From 5e6f7470162050512482b7cf065c30b0e11f2d23 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Thu, 31 May 2012 14:27:28 +0000 Subject: [PATCH] Update windows build script to try and be space tolerant in paths svn: r19725 --- windows/builder/build_GrampsWin32.py | 15 +++++++++------ windows/builder/gramps2.nsi | 10 +++++----- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/windows/builder/build_GrampsWin32.py b/windows/builder/build_GrampsWin32.py index 64e65b5bd..2fc3312e1 100644 --- a/windows/builder/build_GrampsWin32.py +++ b/windows/builder/build_GrampsWin32.py @@ -121,7 +121,9 @@ class buildbase(gobject.GObject): destdir cannot exist, script will clean up dir first ''' log.debug('========== exportSVN(%s, %s)' % (svn_dir, destdir) ) - cmd = '"%s" export %s %s' % (SVN_exe ,svn_dir, destdir) +# cmd = '"%s" export %s %s' % (SVN_exe ,svn_dir, destdir) + cmd = [SVN_exe, 'export' ,svn_dir, destdir] #'"%s" export %s %s' % (SVN_exe ,svn_dir, destdir) + log.info( "Running: %s" % cmd) proc = subprocess.Popen( cmd, shell = True, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) @@ -164,7 +166,8 @@ class buildbase(gobject.GObject): #should tests be more along lines of os.name which returns 'posix', 'nt', 'mac', 'os2', 'ce', 'java', 'riscos' if sys.platform == 'win32': - cmd = '"%s" /V3 %s' % (MAKENSIS_exe, pth2nsis_script) +# cmd = '"%s" /V3 %s' % (MAKENSIS_exe, pth2nsis_script) + cmd = [MAKENSIS_exe, '/V3',pth2nsis_script] elif sys.platform == 'linux2': #assumption makensis is installed and on the path cmd = '%s -V3 %s' % (MAKENSIS_exe, pth2nsis_script) @@ -254,10 +257,10 @@ class buildbase(gobject.GObject): mo_file = os.path.join(lan_path,"gramps.mo") log.info( mo_file ) - cmd = "%s --statistics -o %s %s" % (msgfmtCmd, mo_file, po_file) - #log.debug( cmd ) - - proc = subprocess.Popen( cmd, shell = True, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) + cmd = [msgfmtCmd, '--statistics','-o', mo_file, po_file] + log.debug( cmd ) + + proc = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) (out, err) = proc.communicate() output = string.strip(out) log.info( output ) diff --git a/windows/builder/gramps2.nsi b/windows/builder/gramps2.nsi index 9dec73af8..64c49a66e 100644 --- a/windows/builder/gramps2.nsi +++ b/windows/builder/gramps2.nsi @@ -29,8 +29,8 @@ # o WARNING: Except the uninstaller. That re-paths for some reason. # !define GRAMPS_VERSION $%GRAMPS_VER% -!define GRAMPS_BUILD_PATH $%GRAMPS_BUILD_DIR% -!define GRAMPS_OUT_PATH $%GRAMPS_OUT_DIR% +!define GRAMPS_BUILD_PATH "$%GRAMPS_BUILD_DIR%" +!define GRAMPS_OUT_PATH "$%GRAMPS_OUT_DIR%" !define MIN_PYTHON_VERSION "2.6.0" !define MIN_GTK_VERSION "2.12.9" @@ -50,7 +50,7 @@ # output file Name ${PRODUCT_NAME} -OutFile ${GRAMPS_OUT_PATH}\gramps-${PRODUCT_VERSION}.exe +OutFile "${GRAMPS_OUT_PATH}\gramps-${PRODUCT_VERSION}.exe" # self ensure we don't have a corrupted file CRCCheck on @@ -107,7 +107,7 @@ PageExEnd ;Custom page - for dependancy checking Page custom DependenciesPageFunction DependenciesPageLeave ; License page -!insertmacro MUI_PAGE_LICENSE ${GRAMPS_BUILD_PATH}\COPYING +!insertmacro MUI_PAGE_LICENSE "${GRAMPS_BUILD_PATH}\COPYING" ; Component Page ;!insertmacro MUI_PAGE_COMPONENTS ; Directory page @@ -573,7 +573,7 @@ Section "MainSection" SEC01 # File "${GRAMPS_BUILD_PATH}\gramps.py" SetOverwrite try #File /r ${GRAMPS_BUILD_PATH}\src\*.* - File /r ${GRAMPS_BUILD_PATH}\*.* + File /r "${GRAMPS_BUILD_PATH}\*.*" WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "" "$INSTDIR" WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "version" ${PRODUCT_VERSION} Call WriteGrampsLauncher