mirror of https://github.com/vitalif/openscad
support mingw win32 builds
parent
45060878b5
commit
6acf0b5019
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# This script creates a binary release of OpenSCAD.
|
# This script creates a binary release of OpenSCAD.
|
||||||
# This should work under Mac OS X and Windows (msys). Linux support pending.
|
# 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).
|
||||||
|
# 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.
|
||||||
#
|
#
|
||||||
|
@ -54,9 +56,23 @@ case $OS in
|
||||||
ZIPARGS="a -tzip"
|
ZIPARGS="a -tzip"
|
||||||
TARGET=release
|
TARGET=release
|
||||||
;;
|
;;
|
||||||
|
LINXWIN)
|
||||||
|
unset CONFIG
|
||||||
|
TARGET=release
|
||||||
|
ZIP="zip"
|
||||||
|
ZIPARGS="-r"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case $OS in
|
||||||
|
LINXWIN)
|
||||||
|
i686-pc-mingw32-qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug openscad.pro
|
||||||
|
;;
|
||||||
|
*)
|
||||||
qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG-=debug openscad.pro
|
qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG-=debug openscad.pro
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
make -s clean
|
make -s clean
|
||||||
case $OS in
|
case $OS in
|
||||||
MACOSX)
|
MACOSX)
|
||||||
|
@ -122,4 +138,16 @@ case $OS in
|
||||||
rm -rf openscad-$VERSION
|
rm -rf openscad-$VERSION
|
||||||
echo "Binary created: openscad-$VERSION.zip"
|
echo "Binary created: openscad-$VERSION.zip"
|
||||||
;;
|
;;
|
||||||
|
LINXWIN)
|
||||||
|
#package
|
||||||
|
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"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,13 +1,27 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
dmgfile=$1
|
# Works with Mac OS X and Linux cross-compiling for windows using
|
||||||
if [ -z "$dmgfile" ]; then
|
# mingw-cross-env (use like: OS=LINXWIN update-web.sh file1.zip file2.exe).
|
||||||
echo "Usage: $0 <dmgfile>"
|
|
||||||
|
file1=$1
|
||||||
|
if [ -z "$file1" ]; then
|
||||||
|
echo "Usage: $0 <file1> [<file2>]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $OSTYPE =~ "darwin" ]]; then
|
||||||
|
OS=MACOSX
|
||||||
|
fi
|
||||||
|
|
||||||
indexfile=../openscad.github.com/index.html
|
indexfile=../openscad.github.com/index.html
|
||||||
if [ -f $indexfile ]; then
|
if [ -f $indexfile ]; then
|
||||||
sed -i .backup -e "s/^\(.*mac-snapshot.*\)\(OpenSCAD-.*\.dmg\)\(.*\)\(OpenSCAD-.*dmg\)\(.*$\)/\\1$dmgfile\\3$dmgfile\\5/" $indexfile
|
if [ $OS == MACOSX ]; then
|
||||||
|
sed -i .backup -e "s/^\(.*mac-snapshot.*\)\(OpenSCAD-.*\.dmg\)\(.*\)\(OpenSCAD-.*dmg\)\(.*$\)/\\1$file1\\3$file1\\5/" $indexfile
|
||||||
|
elif [ $OS == LINXWIN ]; then
|
||||||
|
file2=$2
|
||||||
|
sed -i .backup -e "s/^\(.*win-snapshot-zip.*\)\(OpenSCAD-.*\.zip\)\(.*\)\(OpenSCAD-.*zip\)\(.*$\)/\\1$file1\\3$file1\\5/" $indexfile
|
||||||
|
sed -i .backup -e "s/^\(.*win-snapshot-exe.*\)\(OpenSCAD-.*-Installer\.exe\)\(.*\)\(OpenSCAD-.*-Installer.exe\)\(.*$\)/\\1$file2\\3$file2\\5/" $indexfile
|
||||||
|
fi
|
||||||
echo "Web page updated. Remember to commit and push openscad.github.com"
|
echo "Web page updated. Remember to commit and push openscad.github.com"
|
||||||
else
|
else
|
||||||
echo "Web page not found at $indexfile"
|
echo "Web page not found at $indexfile"
|
||||||
|
|
Loading…
Reference in New Issue