[banshee] windows: First pass at a .msi project/creator
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] windows: First pass at a .msi project/creator
- Date: Thu, 27 Jan 2011 03:09:34 +0000 (UTC)
commit 62fb56012c04e914201cb3bae5f01060a24d38f0
Author: Gabriel Burt <gabriel burt gmail com>
Date: Wed Jan 26 20:55:34 2011 -0600
windows: First pass at a .msi project/creator
build/windows/Bitmaps/bannrbmp.bmp | Bin 0 -> 114430 bytes
build/windows/Bitmaps/banshee.ico | Bin 0 -> 167206 bytes
build/windows/Bitmaps/dlgbmp.bmp | Bin 0 -> 615318 bytes
build/windows/Product.wxs | 99 ++++++++++++++++++++++++++++++++++++
build/windows/WixSetup.sln | 20 +++++++
build/windows/WixSetup.wixproj | 54 +++++++++++++++++++
build/windows/build.js | 72 ++++++++++++++++++++++++++
build/windows/license.rtf | Bin 0 -> 1254 bytes
8 files changed, 245 insertions(+), 0 deletions(-)
---
diff --git a/build/windows/Bitmaps/bannrbmp.bmp b/build/windows/Bitmaps/bannrbmp.bmp
new file mode 100644
index 0000000..1a43149
Binary files /dev/null and b/build/windows/Bitmaps/bannrbmp.bmp differ
diff --git a/build/windows/Bitmaps/banshee.ico b/build/windows/Bitmaps/banshee.ico
new file mode 100644
index 0000000..78305f9
Binary files /dev/null and b/build/windows/Bitmaps/banshee.ico differ
diff --git a/build/windows/Bitmaps/dlgbmp.bmp b/build/windows/Bitmaps/dlgbmp.bmp
new file mode 100644
index 0000000..87fb246
Binary files /dev/null and b/build/windows/Bitmaps/dlgbmp.bmp differ
diff --git a/build/windows/Product.wxs b/build/windows/Product.wxs
new file mode 100644
index 0000000..f62adf8
--- /dev/null
+++ b/build/windows/Product.wxs
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?define ProductShortName = "Banshee" ?>
+<?define ProductVersion = "1.9.3" ?>
+<?define ProductVersionText = "1.9.3 - PRE-ALPHA" ?>
+<?define Manufacturer = "Novell" ?>
+<?define UpgradeCode = "9134F74C-E7E3-471A-9833-F86FB45CD38E" ?>
+
+<?define BuildRoot= "..\.." ?>
+<?define BinDir= "..\..\bin" ?>
+<?define ShareDir= "..\..\bin\share" ?>
+
+<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)">
+ <Package Id="*" Compressed="yes" Description="$(var.ProductShortName) $(var.ProductVersionText) ($(var.ProductVersion))" InstallerVersion="200" ShortNames="no" Manufacturer="$(var.Manufacturer)" />
+ <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
+
+ <!-- Ensure GTK# 2.12.9+ is installed -->
+ <Property Id="GTKSHARPVERSION">
+ <RegistrySearch Id="gsversion" Root="HKLM" Key="SOFTWARE\Novell\GtkSharp\Version" Type="raw" />
+ </Property>
+ <Condition Message="Gtk# version 2.12.9 or greater must be installed.">
+ <![CDATA[GTKSHARPVERSION >= "2.12" OR REMOVE ~= "ALL"]]>
+ </Condition>
+
+ <!-- Ensure .Net 3.5 is installed -->
+ <PropertyRef Id="NETFRAMEWORK35" />
+ <Condition Message="This setup requires the .NET Framework 3.5 to be installed.">
+ Installed OR NETFRAMEWORK35
+ </Condition>
+
+ <!-- Get the GTK# install directory -->
+ <Property Id="GTKSHARPPATH">
+ <RegistrySearch Id="gspath" Root="HKLM" Key="SOFTWARE\Novell\GtkSharp\InstallFolder" Type="raw" />
+ </Property>
+
+ <!-- Major upgrade -->
+ <Upgrade Id="$(var.UpgradeCode)">
+ <UpgradeVersion Minimum="$(var.ProductVersion)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" />
+ <UpgradeVersion Minimum="0.0.0" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED" />
+ </Upgrade>
+
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="ProgramFilesFolder">
+ <Directory Id="INSTALLLOCATION" Name="Banshee" FileSource="$(var.BuildRoot)\bin">
+ <Component Id="ProductComponent" Guid="38703ED9-C1D1-4DC5-834B-31B8059BF7DF">
+ <File Name="Nereid.exe">
+ <Shortcut Id="banshee_shortcut" Directory="ProgramMenuDir" Name="$(var.ProductShortName)" WorkingDirectory="bin" Icon="Nereid.exe" IconIndex="0" Advertise="yes" />
+ </File>
+
+ <!-- Program Menu Shortcut -->
+ <RemoveFolder Id='ProgramMenuDir' Directory="ProgramMenuDir" On='uninstall' />
+
+ <!-- GTK# path -->
+ <RegistryValue Root='HKLM' Key='SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Nereid.exe' Type='string' Name='Path' Value='[GTKSHARPPATH]\bin' />
+
+ <!-- Place Banshee path into registry -->
+ <RegistryValue Root='HKLM' Key='SOFTWARE\Novell\Banshee' Type='string' Name='Version' Value='$(var.ProductVersion)' />
+ <RegistryValue Root='HKLM' Key='SOFTWARE\Novell\Banshee' Type='string' Name='Path' Value='[INSTALLLOCATION]' />
+
+ </Component>
+ </Directory>
+ </Directory>
+
+ <Directory Id="ProgramMenuFolder" Name="PMenu">
+ <Directory Id="ProgramMenuDir" Name='$(var.ProductShortName)' />
+ </Directory>
+ </Directory>
+
+ <Feature Id="ProductFeature" Title="Banshee" Level="1">
+ <ComponentRef Id="ProductComponent" />
+ <ComponentGroupRef Id="binaries" />
+ <ComponentGroupRef Id="share" />
+ </Feature>
+
+ <!-- Sequences -->
+ <InstallExecuteSequence>
+ <RemoveExistingProducts After="InstallValidate" />
+ </InstallExecuteSequence>
+
+ <InstallUISequence>
+ </InstallUISequence>
+
+ <!-- This enables the license screen and where to install screen -->
+ <Property Id="WIXUI_INSTALLDIR">INSTALLLOCATION</Property>
+ <UIRef Id="WixUI_InstallDir"/>
+
+ <!-- Specify the license to display and graphics to use in our GUI -->
+ <WixVariable Id="WixUILicenseRtf" Value="license.rtf" />
+ <WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" />
+ <WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" />
+
+ <!-- This is for the icon that is shown in the Add/Remove Programs dialog and menu shortcut -->
+ <Icon Id="Nereid.exe" SourceFile="Bitmaps\Banshee.ico" />
+ <Property Id="ARPPRODUCTICON" Value="Nereid.exe" />
+ </Product>
+
+ <?include share.wxi ?>
+ <?include binaries.wxi ?>
+</Wix>
diff --git a/build/windows/WixSetup.sln b/build/windows/WixSetup.sln
new file mode 100644
index 0000000..c40faa1
--- /dev/null
+++ b/build/windows/WixSetup.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "WixSetup", "WixSetup.wixproj", "{33F58FFC-956E-4079-B27A-160A57FFEA7A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {33F58FFC-956E-4079-B27A-160A57FFEA7A}.Debug|x86.ActiveCfg = Debug|x86
+ {33F58FFC-956E-4079-B27A-160A57FFEA7A}.Debug|x86.Build.0 = Debug|x86
+ {33F58FFC-956E-4079-B27A-160A57FFEA7A}.Release|x86.ActiveCfg = Release|x86
+ {33F58FFC-956E-4079-B27A-160A57FFEA7A}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/build/windows/WixSetup.wixproj b/build/windows/WixSetup.wixproj
new file mode 100644
index 0000000..b00ff28
--- /dev/null
+++ b/build/windows/WixSetup.wixproj
@@ -0,0 +1,54 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>3.0</ProductVersion>
+ <ProjectGuid>{33f58ffc-956e-4079-b27a-160a57ffea7a}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>Banshee-1.9.3</OutputName>
+ <OutputType>Package</OutputType>
+ <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\$(Configuration)\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>Debug</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\$(Configuration)\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Product.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="binaries.wxi" />
+ <None Include="share.wxi" />
+ </ItemGroup>
+ <ItemGroup>
+ <WixExtension Include="WixNetFxExtension">
+ <HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
+ </WixExtension>
+ <WixExtension Include="WixUIExtension">
+ <HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
+ </WixExtension>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Bitmaps\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Bitmaps\bannrbmp.bmp" />
+ <Content Include="Bitmaps\dlgbmp.bmp" />
+ <Content Include="Bitmaps\MonoDevelop.ico" />
+ <Content Include="license.rtf" />
+ </ItemGroup>
+ <Import Project="$(WixTargetsPath)" />
+ <!--
+ To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Wix.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/build/windows/build.js b/build/windows/build.js
new file mode 100644
index 0000000..e3eef2a
--- /dev/null
+++ b/build/windows/build.js
@@ -0,0 +1,72 @@
+// This script was started by copying MonoDevelop's, available at
+// https://github.com/mono/monodevelop/tree/master/setup/WixSetup
+
+var version = "1.9.3";
+
+var sh = new ActiveXObject("WScript.Shell");
+var fs = new ActiveXObject("Scripting.FileSystemObject");
+
+// Copy binaries into a new folder so we can generate a file list w/o .git/* being included
+if (fs.FolderExists ("dlls")) fs.DeleteFolder ("dlls");
+fs.CreateFolder ("dlls");
+run ('xcopy /D ..\\..\\bin\\*.dll dlls\\');
+run ('xcopy /D ..\\..\\bin\\*.config dlls\\');
+run ('xcopy /D ..\\..\\bin\\*.pdb dlls\\');
+run ('xcopy /D ..\\..\\bin\\*.exe dlls\\');
+fs.CreateFolder ("dlls\\gst-plugins");
+run ('xcopy /D ..\\..\\bin\\gst-plugins\\* dlls\\gst-plugins\\');
+
+// We already mention Nereid.exe specifically in Product.wxs so we can make a shortcut based off it
+if (fs.FileExists ("dlls\\Nereid.exe")) fs.DeleteFile ("dlls\\Nereid.exe");
+
+// Generate the list of binary files (managed and native .dlls and .pdb and .config files)
+run ('heat dir dlls -cg binaries -srd -scom -sreg -ag -sfrag -suid -indent 2 -var var.BinDir -dr INSTALLLOCATION -out binaries.wxi');
+
+// Heat has no option to output Include (wxi) files instead of Wix (wxs) ones, so do a little regex
+regexreplace ('binaries.wxi', /Wix xmlns/, 'Include xmlns');
+regexreplace ('binaries.wxi', /Wix>/, 'Include>');
+
+// Generate the list of files in share/ (icons, i18n, and GStreamer audio-profiles)
+run ('heat dir ..\\..\\bin\\share -cg share -scom -ag -sfrag -suid -indent 2 -var var.ShareDir -dr INSTALLLOCATION -out share.wxi');
+regexreplace ('share.wxi', /Wix xmlns/, 'Include xmlns');
+regexreplace ('share.wxi', /Wix>/, 'Include>');
+
+// Create the installer, will be outputted to bin/Debug/
+build ("WixSetup.sln")
+
+WScript.Echo ("Setup successfully generated");
+
+function run (cmd)
+{
+ if (sh.run (cmd, 5, true) != 0) {
+ WScript.Echo ("Failed to run cmd:\n" + cmd);
+ WScript.Quit (1);
+ }
+}
+
+function build (file)
+{
+ if (sh.run ("C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe " + file, 5, true) != 0) {
+ WScript.Echo ("Build failed");
+ WScript.Quit (1);
+ }
+}
+
+function regexreplace (file, regex, replacement)
+{
+ var f = fs.OpenTextFile (file, 1);
+ var content = f.ReadAll ();
+ f.Close ();
+ content = content.replace (regex, replacement);
+ f = fs.CreateTextFile (file, true);
+ f.Write (content);
+ f.Close ();
+}
+
+function format (num, len)
+{
+ var res = num.toString ();
+ while (res.length < len)
+ res = "0" + res;
+ return res;
+}
diff --git a/build/windows/license.rtf b/build/windows/license.rtf
new file mode 100644
index 0000000..d85e225
Binary files /dev/null and b/build/windows/license.rtf differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]