chiark / gitweb /
Merge tag '15.01-RC2' into upstream
[cura.git] / package.sh
index 5234e64af68827e625c4864960a2f5c6b5014985..17a06cdb7d7769fd6c2b8f852558c73f75f16fbf 100755 (executable)
@@ -22,12 +22,18 @@ ARCHIVE_FOR_DISTRIBUTION=1
 export BUILD_NAME=15.01-RC2
 TARGET_DIR=Cura-${BUILD_NAME}-${BUILD_TARGET}
 
+##Revision
+export REVISION=1.19
+
+##Git commit
+GIT_HASH=$(git rev-parse --short=4 HEAD)
+
 ##Which versions of external programs to use
 WIN_PORTABLE_PY_VERSION=2.7.2.1
 
 ##Which CuraEngine to use
 if [ -z ${CURA_ENGINE_REPO} ] ; then
-       CURA_ENGINE_REPO="git@github.com:Ultimaker/CuraEngine.git"
+       CURA_ENGINE_REPO="git@github.com:alephobjects/CuraEngine.git"
 fi
 
 #############################
@@ -215,13 +221,13 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
        cd ..
 
        # Create sparse image for distribution
-       hdiutil detach /Volumes/Cura\ -\ Ultimaker/
+       hdiutil detach /Volumes/Cura\ -\ Lulzbot/
        rm -rf Cura.dmg.sparseimage
        hdiutil convert DmgTemplateCompressed.dmg -format UDSP -o Cura.dmg
        hdiutil resize -size 500m Cura.dmg.sparseimage
        hdiutil attach Cura.dmg.sparseimage
-       cp -a dist/Cura.app /Volumes/Cura\ -\ Ultimaker/Cura/
-       hdiutil detach /Volumes/Cura\ -\ Ultimaker
+       cp -a dist/Cura.app /Volumes/Cura\ -\ Lulzbot/Cura/
+       hdiutil detach /Volumes/Cura\ -\ Lulzbot
        hdiutil convert Cura.dmg.sparseimage -format UDZO -imagekey zlib-level=9 -ov -o ../../${TARGET_DIR}.dmg
        exit
 fi
@@ -296,7 +302,7 @@ if [ "$BUILD_TARGET" = "debian_i386" ]; then
        sudo chmod 755 scripts/linux/${BUILD_TARGET}/usr -R
        sudo chmod 755 scripts/linux/${BUILD_TARGET}/DEBIAN -R
        cd scripts/linux
-       dpkg-deb --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${BUILD_NAME}-${BUILD_TARGET}.deb
+       dpkg-deb -Zgzip --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${BUILD_NAME}-${REVISION}-${GIT_HASH}_i386.deb
        sudo chown `id -un`:`id -gn` ${BUILD_TARGET} -R
        exit
 fi
@@ -325,7 +331,7 @@ if [ "$BUILD_TARGET" = "debian_amd64" ]; then
        sudo chmod 755 scripts/linux/${BUILD_TARGET}/usr -R
        sudo chmod 755 scripts/linux/${BUILD_TARGET}/DEBIAN -R
        cd scripts/linux
-       dpkg-deb --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${BUILD_NAME}-${BUILD_TARGET}.deb
+       dpkg-deb -Zgzip --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${BUILD_NAME}-${REVISION}-${GIT_HASH}_amd64.deb
        sudo chown `id -un`:`id -gn` ${BUILD_TARGET} -R
        exit
 fi
@@ -424,6 +430,8 @@ if [ $BUILD_TARGET = "win32" ]; then
        #mv ffmpeg-20120927-git-13f0cd6-win32-static/bin/ffmpeg.exe ${TARGET_DIR}/Cura/
        #mv ffmpeg-20120927-git-13f0cd6-win32-static/licenses ${TARGET_DIR}/Cura/ffmpeg-licenses/
        mv Win32/EjectMedia.exe ${TARGET_DIR}/Cura/
+       cp -a scripts/win32/nsisPlugins/libgcc_s_dw2-1.dll ${TARGET_DIR}
+       cp -a scripts/win32/nsisPlugins/libstdc++-6.dll ${TARGET_DIR}
        
        rm -rf Power/
        rm -rf \$_OUTDIR
@@ -483,7 +491,7 @@ if (( ${ARCHIVE_FOR_DISTRIBUTION} )); then
                        ln -sf `pwd`/${TARGET_DIR} scripts/win32/dist
                        wine ~/.wine/drive_c/Program\ Files\ \(x86\)/NSIS/makensis.exe /DVERSION=${BUILD_NAME} scripts/win32/installer.nsi
             if [ $? != 0 ]; then echo "Failed to package NSIS installer"; exit 1; fi
-                       mv scripts/win32/Cura_${BUILD_NAME}.exe ./
+                       mv scripts/win32/Cura_${BUILD_NAME}-${REVISION}-${GIT_HASH}.exe ./
                fi
                if [ -f '/c/Program Files (x86)/NSIS/makensis.exe' ]; then
                        rm -rf scripts/win32/dist