summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-07-22 02:23:45 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-07-22 02:57:27 +0000
commitabb25a2df53c0c8053465921a0c660fcec4646d9 (patch)
tree0d25de14739c4d020aaa95e255584068a6d9cb1a /packaging
parentNSIS: update for MSYS2 builds (diff)
downloadinkscape-abb25a2df53c0c8053465921a0c660fcec4646d9.tar.gz
inkscape-abb25a2df53c0c8053465921a0c660fcec4646d9.zip
wix: Update for cmake / MSYS2 build
(cherry picked from commit 16cb9a13a88db072389f5f4ba0d6a7997cee0123)
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/wix/files.py5
-rw-r--r--packaging/wix/inkscape.wxs2
-rwxr-xr-xpackaging/wix/version.py54
3 files changed, 33 insertions, 28 deletions
diff --git a/packaging/wix/files.py b/packaging/wix/files.py
index 9bf5f393e..70e5f29c0 100755
--- a/packaging/wix/files.py
+++ b/packaging/wix/files.py
@@ -119,7 +119,8 @@ with open('files.wxs', 'w', encoding='utf-8') as wxs:
wxs.write(indent(2) + "</Directory>\n")
# Python
- ComponentGroup("Python", 'inkscape\\python\\', 2)
+ ComponentGroup("Python", ['inkscape\\python\\','inkscape\\lib\\python2.7\\',
+ 'inkscape\\libpython', 'inkscape\\python'], 2)
# translations and localized content
for lang_code in sorted(locales):
ComponentGroup("Translation_" + valid_id(lang_code), ['\\' + lang_code + '\\',
@@ -128,7 +129,7 @@ with open('files.wxs', 'w', encoding='utf-8') as wxs:
ComponentGroup("Extensions", 'inkscape\\share\\extensions\\', 2)
ComponentGroup("Examples", 'inkscape\\share\\examples\\', 2)
ComponentGroup("Tutorials", 'inkscape\\share\\tutorials\\', 2)
- ComponentGroup("Dictionaries", 'inkscape\\lib\\aspell-0.60\\', 2)
+ ComponentGroup("Dictionaries", ['inkscape\\lib\\aspell-0.60\\', 'inkscape\\lib\\enchant\\'], 2)
# everything that is left (which should be the Inkscape core unless inkscape_dist_dir contains unnecessary files or we defined our components poorly)
ComponentGroup("AllOther", '', 2)
diff --git a/packaging/wix/inkscape.wxs b/packaging/wix/inkscape.wxs
index 051c1cfc1..40b07941b 100644
--- a/packaging/wix/inkscape.wxs
+++ b/packaging/wix/inkscape.wxs
@@ -121,7 +121,7 @@
<UIRef Id="WixUI_Mondo" />
<UIRef Id="WixUI_ErrorProgressText" />
- <Icon Id="inkscape.ico" SourceFile="..\..\inkscape.ico" />
+ <Icon Id="inkscape.ico" SourceFile="..\..\share\branding\inkscape.ico" />
<Property Id="ARPPRODUCTICON" Value="inkscape.ico" />
</Product>
</Wix>
diff --git a/packaging/wix/version.py b/packaging/wix/version.py
index a7ffebaa0..68ca5cc2b 100755
--- a/packaging/wix/version.py
+++ b/packaging/wix/version.py
@@ -14,9 +14,9 @@ architecture = ''
def is64bitArchitecture(filename):
''' test if a executable is of x64 format @see http://stackoverflow.com/questions/1001404/check-if-unmanaged-dll-is-32-bit-or-64-bit/1002672#1002672
@see http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx
- //offset to PE header is always at 0x3C
- //PE header starts with "PE\0\0" = 0x50 0x45 0x00 0x00
- //followed by 2-byte machine type field (see document above for enum)
+ //offset to PE header is always at 0x3C
+ //PE header starts with "PE\0\0" = 0x50 0x45 0x00 0x00
+ //followed by 2-byte machine type field (see document above for enum)
'''
with open(filename, 'rb') as cofffile:
cofffile.seek(0x3c)
@@ -37,31 +37,35 @@ inkscape_dist_dir = get_inkscape_dist_dir()
if is64bitArchitecture(inkscape_dist_dir + '\\inkscape.exe'):
architecture = '-x64'
else:
- architecture = ''
+ architecture = '-x86'
-# retrieve the version information from the inkscape.rc file
-# VALUE "ProductVersion", "0.48+devel"
-with open('..\..\src\inkscape.rc', 'r') as rc:
+# retrieve the version information from CMakeLists.txt
+with open('..\..\CMakeLists.txt', 'r') as rc:
isversioninfo = False
-
+
for line in rc.readlines():
- if 'productversion' in line.lower() and 'value' in line.lower():
- items = line.split()
- versionstr = items[2]
- versionstr = versionstr.replace('"', '')
- versionstr = versionstr.replace("'", "")
- # version = version.replace("+", "_")
- print(versionstr + architecture)
- if 'versioninfo' in line.lower():
- isversioninfo = True
- if 'begin' in line.lower():
- isversioninfo = False
- if isversioninfo and 'productversion' in line.lower():
- items = line.split()
- ''' the second element contains now version info in the form major,minor,fix,build'''
- veritems = items[1].split(',')
- version = veritems[0] + '.' + veritems[1]
-
+ if 'set(INKSCAPE_VERSION_MAJOR' in line:
+ version_major = line.split()[-1][0:-1]
+ if 'set(INKSCAPE_VERSION_MINOR' in line:
+ version_minor = line.split()[-1][0:-1]
+ if 'set(INKSCAPE_VERSION_PATCH' in line:
+ version_patch = line.split()[-1][0:-1]
+ if version_patch == '':
+ version_patch = '0'
+ if 'set(INKSCAPE_VERSION_SUFFIX' in line:
+ version_suffix = line.split()[-1][0:-1]
+ version_suffix = version_suffix.replace('"', '')
+
+ version_list = [version_major, version_minor, version_patch, '0']
+ version = '.'.join(version_list)
+
+ versionstr = '.'.join(version_list[0:2])
+ if version_patch != '0':
+ versionstr += '.' + version_patch
+ versionstr += version_suffix
+
+ # required by install.bat
+ print(versionstr + architecture)
with open('version.wxi', 'w') as wxi:
wxi.write("<?xml version='1.0' encoding='utf-8'?>\n")