source: admin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh @ 062ea34

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since 062ea34 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
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.14/python-2.7.14.msi -O python-2.7.msi
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
18    wget -nd http://prdownloads.sourceforge.net/nsis/nsis-3.0rc1-setup.exe?download -O nsis-install.exe
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() {
25    if which winetricks &>/dev/null; then
26        echo "Setting up wine prefix (using winetricks)"
27        winetricks
28    fi
29
30    cd downloads
31    echo "Installing python"
32    $WINE msiexec /qn /i python-2.7.msi
33    echo "Installing vc for python"
34    $WINE msiexec /qn /i VCForPython27.msi
35
36    echo "Installing py2exe (needs X)"
37    $WINE py2exe-install.exe
38    echo "Installing pyqt (needs X)"
39    $WINE pyqt-install.exe
40    echo "Installing nsis (needs X?)"
41    $WINE nsis-install.exe
42
43    cd ..
44}
45
46setup_pip() {
47    echo "Seting up pip..."
48    $WINE C:\\Python27\\python -m pip install --upgrade pip
49}
50
51install_packages() {
52    echo "Installing pywin32"
53    $WINE C:\\Python27\\python -m pip install pywin32
54    echo "Installing required packages"
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
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.