summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-08-02 03:02:45 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-08-02 03:02:45 (GMT)
commitb942c728c1ac532d65bd780ba2a124dc0fb036b1 (patch)
tree44dfeaa30329c994f8b11d10c9c9f60b1b33cee2
parent5036d9acea379d5177179cb8eaa60d2c93417e9a (diff)
find openscad.exe. clearup confusion re NUMCPU / NUMJOBS
-rw-r--r--scripts/installer.nsi2
-rwxr-xr-xscripts/mingw-x-build-dependencies.sh17
-rwxr-xr-xscripts/mingw-x-build-installer.sh34
-rw-r--r--scripts/setenv-mingw-xbuild.sh23
4 files changed, 38 insertions, 38 deletions
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
contact: Jan Huwald // Impressum