Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Merge c81ae57 into 6efb928
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmabc committed Oct 13, 2016
2 parents 6efb928 + c81ae57 commit bdfb03f
Show file tree
Hide file tree
Showing 17 changed files with 2,428 additions and 9 deletions.
32 changes: 23 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
language: python

sudo: true
os:
- linux
- osx
python:
- "2.7"

services:
- docker
install:
- pip install --upgrade pip
- pip install -r requirements.txt
- pip install -r test_requirements.txt

- pip install --upgrade pip
- pip install -r requirements.txt
- pip install -r test_requirements.txt
script:
- make -s

- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo bash travis-linux.sh; fi
after_success:
- coveralls
- coveralls
before_deploy:
- export RELEASE_PKG_FILE=$(ls openbazaard*)
deploy:
provider: releases
api_key: "$GITHUB_TOKEN"
file_glob: true
file:
- "${RELEASE_PKG_FILE}"
- "ob.cfg"
skip_cleanup: true
on:
all_branches: true
31 changes: 31 additions & 0 deletions .travis/openbazaard.linux32.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- mode: python -*-

block_cipher = None


a = Analysis(['../openbazaard.py'],
pathex=['../'],
binaries=None,
datas=None,
hiddenimports=['pystun', 'zmq', 'cryptography', 'cffi', 'packaging'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
a.datas += [('../ob.cfg', 'ob.cfg', 'DATA'),('./bitcointools/english.txt','virt/bitcointools/english.txt','DATA')]
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='openbazaard-linux32',
debug=False,
strip=False,
upx=True,
console=True )
31 changes: 31 additions & 0 deletions .travis/openbazaard.linux64.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- mode: python -*-

block_cipher = None


a = Analysis(['../openbazaard.py'],
pathex=['../'],
binaries=None,
datas=None,
hiddenimports=['pystun', 'zmq', 'cryptography', 'cffi', 'packaging'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
a.datas += [('../ob.cfg', 'ob.cfg', 'DATA'),('./bitcointools/english.txt','virt64/bitcointools/english.txt','DATA')]
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='openbazaard-linux64',
debug=False,
strip=False,
upx=True,
console=True )
38 changes: 38 additions & 0 deletions .travis/openbazaard.win.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- mode: python -*-

block_cipher = None


a = Analysis(['..\\openbazaard.py'],
pathex=['..\\'],
binaries=None,
datas=None,
hiddenimports=['cryptography', 'bitcoin','zmq.backend.cython' ,'zmq.backend.cffi'],
hookspath=None,
runtime_hooks=None,
excludes=None,
win_no_prefer_redirects=None,
win_private_assemblies=None,
cipher=block_cipher)
a.binaries += [('ssleay32.dll', 'windows\\32\\ssleay32.dll', 'BINARY'),
('libeay32.dll', 'windows\\32\\libeay32.dll', 'BINARY')]
a.datas += [
('ob.cfg', 'ob.cfg', 'DATA'),
('bitcointools\\english.txt', 'windows\\english.txt', 'DATA'),
('msvcr120.dll', 'windows\\32\\msvcr120.dll', 'DATA'),
('msvcr90.dll', 'c:\\Python27\\msvcr90.dll', 'DATA'),
('msvcp90.dll', 'c:\\Python27\\msvcp90.dll', 'DATA')
]
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='openbazaard',
icon='windows\\icon.ico',
debug=True,
strip=False,
upx=True,
console=True )
38 changes: 38 additions & 0 deletions .travis/openbazaard.win64.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- mode: python -*-

block_cipher = None


a = Analysis(['..\\openbazaard.py'],
pathex=['..\\'],
binaries=None,
datas=None,
hiddenimports=['cryptography', 'bitcoin','zmq.backend.cython' ,'zmq.backend.cffi'],
hookspath=None,
runtime_hooks=None,
excludes=None,
win_no_prefer_redirects=None,
win_private_assemblies=None,
cipher=block_cipher)
a.binaries += [('ssleay32.dll', 'windows\\64\\ssleay32.dll', 'BINARY'),
('libeay32.dll', 'windows\\64\\libeay32.dll', 'BINARY')]
a.datas += [
('ob.cfg', 'ob.cfg', 'DATA'),
('bitcointools\\english.txt', 'windows\\english.txt', 'DATA'),
#('msvcr120.dll', 'c:\\Python27\\msvcr120.dll', 'DATA'),
('msvcr90.dll', 'c:\\Python27\\msvcr90.dll', 'DATA'),
('msvcp90.dll', 'c:\\Python27\\msvcp90.dll', 'DATA')
]
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='openbazaard',
icon='windows\\icon.ico',
debug=False,
strip=False,
upx=True,
console=True )
47 changes: 47 additions & 0 deletions build-linux32.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

OS="${1}"

mkdir dist


# case "$TRAVIS_OS_NAME" in
# "linux")


cd OpenBazaar/

echo "Building Linux Binaries...."
sudo apt-get -qq update
sudo apt-get install -qq -y wget

echo "32-bit..."

wget -q https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
tar xzf Python-2.7.10.tgz
sudo apt-get -qq -y install gcc-multilib g++-multilib
CFLAGS=-m32 LDFLAGS=-m32 ./configure --prefix=/opt/Python2.7-32bits
make
make install

echo "Installing APT packages"
sudo apt-get -y -qq install npm python-pip python-virtualenv python-dev libffi-dev

echo "Set up virtualenv"
virtualenv virt
. virt/bin/activate

echo "Install Python dependencies"
virt/bin/pip install -q -r requirements.txt
virt/bin/pip install -q pyinstaller==3.1
virt/bin/pip install -q cryptography
virt/bin/pip install -q setuptools==19.2
virt/bin/pyinstaller -D -F .travis/openbazaard.linux32.spec


# ;;
#
# "osx")
#
# ;;
# esac
9 changes: 9 additions & 0 deletions build-linux64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

virtualenv virt64
source virt64/bin/activate
pip install -r requirements.txt
pip install -q pyinstaller==3.1
pip install -q setuptools==19.2
pip install -q cryptography
pyinstaller -D -F .travis/openbazaard.linux64.spec
79 changes: 79 additions & 0 deletions build-win.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/bin/sh

sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -qq wine1.6

sudo mkdir -p dist/windows32
cd dist/windows32
#wget -O python.msi "http://www.python.org/ftp/python/2.7.12/python-2.7.12.msi"
#wget -O pywin32.exe "http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20220/pywin32-220.win32-py2.7.exe?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpywin32%2Ffiles%2Fpywin32%2FBuild%2520220%2F&ts=1473864354&use_mirror=superb-sea2"

THIS_SCRIPT_PATH=`readlink -f $0`
THIS_SCRIPT_DIR=`dirname ${THIS_SCRIPT_PATH}`

WINE_TARBALL=${THIS_SCRIPT_DIR}/wine.tar.gz

export WINEPREFIX=`mktemp -d --suffix=_wine`
export WINEARCH="win32 wine wineboot"

echo "Created wine environment at $WINEPREFIX"

if [ "$1" = "--update" ]; then
echo "Update option given. Starting from existing wine.tar.gz"
tar --directory=${WINEPREFIX} -xzf ${WINE_TARBALL}
fi

WINEPREFIX=${WINEPREFIX}

# Install Python
wget -N http://python.org/ftp/python/2.7.11/python-2.7.11.msi
wine msiexec /i python-2.7.11.msi /qn

# Install MSVC
wget -N https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
wine msiexec /i VCForPython27.msi /qn
wine cmd /c "c:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\vcvarsall.bat" x86

#wget -N https://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe
#wine vcredist_x86.exe /qn

#wine cmd /c "copy c:\\Windows\\System32\\msvcr120.dll c:\\python27"
wine cmd /c "copy c:\\Windows\\System32\\msvcp90.dll c:\\python27"
wine cmd /c "copy c:\\Windows\\System32\\msvcm90.dll c:\\python27"

# Install pip

wget -N https://bootstrap.pypa.io/get-pip.py
wine c:/Python27/python.exe get-pip.py

wget -N http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20218/pywin32-218.win32-py2.7.exe?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpywin32%2Ffiles%2Fpywin32%2FBuild%2520218%2F&ts=1475598942&use_mirror=heanet -O pywin32.exe
wine pywin32.exe /s

# Fix TLS Certs issue
wine c:/Python27/python -m pip install pyopenssl ndg-httpsclient pyasn1

# Set up Virtualenv
wine c:/Python27/python -m pip install virtualenv
wine c:/Python27/Scripts/virtualenv env
wine c:/Python27/Scripts/activate.bat

wine c:/Python27/python -m pip install vcversioner
wine c:/Python27/python -m pip install https://openbazaar.org/downloads/miniupnpc-1.9-cp27-none-win32.whl
wine c:/Python27/python -m pip install https://openbazaar.org/downloads/PyNaCl-0.3.0-cp27-none-win32.whl
wine c:/Python27/python -m pip install https://openbazaar.org/downloads/Twisted-16.4.1-cp27-cp27m-win32.whl
#wine c:/Python27/python -m pip install https://openbazaar.org/downloads/Twisted-16.4.1-cp27m-win_amd64.whl
#wine c:/Python27/python -m pip install pefile
wine c:/Python27/python -m pip install -r ../../requirements.txt

wine c:/Python27/python -m pip install pyinstaller==3.1
wine c:/Python27/python -m pip install setuptools==19.2
wine c:/Python27/python -m pip install pystun
wine c:/Python27/python -m pip install https://pypi.python.org/packages/7a/ec/47559abcfd6328c802036e8cf00a73885b5a71b4228e7f2dfb51f3ab2d69/pyzmq-15.3.0+fix-cp27-cp27m-win32.whl#md5=fdaa98a1dd2d201cb86229ad59baac17

wget -N https://github.com/pyinstaller/pyinstaller/releases/download/v3.1/PyInstaller-3.1.zip
unzip -o PyInstaller-3.1.zip
cd ../..
wine C:/Python27/python.exe dist/windows32/PyInstaller-3.1/pyinstaller.py -F -n openbazaard.exe -i images/icon.ico .travis/openbazaard.win.spec --noconfirm --log-level=DEBUG


72 changes: 72 additions & 0 deletions build-win64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/sh


sudo mkdir -p dist/windows64
cd dist/windows64


THIS_SCRIPT_PATH=`readlink -f $0`
THIS_SCRIPT_DIR=`dirname ${THIS_SCRIPT_PATH}`

WINE_TARBALL=${THIS_SCRIPT_DIR}/wine.tar.gz

export WINEPREFIX=`mktemp -d --suffix=_wine`
export WINEARCH="wine wineboot"

echo "Created wine environment at $WINEPREFIX"

if [ "$1" = "--update" ]; then
echo "Update option given. Starting from existing wine.tar.gz"
tar --directory=${WINEPREFIX} -xzf ${WINE_TARBALL}
fi

WINEPREFIX=${WINEPREFIX}

# Install Python
wget -N https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi
wine msiexec /i python-2.7.11.amd64.msi /qn

# Install MSVC
wget -N https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
wine msiexec /i VCForPython27.msi /qn
wine cmd /c "c:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\vcvarsall.bat" amd64

wine cmd /c "copy c:\\Windows\\System32\\msvcr90.dll ."
wine cmd /c "copy c:\\Windows\\System32\\msvcr120.dll c:\\python27"
wine cmd /c "copy c:\\Windows\\System32\\msvcp90.dll c:\\python27"
wine cmd /c "copy c:\\Windows\\System32\\msvcm90.dll c:\\python27"

# Install pip
wget -N https://bootstrap.pypa.io/get-pip.py
wine c:/Python27/python.exe get-pip.py

wget -N http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20218/pywin32-218.win-amd64-py2.7.exe?r=&ts=1475526189&use_mirror=pilotfiber -O pywin32.exe
wine pywin32.exe /s

# Fix TLS Certs issue
wine c:/Python27/python -m pip install pyopenssl ndg-httpsclient pyasn1

# Set up Virtualenv
#wine c:/Python27/python -m pip install virtualenv
#wine c:/Python27/Scripts/virtualenv env
#wine c:/Python27/Scripts/activate.bat

wine c:/Python27/python -m pip install vcversioner
wine c:/Python27/python -m pip install https://openbazaar.org/downloads/miniupnpc-1.9-cp27-none-win_amd64.whl
wine c:/Python27/python -m pip install https://openbazaar.org/downloads/PyNaCl-0.3.0-cp27-none-win_amd64.whl
wine c:/Python27/python -m pip install https://openbazaar.org/downloads/Twisted-16.4.1-cp27m-win_amd64.whl
wine c:/Python27/python -m pip install -r ../../requirements.txt

wine c:/Python27/python -m pip install pyinstaller==3.1
wine c:/Python27/python -m pip install setuptools==19.2
wine c:/Python27/python -m pip install pystun
wine c:/Python27/python -m pip install https://pypi.python.org/packages/a1/0c/f2029939f3ed0ebdfcd68451ffb5433d9b6268632cf9874a3edbff101008/pyzmq-15.3.0+fix-cp27-cp27m-win_amd64.whl#md5=708b0bb576b8827c4f31a5377a653be5

wine cmd /c "copy c:\\Windows\\System32\\msvcm90.dll c:\\python27"
wine cmd /c "copy c:\\Windows\\System32\\msvcm90.dll c:\\python27"

wget -N https://github.com/pyinstaller/pyinstaller/releases/download/v3.1/PyInstaller-3.1.zip
unzip -o PyInstaller-3.1.zip
cd ../..
wine C:/Python27/python.exe dist/windows64/PyInstaller-3.1/pyinstaller.py -F -n openbazaard.exe -i images/icon.ico .travis/openbazaard.win64.spec --noconfirm

0 comments on commit bdfb03f

Please sign in to comment.