diff options
| -rw-r--r-- | scripts/installer.nsi | 4 | ||||
| -rwxr-xr-x | scripts/mingw-x-build-installer.sh | 1 | ||||
| -rwxr-xr-x | scripts/release-common.sh | 63 | 
3 files changed, 56 insertions, 12 deletions
| 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-<versionstring>.zip -# in the current directory. +# in the current directory (or in the $DEPLOYDIR of a mingw cross build)  #   # Usage: release-common.sh [-v <versionstring>] [-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 | 
