[packaging] (Windows) Ability to run "generate_windows_installers.ps1" from any location.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
}
|
||||
},
|
||||
"productName": "Portmaster",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.0", // If removed the version number from Cargo.toml is used.
|
||||
"identifier": "io.safing.portmaster", // this is added as a property to the shortcut on windows (ApplicationUserModelID). Used for notifications.
|
||||
"app": {
|
||||
"withGlobalTauri": true,
|
||||
|
||||
@@ -128,6 +128,9 @@ function Find-And-Copy-File {
|
||||
}
|
||||
# >>>>>>>>>>>>>>>>>>>>>>> End Functions >>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
# Set-Location relative to the script location "../.." (root of the project). So that the script can be run from any location.
|
||||
Set-Location -Path (Join-Path -Path $PSScriptRoot -ChildPath "../..")
|
||||
try {
|
||||
# CONSTANTS
|
||||
$destinationDir = "desktop/tauri/src-tauri"
|
||||
$binaryDir = "$destinationDir/binary" #portmaster\desktop\tauri\src-tauri\binary
|
||||
@@ -156,6 +159,11 @@ if (-not (Test-Path -Path $intelDir)) {
|
||||
New-Item -ItemType Directory -Path $intelDir -ErrorAction Stop > $null
|
||||
}
|
||||
Copy-Item -Force -Path "dist/intel/*" -Destination "$intelDir/" -ErrorAction Stop
|
||||
} catch {
|
||||
Set-Location $originalDirectory
|
||||
Write-Error "[!] Failed! Error: $_"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Set-Location $destinationDir
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user