source: ogAgent-Git/windows/py2exe-wine-linux.sh

qndtest
Last change on this file was 9bb8368, checked in by Ramón M. Gómez <ramongomez@…>, 4 years ago

#940: Update Ubuntu and Windows OGAgent dependencies.

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