39
39
with :
40
40
dotnet-version : ' 10.0.x'
41
41
42
- - name : Setup Inno Setup
43
- uses : nadeemjazmawe/inno-setup-action-cli@v6.0.5
42
+ - name : Install Inno Setup via Chocolatey
43
+ run : |
44
+ choco install innosetup -y
45
+ # Add to path for current session
46
+ $env:PATH += ";C:\Program Files (x86)\Inno Setup 6"
44
47
45
48
- name : Restore dependencies
46
49
run : dotnet restore SemanticCode.sln
@@ -55,17 +58,40 @@ jobs:
55
58
# Remove .pdb files if any exist
56
59
if (Test-Path "*.pdb") { Remove-Item "*.pdb" }
57
60
58
- - name : Prepare installer directory
59
- run : |
60
- # Create dist directory
61
- if (!(Test-Path "dist")) { New-Item -ItemType Directory -Path "dist" }
62
-
63
61
- name : Create Windows installer with Inno Setup
64
- uses : nadeemjazmawe/inno-setup-action-cli@v6.0.5
65
- with :
66
- filepath : setup/setup.iss
67
62
env :
68
63
APP_VERSION : ${{ needs.prepare.outputs.version }}
64
+ run : |
65
+ # Create dist directory
66
+ if (!(Test-Path "dist")) { New-Item -ItemType Directory -Path "dist" }
67
+ # Find iscc.exe and run it
68
+ $isccPath = @(
69
+ "C:\Program Files (x86)\Inno Setup 6\iscc.exe",
70
+ "C:\Program Files\Inno Setup 6\iscc.exe",
71
+ "C:\tools\InnoSetup\iscc.exe"
72
+ ) | Where-Object { Test-Path $_ } | Select-Object -First 1
73
+
74
+ if (-not $isccPath) {
75
+ # Search in chocolatey installation paths
76
+ $chocoPath = Get-ChildItem -Path "C:\ProgramData\chocolatey" -Recurse -Name "iscc.exe" -ErrorAction SilentlyContinue | Select-Object -First 1
77
+ if ($chocoPath) {
78
+ $isccPath = "C:\ProgramData\chocolatey\$chocoPath"
79
+ }
80
+ }
81
+
82
+ if ($isccPath) {
83
+ Write-Host "Using ISCC at: $isccPath"
84
+ & $isccPath setup/setup.iss
85
+ } else {
86
+ Write-Host "ISCC not found in standard locations, trying PATH"
87
+ # Try direct command
88
+ try {
89
+ iscc setup/setup.iss
90
+ } catch {
91
+ Write-Error "Failed to run iscc: $_"
92
+ exit 1
93
+ }
94
+ }
69
95
70
96
- name : Create Windows archive (fallback)
71
97
run : |
0 commit comments