mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
fix: enhance Windows build process with installer and ZIP packaging
This commit is contained in:
+46
-10
@@ -28,8 +28,8 @@ jobs:
|
|||||||
artifact_name: SoftwareManager-dev-${{ github.sha }}-linux
|
artifact_name: SoftwareManager-dev-${{ github.sha }}-linux
|
||||||
asset_name: SoftwareManager-dev-${{ github.sha }}-linux
|
asset_name: SoftwareManager-dev-${{ github.sha }}-linux
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
artifact_name: SoftwareManager-dev-${{ github.sha }}-windows.exe
|
artifact_name: SoftwareManager-dev-${{ github.sha }}-windows
|
||||||
asset_name: SoftwareManager-dev-${{ github.sha }}-windows.exe
|
asset_name: SoftwareManager-dev-${{ github.sha }}-windows
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
artifact_name: SoftwareManager-dev-${{ github.sha }}-macos
|
artifact_name: SoftwareManager-dev-${{ github.sha }}-macos
|
||||||
asset_name: SoftwareManager-dev-${{ github.sha }}-macos
|
asset_name: SoftwareManager-dev-${{ github.sha }}-macos
|
||||||
@@ -116,9 +116,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
python -m nuitka \
|
python -m nuitka \
|
||||||
--onefile \
|
--standalone \
|
||||||
--onefile-no-compression \
|
|
||||||
--onefile-tempdir-spec="{CACHE_DIR}/${{ env.APP_NAME }}/${{ env.VERSION }}" \
|
|
||||||
--assume-yes-for-downloads \
|
--assume-yes-for-downloads \
|
||||||
--windows-console-mode=disable \
|
--windows-console-mode=disable \
|
||||||
--windows-icon-from-ico=app_icon.ico \
|
--windows-icon-from-ico=app_icon.ico \
|
||||||
@@ -130,6 +128,7 @@ jobs:
|
|||||||
--include-data-files=build_info.json=src/build_info.json \
|
--include-data-files=build_info.json=src/build_info.json \
|
||||||
--include-data-files=build_info.json=src/core/interface/build_info.json \
|
--include-data-files=build_info.json=src/core/interface/build_info.json \
|
||||||
--output-filename=${{ env.APP_NAME }}.exe \
|
--output-filename=${{ env.APP_NAME }}.exe \
|
||||||
|
--output-dir=nuitka-build \
|
||||||
src/main.py
|
src/main.py
|
||||||
|
|
||||||
- name: Build with PyInstaller (Linux)
|
- name: Build with PyInstaller (Linux)
|
||||||
@@ -173,14 +172,48 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p dist-final
|
mkdir -p dist-final
|
||||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||||
mv ${{ env.APP_NAME }}.exe dist-final/${{ matrix.artifact_name }}
|
mv nuitka-build/main.dist dist-final/${{ env.APP_NAME }}
|
||||||
|
ls -la dist-final/${{ env.APP_NAME }}/
|
||||||
else
|
else
|
||||||
chmod +x dist/${{ env.APP_NAME }}
|
chmod +x dist/${{ env.APP_NAME }}
|
||||||
mv dist/${{ env.APP_NAME }} dist-final/${{ matrix.artifact_name }}
|
mv dist/${{ env.APP_NAME }} dist-final/${{ matrix.artifact_name }}
|
||||||
fi
|
fi
|
||||||
ls -la dist-final/
|
ls -la dist-final/
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Create ZIP (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
Compress-Archive -Path "dist-final/${{ env.APP_NAME }}/*" -DestinationPath "dist-final/${{ matrix.artifact_name }}.zip"
|
||||||
|
Write-Host "Created ZIP: ${{ matrix.artifact_name }}.zip"
|
||||||
|
|
||||||
|
- name: Build Installer (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
SHORT_SHA="${{ github.sha }}"
|
||||||
|
SHORT_SHA="${SHORT_SHA:0:7}"
|
||||||
|
SETUP_NAME="SoftwareManager-dev-${SHORT_SHA}-windows-setup"
|
||||||
|
iscc //DMyAppVersion="${{ env.VERSION }}" \
|
||||||
|
//DMySourceDir="dist-final\\${{ env.APP_NAME }}" \
|
||||||
|
//DMyOutputDir="dist-final" \
|
||||||
|
//DMyOutputFilename="${SETUP_NAME}" \
|
||||||
|
installer.iss
|
||||||
|
echo "SETUP_NAME=${SETUP_NAME}" >> $GITHUB_ENV
|
||||||
|
ls -la dist-final/
|
||||||
|
|
||||||
|
- name: Upload build artifact (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}-build
|
||||||
|
path: |
|
||||||
|
dist-final/${{ matrix.artifact_name }}.zip
|
||||||
|
dist-final/${{ env.SETUP_NAME }}.exe
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
- name: Upload build artifact (Linux/macOS)
|
||||||
|
if: runner.os != 'Windows'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}-build
|
name: ${{ matrix.os }}-build
|
||||||
@@ -204,7 +237,8 @@ jobs:
|
|||||||
mkdir -p release
|
mkdir -p release
|
||||||
SHORT_SHA="${{ needs.build.outputs.short_sha }}"
|
SHORT_SHA="${{ needs.build.outputs.short_sha }}"
|
||||||
cp artifacts/ubuntu-22.04-build/SoftwareManager-dev-*-linux release/SoftwareManager-dev-${SHORT_SHA}-linux
|
cp artifacts/ubuntu-22.04-build/SoftwareManager-dev-*-linux release/SoftwareManager-dev-${SHORT_SHA}-linux
|
||||||
cp artifacts/windows-latest-build/SoftwareManager-dev-*-windows.exe release/SoftwareManager-dev-${SHORT_SHA}-windows.exe
|
cp artifacts/windows-latest-build/SoftwareManager-dev-*-windows.zip release/SoftwareManager-dev-${SHORT_SHA}-windows.zip
|
||||||
|
cp artifacts/windows-latest-build/SoftwareManager-dev-*-windows-setup.exe release/SoftwareManager-dev-${SHORT_SHA}-windows-setup.exe
|
||||||
cp artifacts/macos-latest-build/SoftwareManager-dev-*-macos release/SoftwareManager-dev-${SHORT_SHA}-macos
|
cp artifacts/macos-latest-build/SoftwareManager-dev-*-macos release/SoftwareManager-dev-${SHORT_SHA}-macos
|
||||||
chmod +x release/SoftwareManager-dev-*-linux release/SoftwareManager-dev-*-macos
|
chmod +x release/SoftwareManager-dev-*-linux release/SoftwareManager-dev-*-macos
|
||||||
ls -la release/
|
ls -la release/
|
||||||
@@ -229,7 +263,8 @@ jobs:
|
|||||||
|
|
||||||
### Downloads
|
### Downloads
|
||||||
- Linux: \`SoftwareManager-dev-${SHORT_SHA}-linux\`
|
- Linux: \`SoftwareManager-dev-${SHORT_SHA}-linux\`
|
||||||
- Windows: \`SoftwareManager-dev-${SHORT_SHA}-windows.exe\`
|
- Windows (Portable ZIP): \`SoftwareManager-dev-${SHORT_SHA}-windows.zip\`
|
||||||
|
- Windows (Installer): \`SoftwareManager-dev-${SHORT_SHA}-windows-setup.exe\`
|
||||||
- macOS: \`SoftwareManager-dev-${SHORT_SHA}-macos\`
|
- macOS: \`SoftwareManager-dev-${SHORT_SHA}-macos\`
|
||||||
|
|
||||||
### SHA-256 Checksums
|
### SHA-256 Checksums
|
||||||
@@ -247,7 +282,8 @@ jobs:
|
|||||||
body_path: release_notes.md
|
body_path: release_notes.md
|
||||||
files: |
|
files: |
|
||||||
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-linux
|
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-linux
|
||||||
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-windows.exe
|
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-windows.zip
|
||||||
|
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-windows-setup.exe
|
||||||
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-macos
|
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-macos
|
||||||
release/SHA256SUMS.txt
|
release/SHA256SUMS.txt
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
#define MyAppName "SoftwareManager"
|
||||||
|
#define MyAppPublisher "KeksPirates"
|
||||||
|
#define MyAppURL "https://github.com/KeksPirates/SoftwareManager"
|
||||||
|
#define MyAppExeName "SoftwareManager.exe"
|
||||||
|
|
||||||
|
; Version is passed via /D on the command line: iscc /DMyAppVersion=...
|
||||||
|
#ifndef MyAppVersion
|
||||||
|
#define MyAppVersion "dev"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
; SourceDir is passed via /D on the command line
|
||||||
|
#ifndef MySourceDir
|
||||||
|
#define MySourceDir "dist-final\SoftwareManager"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
; OutputDir is passed via /D on the command line
|
||||||
|
#ifndef MyOutputDir
|
||||||
|
#define MyOutputDir "dist-final"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
; OutputFilename is passed via /D on the command line
|
||||||
|
#ifndef MyOutputFilename
|
||||||
|
#define MyOutputFilename "SoftwareManager-setup"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[Setup]
|
||||||
|
AppId={{8F2E4B6A-1C3D-4E5F-9A7B-0D8E6F2C4A1B}
|
||||||
|
AppName={#MyAppName}
|
||||||
|
AppVersion={#MyAppVersion}
|
||||||
|
AppPublisher={#MyAppPublisher}
|
||||||
|
AppPublisherURL={#MyAppURL}
|
||||||
|
AppSupportURL={#MyAppURL}/issues
|
||||||
|
DefaultDirName={autopf}\{#MyAppName}
|
||||||
|
DefaultGroupName={#MyAppName}
|
||||||
|
AllowNoIcons=yes
|
||||||
|
OutputDir={#MyOutputDir}
|
||||||
|
OutputBaseFilename={#MyOutputFilename}
|
||||||
|
Compression=lzma2
|
||||||
|
SolidCompression=yes
|
||||||
|
WizardStyle=modern
|
||||||
|
PrivilegesRequired=lowest
|
||||||
|
PrivilegesRequiredOverridesAllowed=dialog
|
||||||
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||||
|
ArchitecturesAllowed=x64compatible
|
||||||
|
ArchitecturesInstallIn64BitMode=x64compatible
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "{#MySourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||||
|
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
||||||
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||||
Reference in New Issue
Block a user