[banshee] windows: Fix "Launch Banshee" checkbox in installer (bgo#641989)
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] windows: Fix "Launch Banshee" checkbox in installer (bgo#641989)
- Date: Sat, 26 Feb 2011 16:19:16 +0000 (UTC)
commit 90d26408c66e0a6c3d58a0fd6c5d1729f13abea2
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Sat Feb 26 17:07:25 2011 +0100
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.
build/windows/InstallerDefinition.wxs | 6 +++---
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 d599ec4..d19e7bf 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 9db87e2..5590d0a 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');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]