chiark / gitweb /
Updated package script to run nsis if wine exists
authordaid <daid303@gmail.com>
Tue, 3 Apr 2012 10:27:36 +0000 (12:27 +0200)
committerdaid <daid303@gmail.com>
Tue, 3 Apr 2012 10:27:36 +0000 (12:27 +0200)
package.sh
scripts/win32/installer.nsi

index 7eaed8040afa3a06467b22988c2061c5884e84b0..2a9038ae32bde48278c5812a84d67d165b85f8ca 100755 (executable)
@@ -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
index 590deabb07a3c1c04a8ee78127b1d00fd366b97c..c5d36f5b155f94bdd83c6002a304f2a3ce0091d7 100644 (file)
@@ -1,4 +1,6 @@
-!define VERSION 'RC1'
+!ifndef VERSION
+  !define VERSION 'DEV'
+!endif
 
 ; The name of the installer
 Name "Cura ${VERSION}"