From 47902704240e057594074e4d24550112deb482ff Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 29 Jul 2012 10:24:38 -0500 Subject: script to help build windows installer. diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh index e820e20..f1e9984 100755 --- a/scripts/mingw-x-build-dependencies.sh +++ b/scripts/mingw-x-build-dependencies.sh @@ -19,6 +19,12 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then echo "Must be run from the OpenSCAD source root directory" exit 0 fi + +if [ $OPENSCAD_LIBRARIES ]; then + echo "OPENSCAD_LIBRARIES env variable is already set. Please re-run from a clean shell." + exit 0 +fi + BASEDIR=$HOME/openscad_deps MXEDIR=$BASEDIR/mxe PATH=$MXEDIR/usr/bin:$PATH diff --git a/scripts/mingw-x-build-installer.sh b/scripts/mingw-x-build-installer.sh new file mode 100755 index 0000000..0f6fc73 --- /dev/null +++ b/scripts/mingw-x-build-installer.sh @@ -0,0 +1,81 @@ +#!/bin/sh -e +# +# This script builds a binary install package of OpenSCAD for Windows +# using a cross-built mingw OpenSCAD and the NSIS installer system +# +# This script must be run from the OpenSCAD source root directory +# +# Usage: ./scripts/mingw-x-build-release.sh +# +# Result: binary installer in ./release_mingw32 directory +# +# +# Prerequisites: +# +# You need to run the scripts/mingw-x-build-dependencues.sh script +# and build openscad before running this script. +# +# You need MCAD. run 'git submodule init && git submodule update' +# +# You need the Nullsoft installer system, on ubuntu 'sudo apt-get install nsis' +# +# You need to copy/paste the FileAssociation.nsh file from +# http://nsis.sourceforge.net/File_Association into RELEASE_DIR +# (it has no license information so cannot be included directly) +# +# Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X +# + +OPENSCADDIR=$PWD +RELEASE_DIR=$OPENSCADDIR/release_mingw32 + +if [ ! -f $OPENSCADDIR/openscad.pro ]; then + echo "Must be run from the OpenSCAD source root directory" + exit 0 +fi + +if [ ! -e $OPENSCADDIR/libraries/MCAD ]; then + echo "Please download the MCAD submodule: (git submodule init && git submodule update)" + exit 0 +fi + +if [ ! -e $RELEASE_DIR ]; then + echo $RELEASE_DIR "empty. Please build OpenSCAD for mingw32 first." + exit 0 +fi + +if [ ! -e $RELEASE_DIR/openscad.exe ]; then + echo "Can't find" $RELEASE_DIR"/openscad.exe Please build OpenSCAD for mingw32 first." + exit 0 +fi + +if [ ! "`command -v makensis`" ]; then + echo "makensis not found. please install nsis" + exit 0 +fi + +if [ ! -e $RELEASE_DIR/FileAssociation.nsh ]; then + echo "Please install FileAssociation.nsh into" $RELEASE_DIR + echo "You can copy/paste it from http://nsis.sourceforge.net/File_Association" +fi + +echo "Copying files to" $RELEASE_DIR + +cp -av $OPENSCADDIR/libraries $RELEASE_DIR +cp -av $OPENSCADDIR/examples $RELEASE_DIR +cp -av $OPENSCADDIR/scripts/installer.nsi $RELEASE_DIR + +echo "running nsis" + +cd $RELEASE_DIR && makensis installer.nsi + +cd $OPENSCADDIR + +INSTALLFILE=$RELEASE_DIR/openscad_setup.exe + +if [ -e $INSTALLFILE ]; then + echo "Build complete. Install file ready: $INSTALLFILE" +else + echo "Build failed. Sorry." +fi + -- cgit v0.10.1 From 57173bbe7a2ab94a35ec51832d713d88e2678351 Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 29 Jul 2012 10:51:31 -0500 Subject: fix name of script diff --git a/scripts/mingw-x-build-installer.sh b/scripts/mingw-x-build-installer.sh index 0f6fc73..fb491f6 100755 --- a/scripts/mingw-x-build-installer.sh +++ b/scripts/mingw-x-build-installer.sh @@ -5,7 +5,7 @@ # # This script must be run from the OpenSCAD source root directory # -# Usage: ./scripts/mingw-x-build-release.sh +# Usage: ./scripts/mingw-x-build-installer.sh # # Result: binary installer in ./release_mingw32 directory # -- cgit v0.10.1 From bac5e1130c3f2f2db3eec5d8d232ad25b60284c5 Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 20:35:12 -0500 Subject: rework mingw to be more like other builds (setenv-mingw-xbuild.sh) diff --git a/openscad.pro b/openscad.pro index 3dfd1c5..2f02473 100644 --- a/openscad.pro +++ b/openscad.pro @@ -103,6 +103,10 @@ netbsd* { QMAKE_CXXFLAGS *= -fno-strict-aliasing } +*lyoob* { + message("lyoobyoo") +} + *clang* { # disable enormous amount of warnings about CGAL QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh index f1e9984..ac60d9e 100755 --- a/scripts/mingw-x-build-dependencies.sh +++ b/scripts/mingw-x-build-dependencies.sh @@ -20,36 +20,17 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then exit 0 fi -if [ $OPENSCAD_LIBRARIES ]; then - echo "OPENSCAD_LIBRARIES env variable is already set. Please re-run from a clean shell." - exit 0 -fi - -BASEDIR=$HOME/openscad_deps -MXEDIR=$BASEDIR/mxe -PATH=$MXEDIR/usr/bin:$PATH -mkdir -p $BASEDIR +. ./scripts/setenv-mingw-xbuild.sh -echo MXEDIR: $MXEDIR -echo BASEDIR: $BASEDIR -echo OPENSCADDIR: $OPENSCADDIR -echo PATH modified with $MXEDIR/usr/bin -if [ ! $NUMCPU ]; then - echo "note: you can 'export NUMCPU=x' for multi-core compiles (x=number)"; - NUMCPU=1 +if [ ! -e $BASEDIR ]; then + mkdir -p $BASEDIR fi -if [ ! $NUMJOBS ]; then - echo "note: you can 'export NUMJOBS=x' for building multiple pkgs at once" - if [ $NUMCPU -gt 2 ]; then - NUMJOBS=$((NUMCPU/2)) - else - NUMJOBS=1 - fi +if [ ! -e $DEPLOYDIR ]; then + mkdir -p $DEPLOYDIR fi -echo NUMCPU: $NUMCPU -echo NUMJOBS: $NUMJOBS cd $BASEDIR + if [ ! -e mxe ]; then echo "Downloading MXE into " $MXEDIR git clone git://github.com/mxe/mxe.git @@ -59,22 +40,24 @@ echo "entering" $MXEDIR cd $MXEDIR echo "make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS" make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS -#make mpfr -j$NUMCPU JOBS=$NUMJOBS # for testing +#make mpfr -j $NUMCPU JOBS=$NUMJOBS # for testing echo "leaving" $MXEDIR + echo "entering $OPENSCADDIR" cd $OPENSCADDIR -if [ -e mingw-cross-env ]; then - rm ./mingw-cross-env + +if [ -e $DEPLOYDIR/mingw-cross-env ]; then + rm $DEPLOYDIR/mingw-cross-env fi -echo "linking mingw-cross-env directory" -ln -s $MXEDIR/usr/i686-pc-mingw32/ ./mingw-cross-env +echo "linking mxe to" $DEPLOYDIR/mingw-cross-env +ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env echo echo "now copy/paste the following to cross-build openscad" echo -echo "export PATH=$MXEDIR/usr/bin:\$PATH" -echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env openscad.pro" +echo cd $DEPLOYDIR +echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro" #echo "make -j$NUMCPU" # causes parser_yacc.hpp errors echo "make" echo -- cgit v0.10.1 From 2f3e11a797e368a7cdf9726231de7c707629751e Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 20:35:38 -0500 Subject: new script to set env variables for mingw cross build diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh new file mode 100755 index 0000000..c85f84e --- /dev/null +++ b/scripts/setenv-mingw-xbuild.sh @@ -0,0 +1,42 @@ +#!/bin/sh -e +# +# set environment variables for mingw/mxe cross-build +# +# Usage: source ./scripts/setenv-mingw-xbuild.sh +# +# Prerequisites: +# +# Please see http://mxe.cc/#requirements +# +# Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X +# + +OPENSCADDIR=$PWD + +if [ ! $BASEDIR ]; then + BASEDIR=$HOME/openscad_deps +fi +DEPLOYDIR=$OPENSCADDIR/mingw32 +MXEDIR=$BASEDIR/mxe +PATH=$MXEDIR/usr/bin:$PATH + +echo MXEDIR: $MXEDIR +echo BASEDIR: $BASEDIR +echo DEPLOYDIR: $DEPLOYDIR +echo OPENSCADDIR: $OPENSCADDIR +echo PATH modified with $MXEDIR/usr/bin +if [ ! $NUMCPU ]; then + echo "note: you can 'export NUMCPU=x' for multi-core compiles (x=number)"; + NUMCPU=1 +fi +if [ ! $NUMJOBS ]; then + echo "note: you can 'export NUMJOBS=x' for building multiple pkgs at once" + if [ $NUMCPU -gt 2 ]; then + NUMJOBS=$((NUMCPU/2)) + else + NUMJOBS=1 + fi +fi +echo NUMCPU: $NUMCPU +echo NUMJOBS: $NUMJOBS + -- cgit v0.10.1 From 7eef9f7649929fe9efef28532ea1397725c6f78e Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 20:36:27 -0500 Subject: rework mingw build to use 'out of source build' for better dual-building diff --git a/mingw-cross-env.pri b/mingw-cross-env.pri index bc6f33a..9b808c0 100644 --- a/mingw-cross-env.pri +++ b/mingw-cross-env.pri @@ -11,21 +11,6 @@ CONFIG(mingw-cross-env) { LIBS += mingw-cross-env/lib/libgmp.a LIBS += mingw-cross-env/lib/libCGAL.a QMAKE_CXXFLAGS += -fpermissive - - - # Use different location for the cross-compiled binaries + .o files - # This allows compiling unix build + mingw build in same tree - - DESTDIR=. - - Release:DESTDIR = release_mingw32 - Debug:DESTDIR = debug_mingw32 - - OBJECTS_DIR = $$DESTDIR/objects - MOC_DIR = $$DESTDIR/moc - RCC_DIR = $$DESTDIR/rcc - UI_DIR = $$DESTDIR/ui - } -- cgit v0.10.1 From 782ce65835d8628c90bee9cca9a6fdfff45fdaae Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 20:44:41 -0500 Subject: replace RELEASE_DIR with DEPLOYDIR to match Mac OSX? auto-download MCAD. diff --git a/scripts/mingw-x-build-installer.sh b/scripts/mingw-x-build-installer.sh index fb491f6..8f0dddc 100755 --- a/scripts/mingw-x-build-installer.sh +++ b/scripts/mingw-x-build-installer.sh @@ -7,45 +7,48 @@ # # Usage: ./scripts/mingw-x-build-installer.sh # -# Result: binary installer in ./release_mingw32 directory +# Result: binary installer in $DEPLOYDIR directory # # # Prerequisites: # -# You need to run the scripts/mingw-x-build-dependencues.sh script -# and build openscad before running this script. +# source ./scripts/setenv-mingw-xbuild.sh +# ./scripts/mingw-x-build-dependencues.sh +# +# and then build openscad before running this script. # # You need MCAD. run 'git submodule init && git submodule update' # # You need the Nullsoft installer system, on ubuntu 'sudo apt-get install nsis' # # You need to copy/paste the FileAssociation.nsh file from -# http://nsis.sourceforge.net/File_Association into RELEASE_DIR +# http://nsis.sourceforge.net/File_Association into DEPLOYDIR # (it has no license information so cannot be included directly) # # Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X # OPENSCADDIR=$PWD -RELEASE_DIR=$OPENSCADDIR/release_mingw32 - if [ ! -f $OPENSCADDIR/openscad.pro ]; then echo "Must be run from the OpenSCAD source root directory" exit 0 fi +. ./scripts/setenv-mingw-xbuild.sh + if [ ! -e $OPENSCADDIR/libraries/MCAD ]; then - echo "Please download the MCAD submodule: (git submodule init && git submodule update)" - exit 0 + echo "Downloading MCAD" + git submodule init + git submodule update fi -if [ ! -e $RELEASE_DIR ]; then - echo $RELEASE_DIR "empty. Please build OpenSCAD for mingw32 first." +if [ ! -e $DEPLOYDIR ]; then + echo $DEPLOYDIR "empty. Please build OpenSCAD for mingw32 first." exit 0 fi -if [ ! -e $RELEASE_DIR/openscad.exe ]; then - echo "Can't find" $RELEASE_DIR"/openscad.exe Please build OpenSCAD for mingw32 first." +if [ ! -e $DEPLOYDIR/openscad.exe ]; then + echo "Can't find" $DEPLOYDIR"/openscad.exe Please build OpenSCAD for mingw32 first." exit 0 fi @@ -54,24 +57,24 @@ if [ ! "`command -v makensis`" ]; then exit 0 fi -if [ ! -e $RELEASE_DIR/FileAssociation.nsh ]; then - echo "Please install FileAssociation.nsh into" $RELEASE_DIR +if [ ! -e $DEPLOYDIR/FileAssociation.nsh ]; then + echo "Please install FileAssociation.nsh into" $DEPLOYDIR echo "You can copy/paste it from http://nsis.sourceforge.net/File_Association" fi -echo "Copying files to" $RELEASE_DIR +echo "Copying files to" $DEPLOYDIR -cp -av $OPENSCADDIR/libraries $RELEASE_DIR -cp -av $OPENSCADDIR/examples $RELEASE_DIR -cp -av $OPENSCADDIR/scripts/installer.nsi $RELEASE_DIR +cp -av $OPENSCADDIR/libraries $DEPLOYDIR +cp -av $OPENSCADDIR/examples $DEPLOYDIR +cp -av $OPENSCADDIR/scripts/installer.nsi $DEPLOYDIR echo "running nsis" -cd $RELEASE_DIR && makensis installer.nsi +cd $DEPLOYDIR && makensis installer.nsi cd $OPENSCADDIR -INSTALLFILE=$RELEASE_DIR/openscad_setup.exe +INSTALLFILE=$DEPLOYDIR/openscad_setup.exe if [ -e $INSTALLFILE ]; then echo "Build complete. Install file ready: $INSTALLFILE" -- cgit v0.10.1 From 4f7325619cb4aed28b8ff8741f8576a9af5abd88 Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 21:24:21 -0500 Subject: Adding fileassociation.nsh script from zlib-licensed NSIS wiki diff --git a/scripts/FileAssociation.nsh b/scripts/FileAssociation.nsh new file mode 100644 index 0000000..d564d18 --- /dev/null +++ b/scripts/FileAssociation.nsh @@ -0,0 +1,191 @@ +/* +_____________________________________________________________________________ + + File Association +_____________________________________________________________________________ + + Based on code taken from http://nsis.sourceforge.net/File_Association + + Usage in script: + 1. !include "FileAssociation.nsh" + 2. [Section|Function] + ${FileAssociationFunction} "Param1" "Param2" "..." $var + [SectionEnd|FunctionEnd] + + FileAssociationFunction=[RegisterExtension|UnRegisterExtension] + +_____________________________________________________________________________ + + ${RegisterExtension} "[executable]" "[extension]" "[description]" + +"[executable]" ; executable which opens the file format + ; +"[extension]" ; extension, which represents the file format to open + ; +"[description]" ; description for the extension. This will be display in Windows Explorer. + ; + + + ${UnRegisterExtension} "[extension]" "[description]" + +"[extension]" ; extension, which represents the file format to open + ; +"[description]" ; description for the extension. This will be display in Windows Explorer. + ; + +_____________________________________________________________________________ + + Macros +_____________________________________________________________________________ + + Change log window verbosity (default: 3=no script) + + Example: + !include "FileAssociation.nsh" + !insertmacro RegisterExtension + ${FileAssociation_VERBOSE} 4 # all verbosity + !insertmacro UnRegisterExtension + ${FileAssociation_VERBOSE} 3 # no script +*/ + + +!ifndef FileAssociation_INCLUDED +!define FileAssociation_INCLUDED + +!include Util.nsh + +!verbose push +!verbose 3 +!ifndef _FileAssociation_VERBOSE + !define _FileAssociation_VERBOSE 3 +!endif +!verbose ${_FileAssociation_VERBOSE} +!define FileAssociation_VERBOSE `!insertmacro FileAssociation_VERBOSE` +!verbose pop + +!macro FileAssociation_VERBOSE _VERBOSE + !verbose push + !verbose 3 + !undef _FileAssociation_VERBOSE + !define _FileAssociation_VERBOSE ${_VERBOSE} + !verbose pop +!macroend + + + +!macro RegisterExtensionCall _EXECUTABLE _EXTENSION _DESCRIPTION + !verbose push + !verbose ${_FileAssociation_VERBOSE} + Push `${_DESCRIPTION}` + Push `${_EXTENSION}` + Push `${_EXECUTABLE}` + ${CallArtificialFunction} RegisterExtension_ + !verbose pop +!macroend + +!macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION + !verbose push + !verbose ${_FileAssociation_VERBOSE} + Push `${_EXTENSION}` + Push `${_DESCRIPTION}` + ${CallArtificialFunction} UnRegisterExtension_ + !verbose pop +!macroend + + + +!define RegisterExtension `!insertmacro RegisterExtensionCall` +!define un.RegisterExtension `!insertmacro RegisterExtensionCall` + +!macro RegisterExtension +!macroend + +!macro un.RegisterExtension +!macroend + +!macro RegisterExtension_ + !verbose push + !verbose ${_FileAssociation_VERBOSE} + + Exch $R2 ;exe + Exch + Exch $R1 ;ext + Exch + Exch 2 + Exch $R0 ;desc + Exch 2 + Push $0 + Push $1 + + ReadRegStr $1 HKCR $R1 "" ; read current file association + StrCmp "$1" "" NoBackup ; is it empty + StrCmp "$1" "$R0" NoBackup ; is it our own + WriteRegStr HKCR $R1 "backup_val" "$1" ; backup current value +NoBackup: + WriteRegStr HKCR $R1 "" "$R0" ; set our file association + + ReadRegStr $0 HKCR $R0 "" + StrCmp $0 "" 0 Skip + WriteRegStr HKCR "$R0" "" "$R0" + WriteRegStr HKCR "$R0\shell" "" "open" + WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0" +Skip: + WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"' + WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0" + WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"' + + Pop $1 + Pop $0 + Pop $R2 + Pop $R1 + Pop $R0 + + !verbose pop +!macroend + + + +!define UnRegisterExtension `!insertmacro UnRegisterExtensionCall` +!define un.UnRegisterExtension `!insertmacro UnRegisterExtensionCall` + +!macro UnRegisterExtension +!macroend + +!macro un.UnRegisterExtension +!macroend + +!macro UnRegisterExtension_ + !verbose push + !verbose ${_FileAssociation_VERBOSE} + + Exch $R1 ;desc + Exch + Exch $R0 ;ext + Exch + Push $0 + Push $1 + + ReadRegStr $1 HKCR $R0 "" + StrCmp $1 $R1 0 NoOwn ; only do this if we own it + ReadRegStr $1 HKCR $R0 "backup_val" + StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key + DeleteRegKey HKCR $R0 + Goto NoOwn + +Restore: + WriteRegStr HKCR $R0 "" $1 + DeleteRegValue HKCR $R0 "backup_val" + DeleteRegKey HKCR $R1 ;Delete key with association name settings + +NoOwn: + + Pop $1 + Pop $0 + Pop $R1 + Pop $R0 + + !verbose pop +!macroend + +!endif # !FileAssociation_INCLUDED + -- cgit v0.10.1 From 4119380456fb9b2068ffe672adb7e79fcb456dd7 Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 21:35:17 -0500 Subject: add FileAssociation zlib-licensed file from nsis.sourceforge.net diff --git a/scripts/FileAssociation.nsh b/scripts/FileAssociation.nsh index d564d18..380b468 100644 --- a/scripts/FileAssociation.nsh +++ b/scripts/FileAssociation.nsh @@ -1,4 +1,38 @@ /* +nsis.sourceforge.net COPYRIGHT +Copyright (C) 1995-2009 Contributors + +Note the 'edit' page of the wiki at nsis.sourceforge.net specifically +states the following: + +"All contributions sent to this wiki are generally considered to be in +the zlib/libpng license (see License for details)." + +The NSIS 'license' link on the wiki states the following: + +"All NSIS source code, plug-ins, documentation, examples, header files +and graphics, with the exception of the compression modules and where +otherwise noted, are licensed under the zlib/libpng license." + +http://nsis.sourceforge.net/File_Assocation lists these authors: + +Author: Vytautas (talk, contrib) +Author: intersol (talk, contrib) +Author: chefkoch (talk, contrib) + +ZLIB/LIBPNG LICENSE +------------------- + +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* _____________________________________________________________________________ File Association -- cgit v0.10.1 From 1381bec31f5b19609f4e55031b36ec44d083ba83 Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 21:39:30 -0500 Subject: rename mingw file-association script to fit with the scripting system better diff --git a/scripts/FileAssociation.nsh b/scripts/FileAssociation.nsh deleted file mode 100644 index 380b468..0000000 --- a/scripts/FileAssociation.nsh +++ /dev/null @@ -1,225 +0,0 @@ -/* -nsis.sourceforge.net COPYRIGHT -Copyright (C) 1995-2009 Contributors - -Note the 'edit' page of the wiki at nsis.sourceforge.net specifically -states the following: - -"All contributions sent to this wiki are generally considered to be in -the zlib/libpng license (see License for details)." - -The NSIS 'license' link on the wiki states the following: - -"All NSIS source code, plug-ins, documentation, examples, header files -and graphics, with the exception of the compression modules and where -otherwise noted, are licensed under the zlib/libpng license." - -http://nsis.sourceforge.net/File_Assocation lists these authors: - -Author: Vytautas (talk, contrib) -Author: intersol (talk, contrib) -Author: chefkoch (talk, contrib) - -ZLIB/LIBPNG LICENSE -------------------- - -This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/* -_____________________________________________________________________________ - - File Association -_____________________________________________________________________________ - - Based on code taken from http://nsis.sourceforge.net/File_Association - - Usage in script: - 1. !include "FileAssociation.nsh" - 2. [Section|Function] - ${FileAssociationFunction} "Param1" "Param2" "..." $var - [SectionEnd|FunctionEnd] - - FileAssociationFunction=[RegisterExtension|UnRegisterExtension] - -_____________________________________________________________________________ - - ${RegisterExtension} "[executable]" "[extension]" "[description]" - -"[executable]" ; executable which opens the file format - ; -"[extension]" ; extension, which represents the file format to open - ; -"[description]" ; description for the extension. This will be display in Windows Explorer. - ; - - - ${UnRegisterExtension} "[extension]" "[description]" - -"[extension]" ; extension, which represents the file format to open - ; -"[description]" ; description for the extension. This will be display in Windows Explorer. - ; - -_____________________________________________________________________________ - - Macros -_____________________________________________________________________________ - - Change log window verbosity (default: 3=no script) - - Example: - !include "FileAssociation.nsh" - !insertmacro RegisterExtension - ${FileAssociation_VERBOSE} 4 # all verbosity - !insertmacro UnRegisterExtension - ${FileAssociation_VERBOSE} 3 # no script -*/ - - -!ifndef FileAssociation_INCLUDED -!define FileAssociation_INCLUDED - -!include Util.nsh - -!verbose push -!verbose 3 -!ifndef _FileAssociation_VERBOSE - !define _FileAssociation_VERBOSE 3 -!endif -!verbose ${_FileAssociation_VERBOSE} -!define FileAssociation_VERBOSE `!insertmacro FileAssociation_VERBOSE` -!verbose pop - -!macro FileAssociation_VERBOSE _VERBOSE - !verbose push - !verbose 3 - !undef _FileAssociation_VERBOSE - !define _FileAssociation_VERBOSE ${_VERBOSE} - !verbose pop -!macroend - - - -!macro RegisterExtensionCall _EXECUTABLE _EXTENSION _DESCRIPTION - !verbose push - !verbose ${_FileAssociation_VERBOSE} - Push `${_DESCRIPTION}` - Push `${_EXTENSION}` - Push `${_EXECUTABLE}` - ${CallArtificialFunction} RegisterExtension_ - !verbose pop -!macroend - -!macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION - !verbose push - !verbose ${_FileAssociation_VERBOSE} - Push `${_EXTENSION}` - Push `${_DESCRIPTION}` - ${CallArtificialFunction} UnRegisterExtension_ - !verbose pop -!macroend - - - -!define RegisterExtension `!insertmacro RegisterExtensionCall` -!define un.RegisterExtension `!insertmacro RegisterExtensionCall` - -!macro RegisterExtension -!macroend - -!macro un.RegisterExtension -!macroend - -!macro RegisterExtension_ - !verbose push - !verbose ${_FileAssociation_VERBOSE} - - Exch $R2 ;exe - Exch - Exch $R1 ;ext - Exch - Exch 2 - Exch $R0 ;desc - Exch 2 - Push $0 - Push $1 - - ReadRegStr $1 HKCR $R1 "" ; read current file association - StrCmp "$1" "" NoBackup ; is it empty - StrCmp "$1" "$R0" NoBackup ; is it our own - WriteRegStr HKCR $R1 "backup_val" "$1" ; backup current value -NoBackup: - WriteRegStr HKCR $R1 "" "$R0" ; set our file association - - ReadRegStr $0 HKCR $R0 "" - StrCmp $0 "" 0 Skip - WriteRegStr HKCR "$R0" "" "$R0" - WriteRegStr HKCR "$R0\shell" "" "open" - WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0" -Skip: - WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"' - WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0" - WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"' - - Pop $1 - Pop $0 - Pop $R2 - Pop $R1 - Pop $R0 - - !verbose pop -!macroend - - - -!define UnRegisterExtension `!insertmacro UnRegisterExtensionCall` -!define un.UnRegisterExtension `!insertmacro UnRegisterExtensionCall` - -!macro UnRegisterExtension -!macroend - -!macro un.UnRegisterExtension -!macroend - -!macro UnRegisterExtension_ - !verbose push - !verbose ${_FileAssociation_VERBOSE} - - Exch $R1 ;desc - Exch - Exch $R0 ;ext - Exch - Push $0 - Push $1 - - ReadRegStr $1 HKCR $R0 "" - StrCmp $1 $R1 0 NoOwn ; only do this if we own it - ReadRegStr $1 HKCR $R0 "backup_val" - StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key - DeleteRegKey HKCR $R0 - Goto NoOwn - -Restore: - WriteRegStr HKCR $R0 "" $1 - DeleteRegValue HKCR $R0 "backup_val" - DeleteRegKey HKCR $R1 ;Delete key with association name settings - -NoOwn: - - Pop $1 - Pop $0 - Pop $R1 - Pop $R0 - - !verbose pop -!macroend - -!endif # !FileAssociation_INCLUDED - diff --git a/scripts/installer.nsi b/scripts/installer.nsi index 269a30c..2fb58f2 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -1,4 +1,4 @@ -!include "FileAssociation.nsh" +!include "mingw-file-association.nsh" Name "OpenSCAD" OutFile "openscad_setup.exe" InstallDir $PROGRAMFILES\OpenSCAD diff --git a/scripts/mingw-file-association.nsh b/scripts/mingw-file-association.nsh new file mode 100644 index 0000000..380b468 --- /dev/null +++ b/scripts/mingw-file-association.nsh @@ -0,0 +1,225 @@ +/* +nsis.sourceforge.net COPYRIGHT +Copyright (C) 1995-2009 Contributors + +Note the 'edit' page of the wiki at nsis.sourceforge.net specifically +states the following: + +"All contributions sent to this wiki are generally considered to be in +the zlib/libpng license (see License for details)." + +The NSIS 'license' link on the wiki states the following: + +"All NSIS source code, plug-ins, documentation, examples, header files +and graphics, with the exception of the compression modules and where +otherwise noted, are licensed under the zlib/libpng license." + +http://nsis.sourceforge.net/File_Assocation lists these authors: + +Author: Vytautas (talk, contrib) +Author: intersol (talk, contrib) +Author: chefkoch (talk, contrib) + +ZLIB/LIBPNG LICENSE +------------------- + +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* +_____________________________________________________________________________ + + File Association +_____________________________________________________________________________ + + Based on code taken from http://nsis.sourceforge.net/File_Association + + Usage in script: + 1. !include "FileAssociation.nsh" + 2. [Section|Function] + ${FileAssociationFunction} "Param1" "Param2" "..." $var + [SectionEnd|FunctionEnd] + + FileAssociationFunction=[RegisterExtension|UnRegisterExtension] + +_____________________________________________________________________________ + + ${RegisterExtension} "[executable]" "[extension]" "[description]" + +"[executable]" ; executable which opens the file format + ; +"[extension]" ; extension, which represents the file format to open + ; +"[description]" ; description for the extension. This will be display in Windows Explorer. + ; + + + ${UnRegisterExtension} "[extension]" "[description]" + +"[extension]" ; extension, which represents the file format to open + ; +"[description]" ; description for the extension. This will be display in Windows Explorer. + ; + +_____________________________________________________________________________ + + Macros +_____________________________________________________________________________ + + Change log window verbosity (default: 3=no script) + + Example: + !include "FileAssociation.nsh" + !insertmacro RegisterExtension + ${FileAssociation_VERBOSE} 4 # all verbosity + !insertmacro UnRegisterExtension + ${FileAssociation_VERBOSE} 3 # no script +*/ + + +!ifndef FileAssociation_INCLUDED +!define FileAssociation_INCLUDED + +!include Util.nsh + +!verbose push +!verbose 3 +!ifndef _FileAssociation_VERBOSE + !define _FileAssociation_VERBOSE 3 +!endif +!verbose ${_FileAssociation_VERBOSE} +!define FileAssociation_VERBOSE `!insertmacro FileAssociation_VERBOSE` +!verbose pop + +!macro FileAssociation_VERBOSE _VERBOSE + !verbose push + !verbose 3 + !undef _FileAssociation_VERBOSE + !define _FileAssociation_VERBOSE ${_VERBOSE} + !verbose pop +!macroend + + + +!macro RegisterExtensionCall _EXECUTABLE _EXTENSION _DESCRIPTION + !verbose push + !verbose ${_FileAssociation_VERBOSE} + Push `${_DESCRIPTION}` + Push `${_EXTENSION}` + Push `${_EXECUTABLE}` + ${CallArtificialFunction} RegisterExtension_ + !verbose pop +!macroend + +!macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION + !verbose push + !verbose ${_FileAssociation_VERBOSE} + Push `${_EXTENSION}` + Push `${_DESCRIPTION}` + ${CallArtificialFunction} UnRegisterExtension_ + !verbose pop +!macroend + + + +!define RegisterExtension `!insertmacro RegisterExtensionCall` +!define un.RegisterExtension `!insertmacro RegisterExtensionCall` + +!macro RegisterExtension +!macroend + +!macro un.RegisterExtension +!macroend + +!macro RegisterExtension_ + !verbose push + !verbose ${_FileAssociation_VERBOSE} + + Exch $R2 ;exe + Exch + Exch $R1 ;ext + Exch + Exch 2 + Exch $R0 ;desc + Exch 2 + Push $0 + Push $1 + + ReadRegStr $1 HKCR $R1 "" ; read current file association + StrCmp "$1" "" NoBackup ; is it empty + StrCmp "$1" "$R0" NoBackup ; is it our own + WriteRegStr HKCR $R1 "backup_val" "$1" ; backup current value +NoBackup: + WriteRegStr HKCR $R1 "" "$R0" ; set our file association + + ReadRegStr $0 HKCR $R0 "" + StrCmp $0 "" 0 Skip + WriteRegStr HKCR "$R0" "" "$R0" + WriteRegStr HKCR "$R0\shell" "" "open" + WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0" +Skip: + WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"' + WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0" + WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"' + + Pop $1 + Pop $0 + Pop $R2 + Pop $R1 + Pop $R0 + + !verbose pop +!macroend + + + +!define UnRegisterExtension `!insertmacro UnRegisterExtensionCall` +!define un.UnRegisterExtension `!insertmacro UnRegisterExtensionCall` + +!macro UnRegisterExtension +!macroend + +!macro un.UnRegisterExtension +!macroend + +!macro UnRegisterExtension_ + !verbose push + !verbose ${_FileAssociation_VERBOSE} + + Exch $R1 ;desc + Exch + Exch $R0 ;ext + Exch + Push $0 + Push $1 + + ReadRegStr $1 HKCR $R0 "" + StrCmp $1 $R1 0 NoOwn ; only do this if we own it + ReadRegStr $1 HKCR $R0 "backup_val" + StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key + DeleteRegKey HKCR $R0 + Goto NoOwn + +Restore: + WriteRegStr HKCR $R0 "" $1 + DeleteRegValue HKCR $R0 "backup_val" + DeleteRegKey HKCR $R1 ;Delete key with association name settings + +NoOwn: + + Pop $1 + Pop $0 + Pop $R1 + Pop $R0 + + !verbose pop +!macroend + +!endif # !FileAssociation_INCLUDED + -- cgit v0.10.1 From 5036d9acea379d5177179cb8eaa60d2c93417e9a Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 21:40:17 -0500 Subject: fix permissions diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh old mode 100755 new mode 100644 -- cgit v0.10.1 From b942c728c1ac532d65bd780ba2a124dc0fb036b1 Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 22:02:45 -0500 Subject: find openscad.exe. clearup confusion re NUMCPU / NUMJOBS diff --git a/scripts/installer.nsi b/scripts/installer.nsi index 2fb58f2..1e56422 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -5,7 +5,7 @@ InstallDir $PROGRAMFILES\OpenSCAD DirText "This will install OpenSCAD on your computer. Choose a directory" Section "install" SetOutPath $INSTDIR -File openscad.exe +File release/openscad.exe File /r examples File /r libraries ${registerExtension} "$INSTDIR\openscad.exe" ".scad" "OpenSCAD_File" diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh index ac60d9e..405b7e8 100755 --- a/scripts/mingw-x-build-dependencies.sh +++ b/scripts/mingw-x-build-dependencies.sh @@ -19,6 +19,20 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then echo "Must be run from the OpenSCAD source root directory" exit 0 fi +echo OPENSCADDIR: $OPENSCADDIR + +if [ ! $NUMCPU ]; then + echo "note: you can 'export NUMCPU=x' for multi-core compiles (x=number)"; + NUMCPU=1 +fi +if [ ! $NUMJOBS ]; then + echo "note: you can 'export NUMJOBS=x' for building multiple pkgs at once" + if [ $NUMCPU -gt 2 ]; then + NUMJOBS=$((NUMCPU/2)) + else + NUMJOBS=1 + fi +fi . ./scripts/setenv-mingw-xbuild.sh @@ -54,10 +68,11 @@ echo "linking mxe to" $DEPLOYDIR/mingw-cross-env ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env echo -echo "now copy/paste the following to cross-build openscad" +echo "now copy/paste the following to cross-build openscad in" $DEPLOYDIR echo echo cd $DEPLOYDIR echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro" #echo "make -j$NUMCPU" # causes parser_yacc.hpp errors echo "make" +echo cd $OPENSCADDIR echo diff --git a/scripts/mingw-x-build-installer.sh b/scripts/mingw-x-build-installer.sh index 8f0dddc..6fd5407 100755 --- a/scripts/mingw-x-build-installer.sh +++ b/scripts/mingw-x-build-installer.sh @@ -21,10 +21,6 @@ # # You need the Nullsoft installer system, on ubuntu 'sudo apt-get install nsis' # -# You need to copy/paste the FileAssociation.nsh file from -# http://nsis.sourceforge.net/File_Association into DEPLOYDIR -# (it has no license information so cannot be included directly) -# # Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X # @@ -47,8 +43,10 @@ if [ ! -e $DEPLOYDIR ]; then exit 0 fi -if [ ! -e $DEPLOYDIR/openscad.exe ]; then - echo "Can't find" $DEPLOYDIR"/openscad.exe Please build OpenSCAD for mingw32 first." +OPENSCAD_EXE=$DEPLOYDIR/release/openscad.exe + +if [ ! -e $OPESCAD_EXE ]; then + echo "Can't find" $OPENSCAD_EXE "Please build OpenSCAD for mingw32 first." exit 0 fi @@ -57,27 +55,31 @@ if [ ! "`command -v makensis`" ]; then exit 0 fi -if [ ! -e $DEPLOYDIR/FileAssociation.nsh ]; then - echo "Please install FileAssociation.nsh into" $DEPLOYDIR - echo "You can copy/paste it from http://nsis.sourceforge.net/File_Association" -fi echo "Copying files to" $DEPLOYDIR -cp -av $OPENSCADDIR/libraries $DEPLOYDIR -cp -av $OPENSCADDIR/examples $DEPLOYDIR -cp -av $OPENSCADDIR/scripts/installer.nsi $DEPLOYDIR +copy_files() +{ + echo "copying" $1 + cp -a $1 $2 +} + +copy_files $OPENSCADDIR/libraries $DEPLOYDIR +copy_files $OPENSCADDIR/examples $DEPLOYDIR +copy_files $OPENSCADDIR/scripts/installer.nsi $DEPLOYDIR +copy_files $OPENSCADDIR/scripts/mingw-file-association.nsh $DEPLOYDIR -echo "running nsis" +echo "running makensis in" $DEPLOYDIR -cd $DEPLOYDIR && makensis installer.nsi +cd $DEPLOYDIR && makensis -V2 installer.nsi cd $OPENSCADDIR INSTALLFILE=$DEPLOYDIR/openscad_setup.exe if [ -e $INSTALLFILE ]; then - echo "Build complete. Install file ready: $INSTALLFILE" + echo "Build complete. Install file ready:" + echo " " $INSTALLFILE else echo "Build failed. Sorry." fi diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh index c85f84e..8417e0a 100644 --- a/scripts/setenv-mingw-xbuild.sh +++ b/scripts/setenv-mingw-xbuild.sh @@ -11,32 +11,15 @@ # Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X # -OPENSCADDIR=$PWD - if [ ! $BASEDIR ]; then BASEDIR=$HOME/openscad_deps fi -DEPLOYDIR=$OPENSCADDIR/mingw32 -MXEDIR=$BASEDIR/mxe -PATH=$MXEDIR/usr/bin:$PATH +export DEPLOYDIR=$OPENSCADDIR/mingw32 +export MXEDIR=$BASEDIR/mxe +export PATH=$MXEDIR/usr/bin:$PATH echo MXEDIR: $MXEDIR echo BASEDIR: $BASEDIR echo DEPLOYDIR: $DEPLOYDIR -echo OPENSCADDIR: $OPENSCADDIR echo PATH modified with $MXEDIR/usr/bin -if [ ! $NUMCPU ]; then - echo "note: you can 'export NUMCPU=x' for multi-core compiles (x=number)"; - NUMCPU=1 -fi -if [ ! $NUMJOBS ]; then - echo "note: you can 'export NUMJOBS=x' for building multiple pkgs at once" - if [ $NUMCPU -gt 2 ]; then - NUMJOBS=$((NUMCPU/2)) - else - NUMJOBS=1 - fi -fi -echo NUMCPU: $NUMCPU -echo NUMJOBS: $NUMJOBS -- cgit v0.10.1 From cec082a7fad504aa3b1389e8e38241c451440b01 Mon Sep 17 00:00:00 2001 From: don bright Date: Thu, 2 Aug 2012 05:20:02 +0200 Subject: fix bug w OPENSCADDIR diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh index 8417e0a..987f6e4 100644 --- a/scripts/setenv-mingw-xbuild.sh +++ b/scripts/setenv-mingw-xbuild.sh @@ -14,12 +14,13 @@ if [ ! $BASEDIR ]; then BASEDIR=$HOME/openscad_deps fi +export OPENSCADDIR=$PWD export DEPLOYDIR=$OPENSCADDIR/mingw32 export MXEDIR=$BASEDIR/mxe export PATH=$MXEDIR/usr/bin:$PATH -echo MXEDIR: $MXEDIR echo BASEDIR: $BASEDIR +echo MXEDIR: $MXEDIR echo DEPLOYDIR: $DEPLOYDIR echo PATH modified with $MXEDIR/usr/bin -- cgit v0.10.1 From c900bc628fafa157aa2f45e0d387563a6a19819e Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 22:43:47 -0500 Subject: update README with cross-build instructions diff --git a/README.md b/README.md index ffb6b6e..8bc9135 100644 --- a/README.md +++ b/README.md @@ -164,9 +164,22 @@ After that, follow the Compilation instructions below. ### Building for Windows OpenSCAD for Windows is usually cross-compiled from Linux. If you wish to -attempt an MSVC build, please see this site: +attempt an MSVC build on Windows, please see this site: http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows +To cross-build, first make sure that you have development tools +installed to get GCC. Then after you've cloned this git repository, run +the script that sets up the environment variables. + + source ./scripts/setenv-mingw-xbuild.sh + +Then run the script to download & compile all the prerequisite libraries above: + + ./scripts/mingw-x-build-dependencies.sh + +After that, follow the Compilation instructions that are printed at the +end of the script (not the ones below). + ### Compilation First, run 'qmake' from Qt4 to generate a Makefile. On some systems you need to -- cgit v0.10.1 From e9e97af0a104b6dd2b4ef6bac95a5ea3e6ebeddb Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 23:06:19 -0500 Subject: add script to do qmake line for mingw. enable fully auto build diff --git a/scripts/mingw-x-build-openscad.sh b/scripts/mingw-x-build-openscad.sh new file mode 100755 index 0000000..5f27960 --- /dev/null +++ b/scripts/mingw-x-build-openscad.sh @@ -0,0 +1,42 @@ +#!/bin/sh -e +# +# This script builds Openscad.exe for windows using the MXE cross build system. +# +# This script must be run from the OpenSCAD source root directory +# +# You must have already run the mingw-x-build-dependencies.sh script +# +# Usage: +# +# ./scripts/mingw-x-build-openscad.sh +# + +OPENSCADDIR=$PWD +if [ ! -f $OPENSCADDIR/openscad.pro ]; then + echo "Must be run from the OpenSCAD source root directory" + exit 0 +fi +echo OPENSCADDIR: $OPENSCADDIR + +. ./scripts/setenv-mingw-xbuild.sh + +if [ ! -e $BASEDIR/lib ]; then + echo "please run the mingw-x-build-dependencies.sh script first" +fi + +echo cd $DEPLOYDIR +echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro" +#echo "make -j$NUMCPU" # causes parser_yacc.hpp errors +echo "make" + +OPENSCAD_EXE=$DEPLOYDIR/release/openscad.exe + +if [ -e $OPENSCAD_EXE ] ; then + echo + echo $OPENSCAD_EXE built in $DEPLOYDIR/release + echo +else + echo Cannot find $OPENSCAD_EXE. The build appears to have had an error. +fi + +echo cd $OPENSCADDIR -- cgit v0.10.1 From 0b77c6af81356d736eea2e50f875f4b92a2a5b25 Mon Sep 17 00:00:00 2001 From: don bright Date: Wed, 1 Aug 2012 23:14:34 -0500 Subject: bugfixes, update README diff --git a/README.md b/README.md index 8bc9135..ea27c46 100644 --- a/README.md +++ b/README.md @@ -177,8 +177,9 @@ Then run the script to download & compile all the prerequisite libraries above: ./scripts/mingw-x-build-dependencies.sh -After that, follow the Compilation instructions that are printed at the -end of the script (not the ones below). +After that (it may take several hours), run the Compilation script: + + ./scripts/mingw-x-build-openscad.sh ### Compilation diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh index 405b7e8..6856ba1 100755 --- a/scripts/mingw-x-build-dependencies.sh +++ b/scripts/mingw-x-build-dependencies.sh @@ -67,12 +67,3 @@ fi echo "linking mxe to" $DEPLOYDIR/mingw-cross-env ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env -echo -echo "now copy/paste the following to cross-build openscad in" $DEPLOYDIR -echo -echo cd $DEPLOYDIR -echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro" -#echo "make -j$NUMCPU" # causes parser_yacc.hpp errors -echo "make" -echo cd $OPENSCADDIR -echo diff --git a/scripts/mingw-x-build-openscad.sh b/scripts/mingw-x-build-openscad.sh index 5f27960..59065ce 100755 --- a/scripts/mingw-x-build-openscad.sh +++ b/scripts/mingw-x-build-openscad.sh @@ -24,19 +24,24 @@ if [ ! -e $BASEDIR/lib ]; then echo "please run the mingw-x-build-dependencies.sh script first" fi -echo cd $DEPLOYDIR -echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro" -#echo "make -j$NUMCPU" # causes parser_yacc.hpp errors -echo "make" +echo "entering $DEPLOYDIR" +cd $DEPLOYDIR +i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro +#"make -j$NUMCPU" # causes parser_yacc.hpp errors +make +echo "leaving $DEPLOYDIR" + +echo "entering $OPENSCADDIR" +cd $OPENSCADDIR OPENSCAD_EXE=$DEPLOYDIR/release/openscad.exe if [ -e $OPENSCAD_EXE ] ; then + echo Build finished. Executable: echo - echo $OPENSCAD_EXE built in $DEPLOYDIR/release + echo " "$OPENSCAD_EXE echo else echo Cannot find $OPENSCAD_EXE. The build appears to have had an error. fi -echo cd $OPENSCADDIR -- cgit v0.10.1 From c29d8a370fea0477cb9bed2143823c596a2d3e76 Mon Sep 17 00:00:00 2001 From: don bright Date: Thu, 2 Aug 2012 00:05:27 -0500 Subject: tweak wording. diff --git a/scripts/mingw-x-build-openscad.sh b/scripts/mingw-x-build-openscad.sh index 59065ce..d0d5b9c 100755 --- a/scripts/mingw-x-build-openscad.sh +++ b/scripts/mingw-x-build-openscad.sh @@ -37,10 +37,8 @@ cd $OPENSCADDIR OPENSCAD_EXE=$DEPLOYDIR/release/openscad.exe if [ -e $OPENSCAD_EXE ] ; then - echo Build finished. Executable: - echo - echo " "$OPENSCAD_EXE - echo + echo Build finished. Executable file ready: + echo " " $OPENSCAD_EXE else echo Cannot find $OPENSCAD_EXE. The build appears to have had an error. fi -- cgit v0.10.1 From 08b07769859ef4905a72b54c58e2e7891d3ac0a5 Mon Sep 17 00:00:00 2001 From: don bright Date: Thu, 2 Aug 2012 21:52:47 -0500 Subject: integrate mingw-xxxx scripts with release-common.sh diff --git a/scripts/installer.nsi b/scripts/installer.nsi index 1e56422..763d42d 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -6,8 +6,8 @@ DirText "This will install OpenSCAD on your computer. Choose a directory" Section "install" SetOutPath $INSTDIR File release/openscad.exe -File /r examples -File /r libraries +File /r /x mingw-cross-env examples +File /r /x mingw-cross-env libraries ${registerExtension} "$INSTDIR\openscad.exe" ".scad" "OpenSCAD_File" CreateShortCut $SMPROGRAMS\OpenSCAD.lnk $INSTDIR\openscad.exe WriteUninstaller $INSTDIR\Uninstall.exe diff --git a/scripts/mingw-x-build-installer.sh b/scripts/mingw-x-build-installer.sh index 6fd5407..4ac9f4e 100755 --- a/scripts/mingw-x-build-installer.sh +++ b/scripts/mingw-x-build-installer.sh @@ -72,6 +72,7 @@ copy_files $OPENSCADDIR/scripts/mingw-file-association.nsh $DEPLOYDIR echo "running makensis in" $DEPLOYDIR cd $DEPLOYDIR && makensis -V2 installer.nsi +# cd $DEPLOYDIR && makensis installer.nsi # debug nsis cd $OPENSCADDIR diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 94a8634..7bf1c07 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -5,7 +5,7 @@ # for windows using mingw-cross-env (use like: OS=LINXWIN release-common.sh). # Linux support pending. # The script will create a file called openscad-.zip -# in the current directory. +# in the current directory (or in the $DEPLOYDIR of a mingw cross build) # # Usage: release-common.sh [-v ] [-c] # -v Version string (e.g. -v 2010.01) @@ -24,6 +24,16 @@ printUsage() echo " Example: $0 -v 2010.01 } +OPENSCADDIR=$PWD +if [ ! -f $OPENSCADDIR/openscad.pro ]; then + echo "Must be run from the OpenSCAD source root directory" + exit 0 +fi + +if [ $OS == "LINXWIN" ]; then + OSTYPE=mingw-cross-env +fi + if [[ "$OSTYPE" =~ "darwin" ]]; then OS=MACOSX elif [[ $OSTYPE == "msys" ]]; then @@ -72,22 +82,34 @@ case $OS in ;; LINXWIN) unset CONFIG + . ./scripts/setenv-mingw-xbuild.sh TARGET=release ZIP="zip" ZIPARGS="-r" ;; esac + case $OS in LINXWIN) - i686-pc-mingw32-qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug openscad.pro + cd $DEPLOYDIR && i686-pc-mingw32-qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug ../openscad.pro + cd $OPENSCADDIR ;; *) qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG-=debug openscad.pro ;; esac -make -s clean +case $OS in + LINXWIN) +# cd $DEPLOYDIR && make -s clean + cd $OPENSCADDIR + ;; + *) + make -s clean + ;; +esac + case $OS in MACOSX) rm -rf OpenSCAD.app @@ -98,7 +120,16 @@ case $OS in ;; esac -make -j2 $TARGET +case $OS in + LINXWIN) + # make -j2 sometimes has problems with parser_yacc + cd $DEPLOYDIR && make $TARGET + cd $OPENSCADDIR + ;; + *) + make -j2 $TARGET + ;; +esac if [[ $? != 0 ]]; then echo "Error building OpenSCAD. Aborting." @@ -112,6 +143,12 @@ case $OS in EXAMPLESDIR=OpenSCAD.app/Contents/Resources/examples LIBRARYDIR=OpenSCAD.app/Contents/Resources/libraries ;; + LINXWIN) + EXAMPLESDIR=$DEPLOYDIR/openscad-$VERSION/examples/ + LIBRARYDIR=$DEPLOYDIR/openscad-$VERSION/libraries/ + rm -rf $DEPLOYDIR/openscad-$VERSION + mkdir $DEPLOYDIR/openscad-$VERSION + ;; *) EXAMPLESDIR=openscad-$VERSION/examples/ LIBRARYDIR=openscad-$VERSION/libraries/ @@ -158,15 +195,21 @@ case $OS in ;; LINXWIN) #package + echo "Creating binary package" + cd $DEPLOYDIR cp $TARGET/openscad.exe openscad-$VERSION rm -f OpenSCAD-$VERSION.zip "$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION - cp scripts/installer.nsi openscad-$VERSION/ - cd openscad-$VERSION && makensis installer.nsi && cd .. - cp openscad-$VERSION/openscad_setup.exe OpenSCAD-$VERSION-Installer.exe - rm -rf openscad-$VERSION - echo "Binary created: OpenSCAD-$VERSION.zip" - echo "Installer created: OpenSCAD-$VERSION-Installer.exe" + rm -rf ./openscad-$VERSION + cd $OPENSCADDIR + + echo "Creating installer" + ./scripts/mingw-x-build-installer.sh + cp $DEPLOYDIR/openscad_setup.exe $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe + echo + echo "Binary created: $DEPLOYDIR/OpenSCAD-$VERSION.zip" + echo "Installer created: $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe" + echo ;; LINUX) # Do stuff from release-linux.sh -- cgit v0.10.1 From 7b9a838abe730f7ddd5eca8b8376dc6af10c9a49 Mon Sep 17 00:00:00 2001 From: don bright Date: Fri, 3 Aug 2012 06:30:28 -0500 Subject: update the 'release checklist' and integrate with mingw crossbuild diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt index 71158f6..02ac82e 100644 --- a/doc/release-checklist.txt +++ b/doc/release-checklist.txt @@ -1,28 +1,32 @@ OpenSCAD Release Checklist -------------------------- -o Update version +o Update VERSION in these files: scripts/release-linux.sh - scripts/publish-macosx.sh - FIXME: Windows + scripts/publish-macosx.sh + scripts/publish-mingw-x.sh + +o Update VERSION env variable + export VERSION=2012.08 o Update RELEASE_NOTES o Tag release - git tag "openscad-2011.12" + git tag "openscad-$VERSION" o build source package - scripts/git-archive-all.py --prefix=openscad-2011.12/ openscad-2011.12.src.tar.gz + scripts/git-archive-all.py --prefix=openscad-$VERSION/ openscad-$VERSION.src.tar.gz o build binaries - tar xzf openscad-2011.12.src.tar.gz - cd openscad-2011.12 + tar xzf openscad-$VERSION.src.tar.gz + cd openscad-$VERSION Mac OS X (For Qt-4.7.3: Remove /Developers/Applications/Qt/plugins/qmltooling) - ./scripts/publish-macosx.sh -> OpenSCAD-2011.12.dmg + ./scripts/publish-macosx.sh -> OpenSCAD-$VERSION.dmg Linux: FIXME 32 vs. 64 bit ./scripts/release-linux.sh - Windows: FIXME 32 vs. 64 bit + Windows mingw cross-build: FIXME 32 vs. 64 bit + ./scripts/publish-mingw-x.sh o FIXME: Run some tests diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh index 6856ba1..1ea7d14 100755 --- a/scripts/mingw-x-build-dependencies.sh +++ b/scripts/mingw-x-build-dependencies.sh @@ -39,9 +39,6 @@ fi if [ ! -e $BASEDIR ]; then mkdir -p $BASEDIR fi -if [ ! -e $DEPLOYDIR ]; then - mkdir -p $DEPLOYDIR -fi cd $BASEDIR @@ -61,9 +58,3 @@ echo "leaving" $MXEDIR echo "entering $OPENSCADDIR" cd $OPENSCADDIR -if [ -e $DEPLOYDIR/mingw-cross-env ]; then - rm $DEPLOYDIR/mingw-cross-env -fi -echo "linking mxe to" $DEPLOYDIR/mingw-cross-env -ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env - diff --git a/scripts/publish-mingw-x.sh b/scripts/publish-mingw-x.sh new file mode 100755 index 0000000..e15899e --- /dev/null +++ b/scripts/publish-mingw-x.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# Set this if we're doing a release build. Comment it out for development builds +#VERSION=2011.12 + +if test -z "$VERSION"; then + VERSION=`date "+%Y.%m.%d"` + COMMIT=-c +fi + +# Turn off ccache, just for safety +CCACHE_DISABLE=1 + +. ./scripts/setenv-mingw-xbuild.sh + +if [ ! -f $OPENSCADDIR/openscad.pro ]; then + echo "Must be run from the OpenSCAD source root directory" + exit 0 +fi + +OS=LINXWIN ./scripts/release-common.sh -v $VERSION $COMMIT +if [[ $? != 0 ]]; then + exit 1 +fi + +echo "Please upload these files to the appropriate location" +BINFILE=$DEPLOYDIR/OpenSCAD-$VERSION.zip +INSTALLFILE=$DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe +echo $BINFILE +echo $INSTALLFILE + +echo +echo "Then copy/paste these commands into your shell:" +echo + +# Update snapshot filename on wab page +echo ./scripts/update-web.sh OpenSCAD-$VERSION.zip +echo ./scripts/update-web.sh OpenSCAD-$VERSION-Installer.exe diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 7bf1c07..fb7df40 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -202,6 +202,7 @@ case $OS in "$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION rm -rf ./openscad-$VERSION cd $OPENSCADDIR + echo "Binary package created" echo "Creating installer" ./scripts/mingw-x-build-installer.sh diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh index 987f6e4..271e5be 100644 --- a/scripts/setenv-mingw-xbuild.sh +++ b/scripts/setenv-mingw-xbuild.sh @@ -24,3 +24,14 @@ echo MXEDIR: $MXEDIR echo DEPLOYDIR: $DEPLOYDIR echo PATH modified with $MXEDIR/usr/bin +if [ ! -e $DEPLOYDIR ]; then + mkdir -p $DEPLOYDIR +fi +if [ ! -e $DEPLOYDIR/mingw-cross-env ]; then + echo linking $MXEDIR/usr/i686-pc-mingw32/ to $DEPLOYDIR/mingw-cross-env + ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env +else + echo $DEPLOYDIR/mingw-cross-env is already symlinked +fi + + -- cgit v0.10.1 From c8cdc9d81ce9c813d711039abd1b723b783bdd2d Mon Sep 17 00:00:00 2001 From: don bright Date: Fri, 3 Aug 2012 19:22:22 -0500 Subject: use VERSION environment variable instead of editing files diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt index 02ac82e..e69ed87 100644 --- a/doc/release-checklist.txt +++ b/doc/release-checklist.txt @@ -1,14 +1,15 @@ OpenSCAD Release Checklist -------------------------- -o Update VERSION in these files: +o Update VERSION environment variable + export VERSION=2012.08 + + It will be used by the commands below, as well as these files: + scripts/release-linux.sh - scripts/publish-macosx.sh + scripts/publish-macosx.sh scripts/publish-mingw-x.sh -o Update VERSION env variable - export VERSION=2012.08 - o Update RELEASE_NOTES o Tag release @@ -30,7 +31,9 @@ o build binaries o FIXME: Run some tests -o Set back version to being date-tagged: release-linux.sh, publish-macosx.sh, FIXME: Windows +o Remove VERSION environment variable + + export VERSION= o git push --tags diff --git a/scripts/publish-mingw-x.sh b/scripts/publish-mingw-x.sh index e15899e..1f23ace 100755 --- a/scripts/publish-mingw-x.sh +++ b/scripts/publish-mingw-x.sh @@ -19,7 +19,10 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then fi OS=LINXWIN ./scripts/release-common.sh -v $VERSION $COMMIT -if [[ $? != 0 ]]; then + +echo $? return value + +if [ $? != 0 ]; then exit 1 fi -- cgit v0.10.1 From 81df2f9c5fd55406baf0f53550c7aae1b60df2cf Mon Sep 17 00:00:00 2001 From: don bright Date: Fri, 3 Aug 2012 19:38:47 -0500 Subject: some tweaks for better error reporting diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt index e69ed87..c0b1469 100644 --- a/doc/release-checklist.txt +++ b/doc/release-checklist.txt @@ -2,6 +2,7 @@ OpenSCAD Release Checklist -------------------------- o Update VERSION environment variable + export VERSION=2012.08 It will be used by the commands below, as well as these files: @@ -27,7 +28,8 @@ o build binaries Linux: FIXME 32 vs. 64 bit ./scripts/release-linux.sh Windows mingw cross-build: FIXME 32 vs. 64 bit - ./scripts/publish-mingw-x.sh + ./scripts/publish-mingw-x.sh -> mingw32/Openscad-$VERSION.zip + -> mingw32/Openscad-$VERSION-Installer.exe o FIXME: Run some tests diff --git a/scripts/publish-mingw-x.sh b/scripts/publish-mingw-x.sh index 1f23ace..0dc99ea 100755 --- a/scripts/publish-mingw-x.sh +++ b/scripts/publish-mingw-x.sh @@ -1,5 +1,7 @@ #!/bin/sh +# This is run as part of the checklist in docs/release-checklist.txt +# # Set this if we're doing a release build. Comment it out for development builds #VERSION=2011.12 @@ -13,6 +15,13 @@ CCACHE_DISABLE=1 . ./scripts/setenv-mingw-xbuild.sh +if [ ! -e $MXEDIR ]; then + echo "Mingw cross tools not found." + echo " Please run ./scripts/mingw-x-build-dependencies.sh to install " + echo " or modify MXEDIR to point to the root of your cross-tools setup" + echo " ( Please see setenv-mingw-xbuild.sh for more info ) " +fi + if [ ! -f $OPENSCADDIR/openscad.pro ]; then echo "Must be run from the OpenSCAD source root directory" exit 0 @@ -20,9 +29,8 @@ fi OS=LINXWIN ./scripts/release-common.sh -v $VERSION $COMMIT -echo $? return value - if [ $? != 0 ]; then + echo "release-common.sh returned error code: $?. build stopped." exit 1 fi -- cgit v0.10.1 From 72462e4d0f49740e57be374cfc1fdeeb668ae913 Mon Sep 17 00:00:00 2001 From: don bright Date: Sat, 4 Aug 2012 12:22:40 -0500 Subject: cleanup OSTYPE diff --git a/scripts/publish-mingw-x.sh b/scripts/publish-mingw-x.sh index 0dc99ea..4e0afe9 100755 --- a/scripts/publish-mingw-x.sh +++ b/scripts/publish-mingw-x.sh @@ -27,7 +27,7 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then exit 0 fi -OS=LINXWIN ./scripts/release-common.sh -v $VERSION $COMMIT +OSTYPE=mingw-cross-env ./scripts/release-common.sh -v $VERSION $COMMIT if [ $? != 0 ]; then echo "release-common.sh returned error code: $?. build stopped." diff --git a/scripts/release-common.sh b/scripts/release-common.sh index fb7df40..e449e1f 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -2,11 +2,11 @@ # # This script creates a binary release of OpenSCAD. # This should work under Mac OS X, Windows (msys), and Linux cross-compiling -# for windows using mingw-cross-env (use like: OS=LINXWIN release-common.sh). +# for windows using mingw-cross-env (use like: OSTYPE=mingw-cross-env release-common.sh). # Linux support pending. # The script will create a file called openscad-.zip # in the current directory (or in the $DEPLOYDIR of a mingw cross build) -# +# # Usage: release-common.sh [-v ] [-c] # -v Version string (e.g. -v 2010.01) # -c Build with commit info @@ -30,10 +30,6 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then exit 0 fi -if [ $OS == "LINXWIN" ]; then - OSTYPE=mingw-cross-env -fi - if [[ "$OSTYPE" =~ "darwin" ]]; then OS=MACOSX elif [[ $OSTYPE == "msys" ]]; then -- cgit v0.10.1 From 1d47a6ebb62ff601f0de8c7e0852644fe48cc834 Mon Sep 17 00:00:00 2001 From: don bright Date: Sat, 4 Aug 2012 19:54:12 +0200 Subject: fix symlink bug in setenv-mingw script. enhance linux docs diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt index c0b1469..b24a19d 100644 --- a/doc/release-checklist.txt +++ b/doc/release-checklist.txt @@ -7,7 +7,7 @@ o Update VERSION environment variable It will be used by the commands below, as well as these files: - scripts/release-linux.sh + scripts/release-common.sh scripts/publish-macosx.sh scripts/publish-mingw-x.sh @@ -26,7 +26,8 @@ o build binaries (For Qt-4.7.3: Remove /Developers/Applications/Qt/plugins/qmltooling) ./scripts/publish-macosx.sh -> OpenSCAD-$VERSION.dmg Linux: FIXME 32 vs. 64 bit - ./scripts/release-linux.sh + ./scripts/release-common.sh -> openscad-$VERSION.ARCH.tar.gz + (where ARCH is x86-64 or x86-32) Windows mingw cross-build: FIXME 32 vs. 64 bit ./scripts/publish-mingw-x.sh -> mingw32/Openscad-$VERSION.zip -> mingw32/Openscad-$VERSION-Installer.exe diff --git a/scripts/release-common.sh b/scripts/release-common.sh index e449e1f..2fc2250 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -102,7 +102,7 @@ case $OS in cd $OPENSCADDIR ;; *) - make -s clean + make -s clean ;; esac @@ -123,7 +123,7 @@ case $OS in cd $OPENSCADDIR ;; *) - make -j2 $TARGET + make -j2 $TARGET ;; esac @@ -226,6 +226,10 @@ case $OS in strip openscad-$VERSION/lib/openscad/* cp scripts/installer-linux.sh openscad-$VERSION/install.sh chmod 755 -R openscad-$VERSION/ - tar cz openscad-$VERSION > openscad-$VERSION.x86-$ARCH.tar.gz + PACKAGEFILE=openscad-$VERSION.x86-$ARCH.tar.gz + tar cz openscad-$VERSION > $PACKAGEFILE + echo + echo "Binary created:" $PACKAGEFILE + echo ;; esac diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh index 271e5be..09a1900 100644 --- a/scripts/setenv-mingw-xbuild.sh +++ b/scripts/setenv-mingw-xbuild.sh @@ -27,7 +27,8 @@ echo PATH modified with $MXEDIR/usr/bin if [ ! -e $DEPLOYDIR ]; then mkdir -p $DEPLOYDIR fi -if [ ! -e $DEPLOYDIR/mingw-cross-env ]; then + +if [ ! -h $DEPLOYDIR/mingw-cross-env ]; then echo linking $MXEDIR/usr/i686-pc-mingw32/ to $DEPLOYDIR/mingw-cross-env ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env else -- cgit v0.10.1 From 8208fe143703f49297be23ca7d102ef1b74d5571 Mon Sep 17 00:00:00 2001 From: don bright Date: Sat, 4 Aug 2012 19:57:19 +0200 Subject: remove debug comment diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 2fc2250..ad1ccaa 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -98,7 +98,7 @@ esac case $OS in LINXWIN) -# cd $DEPLOYDIR && make -s clean + cd $DEPLOYDIR && make -s clean cd $OPENSCADDIR ;; *) -- cgit v0.10.1 From a32dcbf4ba7e9439433cf7727066a466058629ba Mon Sep 17 00:00:00 2001 From: don bright Date: Sat, 4 Aug 2012 20:40:35 +0200 Subject: enable MXEDIR to bet user-set. improve linux doc. diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt index b24a19d..e85e97c 100644 --- a/doc/release-checklist.txt +++ b/doc/release-checklist.txt @@ -25,9 +25,11 @@ o build binaries Mac OS X (For Qt-4.7.3: Remove /Developers/Applications/Qt/plugins/qmltooling) ./scripts/publish-macosx.sh -> OpenSCAD-$VERSION.dmg - Linux: FIXME 32 vs. 64 bit - ./scripts/release-common.sh -> openscad-$VERSION.ARCH.tar.gz - (where ARCH is x86-64 or x86-32) + Linux: + 32-bit: run on a 32-bit machine or VM + 64-bit: run on a 64-bit machine or VM + ./scripts/release-common.sh -> openscad-$VERSION.x86-ARCH.tar.gz + (where ARCH will be detected and set to 32 or 64) Windows mingw cross-build: FIXME 32 vs. 64 bit ./scripts/publish-mingw-x.sh -> mingw32/Openscad-$VERSION.zip -> mingw32/Openscad-$VERSION-Installer.exe diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh index 09a1900..a650f50 100644 --- a/scripts/setenv-mingw-xbuild.sh +++ b/scripts/setenv-mingw-xbuild.sh @@ -12,11 +12,13 @@ # if [ ! $BASEDIR ]; then - BASEDIR=$HOME/openscad_deps + export BASEDIR=$HOME/openscad_deps fi export OPENSCADDIR=$PWD export DEPLOYDIR=$OPENSCADDIR/mingw32 -export MXEDIR=$BASEDIR/mxe +if [ ! $MXEDIR ]; then + export MXEDIR=$BASEDIR/mxe +fi export PATH=$MXEDIR/usr/bin:$PATH echo BASEDIR: $BASEDIR @@ -28,11 +30,8 @@ if [ ! -e $DEPLOYDIR ]; then mkdir -p $DEPLOYDIR fi -if [ ! -h $DEPLOYDIR/mingw-cross-env ]; then - echo linking $MXEDIR/usr/i686-pc-mingw32/ to $DEPLOYDIR/mingw-cross-env - ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env -else - echo $DEPLOYDIR/mingw-cross-env is already symlinked -fi +echo linking $MXEDIR/usr/i686-pc-mingw32/ to $DEPLOYDIR/mingw-cross-env +rm -f $DEPLOYDIR/mingw-cross-env +ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env -- cgit v0.10.1 From a56721af475311b2442e9d5d937455be6f135c93 Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 00:18:36 +0200 Subject: use mxe's nsis if we dont have it. detect MCAD better. diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh index 1ea7d14..76bb7d4 100755 --- a/scripts/mingw-x-build-dependencies.sh +++ b/scripts/mingw-x-build-dependencies.sh @@ -40,17 +40,16 @@ if [ ! -e $BASEDIR ]; then mkdir -p $BASEDIR fi -cd $BASEDIR - -if [ ! -e mxe ]; then +if [ ! -e $MXEDIR ]; then echo "Downloading MXE into " $MXEDIR + cd $MXEDIR/.. git clone git://github.com/mxe/mxe.git fi echo "entering" $MXEDIR cd $MXEDIR echo "make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS" -make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS +make mpfr eigen opencsg cgal qt nsis -j $NUMCPU JOBS=$NUMJOBS #make mpfr -j $NUMCPU JOBS=$NUMJOBS # for testing echo "leaving" $MXEDIR diff --git a/scripts/mingw-x-build-installer.sh b/scripts/mingw-x-build-installer.sh index 4ac9f4e..e740182 100755 --- a/scripts/mingw-x-build-installer.sh +++ b/scripts/mingw-x-build-installer.sh @@ -27,12 +27,12 @@ OPENSCADDIR=$PWD if [ ! -f $OPENSCADDIR/openscad.pro ]; then echo "Must be run from the OpenSCAD source root directory" - exit 0 + exit 1 fi . ./scripts/setenv-mingw-xbuild.sh -if [ ! -e $OPENSCADDIR/libraries/MCAD ]; then +if [ ! -e $OPENSCADDIR/libraries/MCAD/__init__.py ]; then echo "Downloading MCAD" git submodule init git submodule update @@ -40,19 +40,29 @@ fi if [ ! -e $DEPLOYDIR ]; then echo $DEPLOYDIR "empty. Please build OpenSCAD for mingw32 first." - exit 0 + exit 1 fi OPENSCAD_EXE=$DEPLOYDIR/release/openscad.exe if [ ! -e $OPESCAD_EXE ]; then echo "Can't find" $OPENSCAD_EXE "Please build OpenSCAD for mingw32 first." - exit 0 + exit 1 fi +MAKENSIS= + if [ ! "`command -v makensis`" ]; then + MAKENSIS=makensis +fi + +if [ ! "`command -v i686-pc-mingw32-makensis`" ]; then + MAKENSIS=i686-pc-mingw32-makensis +fi + +if [ ! $MAKENSIS ]; then echo "makensis not found. please install nsis" - exit 0 + exit 1 fi diff --git a/scripts/release-common.sh b/scripts/release-common.sh index ad1ccaa..84874bf 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -27,7 +27,7 @@ printUsage() OPENSCADDIR=$PWD if [ ! -f $OPENSCADDIR/openscad.pro ]; then echo "Must be run from the OpenSCAD source root directory" - exit 0 + exit 1 fi if [[ "$OSTYPE" =~ "darwin" ]]; then -- cgit v0.10.1 From 06d48a47f8a2e7899b4edb3fae75a34479453e19 Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 02:06:10 +0200 Subject: favor exclusion during copy instead of rm of .git directory. diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 84874bf..dfd057a 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -134,6 +134,12 @@ fi echo "Creating directory structure..." +if [ ! -e $OPENSCADDIR/libraries/MCAD/__init__.py ]; then + echo "Downloading MCAD" + git submodule init + git submodule update +fi + case $OS in MACOSX) EXAMPLESDIR=OpenSCAD.app/Contents/Resources/examples @@ -153,10 +159,6 @@ case $OS in ;; esac -if [ -d .git ]; then - git submodule update -fi - if [ -n $EXAMPLESDIR ]; then echo $EXAMPLESDIR mkdir -p $EXAMPLESDIR @@ -166,9 +168,9 @@ fi if [ -n $LIBRARYDIR ]; then echo $LIBRARYDIR mkdir -p $LIBRARYDIR - cp -R libraries/* $LIBRARYDIR + tar cf libraries.tar --exclude=.git* + cd $LIBRARYDIR && tar xf $OPENSCADDIR/libraries.tar && cd $OPENSCADDIR chmod -R u=rwx,go=r,+X $LIBRARYDIR/* - rm -rf `find $LIBRARYDIR -name ".git"` fi echo "Creating archive.." -- cgit v0.10.1 From 58db7a9d19f707c72a3f16bdf6275c0e4671f362 Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 02:47:36 +0200 Subject: move functionality from build-installer script to release-common. mostly this means 1. detect NSIS and fail with error message if its not there 2. remove mingw-build-installer and mingw-build-openscad as they are nowredundant. running publish-mingw-x does exactly the same thing, only better because it builds from a clean source tree. diff --git a/scripts/mingw-x-build-installer.sh b/scripts/mingw-x-build-installer.sh deleted file mode 100755 index e740182..0000000 --- a/scripts/mingw-x-build-installer.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -e -# -# This script builds a binary install package of OpenSCAD for Windows -# using a cross-built mingw OpenSCAD and the NSIS installer system -# -# This script must be run from the OpenSCAD source root directory -# -# Usage: ./scripts/mingw-x-build-installer.sh -# -# Result: binary installer in $DEPLOYDIR directory -# -# -# Prerequisites: -# -# source ./scripts/setenv-mingw-xbuild.sh -# ./scripts/mingw-x-build-dependencues.sh -# -# and then build openscad before running this script. -# -# You need MCAD. run 'git submodule init && git submodule update' -# -# You need the Nullsoft installer system, on ubuntu 'sudo apt-get install nsis' -# -# Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X -# - -OPENSCADDIR=$PWD -if [ ! -f $OPENSCADDIR/openscad.pro ]; then - echo "Must be run from the OpenSCAD source root directory" - exit 1 -fi - -. ./scripts/setenv-mingw-xbuild.sh - -if [ ! -e $OPENSCADDIR/libraries/MCAD/__init__.py ]; then - echo "Downloading MCAD" - git submodule init - git submodule update -fi - -if [ ! -e $DEPLOYDIR ]; then - echo $DEPLOYDIR "empty. Please build OpenSCAD for mingw32 first." - exit 1 -fi - -OPENSCAD_EXE=$DEPLOYDIR/release/openscad.exe - -if [ ! -e $OPESCAD_EXE ]; then - echo "Can't find" $OPENSCAD_EXE "Please build OpenSCAD for mingw32 first." - exit 1 -fi - -MAKENSIS= - -if [ ! "`command -v makensis`" ]; then - MAKENSIS=makensis -fi - -if [ ! "`command -v i686-pc-mingw32-makensis`" ]; then - MAKENSIS=i686-pc-mingw32-makensis -fi - -if [ ! $MAKENSIS ]; then - echo "makensis not found. please install nsis" - exit 1 -fi - - -echo "Copying files to" $DEPLOYDIR - -copy_files() -{ - echo "copying" $1 - cp -a $1 $2 -} - -copy_files $OPENSCADDIR/libraries $DEPLOYDIR -copy_files $OPENSCADDIR/examples $DEPLOYDIR -copy_files $OPENSCADDIR/scripts/installer.nsi $DEPLOYDIR -copy_files $OPENSCADDIR/scripts/mingw-file-association.nsh $DEPLOYDIR - -echo "running makensis in" $DEPLOYDIR - -cd $DEPLOYDIR && makensis -V2 installer.nsi -# cd $DEPLOYDIR && makensis installer.nsi # debug nsis - -cd $OPENSCADDIR - -INSTALLFILE=$DEPLOYDIR/openscad_setup.exe - -if [ -e $INSTALLFILE ]; then - echo "Build complete. Install file ready:" - echo " " $INSTALLFILE -else - echo "Build failed. Sorry." -fi - diff --git a/scripts/mingw-x-build-openscad.sh b/scripts/mingw-x-build-openscad.sh deleted file mode 100755 index d0d5b9c..0000000 --- a/scripts/mingw-x-build-openscad.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -e -# -# This script builds Openscad.exe for windows using the MXE cross build system. -# -# This script must be run from the OpenSCAD source root directory -# -# You must have already run the mingw-x-build-dependencies.sh script -# -# Usage: -# -# ./scripts/mingw-x-build-openscad.sh -# - -OPENSCADDIR=$PWD -if [ ! -f $OPENSCADDIR/openscad.pro ]; then - echo "Must be run from the OpenSCAD source root directory" - exit 0 -fi -echo OPENSCADDIR: $OPENSCADDIR - -. ./scripts/setenv-mingw-xbuild.sh - -if [ ! -e $BASEDIR/lib ]; then - echo "please run the mingw-x-build-dependencies.sh script first" -fi - -echo "entering $DEPLOYDIR" -cd $DEPLOYDIR -i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro -#"make -j$NUMCPU" # causes parser_yacc.hpp errors -make -echo "leaving $DEPLOYDIR" - -echo "entering $OPENSCADDIR" -cd $OPENSCADDIR - -OPENSCAD_EXE=$DEPLOYDIR/release/openscad.exe - -if [ -e $OPENSCAD_EXE ] ; then - echo Build finished. Executable file ready: - echo " " $OPENSCAD_EXE -else - echo Cannot find $OPENSCAD_EXE. The build appears to have had an error. -fi - diff --git a/scripts/release-common.sh b/scripts/release-common.sh index dfd057a..dfebe13 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -60,6 +60,31 @@ if test -z "$VERSION"; then VERSION=`date "+%Y.%m.%d"` fi + +echo "Checking pre-requisitie..." + +case $OS in + LINXWIN) + MAKENSIS= + + if [ ! "`command -v makensis`" ]; then + MAKENSIS=makensis + elif [ ! "`command -v i686-pc-mingw32-makensis`" ]; then + MAKENSIS=i686-pc-mingw32-makensis + else + echo "makensis not found. please install nsis" + exit 1 + fi + ;; +esac + +if [ ! -e $OPENSCADDIR/libraries/MCAD/__init__.py ]; then + echo "Downloading MCAD" + git submodule init + git submodule update +fi + + echo "Building openscad-$VERSION $CONFIGURATION..." case $OS in @@ -134,12 +159,6 @@ fi echo "Creating directory structure..." -if [ ! -e $OPENSCADDIR/libraries/MCAD/__init__.py ]; then - echo "Downloading MCAD" - git submodule init - git submodule update -fi - case $OS in MACOSX) EXAMPLESDIR=OpenSCAD.app/Contents/Resources/examples @@ -168,8 +187,12 @@ fi if [ -n $LIBRARYDIR ]; then echo $LIBRARYDIR mkdir -p $LIBRARYDIR - tar cf libraries.tar --exclude=.git* - cd $LIBRARYDIR && tar xf $OPENSCADDIR/libraries.tar && cd $OPENSCADDIR + # exclude the .git stuff from MCAD which is a git submodule. + # tar is a relatively portable way to do exclusion + rm libraries.tar + tar cf libraries.tar --exclude=.git* libraries + cd $LIBRARYDIR/.. && tar xf $OPENSCADDIR/libraries.tar && cd $OPENSCADDIR + rm libraries.tar chmod -R u=rwx,go=r,+X $LIBRARYDIR/* fi @@ -198,13 +221,19 @@ case $OS in cp $TARGET/openscad.exe openscad-$VERSION rm -f OpenSCAD-$VERSION.zip "$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION - rm -rf ./openscad-$VERSION cd $OPENSCADDIR echo "Binary package created" echo "Creating installer" - ./scripts/mingw-x-build-installer.sh - cp $DEPLOYDIR/openscad_setup.exe $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe + cp ./scripts/installer.nsi $DEPLOYDIR/openscad-$VERSION + cp ./scripts/mingw-file-association.nsh $DEPLOYDIR/openscad-$VERSION + cd $DEPLOYDIR/openscad-$VERSION + NSISDEBUG=-V2 + # NSISDEBUG= # leave blank for full log + $MAKENSIS $NSISDEBUG installer.nsi + cd $OPENSCADDIR + cp $DEPLOYDIR/openscad-$VERSION/openscad_setup.exe $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe + echo echo "Binary created: $DEPLOYDIR/OpenSCAD-$VERSION.zip" echo "Installer created: $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe" diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh index a650f50..e8976b7 100644 --- a/scripts/setenv-mingw-xbuild.sh +++ b/scripts/setenv-mingw-xbuild.sh @@ -11,14 +11,20 @@ # Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X # +export OPENSCADDIR=$PWD + if [ ! $BASEDIR ]; then export BASEDIR=$HOME/openscad_deps fi -export OPENSCADDIR=$PWD -export DEPLOYDIR=$OPENSCADDIR/mingw32 + +if [ ! $DEPLOYDIR ]; then + export DEPLOYDIR=$OPENSCADDIR/mingw32 +fi + if [ ! $MXEDIR ]; then export MXEDIR=$BASEDIR/mxe fi + export PATH=$MXEDIR/usr/bin:$PATH echo BASEDIR: $BASEDIR -- cgit v0.10.1 From db53bdb496eef048831369b888c775bf0e82b82f Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 03:04:40 +0200 Subject: 1. fix bug in detecting makensis 2. better error message for MXE not being found diff --git a/scripts/publish-mingw-x.sh b/scripts/publish-mingw-x.sh index 4e0afe9..d6cebcd 100755 --- a/scripts/publish-mingw-x.sh +++ b/scripts/publish-mingw-x.sh @@ -16,15 +16,19 @@ CCACHE_DISABLE=1 . ./scripts/setenv-mingw-xbuild.sh if [ ! -e $MXEDIR ]; then - echo "Mingw cross tools not found." - echo " Please run ./scripts/mingw-x-build-dependencies.sh to install " - echo " or modify MXEDIR to point to the root of your cross-tools setup" - echo " ( Please see setenv-mingw-xbuild.sh for more info ) " + echo "MXEDIR: $MXEDIR" + echo "MXEDIR is a non-existent path. Mingw cross tools not found." + echo + echo " Please run ./scripts/mingw-x-build-dependencies.sh to install MXE" + echo " or modify MXEDIR to point to the root of your cross-tools setup" + echo " ( Please see http://mxe.cc for more info ) " + echo + exit 1 fi if [ ! -f $OPENSCADDIR/openscad.pro ]; then echo "Must be run from the OpenSCAD source root directory" - exit 0 + exit 1 fi OSTYPE=mingw-cross-env ./scripts/release-common.sh -v $VERSION $COMMIT diff --git a/scripts/release-common.sh b/scripts/release-common.sh index dfebe13..202efaa 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -67,9 +67,9 @@ case $OS in LINXWIN) MAKENSIS= - if [ ! "`command -v makensis`" ]; then + if [ "`command -v makensis`" ]; then MAKENSIS=makensis - elif [ ! "`command -v i686-pc-mingw32-makensis`" ]; then + elif [ "`command -v i686-pc-mingw32-makensis`" ]; then MAKENSIS=i686-pc-mingw32-makensis else echo "makensis not found. please install nsis" @@ -189,10 +189,10 @@ if [ -n $LIBRARYDIR ]; then mkdir -p $LIBRARYDIR # exclude the .git stuff from MCAD which is a git submodule. # tar is a relatively portable way to do exclusion - rm libraries.tar + rm -f libraries.tar tar cf libraries.tar --exclude=.git* libraries cd $LIBRARYDIR/.. && tar xf $OPENSCADDIR/libraries.tar && cd $OPENSCADDIR - rm libraries.tar + rm -f libraries.tar chmod -R u=rwx,go=r,+X $LIBRARYDIR/* fi -- cgit v0.10.1 From 00c19d2a36e3dc4896dc0b4b4a1696a5d3b7431e Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 03:18:17 +0200 Subject: fix path of openscad.exe in installer.nsi diff --git a/scripts/installer.nsi b/scripts/installer.nsi index 763d42d..87ec18d 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -5,7 +5,7 @@ InstallDir $PROGRAMFILES\OpenSCAD DirText "This will install OpenSCAD on your computer. Choose a directory" Section "install" SetOutPath $INSTDIR -File release/openscad.exe +File openscad.exe File /r /x mingw-cross-env examples File /r /x mingw-cross-env libraries ${registerExtension} "$INSTDIR\openscad.exe" ".scad" "OpenSCAD_File" -- cgit v0.10.1 From 1a7f52b68062df265b1b213b8ae11ff66239527c Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 03:22:28 +0200 Subject: improve log messages in release script diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 202efaa..d2b0f16 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -61,7 +61,7 @@ if test -z "$VERSION"; then fi -echo "Checking pre-requisitie..." +echo "Checking pre-requisites..." case $OS in LINXWIN) @@ -75,6 +75,7 @@ case $OS in echo "makensis not found. please install nsis" exit 1 fi + echo NSIS makensis found: $MAKENSIS ;; esac @@ -82,6 +83,8 @@ if [ ! -e $OPENSCADDIR/libraries/MCAD/__init__.py ]; then echo "Downloading MCAD" git submodule init git submodule update +else + echo "MCAD found:" $OPENSCADDIR/libraries/MCAD fi -- cgit v0.10.1 From 27f23903d3eb212be7f21cdf2727e81981458602 Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 03:59:22 +0200 Subject: more error reporting and log reporting diff --git a/scripts/release-common.sh b/scripts/release-common.sh index d2b0f16..1e6f14d 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -146,7 +146,7 @@ esac case $OS in LINXWIN) - # make -j2 sometimes has problems with parser_yacc + # make -jx sometimes has problems with parser_yacc cd $DEPLOYDIR && make $TARGET cd $OPENSCADDIR ;; @@ -228,19 +228,33 @@ case $OS in echo "Binary package created" echo "Creating installer" + echo "Copying NSIS files to $DEPLOYDIR/openscad-$VERSION" cp ./scripts/installer.nsi $DEPLOYDIR/openscad-$VERSION cp ./scripts/mingw-file-association.nsh $DEPLOYDIR/openscad-$VERSION cd $DEPLOYDIR/openscad-$VERSION NSISDEBUG=-V2 # NSISDEBUG= # leave blank for full log + echo $MAKENSIS $NSISDEBUG installer.nsi $MAKENSIS $NSISDEBUG installer.nsi - cd $OPENSCADDIR cp $DEPLOYDIR/openscad-$VERSION/openscad_setup.exe $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe + cd $OPENSCADDIR - echo - echo "Binary created: $DEPLOYDIR/OpenSCAD-$VERSION.zip" - echo "Installer created: $DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe" - echo + BINFILE=$DEPLOYDIR/OpenSCAD-$VERSION.zip + INSTFILE=$DEPLOYDIR/OpenSCAD-$VERSION-Installer.exe + if [ -e $BINFILE ]; then + if [ -e $INSTFILE ]; then + echo + echo "Binary created:" $BINFILE + echo "Installer created:" $INSTFILE + echo + else + echo "Build failed. Cannot find" $INSTFILE + exit 1 + fi + else + echo "Build failed. Cannot find" $BINFILE + exit 1 + fi ;; LINUX) # Do stuff from release-linux.sh -- cgit v0.10.1 From 982fb58263f169f792e8ec86855891d99a058452 Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 04:53:38 +0200 Subject: update README to match new mingw build diff --git a/README.md b/README.md index ea27c46..ee1045e 100644 --- a/README.md +++ b/README.md @@ -177,9 +177,9 @@ Then run the script to download & compile all the prerequisite libraries above: ./scripts/mingw-x-build-dependencies.sh -After that (it may take several hours), run the Compilation script: +Then skip the compilation instructions below. Instead, build an installer: - ./scripts/mingw-x-build-openscad.sh + ./scripts/publish-mingw-x.sh ### Compilation -- cgit v0.10.1 From bc5c35ccfd4a5f8a98849124ad8284e44e1ffc0d Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 04:54:57 +0200 Subject: update README to match mingw script changes diff --git a/README.md b/README.md index ee1045e..d91da32 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ Then run the script to download & compile all the prerequisite libraries above: Then skip the compilation instructions below. Instead, build an installer: - ./scripts/publish-mingw-x.sh + OSTYPE=mingw-cross-env ./scripts/release-common.sh ### Compilation -- cgit v0.10.1 From bcd6148383498ded8a96c9d2f61ddb8cb8e94243 Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 04:56:55 +0200 Subject: remove debugging diff --git a/openscad.pro b/openscad.pro index 2f02473..3dfd1c5 100644 --- a/openscad.pro +++ b/openscad.pro @@ -103,10 +103,6 @@ netbsd* { QMAKE_CXXFLAGS *= -fno-strict-aliasing } -*lyoob* { - message("lyoobyoo") -} - *clang* { # disable enormous amount of warnings about CGAL QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter -- cgit v0.10.1 From bae78fc8f9b242e4cfa3e772c021b473ca778a28 Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 05:01:52 +0200 Subject: restory old submodule update command if .git exists diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 1e6f14d..7bc89e6 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -87,6 +87,9 @@ else echo "MCAD found:" $OPENSCADDIR/libraries/MCAD fi +if [ -d .git ]; then + git submodule update +fi echo "Building openscad-$VERSION $CONFIGURATION..." -- cgit v0.10.1 From 8318c672a821e329dfb3b9eaec886ed3b28c550d Mon Sep 17 00:00:00 2001 From: don bright Date: Sun, 5 Aug 2012 05:03:52 +0200 Subject: clarify documentation diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 7bc89e6..62f8ed8 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -194,7 +194,8 @@ if [ -n $LIBRARYDIR ]; then echo $LIBRARYDIR mkdir -p $LIBRARYDIR # exclude the .git stuff from MCAD which is a git submodule. - # tar is a relatively portable way to do exclusion + # tar is a relatively portable way to do exclusion, without the + # risks of rm rm -f libraries.tar tar cf libraries.tar --exclude=.git* libraries cd $LIBRARYDIR/.. && tar xf $OPENSCADDIR/libraries.tar && cd $OPENSCADDIR -- cgit v0.10.1