source: admin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh @ 7da63e81

Last change on this file since 7da63e81 was b468e58, checked in by Ramón M. Gómez <ramongomez@…>, 6 years ago

#914: Update OGAgent creation dependencies and installation instructions.

  • Property mode set to 100755
File size: 2.4 KB
RevLine 
[c3e7c06]1#!/bin/sh
2
3# We need:
4# * Wine (32 bit)
[435c10d]5# * winetricks (in some distributions)
[c3e7c06]6
[31f6347]7export WINEARCH=win32 WINEPREFIX=$PWD/wine WINEDEBUG=fixme-all
[c3e7c06]8WINE=wine
9
10download() {
11    mkdir downloads
12    # Get needed software
13    cd downloads
[31f6347]14    wget -nd https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi -O python-2.7.msi
[c3e7c06]15    wget -nd http://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
16    wget -nd https://bootstrap.pypa.io/get-pip.py
17    wget -nd http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.7.exe/download -O py2exe-install.exe
[38aa1f3]18    wget -nd http://prdownloads.sourceforge.net/nsis/nsis-3.0rc1-setup.exe?download -O nsis-install.exe
[c3e7c06]19    wget -nd http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe/download -O pyqt-install.exe
20    wget -nd http://nsis.sourceforge.net/mediawiki/images/d/d7/NSIS_Simple_Firewall_Plugin_1.20.zip
21    cd ..
22}
23
24install_python() {
[435c10d]25    if which winetricks &>/dev/null; then
26        echo "Setting up wine prefix (using winetricks)"
27        winetricks
28    fi
[b468e58]29
[c3e7c06]30    cd downloads
31    echo "Installing python"
[38aa1f3]32    $WINE msiexec /qn /i python-2.7.msi
[c3e7c06]33    echo "Installing vc for python"
34    $WINE msiexec /qn /i VCForPython27.msi
[b468e58]35
[c3e7c06]36    echo "Installing py2exe (needs X)"
37    $WINE py2exe-install.exe
[b468e58]38    echo "Installing pyqt (needs X)"
[c3e7c06]39    $WINE pyqt-install.exe
40    echo "Installing nsis (needs X?)"
41    $WINE nsis-install.exe
[b468e58]42
[c3e7c06]43    cd ..
44}
45
46setup_pip() {
47    echo "Seting up pip..."
[31f6347]48    $WINE C:\\Python27\\python -m pip install --upgrade pip
[b468e58]49}
[c3e7c06]50
51install_packages() {
[b468e58]52    echo "Installing pywin32"
53    $WINE C:\\Python27\\python -m pip install pywin32
54    echo "Installing required packages"
[31f6347]55    $WINE C:\\Python27\\python -m pip install requests
56    $WINE C:\\Python27\\python -m pip install six
57    # Using easy_install instead of pip to install pycrypto
58    $WINE C:\\Python27\\Scripts\\easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win32-py2.7.exe
[c3e7c06]59    # Copy nsis required NSIS_Simple_Firewall_Plugin_1
60    echo "Copying simple firewall plugin for nsis installer"
61    unzip -o downloads/NSIS_Simple_Firewall_Plugin_1.20.zip SimpleFC.dll -d $WINEPREFIX/drive_c/Program\ Files/NSIS/Plugins/x86-ansi/
62    unzip -o downloads/NSIS_Simple_Firewall_Plugin_1.20.zip SimpleFC.dll -d $WINEPREFIX/drive_c/Program\ Files/NSIS/Plugins/x86-unicode/
63}
64
65download
66install_python
67setup_pip
68install_packages
69
Note: See TracBrowser for help on using the repository browser.