grab_files.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Download the necessary files
  2. wget -O gtkbundle.zip http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip
  3. wget -O pygobject.exe http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.28/pygobject-2.28.3.win32-py2.7.exe
  4. wget -O pycairo.exe http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.8/pycairo-1.8.10.win32-py2.7.exe
  5. wget -O pygtk.exe http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-2.24.0.win32-py2.7.exe
  6. #Numpy and Matplotlib are both the bindings for Python 2.7 and 32-bit, but will work on a 64-bit Windows
  7. wget -O numpy.exe http://downloads.sourceforge.net/project/numpy/NumPy/1.9.2/numpy-1.9.2-win32-superpack-python2.7.exe
  8. wget -O matplotlib.exe https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.4.3/windows/matplotlib-1.4.3.win32-py2.7.exe
  9. # GTK runtime
  10. mkdir gtkbundle
  11. unzip -d gtkbundle gtkbundle.zip
  12. cd gtkbundle
  13. rm -r src man include share/doc share/man share/gtk-doc share/gtk-2.0/demo bin/gtk-demo.exe etc/bash_completion.d
  14. cd ..
  15. # Python bindings
  16. mkdir pygobject
  17. unzip -d pygobject pygobject.exe
  18. mkdir pycairo
  19. unzip -d pycairo pycairo.exe
  20. mkdir pygtk
  21. unzip -d pygtk pygtk.exe
  22. mkdir numpy
  23. unzip -d numpy numpy.exe
  24. mkdir matplotlib
  25. unzip -d matplotlib matplotlib.exe
  26. # Reassemble into pynsist_pkgs
  27. echo -n "Assembling GTK files into pynsist_pkgs... "
  28. rm -r pynsist_pkgs
  29. mkdir pynsist_pkgs
  30. mv gtkbundle pynsist_pkgs/gtk
  31. cp -r pygobject/PLATLIB/* pynsist_pkgs
  32. rm -r pygobject
  33. cp -r pycairo/PLATLIB/* pynsist_pkgs
  34. cp -r pycairo/DATA/lib/site-packages/cairo/* pynsist_pkgs/cairo
  35. rm -r pycairo
  36. cp -r pygtk/PLATLIB/* pynsist_pkgs
  37. rm -r pygtk
  38. cp -r matplotlib/PLATLIB/* pynsist_pkgs
  39. rm -r matplotlib
  40. #Unzip numpy into base directory
  41. 7z e numpy.exe
  42. #Unzip the NoSSE package into the numpy directory
  43. 7z x numpy-1.9.2-nosse.exe -onumpy
  44. cp -r numpy/PLATLIB/* pynsist_pkgs
  45. rm -r numpy
  46. rm -r pynsist_pkgs/gtk-2.0/tests
  47. echo "done"