@@ -141,3 +141,89 @@ jobs:
141141
142142 - name : Verify Built Artifacts
143143 run : dir 'Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ matrix.configuration }}\MttVDD'
144+
145+ prepare_installer :
146+ runs-on : windows-latest
147+ needs : build
148+ strategy :
149+ matrix :
150+ configuration : [Release]
151+ platform : [x64, ARM64]
152+ steps :
153+ - name : Checkout code
154+ uses : actions/checkout@v3
155+
156+ - name : Download artifacts
157+ uses : actions/download-artifact@v4
158+ with :
159+ name : Built-Driver-${{ matrix.configuration }}-${{ matrix.platform }}
160+ path : SignedArtifacts
161+
162+ - name : Prepare Setup Repository
163+ run : |
164+ git clone https://${{ secrets.READ_REPO }}@github.com/VirtualDisplay/Virtual-Driver-Installer.git inno-setup
165+
166+ - name : Prepare Setup
167+ run : |
168+ mkdir -p inno-setup\input
169+ copy "SignedArtifacts\*" inno-setup\input\
170+ $platform = "${{ matrix.platform }}"
171+
172+ # Display directory contents for debugging
173+ Write-Host "Contents of SignedArtifacts directory:"
174+ dir "SignedArtifacts"
175+
176+ Write-Host "Contents of inno-setup\input directory after copy:"
177+ dir "inno-setup\input"
178+
179+ # Check if Companion directory exists before attempting operations
180+ if (Test-Path "inno-setup\input\Companion") {
181+ Write-Host "Contents of Companion directory:"
182+ dir "inno-setup\input\Companion" -Recurse
183+ } else {
184+ Write-Host "Companion directory not found"
185+ }
186+
187+ # Set release tag
188+ $releaseTag = (Get-Date).ToString('yy.MM.dd')
189+ (Get-Content "inno-setup\Setup.iss") |
190+ ForEach-Object { $_ -replace '1.0.0', $releaseTag } |
191+ Set-Content "inno-setup\Setup.iss"
192+
193+ # ARM64-specific handling
194+ if ($platform -eq 'ARM64') {
195+ (Get-Content "inno-setup\Setup.iss") |
196+ ForEach-Object { $_ -replace 'x64compatible', 'arm64' } |
197+ Set-Content "inno-setup\Setup.iss"
198+
199+ (Get-Content "inno-setup\Setup.iss") |
200+ ForEach-Object { $_ -replace '-x64', '-arm64' } |
201+ Set-Content "inno-setup\Setup.iss"
202+
203+ # VDDSysTray has been replaced with VDDControl
204+ if (Test-Path "inno-setup\input\Companion\VDDControl.exe") {
205+ Remove-Item "inno-setup\input\Companion\VDDControl.exe"
206+ Write-Host "Removed x64 VDDControl.exe"
207+ }
208+
209+ # Check if ARM64 VDDControl exists before copying
210+ if (Test-Path "inno-setup\input\Companion\arm64\VDDControl.exe") {
211+ copy "inno-setup\input\Companion\arm64\VDDControl.exe" "inno-setup\input\Companion\"
212+ Write-Host "Copied ARM64 VDDControl.exe"
213+ } else {
214+ Write-Host "Warning: ARM64 VDDControl.exe not found in expected location"
215+ dir "inno-setup\input\Companion" -Recurse
216+ }
217+ }
218+
219+ - name : Compile Installer
220+ uses : Minionguyjpro/Inno-Setup-Action@v1.2.2
221+ with :
222+ path : inno-setup\Setup.iss
223+ options : /O+
224+
225+ - name : Upload Installer as artifact
226+ uses : actions/upload-artifact@v4
227+ with :
228+ name : Installer-${{ matrix.configuration }}-${{ matrix.platform }}
229+ path : inno-setup\output\*.exe
0 commit comments