[WIP] updater rafactoring, minor improvments
This commit is contained in:
@@ -33,7 +33,9 @@ Update WIX installer template:
|
||||
2. Replace the contents of `templates/main_original.wxs` with the repository version.
|
||||
3. Replace the contents of `templates/main.wsx` and add the fallowing lines at the end of the file, inside the `Product` tag.
|
||||
```xml
|
||||
<!-- Service fragments -->
|
||||
<CustomActionRef Id='InstallPortmasterService' />
|
||||
<CustomActionRef Id='StopPortmasterService' />
|
||||
<CustomActionRef Id='DeletePortmasterService' />
|
||||
<!-- End Service fragments -->
|
||||
```
|
||||
|
||||
@@ -109,8 +109,10 @@
|
||||
},
|
||||
"wix": {
|
||||
"fragmentPaths": [
|
||||
"templates/service.wxs"
|
||||
"templates/service.wxs",
|
||||
"templates/files.wxs"
|
||||
],
|
||||
"componentGroupRefs": ["BinaryAndIntelFiles"],
|
||||
"template": "templates/main.wxs"
|
||||
}
|
||||
},
|
||||
|
||||
36
desktop/tauri/src-tauri/templates/files.wxs
Normal file
36
desktop/tauri/src-tauri/templates/files.wxs
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<DirectoryRef Id="INSTALLDIR">
|
||||
<Directory Id="BinaryDir" Name="binary" />
|
||||
<Directory Id="IntelDir" Name="intel" />
|
||||
</DirectoryRef>
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<Component Id="BinaryFiles" Directory="BinaryDir" 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" />
|
||||
</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" />
|
||||
</Component>
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<ComponentGroup Id="BinaryAndIntelFiles">
|
||||
<ComponentRef Id="BinaryFiles" />
|
||||
<ComponentRef Id="IntelFiles" />
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -341,14 +341,16 @@
|
||||
</InstallExecuteSequence>
|
||||
{{/if}}
|
||||
|
||||
<CustomActionRef Id='InstallPortmasterService' />
|
||||
<CustomActionRef Id='StopPortmasterService' />
|
||||
<CustomActionRef Id='DeletePortmasterService' />
|
||||
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="LaunchApplication" After="InstallFinalize">AUTOLAUNCHAPP AND NOT Installed</Custom>
|
||||
</InstallExecuteSequence>
|
||||
|
||||
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize"/>
|
||||
|
||||
<!-- Service fragments -->
|
||||
<CustomActionRef Id='InstallPortmasterService' />
|
||||
<CustomActionRef Id='StopPortmasterService' />
|
||||
<CustomActionRef Id='DeletePortmasterService' />
|
||||
<!-- End Service fragments -->
|
||||
</Product>
|
||||
</Wix>
|
||||
@@ -3,7 +3,7 @@
|
||||
<Fragment>
|
||||
<CustomAction Id="InstallPortmasterService"
|
||||
Directory="INSTALLDIR"
|
||||
ExeCommand=""[INSTALLDIR]portmaster-start.exe" install core-service --data="[INSTALLDIR]data""
|
||||
ExeCommand="sc.exe create PortmasterCore binPath= "[INSTALLDIR]binary\portmaster-core.exe --data [INSTALLDIR]data""
|
||||
Execute="commit"
|
||||
Return="check"
|
||||
Impersonate="no"
|
||||
|
||||
Reference in New Issue
Block a user