6 # This script is to package the Cura package for Windows/Linux and Mac OS X
7 # This script should run under Linux and Mac OS X, as well as Windows with Cygwin.
9 #############################
11 #############################
13 ##Select the build target
14 BUILD_TARGET=${1:-none}
17 #BUILD_TARGET=debian_i386
18 #BUILD_TARGET=debian_amd64
19 #BUILD_TARGET=debian_armhf
22 ##Do we need to create the final archive
23 ARCHIVE_FOR_DISTRIBUTION=1
24 ##Which version name are we appending to the final archive
28 version_file="./Cura/version"
29 while IFS= read -r line
31 export BUILD_VERSION="$line"
33 TARGET_DIR=Cura-${BUILD_VERSION}-${BUILD_TARGET}
36 GIT_HASH=$(git rev-parse --short=4 HEAD)
38 export FULL_VERSION=${BUILD_VERSION}-${GIT_HASH}
40 ##Which versions of external programs to use
41 WIN_PORTABLE_PY_VERSION=2.7.6.1
43 ##Which CuraEngine to use
44 if [ -z ${CURA_ENGINE_REPO:-} ] ; then
45 CURA_ENGINE_REPO="https://code.alephobjects.com/diffusion/CE/curaengine.git"
48 #############################
50 #############################
53 if [ -z "`which $1`" ]; then
54 echo "The $1 command must be somewhere in your \$PATH."
55 echo "Fix your \$PATH or install $2"
62 filename=`basename "$1"`
63 echo "Checking for $filename"
64 if [ ! -f "$filename" ]; then
68 echo "Failed to download $1"
77 echo "7z x -y $*" >> log.txt
78 $EXTRACT x -y $* >> log.txt
80 echo "Failed to extract $*"
87 echo "Cloning $1 into $2"
99 #############################
100 # Actual build script
101 #############################
102 if [ "$BUILD_TARGET" = "none" ]; then
103 echo "You need to specify a build target with:"
105 echo "$0 debian_i386"
106 echo "$0 debian_amd64"
107 echo "$0 debian_armhf"
110 echo "$0 fedora # current system"
111 echo "$0 fedora \"mock_config_file\" ... # different system(s)"
115 if [ -z `which make` ]; then
121 if [ -z `which 7za` ]; then
127 # Change working directory to the directory the script is in
128 # http://stackoverflow.com/a/246128
129 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
132 checkTool git "git: http://git-scm.com/"
133 checkTool curl "curl: http://curl.haxx.se/"
134 if [ $BUILD_TARGET = "win32" ]; then
135 checkTool avr-gcc "avr-gcc: http://winavr.sourceforge.net/ "
136 #Check if we have 7zip, needed to extract and packup a bunch of packages for windows.
137 checkTool $EXTRACT "7zip: http://www.7-zip.org/"
138 checkTool $MAKE "mingw: http://www.mingw.org/"
140 #For building under MacOS we need gnutar instead of tar
141 if [ -z `which gnutar` ]; then
147 #############################
148 # Build the required firmwares
149 #############################
151 gitClone "https://github.com/Ultimaker/cura-binary-data" _cura_binary_data
153 cp -v _cura_binary_data/cura/resources/firmware/* resources/firmware/
155 #############################
157 #############################
159 if [ "$BUILD_TARGET" = "darwin" ]; then
160 TARGET_DIR=Cura-${BUILD_VERSION}-MacOS
162 rm -rf scripts/darwin/build
163 rm -rf scripts/darwin/dist
165 python build_app.py py2app
167 if [[ $rc != 0 ]]; then
168 echo "Cannot build app."
172 #Add cura version file (should read the version from the bundle with pyobjc, but will figure that out later)
173 echo $BUILD_VERSION > scripts/darwin/dist/Cura.app/Contents/Resources/version
175 gitClone ${CURA_ENGINE_REPO} CuraEngine
176 if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi
177 $MAKE -C CuraEngine VERSION=${BUILD_VERSION}
178 if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi
179 cp CuraEngine/build/CuraEngine scripts/darwin/dist/Cura.app/Contents/Resources/CuraEngine
183 # Install QuickLook plugin
184 mkdir -p dist/Cura.app/Contents/Library/QuickLook
185 cp -a STLQuickLook.qlgenerator dist/Cura.app/Contents/Library/QuickLook/
189 $TAR cfp - Cura.app | gzip --best -c > ../../../${TARGET_DIR}.tar.gz
192 # Create sparse image for distribution
193 hdiutil detach /Volumes/Cura\ -\ Lulzbot/ || true
194 rm -rf Cura.dmg.sparseimage
195 hdiutil convert DmgTemplateCompressed.dmg -format UDSP -o Cura.dmg
196 hdiutil resize -size 500m Cura.dmg.sparseimage
197 hdiutil attach Cura.dmg.sparseimage
198 cp -a dist/Cura.app /Volumes/Cura\ -\ Lulzbot/Cura/
199 hdiutil detach /Volumes/Cura\ -\ Lulzbot
200 hdiutil convert Cura.dmg.sparseimage -format UDZO -imagekey zlib-level=9 -ov -o ../../${TARGET_DIR}.dmg
204 #############################
205 # FreeBSD part by CeDeROM
206 #############################
208 if [ "$BUILD_TARGET" = "freebsd" ]; then
210 gitClone https://github.com/GreatFruitOmsk/Power Power
211 gitClone ${CURA_ENGINE_REPO} CuraEngine
212 if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi
213 gmake -j4 -C CuraEngine VERSION=${BUILD_VERSION}
214 if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi
215 rm -rf scripts/freebsd/dist
216 mkdir -p scripts/freebsd/dist/share/cura
217 mkdir -p scripts/freebsd/dist/share/applications
218 mkdir -p scripts/freebsd/dist/bin
219 cp -a Cura scripts/freebsd/dist/share/cura/
220 cp -a resources scripts/freebsd/dist/share/cura/
221 cp -a plugins scripts/freebsd/dist/share/cura/
222 cp -a CuraEngine/build/CuraEngine scripts/freebsd/dist/share/cura/
223 cp scripts/freebsd/cura.py scripts/freebsd/dist/share/cura/
224 cp scripts/freebsd/cura.desktop scripts/freebsd/dist/share/applications/
225 cp scripts/freebsd/cura scripts/freebsd/dist/bin/
226 cp -a Power/power scripts/freebsd/dist/share/cura/
227 echo $BUILD_VERSION > scripts/freebsd/dist/share/cura/Cura/version
228 #Create file list (pkg-plist)
229 cd scripts/freebsd/dist
230 find * -type f > ../pkg-plist
231 DIRLVL=20; while [ $DIRLVL -ge 0 ]; do
232 DIRS=`find share/cura -type d -depth $DIRLVL`
234 echo "@dirrm $DIR" >> ../pkg-plist
236 DIRLVL=`expr $DIRLVL - 1`
239 # Create archive or package if root
240 if [ `whoami` == "root" ]; then
241 echo "Are you root? Use the Port Luke! :-)"
243 echo "You are not root, building simple package archive..."
245 $TAR czf ../../${TARGET_DIR}.tar.gz dist/**
250 #############################
252 #############################
254 if [ "$BUILD_TARGET" = "debian_i386" ]; then
255 export CXX="g++ -m32"
256 gitClone https://github.com/GreatFruitOmsk/Power Power
257 gitClone ${CURA_ENGINE_REPO} CuraEngine
258 if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi
259 $MAKE -C CuraEngine VERSION=${BUILD_VERSION}
260 if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi
261 rm -rf scripts/linux/${BUILD_TARGET}/usr/share/cura
262 mkdir -p scripts/linux/${BUILD_TARGET}/usr/share/cura
263 cp -a Cura scripts/linux/${BUILD_TARGET}/usr/share/cura/
264 cp -a resources scripts/linux/${BUILD_TARGET}/usr/share/cura/
265 cp -a plugins scripts/linux/${BUILD_TARGET}/usr/share/cura/
266 cp -a CuraEngine/build/CuraEngine scripts/linux/${BUILD_TARGET}/usr/share/cura/
267 cp scripts/linux/cura.py scripts/linux/${BUILD_TARGET}/usr/share/cura/
268 cp -a Power/power scripts/linux/${BUILD_TARGET}/usr/share/cura/
269 echo $BUILD_VERSION > scripts/linux/${BUILD_TARGET}/usr/share/cura/Cura/version
270 cat scripts/linux/debian_control | sed "s/\[BUILD_VERSION\]/${FULL_VERSION}/" | sed 's/\[ARCH\]/i386/' > scripts/linux/${BUILD_TARGET}/DEBIAN/control
271 sudo chown root:root scripts/linux/${BUILD_TARGET} -R
272 sudo chmod 755 scripts/linux/${BUILD_TARGET}/usr -R
273 sudo chmod 755 scripts/linux/${BUILD_TARGET}/DEBIAN -R
275 dpkg-deb -Zgzip --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${FULL_VERSION}_i386.deb
276 sudo chown `id -un`:`id -gn` ${BUILD_TARGET} -R
280 #############################
282 #############################
284 if [ "$BUILD_TARGET" = "debian_amd64" ]; then
285 export CXX="g++ -m64"
286 gitClone https://github.com/GreatFruitOmsk/Power Power
287 gitClone ${CURA_ENGINE_REPO} CuraEngine
288 if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi
289 $MAKE -C CuraEngine VERSION=${BUILD_VERSION}
290 if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi
291 rm -rf scripts/linux/${BUILD_TARGET}/usr/share/cura
292 mkdir -p scripts/linux/${BUILD_TARGET}/usr/share/cura
293 cp -a Cura scripts/linux/${BUILD_TARGET}/usr/share/cura/
294 cp -a resources scripts/linux/${BUILD_TARGET}/usr/share/cura/
295 cp -a plugins scripts/linux/${BUILD_TARGET}/usr/share/cura/
296 cp -a CuraEngine/build/CuraEngine scripts/linux/${BUILD_TARGET}/usr/share/cura/
297 cp scripts/linux/cura.py scripts/linux/${BUILD_TARGET}/usr/share/cura/
298 cp -a Power/power scripts/linux/${BUILD_TARGET}/usr/share/cura/
299 echo $BUILD_VERSION > scripts/linux/${BUILD_TARGET}/usr/share/cura/Cura/version
300 cat scripts/linux/debian_control | sed "s/\[BUILD_VERSION\]/${FULL_VERSION}/" | sed 's/\[ARCH\]/amd64/' > scripts/linux/${BUILD_TARGET}/DEBIAN/control
301 sudo chown root:root scripts/linux/${BUILD_TARGET} -R
302 sudo chmod 755 scripts/linux/${BUILD_TARGET}/usr -R
303 sudo chmod 755 scripts/linux/${BUILD_TARGET}/DEBIAN -R
305 dpkg-deb -Zgzip --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${FULL_VERSION}_amd64.deb
306 sudo chown `id -un`:`id -gn` ${BUILD_TARGET} -R
310 #############################
312 #############################
314 if [ "$BUILD_TARGET" = "debian_armhf" ]; then
316 gitClone https://github.com/GreatFruitOmsk/Power Power
317 gitClone ${CURA_ENGINE_REPO} CuraEngine
318 if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi
319 $MAKE -C CuraEngine VERSION=${BUILD_VERSION}
320 if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi
321 rm -rf scripts/linux/${BUILD_TARGET}/usr/share/cura
322 mkdir -p scripts/linux/${BUILD_TARGET}/usr/share/cura
323 cp -a Cura scripts/linux/${BUILD_TARGET}/usr/share/cura/
324 cp -a resources scripts/linux/${BUILD_TARGET}/usr/share/cura/
325 cp -a plugins scripts/linux/${BUILD_TARGET}/usr/share/cura/
326 cp -a CuraEngine/build/CuraEngine scripts/linux/${BUILD_TARGET}/usr/share/cura/
327 cp scripts/linux/cura.py scripts/linux/${BUILD_TARGET}/usr/share/cura/
328 cp -a Power/power scripts/linux/${BUILD_TARGET}/usr/share/cura/
329 echo $BUILD_VERSION > scripts/linux/${BUILD_TARGET}/usr/share/cura/Cura/version
330 cat scripts/linux/debian_control | sed "s/\[BUILD_VERSION\]/${FULL_VERSION}/" | sed 's/\[ARCH\]/armhf/' > scripts/linux/${BUILD_TARGET}/DEBIAN/control
331 sudo chown root:root scripts/linux/${BUILD_TARGET} -R
332 sudo chmod 755 scripts/linux/${BUILD_TARGET}/usr -R
333 sudo chmod 755 scripts/linux/${BUILD_TARGET}/DEBIAN -R
335 dpkg-deb --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${BUILD_VERSION}-${BUILD_TARGET}.deb
336 sudo chown `id -un`:`id -gn` ${BUILD_TARGET} -R
340 #############################
342 #############################
344 function sanitiseVersion() {
346 echo "${_version//-/.}"
349 function fedoraCreateSRPM() {
351 local _version="$(sanitiseVersion "$2")"
352 local _srcSpecFile="$3"
353 local _srcSpecFileRelease="$4"
354 local _dstSrpmDir="$5"
356 local _dstTarSources="$HOME/rpmbuild/SOURCES/$_curaName-$_version.tar.gz"
357 local _dstSpec="$HOME/rpmbuild/SPECS/$_curaName-$_version.spec"
359 local _namePower="Power"
360 local _nameCuraEngine="CuraEngine"
362 gitClone "https://github.com/GreatFruitOmsk/Power" "$_namePower"
363 gitClone "$CURA_ENGINE_REPO" "$_nameCuraEngine"
366 local _gitPower="$(git rev-list -1 HEAD)"
369 cd "$_nameCuraEngine"
370 local _gitCuraEngine="$(git rev-list -1 HEAD)"
373 local _gitCura="$(git rev-list -1 HEAD)"
377 rm -fv "$_dstTarSources"
380 --transform "s#^#$_curaName-$_version/#" \
381 -zcvf "$_dstTarSources" \
387 scripts/linux/cura.py \
388 scripts/linux/fedora/usr
391 -e "s#__curaName__#$_curaName#" \
392 -e "s#__version__#$_version#" \
393 -e "s#__gitCura__#$_gitCura#" \
394 -e "s#__gitCuraEngine__#$_gitCuraEngine#" \
395 -e "s#__gitPower__#$_gitPower#" \
396 -e "s#__basedir__#scripts/linux/fedora#" \
400 rpmbuild -bs "$_dstSpec"
402 mkdir -pv "$_dstSrpmDir"
404 "$HOME/rpmbuild/SRPMS/$_curaName-$_version-$_srcSpecFileRelease.src.rpm" \
408 function buildFedora() {
409 local _nameForRpm="Cura"
410 local _versionForRpm="$(sanitiseVersion "$BUILD_VERSION")"
416 local _srcSpecFile="scripts/linux/fedora/rpm.spec"
417 local _srcSpecFileRelease="$(rpmspec -P "$_srcSpecFile" | grep -E '^Release:'|awk '{print $NF}')"
418 local _dstSrpmDir="scripts/linux/fedora/SRPMS"
424 "$_srcSpecFileRelease" \
431 local _srpmFile="$_dstSrpmDir/$_nameForRpm-$_versionForRpm-$_srcSpecFileRelease.src.rpm"
432 local _dstRpmDir="scripts/linux/fedora/RPMS"
434 while [ $# -ne 0 ]; do
435 local _mockRelease="$(basename "${1%\.cfg}")"
436 local _mockReleaseArg=""
437 if [ -n "$_mockRelease" ]; then
438 _mockReleaseArg="-r $_mockRelease"
441 mkdir -pv "$_dstRpmDir/$_mockRelease"
442 # Need to use /usr/bin/mock because depending on $PATH, if /usr/sbin/mock is
443 # run instead, it will give an error.
446 --resultdir="$_dstRpmDir/$_mockRelease" \
453 #############################
455 #############################
457 if [ "$BUILD_TARGET" = "fedora" ]; then
458 shift 1 # skip "fedora" arg
460 if [ $# -eq 0 ]; then
461 "$0" "$BUILD_TARGET" ""
469 #############################
471 #############################
473 #############################
474 # Download all needed files.
475 #############################
477 if [ $BUILD_TARGET = "win32" ]; then
478 #Get portable python for windows and extract it. (Linux and Mac need to install python themselfs)
479 downloadURL http://ftp.nluug.nl/languages/python/portablepython/v2.7/PortablePython_${WIN_PORTABLE_PY_VERSION}.exe
480 downloadURL http://sourceforge.net/projects/pyopengl/files/PyOpenGL/3.0.1/PyOpenGL-3.0.1.win32.exe
481 downloadURL http://videocapture.sourceforge.net/VideoCapture-0.9-5.zip
482 #downloadURL http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20120927-git-13f0cd6-win32-static.7z
483 downloadURL http://sourceforge.net/projects/comtypes/files/comtypes/0.6.2/comtypes-0.6.2.win32.exe
484 downloadURL http://www.uwe-sieber.de/files/ejectmedia.zip
485 #Get the power module for python
486 gitClone https://github.com/GreatFruitOmsk/Power Power
487 if [ $? != 0 ]; then echo "Failed to clone Power"; exit 1; fi
488 gitClone ${CURA_ENGINE_REPO} CuraEngine
489 if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi
492 #############################
494 #############################
496 mkdir -p ${TARGET_DIR}
499 if [ $BUILD_TARGET = "win32" ]; then
500 if [ -z `which i686-w64-mingw32-g++` ]; then
503 CXX=i686-w64-mingw32-g++
506 #For windows extract portable python to include it.
507 extract PortablePython_${WIN_PORTABLE_PY_VERSION}.exe App
508 extract PyOpenGL-3.0.1.win32.exe PURELIB
509 extract VideoCapture-0.9-5.zip VideoCapture-0.9-5/Python27/DLLs/vidcap.pyd
510 #extract ffmpeg-20120927-git-13f0cd6-win32-static.7z ffmpeg-20120927-git-13f0cd6-win32-static/bin/ffmpeg.exe
511 #extract ffmpeg-20120927-git-13f0cd6-win32-static.7z ffmpeg-20120927-git-13f0cd6-win32-static/licenses
512 extract comtypes-0.6.2.win32.exe
513 extract ejectmedia.zip Win32
515 mkdir -p ${TARGET_DIR}/python
516 mkdir -p ${TARGET_DIR}/Cura/
517 mv App/Lib/site-packages/ PURELIB/
518 mv App/* ${TARGET_DIR}/python
519 mkdir -p ${TARGET_DIR}/python/Lib/site-packages/
520 mv PURELIB/site-packages/setuptools* PURELIB/site-packages/site.py PURELIB/site-packages/easy_install.py ${TARGET_DIR}/python/Lib/site-packages/
521 mv PURELIB/site-packages/numpy* ${TARGET_DIR}/python/Lib/site-packages/
522 mv PURELIB/site-packages/serial* ${TARGET_DIR}/python/Lib/site-packages/
523 mv PURELIB/site-packages/pyserial* ${TARGET_DIR}/python/Lib/site-packages/
524 mv PURELIB/site-packages/wx* ${TARGET_DIR}/python/Lib/site-packages/
525 mv PURELIB/OpenGL ${TARGET_DIR}/python/Lib
526 mv PURELIB/comtypes ${TARGET_DIR}/python/Lib
527 mv Power/power ${TARGET_DIR}/python/Lib
528 mv VideoCapture-0.9-5/Python27/DLLs/vidcap.pyd ${TARGET_DIR}/python/DLLs
529 #mv ffmpeg-20120927-git-13f0cd6-win32-static/bin/ffmpeg.exe ${TARGET_DIR}/Cura/
530 #mv ffmpeg-20120927-git-13f0cd6-win32-static/licenses ${TARGET_DIR}/Cura/ffmpeg-licenses/
531 mv Win32/EjectMedia.exe ${TARGET_DIR}/Cura/
532 cp -a scripts/win32/nsisPlugins/libgcc_s_dw2-1.dll ${TARGET_DIR}
533 cp -a scripts/win32/nsisPlugins/libstdc++-6.dll ${TARGET_DIR}
538 rm -rf VideoCapture-0.9-5
539 #rm -rf ffmpeg-20120927-git-13f0cd6-win32-static
541 #Clean up portable python a bit, to keep the package size down.
542 rm -rf ${TARGET_DIR}/python/PyScripter.*
543 rm -rf ${TARGET_DIR}/python/Doc
544 rm -rf ${TARGET_DIR}/python/locale
545 rm -rf ${TARGET_DIR}/python/tcl
546 rm -rf ${TARGET_DIR}/python/Lib/test
547 rm -rf ${TARGET_DIR}/python/Lib/distutils
548 rm -rf ${TARGET_DIR}/python/Lib/site-packages/wx-3.0-msw/wx/tools
549 rm -rf ${TARGET_DIR}/python/Lib/site-packages/wx-3.0-msw/wx/locale
550 #Remove the gle files because they require MSVCR71.dll, which is not included. We also don't need gle, so it's safe to remove it.
551 rm -rf ${TARGET_DIR}/python/Lib/OpenGL/DLLS/gle*
554 rm -rf ${TARGET_DIR}/python/PyCharm/
555 rm -rf ${TARGET_DIR}/python/share/
556 rm -rf ${TARGET_DIR}/python/qt.conf
558 #Build the C++ engine
559 $MAKE -C CuraEngine VERSION=${BUILD_VERSION} OS=Windows_NT CXX=${CXX}
560 if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi
564 mkdir -p ${TARGET_DIR}/Cura ${TARGET_DIR}/resources ${TARGET_DIR}/plugins
565 cp -a Cura/* ${TARGET_DIR}/Cura
566 cp -a resources/* ${TARGET_DIR}/resources
567 cp -a plugins/* ${TARGET_DIR}/plugins
568 #Add cura version file
569 echo $BUILD_VERSION > ${TARGET_DIR}/Cura/version
572 if [ $BUILD_TARGET = "win32" ]; then
573 cp -a scripts/win32/cura.bat $TARGET_DIR/
574 cp CuraEngine/build/CuraEngine.exe $TARGET_DIR
575 #cp /usr/lib/gcc/i686-w64-mingw32/4.8/libgcc_s_sjlj-1.dll $TARGET_DIR
576 #cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll $TARGET_DIR
577 #cp /usr/lib/gcc/i686-w64-mingw32/4.8/libstdc++-6.dll $TARGET_DIR
581 if (( ${ARCHIVE_FOR_DISTRIBUTION} )); then
582 if [ $BUILD_TARGET = "win32" ]; then
583 #rm ${TARGET_DIR}.zip
585 #7z a ../${TARGET_DIR}.zip *
588 if [ ! -z `which wine` ]; then
589 #if we have wine, try to run our nsis script.
590 rm -rf scripts/win32/dist
591 ln -sf `pwd`/${TARGET_DIR} scripts/win32/dist
592 wine ~/.wine/drive_c/Program\ Files\ \(x86\)/NSIS/makensis.exe /DVERSION=${BUILD_VERSION} scripts/win32/installer.nsi
593 if [ $? != 0 ]; then echo "Failed to package NSIS installer"; exit 1; fi
594 mv scripts/win32/Cura_${FULL_VERSION}.exe ./
596 if [ -f '/c/Program Files (x86)/NSIS/makensis.exe' ]; then
597 rm -rf scripts/win32/dist
598 mv "`pwd`/${TARGET_DIR}" scripts/win32/dist
599 '/c/Program Files (x86)/NSIS/makensis.exe' -DVERSION=${BUILD_VERSION} 'scripts/win32/installer.nsi' >> log.txt
600 if [ $? != 0 ]; then echo "Failed to package NSIS installer"; exit 1; fi
601 mv scripts/win32/Cura_${BUILD_VERSION}.exe ./
604 echo "Archiving to ${TARGET_DIR}.tar.gz"
605 $TAR cfp - ${TARGET_DIR} | gzip --best -c > ${TARGET_DIR}.tar.gz
608 echo "Installed into ${TARGET_DIR}"