From 4554c2db99e17fc91b27bed14558d32c8424463d Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 22 Jul 2017 01:53:08 +0200 Subject: NSIS: update for git and cmake - parse INKSCAPE_VERSION from values define in CMakeLists.txt - remove all revision strings - we typically do not build installers for development versions, so version numbers should be unique (cherry picked from commit be6e18bfb1c0b9dade32f3c1aa298f39d6313ab8) --- packaging/win32/inkscape.nsi | 122 ++++++++----------------- packaging/win32/macros/VersionCompleteXXXX.nsh | 60 ------------ 2 files changed, 37 insertions(+), 145 deletions(-) delete mode 100644 packaging/win32/macros/VersionCompleteXXXX.nsh (limited to 'packaging') diff --git a/packaging/win32/inkscape.nsi b/packaging/win32/inkscape.nsi index 42cf108de..2f116b581 100644 --- a/packaging/win32/inkscape.nsi +++ b/packaging/win32/inkscape.nsi @@ -5,17 +5,6 @@ ; 1. Install NSIS 3.0 or later (http://nsis.sourceforge.net/) ; 2. Compile Inkscape (http://wiki.inkscape.org/wiki/index.php/Win32Port) ; 3. Compile this file with NSIS. -; -; There should be no need to set version numbers in this file as it -; gets them from the Bazaar branch info and inkscape.rc or -; inkscape-version.cpp respectively. However, if the version number comes -; out wrong or this script didn't compile properly then you can define -; INKSCAPE_VERSION by uncommenting the next line and setting the correct -; value: -; !define INKSCAPE_VERSION "0.48" -; If you ever need to do a second, third or Nth release of the build or -; of the installer, then change the RELEASE_REVISION value below: - !define RELEASE_REVISION 1 ; There should never be any need for packagers to touch anything below ; this line. Otherwise file a bug or write to the mailing list. @@ -39,7 +28,6 @@ RequestExecutionLevel admin !include macros\ifexist.nsh !include macros\RequireLatestNSIS.nsh !include macros\SHMessageBoxCheck.nsh -!include macros\VersionCompleteXXXX.nsh !include languages\_language_lists.nsh ; Advanced Uninstall Log {{{3 @@ -134,7 +122,7 @@ ReserveFile /plugin UserInfo.dll ; ####################################### ; Find inkscape distribution directory (uncomment line below to manually define) -;!define INKSCAPE_DIST_DIR ..\..\inkscape +!define INKSCAPE_DIST_DIR ..\..\build64\inkscape !ifdef INKSCAPE_DIST_DIR ${!defineifexist} ${INKSCAPE_DIST_DIR}\inkscape.exe FOUND 1 !ifndef FOUND @@ -153,30 +141,40 @@ ReserveFile /plugin UserInfo.dll !echo `Bundling compiled Inkscape files from ${INKSCAPE_DIST_DIR}` ; Product details (version, name, registry keys etc.) {{{2 -; Try to find version number in inkscape.rc first (e.g. 0.92pre1) {{{3 +; Extract version number from CMakeLists.txt (e.g. 0.92pre1) {{{3 !ifndef INKSCAPE_VERSION - !searchparse /noerrors /file ..\..\src\inkscape.rc `VALUE "ProductVersion", "` INKSCAPE_VERSION `"` - !ifdef INKSCAPE_VERSION - !echo `Got version number from ..\..\src\inkscape.rc: ${INKSCAPE_VERSION}` - !endif -!endif -; Find the version number in inkscape-version.cpp (e.g. 0.47+devel) {{{3 -!ifndef INKSCAPE_VERSION - ; Official release format (no newlines) - !searchparse /noerrors /file ..\..\src\inkscape-version.cpp `namespace Inkscape { char const *version_string = "` INKSCAPE_VERSION ` r` BZR_REVISION `"; }` - !ifndef INKSCAPE_VERSION - ; Other format; sorry, it has to be done in two steps. - !searchparse /noerrors /file ..\..\src\inkscape-version.cpp `char const *version_string = "` INKSCAPE_VERSION `";` - !searchparse /noerrors `${INKSCAPE_VERSION}` `` INKSCAPE_VERSION ` r` BZR_REVISION + !searchparse /noerrors /file ..\..\CMakeLists.txt `set(INKSCAPE_VERSION_MAJOR` INKSCAPE_VERSION_MAJOR `)` + !searchparse /noerrors /file ..\..\CMakeLists.txt `set(INKSCAPE_VERSION_MINOR` INKSCAPE_VERSION_MINOR `)` + !searchparse /noerrors /file ..\..\CMakeLists.txt `set(INKSCAPE_VERSION_PATCH` INKSCAPE_VERSION_PATCH `)` + !searchparse /noerrors /file ..\..\CMakeLists.txt `set(INKSCAPE_VERSION_SUFFIX` INKSCAPE_VERSION_SUFFIX `)` + ; strip whitespace + !define /redef INKSCAPE_VERSION_MAJOR ${INKSCAPE_VERSION_MAJOR} + !define /redef INKSCAPE_VERSION_MINOR ${INKSCAPE_VERSION_MINOR} + !define /redef INKSCAPE_VERSION_PATCH ${INKSCAPE_VERSION_PATCH} + !define /redef INKSCAPE_VERSION_SUFFIX ${INKSCAPE_VERSION_SUFFIX} + ; strip quotes + !searchparse /noerrors ${INKSCAPE_VERSION_SUFFIX} `"` INKSCAPE_VERSION_SUFFIX `"` + ; construct version string + !define INKSCAPE_VERSION "${INKSCAPE_VERSION_MAJOR}.${INKSCAPE_VERSION_MINOR}" + !if "${INKSCAPE_VERSION_PATCH}" != "0" + !if "${INKSCAPE_VERSION_PATCH}" != "" + !define /redef INKSCAPE_VERSION "${INKSCAPE_VERSION}.${INKSCAPE_VERSION_PATCH}" + !endif !endif - !ifdef INKSCAPE_VERSION - !echo `Got version number from ..\..\src\inkscape-version.cpp: ${INKSCAPE_VERSION}` + !define /redef INKSCAPE_VERSION "${INKSCAPE_VERSION}${INKSCAPE_VERSION_SUFFIX}" + ; construct X.X.X.X version string for VIProductVersion + !if "${INKSCAPE_VERSION_PATCH}" != "" + !define VERSION_X.X.X.X ${INKSCAPE_VERSION_MAJOR}.${INKSCAPE_VERSION_MINOR}.${INKSCAPE_VERSION_PATCH}.0 + !else + !define VERSION_X.X.X.X ${INKSCAPE_VERSION_MAJOR}.${INKSCAPE_VERSION_MINOR}.0.0 !endif !endif -!ifndef INKSCAPE_VERSION - !error "INKSCAPE_VERSION not defined and unable to get version number from either ..\..\src\inkscape.rc or ..\..\src\inkscape-version.cpp!" +!ifdef INKSCAPE_VERSION + !echo `INKSCAPE_VERSION: ${INKSCAPE_VERSION}` +!else + !error "INKSCAPE_VERSION not defined and unable to get version number from CMakeLists.txt!" !endif -!define FILENAME Inkscape-${INKSCAPE_VERSION} +!define FILENAME inkscape-${INKSCAPE_VERSION} !define BrandingText `Inkscape ${INKSCAPE_VERSION}` ; Detect architecture of the build @@ -191,54 +189,6 @@ ${!ifexist} ${INKSCAPE_DIST_DIR}\gspawn-win64-helper.exe !error "Could not detect architecture (BITNESS) of the Inkscape build" !endif -; Check for the Bazaar revision number for lp:inkscape {{{3 -${!ifexist} ..\..\.bzr\branch\last-revision - !if `${BZR_REVISION}` == `` - !undef BZR_REVISION - !endif - !ifndef BZR_REVISION - !searchparse /noerrors /file ..\..\.bzr\branch\last-revision "" BZR_REVISION " " - !endif -!endif - -; Check for devel builds and clear up bzr revision number define {{{3 -!searchparse /noerrors ${INKSCAPE_VERSION} "" INKSCAPE_VERSION_NUMBER "+devel" -!if ${INKSCAPE_VERSION_NUMBER} != ${INKSCAPE_VERSION} - !define DEVEL -!endif -!if `${BZR_REVISION}` == `` - !undef BZR_REVISION -!endif -; For releases like 0.48pre1, throw away the preN. It's too tricky to deal with -; it properly so I'll leave it alone. It's just a pre-release, so it doesn't -; really matter. So long as the final release works properly. -!ifndef DEVEL - !undef INKSCAPE_VERSION_NUMBER - !searchparse /noerrors ${INKSCAPE_VERSION} "" INKSCAPE_VERSION_NUMBER "pre" PRE_NUMBER -!endif - -; Handle display version number and complete X.X version numbers into X.X.X.X {{{3 -!ifdef DEVEL & BZR_REVISION - !define /redef FILENAME `${FILENAME}-r${BZR_REVISION}` - !define /redef BrandingText `${BrandingText} r${BZR_REVISION}` - !define VERSION_X.X.X.X_REVISION ${BZR_REVISION} -; Handle the installer revision number {{{4 -!else ifdef RELEASE_REVISION - !define /redef FILENAME `${FILENAME}-${RELEASE_REVISION}` - ; If we wanted the branding text to be like "Inkscape 0.48pre1 r9505" this'd do it. - ;!ifdef BZR_REVISION - ; !define /redef BrandingText `${BrandingText} r${BZR_REVISION}` - ;!endif - !if `${RELEASE_REVISION}` != `1` - !define /redef BrandingText `${BrandingText}, revision ${RELEASE_REVISION}` - !endif - !define VERSION_X.X.X.X_REVISION ${RELEASE_REVISION} -!else - !define VERSION_X.X.X.X_REVISION 0 -!endif - -${VersionCompleteXXXRevision} ${INKSCAPE_VERSION_NUMBER} VERSION_X.X.X.X ${VERSION_X.X.X.X_REVISION} - ; Product definitions {{{3 !define PRODUCT_NAME "Inkscape" ; TODO: fix up the language files to not use this and kill this line !define INSTDIR_KEY "Software\Microsoft\Windows\CurrentVersion\App Paths\inkscape.exe" @@ -261,14 +211,16 @@ OutFile `${FILENAME}` InstallDirRegKey HKLM "${INSTDIR_KEY}" "" ; Version information {{{3 +!define /date COPYRIGHT_YEAR "%Y" VIProductVersion ${VERSION_X.X.X.X} VIAddVersionKey /LANG=0 ProductName "Inkscape" VIAddVersionKey /LANG=0 Comments "Licensed under the GNU GPL" -VIAddVersionKey /LANG=0 CompanyName "Inkscape Project" -VIAddVersionKey /LANG=0 LegalCopyright "© 2016 Inkscape Project" -VIAddVersionKey /LANG=0 FileDescription "Inkscape Vector Graphics Editor" -VIAddVersionKey /LANG=0 FileVersion ${VERSION_X.X.X.X} -VIAddVersionKey /LANG=0 ProductVersion ${VERSION_X.X.X.X} +VIAddVersionKey /LANG=0 CompanyName "Inkscape project" +VIAddVersionKey /LANG=0 LegalCopyright "© ${COPYRIGHT_YEAR} Inkscape project" +VIAddVersionKey /LANG=0 FileDescription "Installer for Inkscape vector graphics editor" +VIAddVersionKey /LANG=0 FileVersion ${INKSCAPE_VERSION} +VIAddVersionKey /LANG=0 ProductVersion ${INKSCAPE_VERSION} + ; Variables {{{2 Var askMultiUser diff --git a/packaging/win32/macros/VersionCompleteXXXX.nsh b/packaging/win32/macros/VersionCompleteXXXX.nsh deleted file mode 100644 index 6ea780508..000000000 --- a/packaging/win32/macros/VersionCompleteXXXX.nsh +++ /dev/null @@ -1,60 +0,0 @@ -; See http://nsis.sourceforge.net/VersionCompleteXXXX for documentation -!macro VersionCompleteXXXRevision _INPUT_VALUE _OUTPUT_SYMBOL _REVISION - !searchparse /noerrors ${_INPUT_VALUE} "" _VERSION_1 "." _VERSION_2 "." _VERSION_3 "." _VERSION_4 - !ifndef _VERSION_1 - !define _VERSION_1 0 - !else if `${_VERSION_1}` == `` - !define /redef _VERSION_1 0 - !endif - !ifndef _VERSION_2 - !define _VERSION_2 0 - !else if `${_VERSION_2}` == `` - !define /redef _VERSION_2 0 - !endif - !ifndef _VERSION_3 - !define _VERSION_3 0 - !else if `${_VERSION_3}` == `` - !define /redef _VERSION_3 0 - !endif - !ifndef _VERSION_4 - !define _VERSION_4 0 - !else if `${_VERSION_4}` == `` - !define /redef _VERSION_4 0 - !endif - !define ${_OUTPUT_SYMBOL} ${_VERSION_1}.${_VERSION_2}.${_VERSION_3}.${_REVISION} - !undef _VERSION_1 - !undef _VERSION_2 - !undef _VERSION_3 - !undef _VERSION_4 - !undef _REVISION -!macroend -!define VersionCompleteXXXRevision `!insertmacro VersionCompleteXXXRevision` -!macro VersionCompleteXXXX _INPUT_VALUE _OUTPUT_SYMBOL - !searchparse /noerrors ${_INPUT_VALUE} "" _VERSION_1 "." _VERSION_2 "." _VERSION_3 "." _VERSION_4 - !ifndef _VERSION_1 - !define _VERSION_1 0 - !else if `${_VERSION_1}` == `` - !define /redef _VERSION_1 0 - !endif - !ifndef _VERSION_2 - !define _VERSION_2 0 - !else if `${_VERSION_2}` == `` - !define /redef _VERSION_2 0 - !endif - !ifndef _VERSION_3 - !define _VERSION_3 0 - !else if `${_VERSION_3}` == `` - !define /redef _VERSION_3 0 - !endif - !ifndef _VERSION_4 - !define _VERSION_4 0 - !else if `${_VERSION_4}` == `` - !define /redef _VERSION_4 0 - !endif - !define ${_OUTPUT_SYMBOL} ${_VERSION_1}.${_VERSION_2}.${_VERSION_3}.${_VERSION_4} - !undef _VERSION_1 - !undef _VERSION_2 - !undef _VERSION_3 - !undef _VERSION_4 -!macroend -!define VersionCompleteXXXX `!insertmacro VersionCompleteXXXX` \ No newline at end of file -- cgit v1.2.3 From 0e545444e93b019154e4f289d2431cc9342c0be9 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 22 Jul 2017 02:19:02 +0200 Subject: NSIS: Allow to set output filenanme on command line Use 'makensis /DOutPath=C:\full\path\output.exe inkscape.nsi'. (cherry picked from commit 3b5261b9a77db009a279918356e8f71bcd7fe640) --- packaging/win32/inkscape.nsi | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'packaging') diff --git a/packaging/win32/inkscape.nsi b/packaging/win32/inkscape.nsi index 2f116b581..497a31a64 100644 --- a/packaging/win32/inkscape.nsi +++ b/packaging/win32/inkscape.nsi @@ -180,10 +180,11 @@ ReserveFile /plugin UserInfo.dll ; Detect architecture of the build ${!ifexist} ${INKSCAPE_DIST_DIR}\gspawn-win32-helper.exe !define BITNESS 32 + !define /redef FILENAME `${FILENAME}-x86` !endif ${!ifexist} ${INKSCAPE_DIST_DIR}\gspawn-win64-helper.exe !define BITNESS 64 - !define /redef FILENAME `${FILENAME}-x64` ; add architecture to filename for 64-bit builds + !define /redef FILENAME `${FILENAME}-x64` !endif !ifndef BITNESS !error "Could not detect architecture (BITNESS) of the Inkscape build" @@ -193,10 +194,14 @@ ${!ifexist} ${INKSCAPE_DIST_DIR}\gspawn-win64-helper.exe !define PRODUCT_NAME "Inkscape" ; TODO: fix up the language files to not use this and kill this line !define INSTDIR_KEY "Software\Microsoft\Windows\CurrentVersion\App Paths\inkscape.exe" !define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Inkscape" -!define _FILENAME ${FILENAME}.exe -!undef FILENAME -!define FILENAME ${_FILENAME} -!undef _FILENAME + +!ifdef OutFile + ; allow to set different output filename by defining 'OutFile' on command line + !define /redef FILENAME ${OutFile} +!else + !define /redef FILENAME ${FILENAME}.exe +!endif + ; Product information {{{3 Name `Inkscape` -- cgit v1.2.3 From a1b95f0c4f86c657bcdc893b30fa9d0c47df919c Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 22 Jul 2017 02:25:57 +0200 Subject: NSIS: Distribution directory can already be set on command line Use 'makensis /DINKSCAPE_DIST_DIR=..\..\build\inkscape inkscape.nsi'. (cherry picked from commit 3534f9a0013a155a1d31e837e12e73eb8678dbb0) --- packaging/win32/inkscape.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packaging') diff --git a/packaging/win32/inkscape.nsi b/packaging/win32/inkscape.nsi index 497a31a64..ba6b5c7b1 100644 --- a/packaging/win32/inkscape.nsi +++ b/packaging/win32/inkscape.nsi @@ -121,8 +121,8 @@ ReserveFile /plugin UserInfo.dll ; SETTINGS ; ####################################### -; Find inkscape distribution directory (uncomment line below to manually define) -!define INKSCAPE_DIST_DIR ..\..\build64\inkscape +; Find inkscape distribution directory (define on command line or uncomment line below to manually define) +;!define INKSCAPE_DIST_DIR ..\..\build\inkscape !ifdef INKSCAPE_DIST_DIR ${!defineifexist} ${INKSCAPE_DIST_DIR}\inkscape.exe FOUND 1 !ifndef FOUND -- cgit v1.2.3 From b47adfaac2e3074c2655e18cbf9175ea155bd05f Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 22 Jul 2017 03:03:25 +0200 Subject: NSIS: update for MSYS2 builds (cherry picked from commit 68642e81c9df0c913a0e976bcbe40b2e2e2385f9) --- packaging/win32/inkscape.nsi | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'packaging') diff --git a/packaging/win32/inkscape.nsi b/packaging/win32/inkscape.nsi index ba6b5c7b1..fb83c3ed5 100644 --- a/packaging/win32/inkscape.nsi +++ b/packaging/win32/inkscape.nsi @@ -287,8 +287,10 @@ Section "$(Core)" SecCore ; Mandatory Inkscape core files section {{{ SetOutPath $INSTDIR !insertmacro UNINSTALL.LOG_OPEN_INSTALL - File /a ${INKSCAPE_DIST_DIR}\ink*.exe - File /nonfatal /a ${INKSCAPE_DIST_DIR}\inkscape.com ; not created as of Inkscape 0.92pre1 + File /a ${INKSCAPE_DIST_DIR}\inkscape.exe + File /a ${INKSCAPE_DIST_DIR}\inkscape.com + File /a ${INKSCAPE_DIST_DIR}\inkview.exe + File /a ${INKSCAPE_DIST_DIR}\inkview.com File /a ${INKSCAPE_DIST_DIR}\AUTHORS File /a ${INKSCAPE_DIST_DIR}\COPYING File /a ${INKSCAPE_DIST_DIR}\GPL2.txt @@ -301,22 +303,10 @@ Section "$(Core)" SecCore ; Mandatory Inkscape core files section {{{ File /a ${INKSCAPE_DIST_DIR}\TRANSLATORS !insertmacro UNINSTALL.LOG_CLOSE_INSTALL - SetOutPath $INSTDIR\data - !insertmacro UNINSTALL.LOG_OPEN_INSTALL - File /nonfatal /a /r ${INKSCAPE_DIST_DIR}\data\*.* - !insertmacro UNINSTALL.LOG_CLOSE_INSTALL SetOutPath $INSTDIR\doc !insertmacro UNINSTALL.LOG_OPEN_INSTALL File /nonfatal /a /r ${INKSCAPE_DIST_DIR}\doc\*.* !insertmacro UNINSTALL.LOG_CLOSE_INSTALL - SetOutPath $INSTDIR\plugins - !insertmacro UNINSTALL.LOG_OPEN_INSTALL - File /nonfatal /a /r ${INKSCAPE_DIST_DIR}\plugins\*.* - !insertmacro UNINSTALL.LOG_CLOSE_INSTALL - SetOutPath $INSTDIR\modules - !insertmacro UNINSTALL.LOG_OPEN_INSTALL - File /nonfatal /a /r ${INKSCAPE_DIST_DIR}\modules\*.* - !insertmacro UNINSTALL.LOG_CLOSE_INSTALL ;exclude everything from /share for which we have separate sections below SetOutPath $INSTDIR\share @@ -342,11 +332,11 @@ Section "$(GTKFiles)" SecGTK ; Mandatory GTK files section {{{ DetailPrint "Installing GTK files..." SetOutPath $INSTDIR !insertmacro UNINSTALL.LOG_OPEN_INSTALL - File /a /r /x python ${INKSCAPE_DIST_DIR}\*.dll + File /a /r /x libpython2.7.dll ${INKSCAPE_DIST_DIR}\*.dll !insertmacro UNINSTALL.LOG_CLOSE_INSTALL SetOutPath $INSTDIR\lib !insertmacro UNINSTALL.LOG_OPEN_INSTALL - File /a /r /x locale /x aspell-0.60 ${INKSCAPE_DIST_DIR}\lib\*.* + File /a /r /x locale /x aspell-0.60 /x enchant /x python2.7 ${INKSCAPE_DIST_DIR}\lib\*.* !insertmacro UNINSTALL.LOG_CLOSE_INSTALL SetOutPath $INSTDIR\etc !insertmacro UNINSTALL.LOG_OPEN_INSTALL @@ -454,6 +444,15 @@ Section "$(Python)" SecPython ; Python distribution {{{ !insertmacro UNINSTALL.LOG_OPEN_INSTALL File /nonfatal /a /r ${INKSCAPE_DIST_DIR}\python\*.* !insertmacro UNINSTALL.LOG_CLOSE_INSTALL + SetOutPath $INSTDIR\lib\python2.7 + !insertmacro UNINSTALL.LOG_OPEN_INSTALL + File /nonfatal /a /r ${INKSCAPE_DIST_DIR}\lib\python2.7\*.* + !insertmacro UNINSTALL.LOG_CLOSE_INSTALL + SetOutPath $INSTDIR + !insertmacro UNINSTALL.LOG_OPEN_INSTALL + File /nonfatal /a ${INKSCAPE_DIST_DIR}\python*.exe + File /nonfatal /a ${INKSCAPE_DIST_DIR}\libpython*.dll + !insertmacro UNINSTALL.LOG_CLOSE_INSTALL !endif SectionEnd ; SecPython }}} @@ -500,6 +499,10 @@ Section "$(Dictionaries)" SecDictionaries ; Aspell dictionaries {{{ !insertmacro UNINSTALL.LOG_OPEN_INSTALL File /nonfatal /a /r ${INKSCAPE_DIST_DIR}\lib\aspell-0.60\*.* !insertmacro UNINSTALL.LOG_CLOSE_INSTALL + SetOutPath $INSTDIR\lib\enchant + !insertmacro UNINSTALL.LOG_OPEN_INSTALL + File /nonfatal /a /r ${INKSCAPE_DIST_DIR}\lib\enchant\*.* + !insertmacro UNINSTALL.LOG_CLOSE_INSTALL !endif SectionEnd ; SecDictionaries }}} -- cgit v1.2.3 From abb25a2df53c0c8053465921a0c660fcec4646d9 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 22 Jul 2017 04:23:45 +0200 Subject: wix: Update for cmake / MSYS2 build (cherry picked from commit 16cb9a13a88db072389f5f4ba0d6a7997cee0123) --- packaging/wix/files.py | 5 +++-- packaging/wix/inkscape.wxs | 2 +- packaging/wix/version.py | 54 +++++++++++++++++++++++++--------------------- 3 files changed, 33 insertions(+), 28 deletions(-) (limited to 'packaging') 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) + "\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 @@ - + 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("\n") -- cgit v1.2.3 From d791282ea1f8e216eda65753485b6bd7fca5ce2f Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 23 Jul 2017 00:30:07 +0200 Subject: cmake: Add 'dist' target to create Windows .exe installer - 'dist-win-exe' allows to create a Windows .exe installer using NSIS - 'dist-win-exe-fast' has a bad compression ratio but is much faster and can be used for testing purposes --- packaging/win32/inkscape.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packaging') diff --git a/packaging/win32/inkscape.nsi b/packaging/win32/inkscape.nsi index fb83c3ed5..7ef5bfcc9 100644 --- a/packaging/win32/inkscape.nsi +++ b/packaging/win32/inkscape.nsi @@ -19,7 +19,7 @@ ; Unicode, compression and admin requirement {{{2 Unicode true SetCompressor /SOLID lzma -SetCompressorDictSize 32 +SetCompressorDictSize 64 RequestExecutionLevel admin ; Include required files {{{2 @@ -299,7 +299,7 @@ Section "$(Core)" SecCore ; Mandatory Inkscape core files section {{{ File /a ${INKSCAPE_DIST_DIR}\NEWS File /a ${INKSCAPE_DIST_DIR}\gspawn-win${BITNESS}-helper.exe File /a ${INKSCAPE_DIST_DIR}\gspawn-win${BITNESS}-helper-console.exe - File /a ${INKSCAPE_DIST_DIR}\README + File /a ${INKSCAPE_DIST_DIR}\README.md File /a ${INKSCAPE_DIST_DIR}\TRANSLATORS !insertmacro UNINSTALL.LOG_CLOSE_INSTALL -- cgit v1.2.3 From ea172cdb15ba9780da806b5190c9dbb0a74231bd Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 23 Jul 2017 03:07:03 +0200 Subject: cmake: Add 'dist' target to create Windows .msi installer - 'dist-win-msi' allows to create a Windows .msi installer using WiX - 'dist-win-msi-fast' has a no compression but is much faster and can be used for testing purposes --- packaging/wix/files.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packaging') diff --git a/packaging/wix/files.py b/packaging/wix/files.py index 70e5f29c0..dd5d72381 100755 --- a/packaging/wix/files.py +++ b/packaging/wix/files.py @@ -40,16 +40,17 @@ def directory(root, breadcrumb, level, exclude=[]): files = [ f for f in os.listdir(root) if os.path.isfile(os.path.join(root,f)) and f not in exclude] for file in files: file_key = os.path.join(root, file) + file_key = file_key.replace('/', '\\') # for usage from MSYS2 shell _id = '_%06d' % (len(file_ids.keys()) + 1) file_ids[file_key] = 'component' + _id wxs.write(indent(level)+ "\n") if file == 'inkscape.exe': - # we refenrence inkscape.exe in inkscape.wxs + # we reference inkscape.exe in inkscape.wxs _id = '_inkscape_exe' wxs.write(indent(level + 1)+ "\n") wxs.write(indent(level)+ "\n") - # then all directories + # then all directories dirs = [ f for f in os.listdir(root) if os.path.isdir(os.path.join(root,f)) ] for dir in dirs: directory_key = breadcrumb + '__' + dir -- cgit v1.2.3 From 63886f85e5993f7b6ef6b5590a3a412f3cadee15 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 23 Jul 2017 03:48:04 +0200 Subject: sync detail fields of .exe and .msi installers --- packaging/wix/inkscape.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packaging') diff --git a/packaging/wix/inkscape.wxs b/packaging/wix/inkscape.wxs index 40b07941b..3dad2ca4c 100644 --- a/packaging/wix/inkscape.wxs +++ b/packaging/wix/inkscape.wxs @@ -3,9 +3,9 @@ - + - + -- cgit v1.2.3