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
272 chown root:root scripts/linux/${BUILD_TARGET} -R
273 chmod 755 scripts/linux/${BUILD_TARGET}/usr -R
274 chmod 755 scripts/linux/${BUILD_TARGET}/DEBIAN -R
276 dpkg-deb -Zgzip --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${FULL_VERSION}_i386.deb
277 chown `id -un`:`id -gn` ${BUILD_TARGET} -R
282 #############################
284 #############################
286 if [ "$BUILD_TARGET" = "debian_amd64" ]; then
287 export CXX="g++ -m64"
288 gitClone https://github.com/GreatFruitOmsk/Power Power
289 gitClone ${CURA_ENGINE_REPO} CuraEngine
290 if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi
291 $MAKE -C CuraEngine VERSION=${BUILD_VERSION}
292 if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi
293 rm -rf scripts/linux/${BUILD_TARGET}/usr/share/cura
294 mkdir -p scripts/linux/${BUILD_TARGET}/usr/share/cura
295 cp -a Cura scripts/linux/${BUILD_TARGET}/usr/share/cura/
296 cp -a resources scripts/linux/${BUILD_TARGET}/usr/share/cura/
297 cp -a plugins scripts/linux/${BUILD_TARGET}/usr/share/cura/
298 cp -a CuraEngine/build/CuraEngine scripts/linux/${BUILD_TARGET}/usr/share/cura/
299 cp scripts/linux/cura.py scripts/linux/${BUILD_TARGET}/usr/share/cura/
300 cp -a Power/power scripts/linux/${BUILD_TARGET}/usr/share/cura/
301 echo $BUILD_VERSION > scripts/linux/${BUILD_TARGET}/usr/share/cura/Cura/version
302 cat scripts/linux/debian_control | sed "s/\[BUILD_VERSION\]/${FULL_VERSION}/" | sed 's/\[ARCH\]/amd64/' > scripts/linux/${BUILD_TARGET}/DEBIAN/control
304 chown root:root scripts/linux/${BUILD_TARGET} -R
305 chmod 755 scripts/linux/${BUILD_TARGET}/usr -R
306 chmod 755 scripts/linux/${BUILD_TARGET}/DEBIAN -R
308 dpkg-deb -Zgzip --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${FULL_VERSION}_amd64.deb
309 chown `id -un`:`id -gn` ${BUILD_TARGET} -R
314 #############################
316 #############################
318 if [ "$BUILD_TARGET" = "debian_armhf" ]; then
320 gitClone https://github.com/GreatFruitOmsk/Power Power
321 gitClone ${CURA_ENGINE_REPO} CuraEngine
322 if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi
323 $MAKE -C CuraEngine VERSION=${BUILD_VERSION}
324 if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi
325 rm -rf scripts/linux/${BUILD_TARGET}/usr/share/cura
326 mkdir -p scripts/linux/${BUILD_TARGET}/usr/share/cura
327 cp -a Cura scripts/linux/${BUILD_TARGET}/usr/share/cura/
328 cp -a resources scripts/linux/${BUILD_TARGET}/usr/share/cura/
329 cp -a plugins scripts/linux/${BUILD_TARGET}/usr/share/cura/
330 cp -a CuraEngine/build/CuraEngine scripts/linux/${BUILD_TARGET}/usr/share/cura/
331 cp scripts/linux/cura.py scripts/linux/${BUILD_TARGET}/usr/share/cura/
332 cp -a Power/power scripts/linux/${BUILD_TARGET}/usr/share/cura/
333 echo $BUILD_VERSION > scripts/linux/${BUILD_TARGET}/usr/share/cura/Cura/version
334 cat scripts/linux/debian_control | sed "s/\[BUILD_VERSION\]/${FULL_VERSION}/" | sed 's/\[ARCH\]/armhf/' > scripts/linux/${BUILD_TARGET}/DEBIAN/control
336 chown root:root scripts/linux/${BUILD_TARGET} -R
337 chmod 755 scripts/linux/${BUILD_TARGET}/usr -R
338 chmod 755 scripts/linux/${BUILD_TARGET}/DEBIAN -R
340 dpkg-deb --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${BUILD_VERSION}-${BUILD_TARGET}.deb
341 chown `id -un`:`id -gn` ${BUILD_TARGET} -R
346 #############################
348 #############################
350 function sanitiseVersion() {
352 echo "${_version//-/.}"
355 function fedoraCreateSRPM() {
357 local _version="$(sanitiseVersion "$2")"
358 local _srcSpecFile="$3"
359 local _srcSpecFileRelease="$4"
360 local _dstSrpmDir="$5"
362 local _dstTarSources="$HOME/rpmbuild/SOURCES/$_curaName-$_version.tar.gz"
363 local _dstSpec="$HOME/rpmbuild/SPECS/$_curaName-$_version.spec"
365 local _namePower="Power"
366 local _nameCuraEngine="CuraEngine"
368 gitClone "https://github.com/GreatFruitOmsk/Power" "$_namePower"
369 gitClone "$CURA_ENGINE_REPO" "$_nameCuraEngine"
372 local _gitPower="$(git rev-list -1 HEAD)"
375 cd "$_nameCuraEngine"
376 local _gitCuraEngine="$(git rev-list -1 HEAD)"
379 local _gitCura="$(git rev-list -1 HEAD)"
383 rm -fv "$_dstTarSources"
386 --transform "s#^#$_curaName-$_version/#" \
387 -zcvf "$_dstTarSources" \
393 scripts/linux/cura.py \
394 scripts/linux/fedora/usr
397 -e "s#__curaName__#$_curaName#" \
398 -e "s#__version__#$_version#" \
399 -e "s#__gitCura__#$_gitCura#" \
400 -e "s#__gitCuraEngine__#$_gitCuraEngine#" \
401 -e "s#__gitPower__#$_gitPower#" \
402 -e "s#__basedir__#scripts/linux/fedora#" \
406 rpmbuild -bs "$_dstSpec"
408 mkdir -pv "$_dstSrpmDir"
410 "$HOME/rpmbuild/SRPMS/$_curaName-$_version-$_srcSpecFileRelease.src.rpm" \
414 function buildFedora() {
415 local _nameForRpm="Cura"
416 local _versionForRpm="$(sanitiseVersion "$BUILD_VERSION")"
422 local _srcSpecFile="scripts/linux/fedora/rpm.spec"
423 local _srcSpecFileRelease="$(rpmspec -P "$_srcSpecFile" | grep -E '^Release:'|awk '{print $NF}')"
424 local _dstSrpmDir="scripts/linux/fedora/SRPMS"
430 "$_srcSpecFileRelease" \
437 local _srpmFile="$_dstSrpmDir/$_nameForRpm-$_versionForRpm-$_srcSpecFileRelease.src.rpm"
438 local _dstRpmDir="scripts/linux/fedora/RPMS"
440 while [ $# -ne 0 ]; do
441 local _mockRelease="$(basename "${1%\.cfg}")"
442 local _mockReleaseArg=""
443 if [ -n "$_mockRelease" ]; then
444 _mockReleaseArg="-r $_mockRelease"
447 mkdir -pv "$_dstRpmDir/$_mockRelease"
448 # Need to use /usr/bin/mock because depending on $PATH, if /usr/sbin/mock is
449 # run instead, it will give an error.
452 --resultdir="$_dstRpmDir/$_mockRelease" \
459 #############################
461 #############################
463 if [ "$BUILD_TARGET" = "fedora" ]; then
464 shift 1 # skip "fedora" arg
466 if [ $# -eq 0 ]; then
467 "$0" "$BUILD_TARGET" ""
475 #############################
477 #############################
479 #############################
480 # Download all needed files.
481 #############################
483 if [ $BUILD_TARGET = "win32" ]; then
484 #Get portable python for windows and extract it. (Linux and Mac need to install python themselfs)
485 downloadURL http://ftp.nluug.nl/languages/python/portablepython/v2.7/PortablePython_${WIN_PORTABLE_PY_VERSION}.exe
486 downloadURL http://sourceforge.net/projects/pyopengl/files/PyOpenGL/3.0.1/PyOpenGL-3.0.1.win32.exe
487 downloadURL http://videocapture.sourceforge.net/VideoCapture-0.9-5.zip
488 #downloadURL http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20120927-git-13f0cd6-win32-static.7z
489 downloadURL http://sourceforge.net/projects/comtypes/files/comtypes/0.6.2/comtypes-0.6.2.win32.exe
490 downloadURL http://www.uwe-sieber.de/files/ejectmedia.zip
491 #Get the power module for python
492 gitClone https://github.com/GreatFruitOmsk/Power Power
493 if [ $? != 0 ]; then echo "Failed to clone Power"; exit 1; fi
494 gitClone ${CURA_ENGINE_REPO} CuraEngine
495 if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi
498 #############################
500 #############################
502 mkdir -p ${TARGET_DIR}
505 if [ $BUILD_TARGET = "win32" ]; then
506 if [ -z `which i686-w64-mingw32-g++` ]; then
509 CXX=i686-w64-mingw32-g++
512 #For windows extract portable python to include it.
513 extract PortablePython_${WIN_PORTABLE_PY_VERSION}.exe App
514 extract PyOpenGL-3.0.1.win32.exe PURELIB
515 extract VideoCapture-0.9-5.zip VideoCapture-0.9-5/Python27/DLLs/vidcap.pyd
516 #extract ffmpeg-20120927-git-13f0cd6-win32-static.7z ffmpeg-20120927-git-13f0cd6-win32-static/bin/ffmpeg.exe
517 #extract ffmpeg-20120927-git-13f0cd6-win32-static.7z ffmpeg-20120927-git-13f0cd6-win32-static/licenses
518 extract comtypes-0.6.2.win32.exe
519 extract ejectmedia.zip Win32
521 mkdir -p ${TARGET_DIR}/python
522 mkdir -p ${TARGET_DIR}/Cura/
523 mv App/Lib/site-packages/ PURELIB/
524 mv App/* ${TARGET_DIR}/python
525 mkdir -p ${TARGET_DIR}/python/Lib/site-packages/
526 mv PURELIB/site-packages/setuptools* PURELIB/site-packages/site.py PURELIB/site-packages/easy_install.py ${TARGET_DIR}/python/Lib/site-packages/
527 mv PURELIB/site-packages/numpy* ${TARGET_DIR}/python/Lib/site-packages/
528 mv PURELIB/site-packages/serial* ${TARGET_DIR}/python/Lib/site-packages/
529 mv PURELIB/site-packages/pyserial* ${TARGET_DIR}/python/Lib/site-packages/
530 mv PURELIB/site-packages/wx* ${TARGET_DIR}/python/Lib/site-packages/
531 mv PURELIB/OpenGL ${TARGET_DIR}/python/Lib
532 mv PURELIB/comtypes ${TARGET_DIR}/python/Lib
533 mv Power/power ${TARGET_DIR}/python/Lib
534 mv VideoCapture-0.9-5/Python27/DLLs/vidcap.pyd ${TARGET_DIR}/python/DLLs
535 #mv ffmpeg-20120927-git-13f0cd6-win32-static/bin/ffmpeg.exe ${TARGET_DIR}/Cura/
536 #mv ffmpeg-20120927-git-13f0cd6-win32-static/licenses ${TARGET_DIR}/Cura/ffmpeg-licenses/
537 mv Win32/EjectMedia.exe ${TARGET_DIR}/Cura/
538 cp -a scripts/win32/nsisPlugins/libgcc_s_dw2-1.dll ${TARGET_DIR}
539 cp -a scripts/win32/nsisPlugins/libstdc++-6.dll ${TARGET_DIR}
544 rm -rf VideoCapture-0.9-5
545 #rm -rf ffmpeg-20120927-git-13f0cd6-win32-static
547 #Clean up portable python a bit, to keep the package size down.
548 rm -rf ${TARGET_DIR}/python/PyScripter.*
549 rm -rf ${TARGET_DIR}/python/Doc
550 rm -rf ${TARGET_DIR}/python/locale
551 rm -rf ${TARGET_DIR}/python/tcl
552 rm -rf ${TARGET_DIR}/python/Lib/test
553 rm -rf ${TARGET_DIR}/python/Lib/distutils
554 rm -rf ${TARGET_DIR}/python/Lib/site-packages/wx-3.0-msw/wx/tools
555 rm -rf ${TARGET_DIR}/python/Lib/site-packages/wx-3.0-msw/wx/locale
556 #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.
557 rm -rf ${TARGET_DIR}/python/Lib/OpenGL/DLLS/gle*
560 rm -rf ${TARGET_DIR}/python/PyCharm/
561 rm -rf ${TARGET_DIR}/python/share/
562 rm -rf ${TARGET_DIR}/python/qt.conf
564 #Build the C++ engine
565 $MAKE -C CuraEngine VERSION=${BUILD_VERSION} OS=Windows_NT CXX=${CXX}
566 if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi
570 mkdir -p ${TARGET_DIR}/Cura ${TARGET_DIR}/resources ${TARGET_DIR}/plugins
571 cp -a Cura/* ${TARGET_DIR}/Cura
572 cp -a resources/* ${TARGET_DIR}/resources
573 cp -a plugins/* ${TARGET_DIR}/plugins
574 #Add cura version file
575 echo $BUILD_VERSION > ${TARGET_DIR}/Cura/version
578 if [ $BUILD_TARGET = "win32" ]; then
579 cp -a scripts/win32/cura.bat $TARGET_DIR/
580 cp CuraEngine/build/CuraEngine.exe $TARGET_DIR
581 #cp /usr/lib/gcc/i686-w64-mingw32/4.8/libgcc_s_sjlj-1.dll $TARGET_DIR
582 #cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll $TARGET_DIR
583 #cp /usr/lib/gcc/i686-w64-mingw32/4.8/libstdc++-6.dll $TARGET_DIR
587 if (( ${ARCHIVE_FOR_DISTRIBUTION} )); then
588 if [ $BUILD_TARGET = "win32" ]; then
589 #rm ${TARGET_DIR}.zip
591 #7z a ../${TARGET_DIR}.zip *
594 if [ ! -z `which wine` ]; then
595 #if we have wine, try to run our nsis script.
596 rm -rf scripts/win32/dist
597 ln -sf `pwd`/${TARGET_DIR} scripts/win32/dist
598 wine ~/.wine/drive_c/Program\ Files\ \(x86\)/NSIS/makensis.exe /DVERSION=${BUILD_VERSION} scripts/win32/installer.nsi
599 if [ $? != 0 ]; then echo "Failed to package NSIS installer"; exit 1; fi
600 mv scripts/win32/Cura_${FULL_VERSION}.exe ./
602 if [ -f '/c/Program Files (x86)/NSIS/makensis.exe' ]; then
603 rm -rf scripts/win32/dist
604 mv "`pwd`/${TARGET_DIR}" scripts/win32/dist
605 '/c/Program Files (x86)/NSIS/makensis.exe' -DVERSION=${BUILD_VERSION} 'scripts/win32/installer.nsi' >> log.txt
606 if [ $? != 0 ]; then echo "Failed to package NSIS installer"; exit 1; fi
607 mv scripts/win32/Cura_${BUILD_VERSION}.exe ./
610 echo "Archiving to ${TARGET_DIR}.tar.gz"
611 $TAR cfp - ${TARGET_DIR} | gzip --best -c > ${TARGET_DIR}.tar.gz
614 echo "Installed into ${TARGET_DIR}"