mirror of https://github.com/vitalif/openscad
integrate mingw-xxxx scripts with release-common.sh
parent
c29d8a370f
commit
08b0776985
|
@ -6,8 +6,8 @@ DirText "This will install OpenSCAD on your computer. Choose a directory"
|
||||||
Section "install"
|
Section "install"
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
File release/openscad.exe
|
File release/openscad.exe
|
||||||
File /r examples
|
File /r /x mingw-cross-env examples
|
||||||
File /r libraries
|
File /r /x mingw-cross-env libraries
|
||||||
${registerExtension} "$INSTDIR\openscad.exe" ".scad" "OpenSCAD_File"
|
${registerExtension} "$INSTDIR\openscad.exe" ".scad" "OpenSCAD_File"
|
||||||
CreateShortCut $SMPROGRAMS\OpenSCAD.lnk $INSTDIR\openscad.exe
|
CreateShortCut $SMPROGRAMS\OpenSCAD.lnk $INSTDIR\openscad.exe
|
||||||
WriteUninstaller $INSTDIR\Uninstall.exe
|
WriteUninstaller $INSTDIR\Uninstall.exe
|
||||||
|
|
|
@ -72,6 +72,7 @@ copy_files $OPENSCADDIR/scripts/mingw-file-association.nsh $DEPLOYDIR
|
||||||
echo "running makensis in" $DEPLOYDIR
|
echo "running makensis in" $DEPLOYDIR
|
||||||
|
|
||||||
cd $DEPLOYDIR && makensis -V2 installer.nsi
|
cd $DEPLOYDIR && makensis -V2 installer.nsi
|
||||||
|
# cd $DEPLOYDIR && makensis installer.nsi # debug nsis
|
||||||
|
|
||||||
cd $OPENSCADDIR
|
cd $OPENSCADDIR
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# for windows using mingw-cross-env (use like: OS=LINXWIN release-common.sh).
|
# for windows using mingw-cross-env (use like: OS=LINXWIN release-common.sh).
|
||||||
# Linux support pending.
|
# Linux support pending.
|
||||||
# The script will create a file called openscad-<versionstring>.zip
|
# 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]
|
# Usage: release-common.sh [-v <versionstring>] [-c]
|
||||||
# -v Version string (e.g. -v 2010.01)
|
# -v Version string (e.g. -v 2010.01)
|
||||||
|
@ -24,6 +24,16 @@ printUsage()
|
||||||
echo " Example: $0 -v 2010.01
|
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
|
if [[ "$OSTYPE" =~ "darwin" ]]; then
|
||||||
OS=MACOSX
|
OS=MACOSX
|
||||||
elif [[ $OSTYPE == "msys" ]]; then
|
elif [[ $OSTYPE == "msys" ]]; then
|
||||||
|
@ -72,22 +82,34 @@ case $OS in
|
||||||
;;
|
;;
|
||||||
LINXWIN)
|
LINXWIN)
|
||||||
unset CONFIG
|
unset CONFIG
|
||||||
|
. ./scripts/setenv-mingw-xbuild.sh
|
||||||
TARGET=release
|
TARGET=release
|
||||||
ZIP="zip"
|
ZIP="zip"
|
||||||
ZIPARGS="-r"
|
ZIPARGS="-r"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
case $OS in
|
case $OS in
|
||||||
LINXWIN)
|
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
|
qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG-=debug openscad.pro
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
make -s clean
|
case $OS in
|
||||||
|
LINXWIN)
|
||||||
|
# cd $DEPLOYDIR && make -s clean
|
||||||
|
cd $OPENSCADDIR
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
make -s clean
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
case $OS in
|
case $OS in
|
||||||
MACOSX)
|
MACOSX)
|
||||||
rm -rf OpenSCAD.app
|
rm -rf OpenSCAD.app
|
||||||
|
@ -98,7 +120,16 @@ case $OS in
|
||||||
;;
|
;;
|
||||||
esac
|
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
|
if [[ $? != 0 ]]; then
|
||||||
echo "Error building OpenSCAD. Aborting."
|
echo "Error building OpenSCAD. Aborting."
|
||||||
|
@ -112,6 +143,12 @@ case $OS in
|
||||||
EXAMPLESDIR=OpenSCAD.app/Contents/Resources/examples
|
EXAMPLESDIR=OpenSCAD.app/Contents/Resources/examples
|
||||||
LIBRARYDIR=OpenSCAD.app/Contents/Resources/libraries
|
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/
|
EXAMPLESDIR=openscad-$VERSION/examples/
|
||||||
LIBRARYDIR=openscad-$VERSION/libraries/
|
LIBRARYDIR=openscad-$VERSION/libraries/
|
||||||
|
@ -158,15 +195,21 @@ case $OS in
|
||||||
;;
|
;;
|
||||||
LINXWIN)
|
LINXWIN)
|
||||||
#package
|
#package
|
||||||
|
echo "Creating binary package"
|
||||||
|
cd $DEPLOYDIR
|
||||||
cp $TARGET/openscad.exe openscad-$VERSION
|
cp $TARGET/openscad.exe openscad-$VERSION
|
||||||
rm -f OpenSCAD-$VERSION.zip
|
rm -f OpenSCAD-$VERSION.zip
|
||||||
"$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION
|
"$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION
|
||||||
cp scripts/installer.nsi openscad-$VERSION/
|
rm -rf ./openscad-$VERSION
|
||||||
cd openscad-$VERSION && makensis installer.nsi && cd ..
|
cd $OPENSCADDIR
|
||||||
cp openscad-$VERSION/openscad_setup.exe OpenSCAD-$VERSION-Installer.exe
|
|
||||||
rm -rf openscad-$VERSION
|
echo "Creating installer"
|
||||||
echo "Binary created: OpenSCAD-$VERSION.zip"
|
./scripts/mingw-x-build-installer.sh
|
||||||
echo "Installer created: OpenSCAD-$VERSION-Installer.exe"
|
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)
|
LINUX)
|
||||||
# Do stuff from release-linux.sh
|
# Do stuff from release-linux.sh
|
||||||
|
|
Loading…
Reference in New Issue