Skip to content

Commit f9a4f95

Browse files
authored
fix build script for nsis (#273)
- Should hopefully improve game scanning speed for most people. - App hangs a lot less while loading, keeps it usable while your libraries are being scanned. - Add translations to the app text (AI-generated for now, open to contributions if you find anything weird). Language gets auto-detected, but you can pick it in the menu on the top right. - "Tools" tab is gone in favor of a small dropdown menu. - Refresh button only refreshes local stuff by default, to make it faster. You can optionally also re-download remote databases by clicking the dropdown on the same button. - Fix newly added manual games not showing immediately.
2 parents 475b03a + 82cf61a commit f9a4f95

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

publish.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ function CheckEnvVar {
2020
CheckEnvVar -Var "TAURI_SIGNING_PRIVATE_KEY"
2121
CheckEnvVar -Var "TAURI_SIGNING_PRIVATE_KEY_PASSWORD"
2222

23-
# Folder where the msi bundle will end up.
24-
$msiFolder = "./backend/target/release/bundle/msi"
23+
# Folder where the nsis bundle will end up.
24+
$bundleFolder = "./backend/target/release/bundle/nsis"
2525

26-
# Delete everything in the msi folder first.
27-
Remove-Item $msiFolder -Force -Recurse -ErrorAction Ignore | Out-Null
26+
# Delete everything in the bundle folder first.
27+
Remove-Item $bundleFolder -Force -Recurse -ErrorAction Ignore | Out-Null
2828

2929
npm run build
3030

31-
# Get built msi file name.
32-
$msiName = (Get-ChildItem -Path $msiFolder -Filter "*.msi" | Select-Object -First 1).Name
31+
# Get built bundle file name.
32+
$exeName = (Get-ChildItem -Path $bundleFolder -Filter "*.exe" | Select-Object -First 1).Name
3333

3434
# Extract version number from file name.
35-
$version = [regex]::Match($msiName, '.+_(.+)_.+_.+').Groups[1].Value
35+
$version = [regex]::Match($exeName, '.+_(.+)_.+_.+').Groups[1].Value
3636

3737
# Read signature from sig file. We deleted everything in this folder before,
3838
# so we're pretty sure nothing other the newly created zip.sig should be found.
39-
$signature = Get-Content -Path "$msiFolder/*zip.sig" -Raw
39+
$signature = Get-Content -Path "$bundleFolder/*zip.sig" -Raw
4040

4141
# Read changelog from environment variable.
4242
$changelog = $env:RAI_PAL_CHANGELOG ?? "Someone forgot to include a changelog."
@@ -66,7 +66,7 @@ $updaterJson | Set-Content -Path "$outputFolder/latest.json"
6666
# and remove version numbers frothe download file. This is important
6767
# because we want to be able to use GitHub's magic releases/latest links
6868
# to directly link to the latest release download.
69-
Copy-Item "$msiFolder/*.msi" "$outputFolder/RaiPal.msi" -Force
70-
Copy-Item "$msiFolder/*.zip" "$outputFolder/updater.zip" -Force
69+
Copy-Item "$bundleFolder/*.exe" "$outputFolder/RaiPal.exe" -Force
70+
Copy-Item "$bundleFolder/*.zip" "$outputFolder/updater.zip" -Force
7171

7272
return $version

0 commit comments

Comments
 (0)