From: daid Date: Tue, 3 Apr 2012 10:27:36 +0000 (+0200) Subject: Updated package script to run nsis if wine exists X-Git-Tag: RC1~5 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6cef0052a9aa6258efde823d7bd02c65c1ff5338;p=cura.git Updated package script to run nsis if wine exists --- diff --git a/package.sh b/package.sh index 7eaed804..2a9038ae 100755 --- a/package.sh +++ b/package.sh @@ -16,7 +16,7 @@ BUILD_TARGET=${1:-win32} ##Do we need to create the final archive ARCHIVE_FOR_DISTRIBUTION=1 ##Which version name are we appending to the final archive -BUILD_NAME=NewUI-Beta4 +BUILD_NAME=RC1 TARGET_DIR=${BUILD_TARGET}-Cura-${BUILD_NAME} ##Which versions of external programs to use @@ -159,6 +159,12 @@ if (( ${ARCHIVE_FOR_DISTRIBUTION} )); then cd ${TARGET_DIR} 7z a ../${TARGET_DIR}.zip * cd .. + + if [ ! -z `which wine` ]; then + #if we have wine, try to run our nsis script. + ln -sf `pwd`/${TARGET_DIR} scripts/win32/dist + wine ~/.wine/drive_c/Program\ Files/NSIS/makensis.exe /DVERSION=${BUILD_NAME} scripts/win32/installer.nsi + fi else echo "Archiving to ${TARGET_DIR}.tar.gz" $TAR cfp - ${TARGET_DIR} | gzip --best -c > ${TARGET_DIR}.tar.gz diff --git a/scripts/win32/installer.nsi b/scripts/win32/installer.nsi index 590deabb..c5d36f5b 100644 --- a/scripts/win32/installer.nsi +++ b/scripts/win32/installer.nsi @@ -1,4 +1,6 @@ -!define VERSION 'RC1' +!ifndef VERSION + !define VERSION 'DEV' +!endif ; The name of the installer Name "Cura ${VERSION}"