diff options
author | Bertrand Lorentz <bertrand.lorentz@gmail.com> | 2011-02-26 17:07:25 +0100 |
---|---|---|
committer | Bertrand Lorentz <bertrand.lorentz@gmail.com> | 2011-02-26 17:18:45 +0100 |
commit | 90d26408c66e0a6c3d58a0fd6c5d1729f13abea2 (patch) | |
tree | 9e2104d5c6f5c59a58ff95989c2b2ac4a94dce4b | |
parent | ef546acb35e8a9b2839f434fa37efac27c84c3b1 (diff) |
windows: Fix "Launch Banshee" checkbox in installer (bgo#641989)
In order to run a file that was just installed, we need to reference it
in the FileKey attribute, using its id.
To ba able to do that, we have to disable the automatic id generation
done by the heat tool, so that the id will now be the file name. We can
only do that for the bin directory, because otherwise we get id
conflicts.
-rw-r--r-- | build/windows/InstallerDefinition.wxs | 6 | ||||
-rw-r--r-- | build/windows/build-installer.js | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/build/windows/InstallerDefinition.wxs b/build/windows/InstallerDefinition.wxs index d599ec41b..d19e7bfd3 100644 --- a/build/windows/InstallerDefinition.wxs +++ b/build/windows/InstallerDefinition.wxs @@ -37,7 +37,7 @@ </Upgrade> <!-- Option to launch when finished with setup --> - <CustomAction Id="StartAppOnExit" Directory="bin" ExeCommand="Nereid.exe" Execute="immediate" Impersonate ="yes" Return="asyncNoWait" /> + <CustomAction Id="StartAppOnExit" FileKey="Nereid.exe" ExeCommand="" Execute="immediate" Impersonate="yes" Return="asyncNoWait" /> <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch Banshee when setup exits" /> <UI> <Publish Dialog="ExitDialog" Control="Finish" Order="1" Event="DoAction" Value="StartAppOnExit">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish> @@ -46,7 +46,7 @@ <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLLOCATION" Name="Banshee" FileSource="$(var.BuildRoot)\bin"> - <Directory Id="bin" Name="bin"> + <Directory Id="bindirectory" Name="bin"> <Component Id="ProductComponent" Guid="55C2C651-CFF2-4607-ADE0-0BB43D5D1086"> <!-- Place Banshee path into registry --> @@ -66,7 +66,7 @@ <Directory Id="ProgramMenuFolder" Name="PMenu"> <Directory Id="ProgramMenuDir" Name='$(var.ProductShortName)'> <Component Id="StartMenuShortcut" Guid="872AA14E-EFCB-4F0B-B3B8-102162257EC1"> - <Shortcut Id="StartMenuShortcut" Name="$(var.ProductShortName)" Icon="Nereid.exe" Target="[INSTALLLOCATION]bin\Nereid.exe" WorkingDirectory="bin"/> + <Shortcut Id="StartMenuShortcut" Name="$(var.ProductShortName)" Icon="Nereid.exe" Target="[INSTALLLOCATION]bin\Nereid.exe" WorkingDirectory="bindirectory"/> <RemoveFolder Id="ProgramMenuSubfolder" On="uninstall"/> <RegistryValue Root="HKCU" Key="Software\$(var.Manufacturer)\$(var.ProductShortName)" Name="installed" Type="integer" Value="1" KeyPath="yes"/> </Component> diff --git a/build/windows/build-installer.js b/build/windows/build-installer.js index 9db87e294..5590d0a0f 100644 --- a/build/windows/build-installer.js +++ b/build/windows/build-installer.js @@ -44,8 +44,13 @@ WScript.Echo ("Setup successfully generated"); function heatDir (dir) { + var params = ' -cg ' + dir + ' -scom -sreg -ag -sfrag -indent 2 -var var.' + dir + 'Dir -dr INSTALLLOCATION '; + if (dir == 'bin') { + // Do not auto-generate ids for files in the bin directory + params += '-suid ' + } // Generate the list of binary files (managed and native .dlls and .pdb and .config files) - run (heat + ' dir ..\\..\\bin\\' + dir + ' -cg ' + dir + ' -scom -sreg -ag -sfrag -indent 2 -var var.' + dir + 'Dir -dr INSTALLLOCATION -out obj\\generated_'+dir+'.wxi'); + run (heat + ' dir ..\\..\\bin\\' + dir + params + ' -out obj\\generated_'+dir+'.wxi'); // Heat has no option to output Include (wxi) files instead of Wix (wxs) ones, so do a little regex regexreplace ('obj\\generated_'+dir+'.wxi', /Wix xmlns/, 'Include xmlns'); |