Selaa lähdekoodia

Update BuildWin32.yml

Ruben 6 kuukautta sitten
vanhempi
sitoutus
c1fff5522f
1 muutettua tiedostoa jossa 41 lisäystä ja 14 poistoa
  1. 41 14
      .github/workflows/BuildWin32.yml

+ 41 - 14
.github/workflows/BuildWin32.yml

@@ -42,14 +42,30 @@ jobs:
           path: ${{ github.workspace }}/Build/PicView-v${{steps.get-version.outputs.version}}-win-x64/
           retention-days: 14
 
-      # Step 6 (x64): Compile .ISS to .EXE Installer for x64
+      # Step 6 (x64): Install Inno Setup
+      - name: Install Inno Setup
+        run: |
+          choco install innosetup -y
+          
+      # Step 7 (x64): Compile .ISS to .EXE Installer for x64
       - name: Compile .ISS to .EXE Installer (x64)
-        uses: pwall2222/[email protected]
-        with:
-          path: .\Build\install.iss
-          options: /O+ /DMyAppVersion=${{steps.get-version.outputs.file-version}} /DMyAppOutputDir=${{ github.workspace }}\Build\install /DMyFileSource=${{ github.workspace }}\Build\PicView-v${{steps.get-version.outputs.version}}-win-x64 /DAppIcon=${{ github.workspace }}\src\PicView.Avalonia.Win32\icon.ico /DLicenseFile=${{ github.workspace }}\src\PicView.Core\Licenses\LICENSE.txt /DMyAppOutputName=Setup-PicView-v${{steps.get-version.outputs.version}}-win-x64
+        run: |
+          $output_name = "Setup-PicView-v${{steps.get-version.outputs.version}}-win-x64"
+          $license_file = "${{ github.workspace }}/LICENSE"
+          $app_icon = "${{ github.workspace }}/PicView/Icons/Logo.ico"
+          
+          & 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' `
+            /O+ `
+            /DMyAppVersion=${{steps.get-version.outputs.version}} `
+            /DMyAppOutputDir="${{ github.workspace }}\Build\install" `
+            /DMyFileSource="${{ github.workspace }}\Build\PicView-v${{steps.get-version.outputs.version}}-win-x64" `
+            /DMyAppOutputName="$output_name" `
+            /DLicenseFile="$license_file" `
+            /DAppIcon="$app_icon" `
+            "${{ github.workspace }}\Build\install.iss"
+        shell: pwsh
 
-      # Step 7 (x64): Upload the Inno Setup Installer for x64 as an artifact
+      # Step 8 (x64): Upload the Inno Setup Installer for x64 as an artifact
       - name: Upload Inno Setup Installer (x64)
         uses: actions/upload-artifact@v4
         with:
@@ -57,13 +73,13 @@ jobs:
           path: ${{ github.workspace }}\Build\install\Setup-PicView-v${{steps.get-version.outputs.version}}-win-x64.exe
           retention-days: 14
 
-      # Step 8 (arm64): Publish arm64 version
+      # Step 9 (arm64): Publish arm64 version
       - name: Publish arm64 version
         run: |
           pwsh -File "${{ github.workspace }}\Build\Build Avalonia.Win32.ps1" -Platform "arm64" -outputPath "${{ github.workspace }}\Build\PicView-v${{steps.get-version.outputs.version}}-win-arm64"
         shell: pwsh
 
-      # Step 9 (arm64): Upload the arm64 zip file as an artifact
+      # Step 10 (arm64): Upload the arm64 zip file as an artifact
       - name: Upload the arm64 artifact
         uses: actions/upload-artifact@v4
         with:
@@ -71,14 +87,25 @@ jobs:
           path: ${{ github.workspace }}/Build/PicView-v${{steps.get-version.outputs.version}}-win-arm64/
           retention-days: 14
 
-      # Step 10 (arm64): Compile .ISS to .EXE Installer for arm64
+      # Step 11 (arm64): Compile .ISS to .EXE Installer for arm64
       - name: Compile .ISS to .EXE Installer (arm64)
-        uses: pwall2222/[email protected]
-        with:
-          path: .\Build\install.iss
-          options: /O+ /DMyAppVersion=${{steps.get-version.outputs.file-version}} /DMyAppOutputDir=${{ github.workspace }}\Build\install /DMyFileSource=${{ github.workspace }}\Build\PicView-v${{steps.get-version.outputs.version}}-win-arm64 /DAppIcon=${{ github.workspace }}\src\PicView.Avalonia.Win32\icon.ico /DLicenseFile=${{ github.workspace }}\src\PicView.Core\Licenses\LICENSE.txt /DMyAppOutputName=Setup-PicView-v${{steps.get-version.outputs.version}}-win-arm64
+        run: |
+          $output_name = "Setup-PicView-v${{steps.get-version.outputs.version}}-win-arm64"
+          $license_file = "${{ github.workspace }}/LICENSE"
+          $app_icon = "${{ github.workspace }}/PicView/Icons/Logo.ico"
+          
+          & 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' `
+            /O+ `
+            /DMyAppVersion=${{steps.get-version.outputs.version}} `
+            /DMyAppOutputDir="${{ github.workspace }}\Build\install" `
+            /DMyFileSource="${{ github.workspace }}\Build\PicView-v${{steps.get-version.outputs.version}}-win-arm64" `
+            /DMyAppOutputName="$output_name" `
+            /DLicenseFile="$license_file" `
+            /DAppIcon="$app_icon" `
+            "${{ github.workspace }}\Build\install.iss"
+        shell: pwsh
 
-      # Step 11 (arm64): Upload the Inno Setup Installer for arm64 as an artifact
+      # Step 12 (arm64): Upload the Inno Setup Installer for arm64 as an artifact
       - name: Upload Inno Setup Installer (arm64)
         uses: actions/upload-artifact@v4
         with: