[banshee] windows: Fix issue with installer



commit 92761bf6e9e0c04789e7529a848e6d16d4ef49c5
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Wed Apr 6 10:42:25 2011 -0700

    windows: Fix issue with installer
    
    Too many files were in a given 'Feature' which sometimes causes 2908
    errors.  Split locale into its own 'Feature' -- not a user-visible change,
    but should help with this issue.

 build/windows/InstallerDefinition.wxs |   21 ++++++++++++++++++---
 build/windows/build-installer.js      |   21 ++++++++++++++++-----
 2 files changed, 34 insertions(+), 8 deletions(-)
---
diff --git a/build/windows/InstallerDefinition.wxs b/build/windows/InstallerDefinition.wxs
index c129c5d..53578bc 100644
--- a/build/windows/InstallerDefinition.wxs
+++ b/build/windows/InstallerDefinition.wxs
@@ -14,7 +14,10 @@
 <?define binDir= "..\..\bin\bin" ?>
 <?define etcDir= "..\..\bin\etc" ?>
 <?define libDir= "..\..\bin\lib" ?>
-<?define shareDir= "..\..\bin\share" ?>
+<?define share_bansheeDir= "..\..\bin\share\banshee" ?>
+<?define share_themesDir= "..\..\bin\share\themes" ?>
+<?define share_iconsDir= "..\..\bin\share\icons" ?>
+<?define share_localeDir= "..\..\bin\share\locale" ?>
 
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
   <Product Id="*" Name="$(var.ProductShortName) $(var.ProductVersionText)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
@@ -59,6 +62,8 @@
 
             </Component>
           </Directory>
+          <Directory Id="SHARELOCATION" Name="share">
+	  </Directory>
         </Directory>
       </Directory>
 
@@ -89,7 +94,14 @@
       <ComponentGroupRef Id="bin" />
       <ComponentGroupRef Id="etc" />
       <ComponentGroupRef Id="lib" />
-      <ComponentGroupRef Id="share" />
+
+      <ComponentGroupRef Id="share\banshee" />
+      <ComponentGroupRef Id="share\icons" />
+      <ComponentGroupRef Id="share\themes" />
+    </Feature>
+
+    <Feature Id="TranslationsFeature" Title="Banshee Translations" Level="1">
+      <ComponentGroupRef Id="share\locale" />
     </Feature>
 
     <!-- Sequences -->
@@ -119,5 +131,8 @@
   <?include obj\generated_bin.wxi ?>
   <?include obj\generated_etc.wxi ?>
   <?include obj\generated_lib.wxi ?>
-  <?include obj\generated_share.wxi ?>
+  <?include obj\generated_share_banshee.wxi ?>
+  <?include obj\generated_share_icons.wxi ?>
+  <?include obj\generated_share_themes.wxi ?>
+  <?include obj\generated_share_locale.wxi ?>
 </Wix>
diff --git a/build/windows/build-installer.js b/build/windows/build-installer.js
index fd581d6..f958331 100644
--- a/build/windows/build-installer.js
+++ b/build/windows/build-installer.js
@@ -30,7 +30,10 @@ if (fs.FolderExists (bin + "\\bin\\addin-db-001")) fs.DeleteFolder (bin + "\\bin
 heatDir ("bin");
 heatDir ("etc");
 heatDir ("lib");
-heatDir ("share");
+heatDir ("share\\banshee");
+heatDir ("share\\icons");
+heatDir ("share\\locale");
+heatDir ("share\\themes");
 
 // Create the installer, will be outputted to Banshee-1.9.6.msi in build/windows/
 build ("Installer.wixproj")
@@ -38,17 +41,25 @@ WScript.Echo ("Setup successfully generated");
 
 function heatDir (dir)
 {
-  var params = ' -cg ' + dir + ' -scom -sreg -ag -sfrag -indent 2 -var var.' + dir + 'Dir -dr INSTALLLOCATION ';
+  var wxi_name = dir.replace (/\\/, '_');
+  var params = ' -cg ' + dir + ' -scom -sreg -ag -sfrag -indent 2 -var var.' + wxi_name + 'Dir';
+ 
+  if (wxi_name.indexOf ("share") == 0) {
+	  params += ' -dr SHARELOCATION ';
+  } else {
+	  params += ' -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 + params + ' -out obj\\generated_'+dir+'.wxi');
+  run (heat + ' dir ..\\..\\bin\\' + dir + params + ' -out obj\\generated_'+wxi_name+'.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');
-  regexreplace ('obj\\generated_'+dir+'.wxi', /Wix>/, 'Include>');
+  regexreplace ('obj\\generated_'+wxi_name+'.wxi', /Wix xmlns/, 'Include xmlns');
+  regexreplace ('obj\\generated_'+wxi_name+'.wxi', /Wix>/, 'Include>');
 }
 
 function run (cmd)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]