Guest User

Untitled

a guest
Jun 18th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. #!/bin/sh
  2. # Script for building the Py{GObject,GTK} installers using MinGW
  3. # via wine on ubuntu 10.04
  4.  
  5. #Install the deps, MinGW and MSYS. GCC 4.5.0
  6. #wine mingw-get.exe install gcc
  7. #wine mingw-get.exe install msys-base
  8.  
  9. PYVERSIONS="6 7"
  10. BDIST_TARGETS="wininst msi"
  11.  
  12. PYGOBJECT_VERSION=2.26.0
  13. PYGTK_VERSION=2.22.0
  14.  
  15. rm -rf {pygobject.git,pycairo-1.8.10,pygtk.git}/dist/
  16.  
  17. for pyver in $PYVERSIONS; do
  18. for bdist in $BDIST_TARGETS; do
  19. if [ ${bdist} = "wininst" ] ; then
  20. build_opt=--user-access-control=auto
  21. else
  22. build_opt=
  23. fi
  24.  
  25. echo "============== Python2.${pyver} bdist_${bdist}"
  26. #PyGObject
  27. cd pygobject.git && rm -rf build/
  28. cat .git/HEAD | grep -q windows || exit 1
  29. wine C:\\Python2${pyver}\\python.exe setup.py build --compiler=mingw32 --enable-threading --yes-i-know-its-not-supported bdist_${bdist} ${build_opt}
  30. test ${bdist} = "wininst" && wine dist/pygobject-$PYGOBJECT_VERSION.win32-py2.${pyver}.exe
  31. cd ../
  32.  
  33. #PyCairo
  34. cd pycairo-1.8.10 && rm -rf build/
  35. patch -N -i fix-install-path.patch
  36. wine C:\\Python2${pyver}\\python.exe setup.py build --compiler=mingw32 bdist_${bdist} ${build_opt}
  37. test ${bdist} = "wininst" && wine dist/pycairo-1.8.10.win32-py2.${pyver}.exe
  38. cd ../
  39.  
  40. #PyGTK
  41. cd pygtk.git && rm -rf build/
  42. cat .git/HEAD | grep -q windows || exit 1
  43. 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}
  44. test ${bdist} = "wininst" && wine dist/pygtk-$PYGTK_VERSION.win32-py2.${pyver}.exe
  45. wine C:\\Python2${pyver}\\python.exe examples/pygtk-demo/pygtk-demo.py
  46. cd ../
  47. done
  48. done
Add Comment
Please, Sign In to add comment