Skip to content

Commit

Permalink
Update installer workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Sep 27, 2024
1 parent b2531b8 commit 651bec8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/WinX64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
# Step 4: Define paths
- name: Define paths
id: paths
shell: pwsh
run: |
$outputDir = (Resolve-Path "PicView-v.${{steps.get-version.outputs.file-version}}-win-x64").Path
$outputDir = "PicView-v.${{steps.get-version.outputs.file-version}}-win-x64"
echo "##[set-output name=output_dir;]$outputDir"
shell: pwsh

# Step 5: Run dotnet publish
- name: Publish the project
Expand Down Expand Up @@ -83,21 +83,27 @@ jobs:
path: ${{ steps.paths.outputs.output_dir }}
retention-days: 14

# Step 9: Generate the Inno Setup Installer
- name: Generate Inno Setup variables
# Step 9: Generate the Inno Setup Installer and copy files to the build directory
- name: Generate Inno Setup variables and copy files to Build directory
run: |
# Create output directory for installer
New-Item -Path ${{ steps.paths.outputs.output_dir }}\install -ItemType Directory -Force
shell: pwsh
# Create the directory inside 'Build'
$buildDir = Join-Path -Path "${{ github.workspace }}" -ChildPath "Build\install"
if (Test-Path $buildDir) {
Remove-Item -Path $buildDir -Recurse -Force
}
New-Item -Path $buildDir -ItemType Directory | Out-Null
# Copy the portable build output to this new directory
$outputPath = "${{ steps.paths.outputs.output_dir }}"
Copy-Item -Path "$outputPath\*" -Destination $buildDir -Recurse -Force
shell: pwsh
# Step 10: Compile .ISS to .EXE Installer
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/[email protected]
with:
path: .\Build\install.iss
options: /O+ /DMyAppVersion=${{steps.get-version.outputs.file-version}} /DMyAppOutputDir=${{ steps.paths.outputs.output_dir }} /DAppIcon=${{ github.workspace }}\src\PicView.Avalonia.Win32\icon.ico /DLicenseFile=${{ github.workspace }}\src\PicView.Core\Licenses\LICENSE.txt
options: /O+ /DMyAppVersion=${{steps.get-version.outputs.file-version}} /DMyAppOutputDir=${{ github.workspace }}\Build\install /DMyFileSource=${{ github.workspace }}\Build\install /DAppIcon=${{ github.workspace }}\src\PicView.Avalonia.Win32\icon.ico /DLicenseFile=${{ github.workspace }}\src\PicView.Core\Licenses\LICENSE.txt

# Step 11: Upload the Inno Setup Installer as an artifact
- name: Upload Inno Setup Installer
Expand Down
12 changes: 11 additions & 1 deletion Build/install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,23 @@ VersionInfoVersion={#MyAppVersion}
SetupWindowTitle=Setup - {#MyAppName} v{#MyAppVersion}
SetupAppTitle=Setup - {#MyAppName} v{#MyAppVersion}

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "de"; MessagesFile: "compiler:Languages\German.isl"
Name: "da"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "ko"; MessagesFile: "compiler:Languages\Korean.isl"
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "openwith"; Description: "Open with {#MyAppName}"; GroupDescription: "Context menu:"; Flags: unchecked
Name: "browsefolder"; Description: "Browse folder with {#MyAppName}"; GroupDescription: "Context menu:"; Flags: unchecked

[Files]
Source: "{#MyAppOutputDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MyFileSource}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{autoprograms}\PicView"; Filename: "{app}\PicView.exe"
Expand Down

0 comments on commit 651bec8

Please sign in to comment.