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

configure-ptt-chedecorare-oglive-methodsejecutarscript-b64fix-cfg2objfixes-winlgromero-filebeatmainmodulesnew-browserno-ptt-paramogadmcliogadmclient-statusogagent-jobsogagent-macosogcore1oglogoglog2override-moduleping1ping2ping3ping4py3-winreport-progresstlsunification2unification3versionswindows-fixes
Last change on this file since 5294919 was 9bb8368, checked in by Ramón M. Gómez <ramongomez@…>, 5 years ago

#940: Update Ubuntu and Windows OGAgent dependencies.

  • Property mode set to 100755
File size: 2.3 KB
RevLine 
[11f7a07]1#!/bin/sh
2
3# We need:
4# * Wine (32 bit)
[85b3316]5# * winetricks (in some distributions)
[11f7a07]6
[90e5c2d]7export WINEARCH=win32 WINEPREFIX=$PWD/wine WINEDEBUG=fixme-all
[11f7a07]8WINE=wine
9
10download() {
11    mkdir downloads
12    # Get needed software
13    cd downloads
[9bb8368]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
[11f7a07]16    wget -nd https://bootstrap.pypa.io/get-pip.py
[9bb8368]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
[11f7a07]19    wget -nd http://nsis.sourceforge.net/mediawiki/images/d/d7/NSIS_Simple_Firewall_Plugin_1.20.zip
20    cd ..
21}
22
23install_python() {
[85b3316]24    if which winetricks &>/dev/null; then
25        echo "Setting up wine prefix (using winetricks)"
26        winetricks
27    fi
[d3dd7cf]28
[11f7a07]29    cd downloads
30    echo "Installing python"
[433b85a]31    $WINE msiexec /qn /i python-2.7.msi
[11f7a07]32    echo "Installing vc for python"
33    $WINE msiexec /qn /i VCForPython27.msi
[d3dd7cf]34
35    echo "Installing pyqt (needs X)"
[11f7a07]36    $WINE pyqt-install.exe
37    echo "Installing nsis (needs X?)"
38    $WINE nsis-install.exe
[d3dd7cf]39
[11f7a07]40    cd ..
41}
42
43setup_pip() {
44    echo "Seting up pip..."
[90e5c2d]45    $WINE C:\\Python27\\python -m pip install --upgrade pip
[d3dd7cf]46}
[11f7a07]47
48install_packages() {
[d3dd7cf]49    echo "Installing pywin32"
50    $WINE C:\\Python27\\python -m pip install pywin32
[9bb8368]51    echo "Installing py2exe"
52    $WINE C:\\Python27\\python -m pip install py2exe_py2
[d3dd7cf]53    echo "Installing required packages"
[9bb8368]54    $WINE C:\\Python27\\python -m pip install requests six
[90e5c2d]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
[11f7a07]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.