summaryrefslogtreecommitdiffstats
path: root/packaging/wix
diff options
context:
space:
mode:
authorAdib Taraben <theadib@gmail.com>2012-12-04 07:09:46 +0000
committertheAdib <theadib@gmail.com>2012-12-04 07:09:46 +0000
commit4bd71062cce91cc63c2173f2b7a562043051ca40 (patch)
treede7f974acb4d0f863ee92b50787a72afbd9f1114 /packaging/wix
parentwin32 registry. set value for inkscape location (Bug 644185) (diff)
downloadinkscape-4bd71062cce91cc63c2173f2b7a562043051ca40.tar.gz
inkscape-4bd71062cce91cc63c2173f2b7a562043051ca40.zip
wix installer: create msi filename from version sing in src/inkscape.rc, add wix files to dist target
(bzr r11929)
Diffstat (limited to 'packaging/wix')
-rw-r--r--packaging/wix/inkscape.wxs12
-rw-r--r--packaging/wix/install.bat9
-rw-r--r--packaging/wix/version.py29
3 files changed, 42 insertions, 8 deletions
diff --git a/packaging/wix/inkscape.wxs b/packaging/wix/inkscape.wxs
index 6e99c2175..dfe61defd 100644
--- a/packaging/wix/inkscape.wxs
+++ b/packaging/wix/inkscape.wxs
@@ -1,18 +1,20 @@
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
- <Product Name='Inkscape 0.48' Id='81922150-317e-4bb0-a31d-ff1c14f707c5' UpgradeCode='4d5fedaa-84a0-48be-bd2a-08246398361a' Language='1033' Codepage='1252' Version='0.48' Manufacturer='inkscape.org'>
+ <?include version.wxi?>
+
+ <Product Name="$(var.FullProductName)" Id='81922150-317e-4bb0-a31d-ff1c14f707c5' UpgradeCode='4d5fedaa-84a0-48be-bd2a-08246398361a' Language='1033' Codepage='1252' Version='0.48' Manufacturer='inkscape.org'>
<Package Id='*' Keywords='Installer' Description="Inkscape Installer" Comments='inkscape is registered trademark of inkscape.org' Manufacturer='inkscape.org' InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
- <Property Id='DiskPrompt' Value="inkscape 0.48 Installation [1]" />
+ <Property Id='DiskPrompt' Value="inkscape Installation [1]" />
<Property Id='ALLUSERS' Value="2" />
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="37de8ea4-e83a-4e40-8f9c-c6066b78d935">
<Shortcut Id="ApplicationStartMenuShortcut"
- Name="Inkscape 0.48.3"
+ Name="$(var.FullProductName)"
Description="Inkscape Vector Graphics Application"
Target="[INSTALLDIR]inkscape.exe"
WorkingDirectory="INSTALLDIR"/>
@@ -27,7 +29,7 @@
<DirectoryRef Id="DesktopFolder">
<Component Id="DesktopShortcut" Guid="3afc08a7-05a1-40cf-90c2-0d6c042bfc41">
<!-- Shortcut Id="desktopFoobar10" Directory="DesktopFolder" Target="[INSTALLDIR]inkscape.exe" Name="Inkscape 0.48" WorkingDirectory='INSTALLDIR' Icon="file_inkscape_exe" IconIndex="0" / -->
- <Shortcut Id="desktopFoobar10" Directory="DesktopFolder" Target="[INSTALLDIR]inkscape.exe" Name="Inkscape 0.48" WorkingDirectory='INSTALLDIR' />
+ <Shortcut Id="desktopFoobar10" Directory="DesktopFolder" Target="[INSTALLDIR]inkscape.exe" Name="$(var.FullProductName)" WorkingDirectory='INSTALLDIR' />
<RemoveFolder Id="DesktopFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\MyApplicationName" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
@@ -49,7 +51,7 @@
- <Feature Id='Complete' Title='inkscape 0.48' Description='The complete Package' Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR' Absent="disallow" AllowAdvertise='no'>
+ <Feature Id='Complete' Title="$(var.FullProductName)" Description='The complete Package' Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR' Absent="disallow" AllowAdvertise='no'>
<!--
<Feature Id='MainProgram' Level='1' Title='inkscape Application' Description='the inkscape Application' Absent="disallow" AllowAdvertise='no'>
<ComponentRef Id='MainExecutable' />
diff --git a/packaging/wix/install.bat b/packaging/wix/install.bat
index f8bb120f0..1b42a596b 100644
--- a/packaging/wix/install.bat
+++ b/packaging/wix/install.bat
@@ -2,6 +2,9 @@
@echo build files.wxs
python files.py
+@echo create version information
+for /f "tokens=*" %%a in ('python version.py') do (set INKSCAPE_VER=%%a)
+
@echo call wix compiler ...
candle inkscape.wxs -ext WiXUtilExtension
@if NOT %ERRORLEVEL% == 0 goto theend
@@ -10,7 +13,7 @@ candle files.wxs
@if NOT %ERRORLEVEL% == 0 goto theend
@echo call wix linker ...
-light -ext WixUIExtension -ext WiXUtilExtension inkscape.wixobj files.wixobj -o inkscape.msi
+light -ext WixUIExtension -ext WiXUtilExtension inkscape.wixobj files.wixobj -o inkscape-%INKSCAPE_VER%.msi
@if NOT %ERRORLEVEL% == 0 goto theend
@echo the installer is now created
@@ -18,11 +21,11 @@ light -ext WixUIExtension -ext WiXUtilExtension inkscape.wixobj files.wixobj -o
goto theend
@echo install ...
-msiexec /i inkscape.msi /l*v inkscape.log
+msiexec /i inkscape-%INKSCAPE_VER%.msi /l*v inkscape.log
pause the program is now installed. press any key to run uninstaller ...
@echo deinstall ...
-msiexec /x inkscape.msi
+msiexec /x inkscape-%INKSCAPE_VER%.msi
@echo ... finished
diff --git a/packaging/wix/version.py b/packaging/wix/version.py
new file mode 100644
index 000000000..46968c90c
--- /dev/null
+++ b/packaging/wix/version.py
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+
+import os
+
+version = ''
+
+# retrieve the version information from the inkscape.rc file
+# VALUE "ProductVersion", "0.48+devel"
+with open('..\..\src\inkscape.rc', 'r') as rc:
+ for line in rc.readlines():
+ if 'productversion' in line.lower() and 'value' in line.lower():
+ items = line.split()
+ version = items[2]
+ version = version.replace('"', '')
+ version = version.replace("'", "")
+ # version = version.replace("+", "_")
+ print version
+
+
+with open('version.wxi', 'w') as wxi:
+ wxi.write("<?xml version='1.0' encoding='utf-8'?>\n")
+ wxi.write("<!-- do not edit, this file is created by version.py tool any changes will be lost -->\n")
+ wxi.write("<Include>\n")
+ wxi.write("<?define ProductVersion='" + version + "' ?>\n")
+ wxi.write("<?define FullProductName='Inkscape " + version + "' ?>\n")
+ wxi.write("</Include>\n")
+
+
+