Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
casperstorm committed Apr 26, 2024
1 parent c0afb71 commit 0d8931e
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions wix/main.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
Codepage='1252'
Version='0.0.{{ VERSION }}'>

<Package Id='*'
<Package
Id='*'
Keywords='Installer'
Description='IRC application written in Rust'
Manufacturer='Squidowl'
Expand All @@ -39,6 +40,7 @@
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='$(var.PlatformProgramFilesFolder)' Name='PFiles'>
<Directory Id='APPLICATIONFOLDER' Name='Halloy'>
<!-- Component for setting PATH environment variable -->
<Component Id='Path' Guid='6112ca47-e424-4454-b780-081463624eee' Win64='$(var.Win64)' KeyPath='yes'>
<Environment
Id='PATH'
Expand All @@ -49,6 +51,8 @@
Action='set'
System='yes'/>
</Component>

<!-- Component for executable -->
<Component Id='binary0' Guid='*' Win64='$(var.Win64)'>
<File
Id='exe0'
Expand All @@ -68,25 +72,31 @@
</Shortcut>
</File>
</Component>

<!-- Component for default program registration -->
<Component Id='RegistryComponentDefaultPrograms' Guid='*'>
<RegistryKey Root='HKLM' Key='Software\Classes\irc' ForceCreateOnInstall='yes' ForceDeleteOnUninstall='yes'>
<RegistryValue Type='string' Value='URL:IRC Protocol' />
<RegistryValue Type='string' Name='URL Protocol' Value='' />

<!-- Default Icon -->
<RegistryKey Key='DefaultIcon' ForceCreateOnInstall='yes' ForceDeleteOnUninstall='yes'>
<RegistryValue Type='string' Value='"[APPLICATIONFOLDER]Halloy.exe",0' />
</RegistryKey>

<!-- Open Command -->
<!-- Command for opening -->
<RegistryKey Key='shell\open\command' ForceCreateOnInstall='yes' ForceDeleteOnUninstall='yes'>
<RegistryValue Type='string' Value='"[APPLICATIONFOLDER]Halloy.exe" "%1"'/>
</RegistryKey>
</RegistryKey>

<!-- Register with Default Programs -->
<RegistryKey Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\App Paths\Halloy.exe' ForceCreateOnInstall='yes' ForceDeleteOnUninstall='yes'>
<!-- Register with App Paths -->
<RegistryKey Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\App Paths\Halloy.exe' ForceCreateOnUninstall='yes' ForceDeleteOnUninstall='yes'>
<RegistryValue Type='string' Value='"[APPLICATIONFOLDER]Halloy.exe"' />
</RegistryKey>

<RegistryKey Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\Uninstall\Halloy' ForceCreateOnInstall='yes' ForceDeleteOnUninstall='yes'>
<!-- Uninstall information -->
<RegistryKey Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\Uninstall\Halloy' ForceCreateOnUninstall='yes' ForceDeleteOnUninstall='yes'>
<RegistryValue Type='string' Name='DisplayName' Value='Halloy' />
<RegistryValue Type='string' Name='UninstallString' Value='"[APPLICATIONFOLDER]Halloy.exe" /uninstall' />
</RegistryKey>
Expand All @@ -101,39 +111,40 @@

<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="c28a5892-ccdf-4870-af36-f87a440b3415">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="Halloy"
Description="IRC application written in Rust"
Target="[binary0]"
WorkingDirectory="APPLICATIONFOLDER"/>
<RemoveFolder Id="CleanUpShortCut" Directory="ApplicationProgramsFolder" On="uninstall"/>
<Shortcut
Id="ApplicationStartMenuShortcut"
Name="Halloy"
Description="IRC application written in Rust"
Target="[binary0]"
WorkingDirectory="APPLICATIONFOLDER"/>

<RemoveFolder
Id="CleanUpShortCut"
Directory="ApplicationProgramsFolder"
On="uninstall"/>

<RegistryValue Root="HKCU" Key="Software\Halloy" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>

<!-- Feature definition -->
<Feature Id='DefaultProgramFeature' Title='Default Programs' Level='1'>
<ComponentRef Id='RegistryComponentDefaultPrograms' />
</Feature>

<!-- Features -->
<Feature
Id='Binaries'
Title='Application'
Description='Install binaries.'
Level='1'
Description='Install binaries.'
ConfigurableDirectory='APPLICATIONFOLDER'
AllowAdvertise='no'
Display='expand'
Absent='disallow'>

<ComponentRef Id='binary0'/>
<ComponentRef Id='Path'/>
<ComponentRef Id='RegistryComponent' />

<ComponentRef Id='RegistryComponentDefaultPrograms' />
<Feature
Id='Shortcut'
Title='Start Menu Shortcut'
Description='Add [ProductName] to the Start Menu'
Level='1'
Absent='allow'>
<ComponentRef Id="ApplicationShortcut" />
Expand Down

0 comments on commit 0d8931e

Please sign in to comment.