feat: update to version 0.1.3 with new CLI flags, logging enhancements, and Windows MSI installer
This commit is contained in:
114
installer/Product.wxs
Normal file
114
installer/Product.wxs
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Product
|
||||
Id="*"
|
||||
Name="Thor Ingest Agent"
|
||||
Language="1033"
|
||||
Version="0.1.3"
|
||||
Manufacturer="Seismo"
|
||||
UpgradeCode="0E2EFA7E-2A75-4A2E-A5D5-9E9C6B99C0E1">
|
||||
|
||||
<Package InstallerVersion="500" Compressed="yes" InstallScope="perMachine" Platform="x64" />
|
||||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
||||
<MediaTemplate />
|
||||
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
||||
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="ProgramFiles64Folder">
|
||||
<Directory Id="INSTALLFOLDER" Name="ThorIngest">
|
||||
<Component Id="MainExecutable" Guid="9A9F3E64-93A0-4D9F-8D2E-1C4B8B9E5E7A">
|
||||
<File Id="ThorIngestExe" Source="..\dist\thor-ingest-agent.exe" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="ConfigExample" Guid="A6B1877F-3C8C-4CE1-9C30-70C8E2D6CB8F">
|
||||
<File Id="ConfigExampleFile" Source="..\config.example.json" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="NssmBinary" Guid="F9E2D403-4F1C-4E55-8A34-0D7CBA74F2BC">
|
||||
<File Id="NssmExe" Source="tools\nssm.exe" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="CommonAppDataFolder">
|
||||
<Directory Id="ProgramDataThorIngest" Name="ThorIngest">
|
||||
<Directory Id="ProgramDataLogs" Name="logs" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<Feature Id="MainFeature" Title="Thor Ingest Agent" Level="1">
|
||||
<ComponentRef Id="MainExecutable" />
|
||||
<ComponentRef Id="ConfigExample" />
|
||||
<ComponentRef Id="NssmBinary" />
|
||||
</Feature>
|
||||
|
||||
<CustomAction
|
||||
Id="CreateProgramDataDirs"
|
||||
Directory="TARGETDIR"
|
||||
ExeCommand="cmd.exe /c if not exist "[CommonAppDataFolder]ThorIngest\" mkdir "[CommonAppDataFolder]ThorIngest\" & if not exist "[CommonAppDataFolder]ThorIngest\logs\" mkdir "[CommonAppDataFolder]ThorIngest\logs\""
|
||||
Execute="deferred"
|
||||
Impersonate="no"
|
||||
Return="check" />
|
||||
|
||||
<CustomAction
|
||||
Id="CopyDefaultConfig"
|
||||
Directory="TARGETDIR"
|
||||
ExeCommand="cmd.exe /c if not exist "[CommonAppDataFolder]ThorIngest\config.json" copy "[INSTALLFOLDER]config.example.json" "[CommonAppDataFolder]ThorIngest\config.json""
|
||||
Execute="deferred"
|
||||
Impersonate="no"
|
||||
Return="check" />
|
||||
|
||||
<CustomAction
|
||||
Id="InstallService"
|
||||
Directory="INSTALLFOLDER"
|
||||
ExeCommand=""[INSTALLFOLDER]nssm.exe" install ThorIngest "[INSTALLFOLDER]thor-ingest-agent.exe" --config "[CommonAppDataFolder]ThorIngest\config.json" --log-dir "[CommonAppDataFolder]ThorIngest\logs""
|
||||
Execute="deferred"
|
||||
Impersonate="no"
|
||||
Return="check" />
|
||||
|
||||
<CustomAction
|
||||
Id="ConfigureServiceStart"
|
||||
Directory="INSTALLFOLDER"
|
||||
ExeCommand=""[INSTALLFOLDER]nssm.exe" set ThorIngest Start SERVICE_AUTO_START"
|
||||
Execute="deferred"
|
||||
Impersonate="no"
|
||||
Return="check" />
|
||||
|
||||
<CustomAction
|
||||
Id="ConfigureServiceRestart"
|
||||
Directory="INSTALLFOLDER"
|
||||
ExeCommand=""[INSTALLFOLDER]nssm.exe" set ThorIngest AppExit Default Restart"
|
||||
Execute="deferred"
|
||||
Impersonate="no"
|
||||
Return="check" />
|
||||
|
||||
<CustomAction
|
||||
Id="StartService"
|
||||
Directory="INSTALLFOLDER"
|
||||
ExeCommand=""[INSTALLFOLDER]nssm.exe" start ThorIngest"
|
||||
Execute="deferred"
|
||||
Impersonate="no"
|
||||
Return="check" />
|
||||
|
||||
<CustomAction
|
||||
Id="RemoveService"
|
||||
Directory="INSTALLFOLDER"
|
||||
ExeCommand=""[INSTALLFOLDER]nssm.exe" remove ThorIngest confirm"
|
||||
Execute="deferred"
|
||||
Impersonate="no"
|
||||
Return="check" />
|
||||
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="CreateProgramDataDirs" After="InstallFiles">NOT Installed</Custom>
|
||||
<Custom Action="CopyDefaultConfig" After="CreateProgramDataDirs">NOT Installed</Custom>
|
||||
<Custom Action="InstallService" After="CopyDefaultConfig">NOT Installed</Custom>
|
||||
<Custom Action="ConfigureServiceStart" After="InstallService">NOT Installed</Custom>
|
||||
<Custom Action="ConfigureServiceRestart" After="ConfigureServiceStart">NOT Installed</Custom>
|
||||
<Custom Action="StartService" After="ConfigureServiceRestart">NOT Installed</Custom>
|
||||
<Custom Action="RemoveService" Before="RemoveFiles">REMOVE="ALL"</Custom>
|
||||
</InstallExecuteSequence>
|
||||
|
||||
<UIRef Id="WixUI_Minimal" />
|
||||
<UIRef Id="WixUI_ErrorProgressText" />
|
||||
|
||||
</Product>
|
||||
</Wix>
|
||||
Reference in New Issue
Block a user