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

configure-ptt-chedecorare-oglive-methodsejecutarscript-b64fix-cfg2objfixes-winlgromero-filebeatmainmodulesnew-browserno-ptt-paramogadmcliogadmclient-statusogagent-jobsogagent-macosogcore1ogliveoglogoglog2override-moduleping1ping2ping3ping4py3-winpython3qndtestreport-progresstlsunification2unification3versionswindows-fixes
Last change on this file since 4d6db25 was 90e5c2d, checked in by ramon <ramongomez@…>, 8 years ago

#718: Creación de OGAgent:

  • adaptar algunos ficheros a la sintaxis recomendada por el comando pylint;
  • OGAgent para Windows:
    • actualizar componentes y reducir los aviso de Wine;
    • corregir fallo al instalar pycrypto para Windows;
    • corregir localización de certificado en Windows (ahora está en librería certifi en vez de en requests);
  • OGAgent para Linux:
    • evitar bucle infinito al intentar parar el proceso.
  • Ignorar mensajes de SELinux en la MV Vagrant para OGAgent.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5471 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 2.6 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/pywin32/files/pywin32/Build%20221/pywin32-221.win32-py2.7.exe/download -O pywin32-install.exe
18    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
19    wget -nd http://prdownloads.sourceforge.net/nsis/nsis-3.0rc1-setup.exe?download -O nsis-install.exe
20    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
21    wget -nd http://nsis.sourceforge.net/mediawiki/images/d/d7/NSIS_Simple_Firewall_Plugin_1.20.zip
22    cd ..
23}
24
25install_python() {
26    if which winetricks &>/dev/null; then
27        echo "Setting up wine prefix (using winetricks)"
28        winetricks
29    fi
30   
31    cd downloads
32    echo "Installing python"
33    $WINE msiexec /qn /i python-2.7.msi
34    echo "Installing vc for python"
35    $WINE msiexec /qn /i VCForPython27.msi
36   
37    echo "Installing pywin32 (needs X)"
38    $WINE pywin32-install.exe
39    echo "Installing py2exe (needs X)"
40    $WINE py2exe-install.exe
41    echo "Installing pyqt"
42    $WINE pyqt-install.exe
43    echo "Installing nsis (needs X?)"
44    $WINE nsis-install.exe
45   
46    cd ..
47}
48
49setup_pip() {
50    echo "Seting up pip..."
51    $WINE C:\\Python27\\python -m pip install --upgrade pip
52}   
53
54install_packages() {
55    echo "Installing required packages"   
56    $WINE C:\\Python27\\python -m pip install requests
57    $WINE C:\\Python27\\python -m pip install six
58    # Using easy_install instead of pip to install pycrypto
59    $WINE C:\\Python27\\Scripts\\easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win32-py2.7.exe
60    # Copy nsis required NSIS_Simple_Firewall_Plugin_1
61    echo "Copying simple firewall plugin for nsis installer"
62    unzip -o downloads/NSIS_Simple_Firewall_Plugin_1.20.zip SimpleFC.dll -d $WINEPREFIX/drive_c/Program\ Files/NSIS/Plugins/x86-ansi/
63    unzip -o downloads/NSIS_Simple_Firewall_Plugin_1.20.zip SimpleFC.dll -d $WINEPREFIX/drive_c/Program\ Files/NSIS/Plugins/x86-unicode/
64}
65
66download
67install_python
68setup_pip
69install_packages
70
71
Note: See TracBrowser for help on using the repository browser.