Unverified Commit 31314d79 authored by Jeremy Bokobza's avatar Jeremy Bokobza Committed by GitHub

Merge pull request #379 from bokobza/master

MacOS DMG packaging
parents 9c18f5ce c160999e
......@@ -29,13 +29,16 @@ env:
- arch=x64
- configuration=Release
- os_platform=linux
- CSC_IDENTITY_AUTO_DISCOVERY=false
cache:
directories:
- ${TRAVIS_BUILD_DIR}/Breeze.UI/node_modules
- $HOME/.nuget/packages
- /usr/share/dotnet/sdk/2.0.0/
- $HOME/.electron
- $HOME/.nuget/packages
- /usr/share/dotnet/sdk/ # dotnet path for linux
- /Users/travis/.dotnet/sdk/ # dotnet path for mac
# Work around NuGet issue #2163
# https://github.com/NuGet/Home/issues/2163
# https://github.com/travis-ci/travis-ci/issues/7728
......@@ -56,9 +59,9 @@ deploy:
secure: $secure_github_key # this key is set on the Travis build page
file_glob: true
file:
- "$TRAVIS_BUILD_DIR/deploy/*.zip"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.deb"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.tar.gz"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.dmg"
skip_cleanup: true
overwrite: true
prerelease: true
......
{
"appId":"com.stratisplatform.breeze",
"productName":"Breeze Wallet",
"directories":{
"app":"dist",
"output":"app-builds",
"buildResources":"dist/assets/images"
},
"win":{
"icon":"dist/assets/images/icon",
"target":[
"nsis"
],
"artifactName":"${productName}-v${version}-setup-${os}-${env.arch}.${ext}"
},
"linux":{
"target":[
"deb",
"tar.gz"
],
"synopsis":"Breeze Wallet: Stratis' dual-currency full block light wallet with a strong focus on privacy.",
"category":"Utility",
"icon":"dist/assets/images/icons",
"artifactName":"${productName}-v${version}-${os}-${arch}.${ext}"
},
"mac":{
"target":[
"dmg"
],
"category":"public.app-category.productivity",
"artifactName":"${productName}-v${version}-${os}-${arch}.${ext}"
},
"nsis":{
"oneClick":false,
"perMachine":true,
"allowToChangeInstallationDirectory":true,
"deleteAppDataOnUninstall":true,
"guid":"ed20df62-ff5a-4b83-a5e3-a361357c6e51",
"createDesktopShortcut":true,
"createStartMenuShortcut":true
},
"msi":{
"warningsAsErrors":false
},
"extraResources":[
"daemon/**/*"
]
"appId": "com.stratisplatform.breeze",
"productName": "Breeze Wallet",
"publish": null,
"directories": {
"app": "dist",
"output": "app-builds",
"buildResources": "dist/assets/images"
},
"win": {
"icon": "dist/assets/images/icon",
"target": [
"nsis"
],
"artifactName": "${productName}-v${version}-setup-${os}-${env.arch}.${ext}"
},
"linux": {
"target": [
"deb",
"tar.gz"
],
"synopsis": "Breeze Wallet: Stratis' dual-currency full block light wallet with a strong focus on privacy.",
"category": "Utility",
"icon": "dist/assets/images/icons",
"artifactName": "${productName}-v${version}-${os}-${arch}.${ext}"
},
"mac": {
"target": [
"dmg"
],
"category": "public.app-category.productivity",
"artifactName": "${productName}-v${version}-${os}-${arch}.${ext}"
},
"nsis": {
"oneClick": false,
"perMachine": true,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": true,
"guid": "ed20df62-ff5a-4b83-a5e3-a361357c6e51",
"createDesktopShortcut": true,
"createStartMenuShortcut": true
},
"msi": {
"warningsAsErrors": false
},
"extraResources": [
"daemon/**/*"
]
}
const electron = require('electron');
const electron = require('electron');
// Module to control application life.
const app = electron.app;
......@@ -160,9 +160,9 @@ function startBitcoinApi() {
apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe');
} else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} //else {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD');
// }
} else {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
}
if(!testnet) {
......@@ -191,9 +191,9 @@ function startStratisApi() {
apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe');
} else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} //else {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD');
// }
} else {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
}
if (!testnet) {
stratisProcess = spawnStratis(apiPath, ['stratis'], {
......
......@@ -57,9 +57,9 @@ If you want the :sparkles: latest :sparkles: (unstable :bomb:) version of the Br
|**OS X**| - | [download][10] | OSX 10.12 or later |
[7]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze-Wallet-v0.3.0-setup-win-x86.exe
[8]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze-Wallet-v0.3.0-setup-win-x64.exe
[9]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze-Wallet-v0.3.0-linux-x64.tar.gz
[10]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-osx-x64.zip
[7]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze.Wallet-v0.3.0-setup-win-x86.exe
[8]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze.Wallet-v0.3.0-setup-win-x64.exe
[9]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze.Wallet-v0.3.0-linux-x64.tar.gz
[10]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/Breeze.Wallet-v0.3.0-mac.dmg
......@@ -58,41 +58,27 @@ cd $TRAVIS_BUILD_DIR/Breeze.UI
echo $log_prefix running 'npm run'
npm run build:prod
# node packaging
echo $log_prefix packaging breeze
if [ "$TRAVIS_OS_NAME" = "osx" ]
then
# node packaging
echo $log_prefix packaging breeze
node package.js --platform=$os_platform --arch=$arch --path=$TRAVIS_BUILD_DIR/breeze_out
# rename node generated folder
echo $log_prefix rename the folder generated by npm from $node_output_name to $app_output_name
mv $TRAVIS_BUILD_DIR/breeze_out/$node_output_name $TRAVIS_BUILD_DIR/breeze_out/$app_output_name
# copy api libs into app
echo $log_prefix copying the Breeze api into the app
mkdir -p $dotnet_resources_path_in_app
cp -r $TRAVIS_BUILD_DIR/Breeze.UI/daemon/* $dotnet_resources_path_in_app
# zip result
echo $log_prefix zipping the app into $TRAVIS_BUILD_DIR/breeze_out/$app_output_zip_name
mkdir -p $TRAVIS_BUILD_DIR/deploy/
cd $TRAVIS_BUILD_DIR/breeze_out
zip -r $TRAVIS_BUILD_DIR/deploy/$app_output_zip_name $app_output_name/*
npx electron-builder build --mac --$arch
else
# node packaging
echo $log_prefix packaging breeze
npx electron-builder build --$TRAVIS_OS_NAME --$arch
npx electron-builder build --linux --$arch
fi
echo $log_prefix finished packaging
fi
#tests
echo $log_prefix no tests to run
echo $log_prefix contents of TRAVIS_BUILD_DIR
cd $TRAVIS_BUILD_DIR
ls
echo $log_prefix contents of the app-builds folder
cd $TRAVIS_BUILD_DIR/Breeze.UI/app-builds/
ls
echo $log_prefix FINISHED build
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment