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

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 e21cba1 was 85b3316, checked in by ramon <ramongomez@…>, 8 years ago

#718: Instrucciones para instalar OGAgent para macOS; no usar Winetricks en nuevas distribuciones para crear OGAgent para Windows y usar Fedora 25 en MV Vagrant.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5229 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
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.11/python-2.7.11.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%20220/pywin32-220.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    WINEPREFIX=`pwd`/wine
27    export WINEPREFIX
28    if which winetricks &>/dev/null; then
29        echo "Setting up wine prefix (using winetricks)"
30        winetricks
31    fi
32   
33    cd downloads
34    echo "Installing python"
35    $WINE msiexec /qn /i python-2.7.msi
36    echo "Installing vc for python"
37    $WINE msiexec /qn /i VCForPython27.msi
38   
39    echo "Installing pywin32 (needs X)"
40    $WINE pywin32-install.exe
41    echo "Installing py2exe (needs X)"
42    $WINE py2exe-install.exe
43    echo "Installing pyqt"
44    $WINE pyqt-install.exe
45    echo "Installing nsis (needs X?)"
46    $WINE nsis-install.exe
47   
48    cd ..
49}
50
51setup_pip() {
52    echo "Seting up pip..."
53    #mkdir $WINEPREFIX/drive_c/temp
54    #cp downloads/get-pip.py $WINEPREFIX/drive_c/temp
55    #cd $WINEPREFIX/drive_c/temp
56    #$WINE c:\\Python27\\python.exe get-pip.py
57    wine c:\\Python27\\python -m pip install --upgrade pip
58}   
59
60install_packages() {
61    echo "Installing required packages"   
62    wine c:\\Python27\\python -m pip install requests
63    wine c:\\Python27\\python -m pip install pycrypto
64    wine c:\\Python27\\python -m pip install six
65    # Copy nsis required NSIS_Simple_Firewall_Plugin_1
66    echo "Copying simple firewall plugin for nsis installer"
67    unzip -o downloads/NSIS_Simple_Firewall_Plugin_1.20.zip SimpleFC.dll -d $WINEPREFIX/drive_c/Program\ Files/NSIS/Plugins/x86-ansi/
68    unzip -o downloads/NSIS_Simple_Firewall_Plugin_1.20.zip SimpleFC.dll -d $WINEPREFIX/drive_c/Program\ Files/NSIS/Plugins/x86-unicode/
69}
70
71download
72install_python
73setup_pip
74install_packages
75
76
Note: See TracBrowser for help on using the repository browser.