electrum-bitcoinprivate/contrib/build-wine/prepare-wine.sh

74 lines
1.9 KiB
Bash
Raw Normal View History

2012-12-09 15:50:07 -08:00
#!/bin/bash
# Please update these links carefully, some versions won't work under Wine
2015-10-05 09:43:10 -07:00
PYTHON_URL=http://www.python.org/ftp/python/2.7.8/python-2.7.8.msi
PYQT4_URL=http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.1/PyQt4-4.11.1-gpl-Py2.7-Qt4.8.6-x32.exe
PYWIN32_URL=http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download
PYINSTALLER_URL=https://pypi.python.org/packages/source/P/PyInstaller/PyInstaller-2.1.zip
2012-12-09 15:50:07 -08:00
NSIS_URL=http://prdownloads.sourceforge.net/nsis/nsis-2.46-setup.exe?download
2015-10-05 09:43:10 -07:00
SETUPTOOLS_URL=https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe
2012-12-09 15:50:07 -08:00
2015-10-23 03:51:54 -07:00
## These settings probably don't need change
2016-02-24 10:06:13 -08:00
export WINEPREFIX=/opt/wine64
2015-10-23 03:51:54 -07:00
#export WINEARCH='win32'
2015-10-05 09:43:10 -07:00
PYHOME=c:/python27
2012-12-09 15:50:07 -08:00
PYTHON="wine $PYHOME/python.exe -OO -B"
# Let's begin!
cd `dirname $0`
set -e
# Clean up Wine environment
echo "Cleaning $WINEPREFIX"
2015-10-23 03:51:54 -07:00
rm -rf $WINEPREFIX
2012-12-09 15:50:07 -08:00
echo "done"
2015-10-23 03:51:54 -07:00
wine 'wineboot'
2012-12-09 15:50:07 -08:00
echo "Cleaning tmp"
rm -rf tmp
mkdir -p tmp
echo "done"
cd tmp
# Install Python
wget -O python.msi "$PYTHON_URL"
2015-10-05 09:43:10 -07:00
wine msiexec /q /i python.msi
2012-12-09 15:50:07 -08:00
# Install PyWin32
wget -O pywin32.exe "$PYWIN32_URL"
wine pywin32.exe
# Install PyQt4
wget -O PyQt.exe "$PYQT4_URL"
wine PyQt.exe
# Install pyinstaller
wget -O pyinstaller.zip "$PYINSTALLER_URL"
unzip pyinstaller.zip
2015-10-05 09:43:10 -07:00
mv PyInstaller-2.1 $WINEPREFIX/drive_c/pyinstaller
2012-12-09 15:50:07 -08:00
# Install ZBar
#wget -q -O zbar.exe "http://sourceforge.net/projects/zbar/files/zbar/0.10/zbar-0.10-setup.exe/download"
#wine zbar.exe
2015-10-05 09:43:10 -07:00
# Install setuptools
wget -O setuptools.exe "$SETUPTOOLS_URL"
wine setuptools.exe
2012-12-09 15:50:07 -08:00
# Install NSIS installer
2015-10-05 09:43:10 -07:00
wget -q -O nsis.exe "$NSIS_URL"
2012-12-09 15:50:07 -08:00
wine nsis.exe
# Install UPX
#wget -O upx.zip "http://upx.sourceforge.net/download/upx308w.zip"
#unzip -o upx.zip
#cp upx*/upx.exe .
2015-10-05 09:43:10 -07:00
# add dlls needed for pyinstaller:
cp $WINEPREFIX/drive_c/windows/system32/msvcp90.dll $WINEPREFIX/drive_c/Python27/
cp $WINEPREFIX/drive_c/windows/system32/msvcm90.dll $WINEPREFIX/drive_c/Python27/