mirror of
https://github.com/safing/portmaster
synced 2025-09-01 10:09:11 +00:00
[WIP] Fix path of the windows installers
This commit is contained in:
parent
6be7330621
commit
eb74b6cc1d
3 changed files with 28 additions and 54 deletions
|
@ -12,21 +12,21 @@
|
|||
|
||||
<Fragment>
|
||||
<Component Id="BinaryFiles" Directory="INSTALLDIR" Guid="850cdd31-424d-45f5-b8f0-95df950ebd0d">
|
||||
<File Id="BinIndexJson" Source="..\..\..\..\binaries\bin-index.json" />
|
||||
<File Id="PortmasterCoreExe" Source="..\..\..\..\binaries\portmaster-core.exe" />
|
||||
<File Id="PortmasterKextSys" Source="..\..\..\..\binaries\portmaster-kext.sys" />
|
||||
<File Id="PortmasterZip" Source="..\..\..\..\binaries\portmaster.zip" />
|
||||
<File Id="AssetsZip" Source="..\..\..\..\binaries\assets.zip" />
|
||||
<File Id="BinIndexJson" Source="..\..\..\..\binary\bin-index.json" />
|
||||
<File Id="PortmasterCoreExe" Source="..\..\..\..\binary\portmaster-core.exe" />
|
||||
<File Id="PortmasterKextSys" Source="..\..\..\..\binary\portmaster-kext.sys" />
|
||||
<File Id="PortmasterZip" Source="..\..\..\..\binary\portmaster.zip" />
|
||||
<File Id="AssetsZip" Source="..\..\..\..\binary\assets.zip" />
|
||||
</Component>
|
||||
|
||||
<Component Id="IntelFiles" Directory="IntelDir" Guid="0bb439f1-2075-45b0-95bf-78ed3dffeb69">
|
||||
<File Id="IntelIndexJson" Source="..\..\..\..\binaries\intel-index.json" />
|
||||
<File Id="BaseDsdl" Source="..\..\..\..\binaries\base.dsdl" />
|
||||
<File Id="Geoipv4Mmdb" Source="..\..\..\..\binaries\geoipv4.mmdb" />
|
||||
<File Id="Geoipv6Mmdb" Source="..\..\..\..\binaries\geoipv6.mmdb" />
|
||||
<File Id="IndexDsd" Source="..\..\..\..\binaries\index.dsd" />
|
||||
<File Id="IntermediateDsdl" Source="..\..\..\..\binaries\intermediate.dsdl" />
|
||||
<File Id="UrgentDsdl" Source="..\..\..\..\binaries\urgent.dsdl" />
|
||||
<File Id="IntelIndexJson" Source="..\..\..\..\intel\intel-index.json" />
|
||||
<File Id="BaseDsdl" Source="..\..\..\..\intel\base.dsdl" />
|
||||
<File Id="Geoipv4Mmdb" Source="..\..\..\..\intel\geoipv4.mmdb" />
|
||||
<File Id="Geoipv6Mmdb" Source="..\..\..\..\intel\geoipv6.mmdb" />
|
||||
<File Id="IndexDsd" Source="..\..\..\..\intel\index.dsd" />
|
||||
<File Id="IntermediateDsdl" Source="..\..\..\..\intel\intermediate.dsdl" />
|
||||
<File Id="UrgentDsdl" Source="..\..\..\..\intel\urgent.dsdl" />
|
||||
</Component>
|
||||
</Fragment>
|
||||
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
!macro NSIS_HOOK_PREINSTALL
|
||||
; Current working directory is <project-dir>\target\release\nsis\x64
|
||||
; Current working directory is <project-dir>\desktop\tauri\src-tauri\target\release\nsis\x64
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
File "..\..\..\..\binaries\bin-index.json"
|
||||
File "..\..\..\..\binaries\portmaster-core.exe"
|
||||
File "..\..\..\..\binaries\portmaster-kext.sys"
|
||||
File "..\..\..\..\binaries\portmaster.zip"
|
||||
File "..\..\..\..\binaries\assets.zip"
|
||||
File "..\..\..\..\binary\bin-index.json"
|
||||
File "..\..\..\..\binary\portmaster-core.exe"
|
||||
File "..\..\..\..\binary\portmaster-kext.sys"
|
||||
File "..\..\..\..\binary\portmaster.zip"
|
||||
File "..\..\..\..\binary\assets.zip"
|
||||
|
||||
SetOutPath "$COMMONPROGRAMDATA\Portmaster\intel"
|
||||
|
||||
File "..\..\..\..\binaries\intel-index.json"
|
||||
File "..\..\..\..\binaries\base.dsdl"
|
||||
File "..\..\..\..\binaries\geoipv4.mmdb"
|
||||
File "..\..\..\..\binaries\geoipv6.mmdb"
|
||||
File "..\..\..\..\binaries\index.dsd"
|
||||
File "..\..\..\..\binaries\intermediate.dsdl"
|
||||
File "..\..\..\..\binaries\urgent.dsdl"
|
||||
File "..\..\..\..\intel\intel-index.json"
|
||||
File "..\..\..\..\intel\base.dsdl"
|
||||
File "..\..\..\..\intel\geoipv4.mmdb"
|
||||
File "..\..\..\..\intel\geoipv6.mmdb"
|
||||
File "..\..\..\..\intel\index.dsd"
|
||||
File "..\..\..\..\intel\intermediate.dsdl"
|
||||
File "..\..\..\..\intel\urgent.dsdl"
|
||||
|
||||
; restire previous state
|
||||
SetOutPath "$INSTDIR"
|
||||
|
@ -25,15 +25,11 @@
|
|||
!macroend
|
||||
|
||||
!macro NSIS_HOOK_POSTINSTALL
|
||||
ExecWait 'sc.exe create PortmasterCore binPath= "$INSTDIR\portmaster-core.exe" --data="$COMMONPROGRAMDATA\Portmaster\data"' $0
|
||||
IntCmp $0 0 +2
|
||||
MessageBox MB_OK "Failed to create PortmasterCore service."
|
||||
ExecWait 'sc.exe create PortmasterCore binPath= "$INSTDIR\portmaster-core.exe" --data="$COMMONPROGRAMDATA\Portmaster\data"'
|
||||
!macroend
|
||||
|
||||
!macro NSIS_HOOK_PREUNINSTALL
|
||||
ExecWait 'sc.exe stop PortmasterCore' $0
|
||||
; Ignore errors if the service is not running
|
||||
ExecWait 'sc.exe delete PortmasterCore' $0
|
||||
; Ignore errors if the service does not exist
|
||||
ExecWait 'sc.exe stop PortmasterCore'
|
||||
ExecWait 'sc.exe delete PortmasterCore'
|
||||
!macroend
|
||||
|
||||
|
|
|
@ -72,25 +72,3 @@ Copy-Item -Path ".\target\release\bundle\nsis\*" -Destination $installerDist
|
|||
# Restore the original directory
|
||||
Set-Location $originalDirectory
|
||||
|
||||
|
||||
# FIXME: remove
|
||||
function Show-Tree {
|
||||
param (
|
||||
[string]$Path = ".",
|
||||
[int]$Indent = 0
|
||||
)
|
||||
|
||||
$items = Get-ChildItem -Path $Path
|
||||
|
||||
foreach ($item in $items) {
|
||||
Write-Host (" " * $Indent) -NoNewline
|
||||
Write-Host "+-- " -NoNewline
|
||||
Write-Host $item.Name
|
||||
|
||||
if ($item.PSIsContainer) {
|
||||
Show-Tree -Path $item.FullName -Indent ($Indent + 4)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Show-Tree 'C:\Program Files (x86)\Windows Kits\10\Include'
|
||||
|
|
Loading…
Add table
Reference in a new issue