Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Script for building the Py{GObject,GTK} installers using MinGW
- # via wine on ubuntu 10.04
- #Install the deps, MinGW and MSYS. GCC 4.5.0
- #wine mingw-get.exe install gcc
- #wine mingw-get.exe install msys-base
- PYVERSIONS="6 7"
- BDIST_TARGETS="wininst msi"
- PYGOBJECT_VERSION=2.26.0
- PYGTK_VERSION=2.22.0
- rm -rf {pygobject.git,pycairo-1.8.10,pygtk.git}/dist/
- for pyver in $PYVERSIONS; do
- for bdist in $BDIST_TARGETS; do
- if [ ${bdist} = "wininst" ] ; then
- build_opt=--user-access-control=auto
- else
- build_opt=
- fi
- echo "============== Python2.${pyver} bdist_${bdist}"
- #PyGObject
- cd pygobject.git && rm -rf build/
- cat .git/HEAD | grep -q windows || exit 1
- wine C:\\Python2${pyver}\\python.exe setup.py build --compiler=mingw32 --enable-threading --yes-i-know-its-not-supported bdist_${bdist} ${build_opt}
- test ${bdist} = "wininst" && wine dist/pygobject-$PYGOBJECT_VERSION.win32-py2.${pyver}.exe
- cd ../
- #PyCairo
- cd pycairo-1.8.10 && rm -rf build/
- patch -N -i fix-install-path.patch
- wine C:\\Python2${pyver}\\python.exe setup.py build --compiler=mingw32 bdist_${bdist} ${build_opt}
- test ${bdist} = "wininst" && wine dist/pycairo-1.8.10.win32-py2.${pyver}.exe
- cd ../
- #PyGTK
- cd pygtk.git && rm -rf build/
- cat .git/HEAD | grep -q windows || exit 1
- PKG_CONFIG_PATH=C:/Python2${pyver}/Lib/pkgconfig/ wine C:\\Python2${pyver}\\python.exe setup.py build --compiler=mingw32 --enable-threading --yes-i-know-its-not-supported bdist_${bdist} ${build_opt}
- test ${bdist} = "wininst" && wine dist/pygtk-$PYGTK_VERSION.win32-py2.${pyver}.exe
- wine C:\\Python2${pyver}\\python.exe examples/pygtk-demo/pygtk-demo.py
- cd ../
- done
- done
Add Comment
Please, Sign In to add comment