Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1835 from OpenBazaar/brian.dep32bit
Browse files Browse the repository at this point in the history
Remove 32-bit Builds and Refactor
  • Loading branch information
jjeffryes authored Nov 15, 2019
2 parents 8875640 + 78f3ec2 commit f2bc6b7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 73 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
env: BINARY=osxclient
- os: linux
- os: osx
osx_image: xcode11.2
env: BINARY=win
script:
- npm run lint
Expand All @@ -40,9 +41,7 @@ deploy:
api_key: "$GITHUB_TOKEN"
file_glob: true
file:
- "dist/win32/*.exe"
- "dist/win32/*.nupkg"
- "dist/win32/RELEASES"
- "dist/win64/RELEASES"
- "dist/win64/*.exe"
- "dist/win64/*.nupkg"
- "dist/osx/*.dmg"
Expand All @@ -62,3 +61,5 @@ env:
- secure: fQ4K2OvSakz0Fk+9X/WWFpPOFoK7IjpI7vAqhEhbH7X2q0iXQUZv1476e3wVQWYlwzks8NlLP4oPXzJm6xooh+1ftxh3q1qlyQlowZKvyqDx/IjOVlZXZoaivqCEwXSmkxH2MG5OL3hjhZr2MG8cai2nbcXPXiUDktGVZm4rJRtbvknPK5TZUMjs9YttvDKy35fa28gdFcXWzKOFerqHIibNzE4CtmAbBhJLgSxopJp3yUrhKhnwEnOA4A3xwFZTARmT02Kfu8y4hOwwylbmysDNT1zWZ9+aNRaB2jvw9DEIevtzcyrmYfTZdbY18nj3O+9Wg8qYPo7YrrSA0pK5NwO9qf5ldxKU4ThfNSMONHgAzZDibXKg9q+axr49PBgNze0YO6T3/ktMIqpP9UPuchrsDMBk54msyqH02drJhQ3FyNLX63Ljt5w20kUks2mQdd/az/NSNGcjH26hDiKUROd7SXTr+cPOOXd0vi/VN1F3AouGVeoaaLm62N0UIv/w+npxn/XDKJE9InHfiGc77KUpysEaA9ydOJ7+WnNSzd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4Va4lX5E1N6k4qtD79LhS6SV7e4QOi1Dhd4aeeUZtYBrSo/AqsXsrULGtbePeFJMH+Y1M3zjIRBOWQcWMjgxlNh5H/StVJSzsODU6++ubZ6zqB3sQTaT1jQYXJUmoSgnykp6H+ikufSlasWZWvTm5gyJ5nd3Kn1CsP2iB2SCV+w6l7eUnjsyb2R9CPG8j/5m1wYx5iGC/9Ot2lAVCwrPRYuw6gLUOO6BVCV3Kz+tBPFtdAP7jpfl6jhlKCtmkovRY+As3zKU+uEHGqB26J5kIp/apiU6czHvHTa4pRbaXgULhegpDE2ccT62Q8Z8O1U3bmZG5cVEGQHhjMrYW1Y3HchfdJ/jhIRSQopFK4WE+BJV0YP1qiMh3WqCFdhCyQrRGGGWBqrfkNuTyNjMCBmThLTIE+kd3XZyXeokFbfxcDSf7Wu90=
- WINEDLLOVERRIDES="mscoree,mshtml="
- WINEDEBUG="-all"
81 changes: 11 additions & 70 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ case "$TRAVIS_OS_NAME" in
"linux")

echo 'Linux builds'

echo 'Building Linux 32-bit Installer....'

echo 'Making dist directories'
mkdir dist/linux32
mkdir dist/linux64

echo 'Install npm packages for Linux'
Expand All @@ -83,22 +79,6 @@ case "$TRAVIS_OS_NAME" in

APPNAME="openbazaar2"

echo "Packaging Electron application"
electron-packager . ${APPNAME} --platform=linux --arch=ia32 --electronVersion=${ELECTRONVER} --ignore="OPENBAZAAR_TEMP" --overwrite --prune --out=dist

echo 'Move go server to electron app'
mkdir dist/${APPNAME}-linux-ia32/resources/openbazaar-go/
cp -rf OPENBAZAAR_TEMP/openbazaar-go-linux-386 dist/${APPNAME}-linux-ia32/resources/openbazaar-go
mv dist/${APPNAME}-linux-ia32/resources/openbazaar-go/openbazaar-go-linux-386 dist/${APPNAME}-linux-ia32/resources/openbazaar-go/openbazaard
rm -rf dist/${APPNAME}-linux-ia32/resources/app/.travis
chmod +x dist/${APPNAME}-linux-ia32/resources/openbazaar-go/openbazaard

echo 'Create debian archive'
electron-installer-debian --config .travis/config_ia32.json

echo 'Create RPM archive'
electron-installer-redhat --config .travis/config_ia32.json

echo 'Building Linux 64-bit Installer....'

echo "Packaging Electron application"
Expand All @@ -120,15 +100,6 @@ case "$TRAVIS_OS_NAME" in

APPNAME="openbazaar2client"

echo "Packaging Electron application"
electron-packager . ${APPNAME} --platform=linux --arch=ia32 --ignore="OPENBAZAAR_TEMP" --electronVersion=${ELECTRONVER} --overwrite --prune --out=dist

echo 'Create debian archive'
electron-installer-debian --config .travis/config_ia32.client.json

echo 'Create RPM archive'
electron-installer-redhat --config .travis/config_ia32.client.json

echo 'Building Linux 64-bit Installer....'

echo "Packaging Electron application"
Expand Down Expand Up @@ -163,58 +134,28 @@ case "$TRAVIS_OS_NAME" in

if [[ $BINARY == 'win' ]]; then

curl -L https://dl.bintray.com/develar/bin/7za -o /tmp/7za
chmod +x /tmp/7za
curl -L https://dl.bintray.com/develar/bin/wine.7z -o /tmp/wine.7z
/tmp/7za x -o/usr/local/Cellar -y /tmp/wine.7z

brew link --overwrite fontconfig gd gnutls jasper libgphoto2 libicns libtasn1 libusb libusb-compat little-cms2 nettle openssl sane-backends webp wine git-lfs gnu-tar dpkg xz

brew remove osslsigncode
brew install mono osslsigncode

brew reinstall [email protected]

# WINDOWS 32
echo 'Building Windows 32-bit Installer...'
mkdir dist/win32

echo 'Running Electron Packager...'
electron-packager . OpenBazaar2 --asar --out=dist --ignore="OPENBAZAAR_TEMP" --protocol-name=OpenBazaar --win32metadata.ProductName="OpenBazaar2" --win32metadata.CompanyName="OpenBazaar" --win32metadata.FileDescription='Decentralized p2p marketplace for Bitcoin' --win32metadata.OriginalFilename=OpenBazaar2.exe --protocol=ob --platform=win32 --arch=ia32 --icon=imgs/openbazaar2.ico --electron-version=${ELECTRONVER} --overwrite

echo 'Copying server binary into application folder...'
cp -rf OPENBAZAAR_TEMP/openbazaar-go-windows-4.0-386.exe dist/OpenBazaar2-win32-ia32/resources/
cp -rf OPENBAZAAR_TEMP/libwinpthread-1.win32.dll dist/OpenBazaar2-win32-ia32/resources/libwinpthread-1.dll
mkdir dist/OpenBazaar2-win32-ia32/resources/openbazaar-go
mv dist/OpenBazaar2-win32-ia32/resources/openbazaar-go-windows-4.0-386.exe dist/OpenBazaar2-win32-ia32/resources/openbazaar-go/openbazaard.exe
mv dist/OpenBazaar2-win32-ia32/resources/libwinpthread-1.dll dist/OpenBazaar2-win32-ia32/resources/openbazaar-go/libwinpthread-1.dll
rm -rf dist/OPENBAZAAR_TEMP

echo 'Building Installer...'
grunt create-windows-installer --appname=OpenBazaar2 --obversion=$PACKAGE_VERSION --appdir=dist/OpenBazaar2-win32-ia32 --outdir=dist/win32
mv dist/win32/OpenBazaar2Setup.exe dist/win32/OpenBazaar2-$PACKAGE_VERSION-Setup-32.exe
mv dist/win32/RELEASES dist/RELEASES

#### CLIENT ONLY
echo 'Running Electron Packager...'
electron-packager . OpenBazaar2Client --asar --out=dist --protocol-name=OpenBazaar --ignore="OPENBAZAAR_TEMP" --win32metadata.ProductName="OpenBazaar2Client" --win32metadata.CompanyName="OpenBazaar" --win32metadata.FileDescription='Decentralized p2p marketplace for Bitcoin' --win32metadata.OriginalFilename=OpenBazaar2Client.exe --protocol=ob --platform=win32 --arch=ia32 --icon=imgs/openbazaar2.ico --electron-version=${ELECTRONVER} --overwrite

echo 'Building Installer...'
grunt create-windows-installer --appname=OpenBazaar2Client --obversion=$PACKAGE_VERSION --appdir=dist/OpenBazaar2Client-win32-ia32 --outdir=dist/win32
mv dist/win32/OpenBazaar2ClientSetup.exe dist/win32/OpenBazaar2Client-$PACKAGE_VERSION-Setup-32.exe

echo 'Sign the installer'
osslsigncode sign -t http://timestamp.digicert.com -h sha1 -key .travis/ob1.keyfile -pass "$OB1_SECRET" -certs .travis/ob1.cert.spc -in dist/win32/OpenBazaar2-$PACKAGE_VERSION-Setup-32.exe -out dist/win32/OpenBazaar2-$PACKAGE_VERSION-Setup-32.exe
osslsigncode sign -t http://timestamp.digicert.com -h sha1 -key .travis/ob1.keyfile -pass "$OB1_SECRET" -certs .travis/ob1.cert.spc -in dist/win32/OpenBazaar2Client-$PACKAGE_VERSION-Setup-32.exe -out dist/win32/OpenBazaar2Client-$PACKAGE_VERSION-Setup-32.exe

rm dist/win32/RELEASES
brew cask install wine-stable

# WINDOWS 64
echo 'Building Windows 64-bit Installer...'
mkdir dist/win64

export WINEARCH=win64

npm install electron-packager

cd node_modules/electron-packager
npm install [email protected]
cd ../..

echo 'Running Electron Packager...'
electron-packager . OpenBazaar2 --asar --out=dist --protocol-name=OpenBazaar --ignore="OPENBAZAAR_TEMP" --win32metadata.ProductName="OpenBazaar2" --win32metadata.CompanyName="OpenBazaar" --win32metadata.FileDescription='Decentralized p2p marketplace for Bitcoin' --win32metadata.OriginalFilename=OpenBazaar2.exe --protocol=ob --platform=win32 --arch=x64 --icon=imgs/openbazaar2.ico --electron-version=${ELECTRONVER} --overwrite
node_modules/electron-packager/bin/electron-packager.js . OpenBazaar2 --asar --out=dist --protocol-name=OpenBazaar --ignore="OPENBAZAAR_TEMP" --win32metadata.ProductName="OpenBazaar2" --win32metadata.CompanyName="OpenBazaar" --win32metadata.FileDescription='Decentralized p2p marketplace for Bitcoin' --win32metadata.OriginalFilename=OpenBazaar2.exe --protocol=ob --platform=win32 --arch=x64 --icon=imgs/openbazaar2.ico --electron-version=${ELECTRONVER} --overwrite

echo 'Copying server binary into application folder...'
cp -rf OPENBAZAAR_TEMP/openbazaar-go-windows-4.0-amd64.exe dist/OpenBazaar2-win32-x64/resources/
Expand All @@ -240,7 +181,7 @@ case "$TRAVIS_OS_NAME" in
osslsigncode sign -t http://timestamp.digicert.com -h sha1 -key .travis/ob1.keyfile -pass "$OB1_SECRET" -certs .travis/ob1.cert.spc -in dist/win64/OpenBazaar2-$PACKAGE_VERSION-Setup-64.exe -out dist/win64/OpenBazaar2-$PACKAGE_VERSION-Setup-64.exe
osslsigncode sign -t http://timestamp.digicert.com -h sha1 -key .travis/ob1.keyfile -pass "$OB1_SECRET" -certs .travis/ob1.cert.spc -in dist/win64/OpenBazaar2Client-$PACKAGE_VERSION-Setup-64.exe -out dist/win64/OpenBazaar2Client-$PACKAGE_VERSION-Setup-64.exe

mv dist/RELEASES dist/win32/RELEASES
mv dist/win64/RELEASES-x64 dist/win64/RELEASES

else

Expand Down

0 comments on commit f2bc6b7

Please sign in to comment.