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: ...@@ -29,13 +29,16 @@ env:
- arch=x64 - arch=x64
- configuration=Release - configuration=Release
- os_platform=linux - os_platform=linux
- CSC_IDENTITY_AUTO_DISCOVERY=false
cache: cache:
directories: directories:
- ${TRAVIS_BUILD_DIR}/Breeze.UI/node_modules - ${TRAVIS_BUILD_DIR}/Breeze.UI/node_modules
- $HOME/.nuget/packages - $HOME/.electron
- /usr/share/dotnet/sdk/2.0.0/ - $HOME/.nuget/packages
- /usr/share/dotnet/sdk/ # dotnet path for linux
- /Users/travis/.dotnet/sdk/ # dotnet path for mac
# Work around NuGet issue #2163 # Work around NuGet issue #2163
# https://github.com/NuGet/Home/issues/2163 # https://github.com/NuGet/Home/issues/2163
# https://github.com/travis-ci/travis-ci/issues/7728 # https://github.com/travis-ci/travis-ci/issues/7728
...@@ -56,9 +59,9 @@ deploy: ...@@ -56,9 +59,9 @@ deploy:
secure: $secure_github_key # this key is set on the Travis build page secure: $secure_github_key # this key is set on the Travis build page
file_glob: true file_glob: true
file: file:
- "$TRAVIS_BUILD_DIR/deploy/*.zip"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.deb" - "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.deb"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.tar.gz" - "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.tar.gz"
- "$TRAVIS_BUILD_DIR/Breeze.UI/app-builds/*.dmg"
skip_cleanup: true skip_cleanup: true
overwrite: true overwrite: true
prerelease: true prerelease: true
......
{ {
"appId":"com.stratisplatform.breeze", "appId": "com.stratisplatform.breeze",
"productName":"Breeze Wallet", "productName": "Breeze Wallet",
"directories":{ "publish": null,
"app":"dist", "directories": {
"output":"app-builds", "app": "dist",
"buildResources":"dist/assets/images" "output": "app-builds",
}, "buildResources": "dist/assets/images"
"win":{ },
"icon":"dist/assets/images/icon", "win": {
"target":[ "icon": "dist/assets/images/icon",
"nsis" "target": [
], "nsis"
"artifactName":"${productName}-v${version}-setup-${os}-${env.arch}.${ext}" ],
}, "artifactName": "${productName}-v${version}-setup-${os}-${env.arch}.${ext}"
"linux":{ },
"target":[ "linux": {
"deb", "target": [
"tar.gz" "deb",
], "tar.gz"
"synopsis":"Breeze Wallet: Stratis' dual-currency full block light wallet with a strong focus on privacy.", ],
"category":"Utility", "synopsis": "Breeze Wallet: Stratis' dual-currency full block light wallet with a strong focus on privacy.",
"icon":"dist/assets/images/icons", "category": "Utility",
"artifactName":"${productName}-v${version}-${os}-${arch}.${ext}" "icon": "dist/assets/images/icons",
}, "artifactName": "${productName}-v${version}-${os}-${arch}.${ext}"
"mac":{ },
"target":[ "mac": {
"dmg" "target": [
], "dmg"
"category":"public.app-category.productivity", ],
"artifactName":"${productName}-v${version}-${os}-${arch}.${ext}" "category": "public.app-category.productivity",
}, "artifactName": "${productName}-v${version}-${os}-${arch}.${ext}"
"nsis":{ },
"oneClick":false, "nsis": {
"perMachine":true, "oneClick": false,
"allowToChangeInstallationDirectory":true, "perMachine": true,
"deleteAppDataOnUninstall":true, "allowToChangeInstallationDirectory": true,
"guid":"ed20df62-ff5a-4b83-a5e3-a361357c6e51", "deleteAppDataOnUninstall": true,
"createDesktopShortcut":true, "guid": "ed20df62-ff5a-4b83-a5e3-a361357c6e51",
"createStartMenuShortcut":true "createDesktopShortcut": true,
}, "createStartMenuShortcut": true
"msi":{ },
"warningsAsErrors":false "msi": {
}, "warningsAsErrors": false
"extraResources":[ },
"daemon/**/*" "extraResources": [
] "daemon/**/*"
]
} }
const electron = require('electron'); const electron = require('electron');
// Module to control application life. // Module to control application life.
const app = electron.app; const app = electron.app;
...@@ -160,9 +160,9 @@ function startBitcoinApi() { ...@@ -160,9 +160,9 @@ function startBitcoinApi() {
apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe'); apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe');
} else if(os.platform() === 'linux') { } else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD'); apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} //else { } else {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD'); apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
// } }
if(!testnet) { if(!testnet) {
...@@ -191,9 +191,9 @@ function startStratisApi() { ...@@ -191,9 +191,9 @@ function startStratisApi() {
apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe'); apiPath = path.resolve(__dirname, '..\\..\\resources\\daemon\\Stratis.BreezeD.exe');
} else if(os.platform() === 'linux') { } else if(os.platform() === 'linux') {
apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD'); apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
} //else { } else {
// apiPath = path.resolve(__dirname, '..//..//Content//resources//daemon//Stratis.BreezeD'); apiPath = path.resolve(__dirname, '..//..//resources//daemon//Stratis.BreezeD');
// } }
if (!testnet) { if (!testnet) {
stratisProcess = spawnStratis(apiPath, ['stratis'], { stratisProcess = spawnStratis(apiPath, ['stratis'], {
......
...@@ -57,9 +57,9 @@ If you want the :sparkles: latest :sparkles: (unstable :bomb:) version of the Br ...@@ -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 | |**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 [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 [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 [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 [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 ...@@ -58,41 +58,27 @@ cd $TRAVIS_BUILD_DIR/Breeze.UI
echo $log_prefix running 'npm run' echo $log_prefix running 'npm run'
npm run build:prod npm run build:prod
# node packaging
echo $log_prefix packaging breeze
if [ "$TRAVIS_OS_NAME" = "osx" ] if [ "$TRAVIS_OS_NAME" = "osx" ]
then then
# node packaging npx electron-builder build --mac --$arch
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/*
else else
# node packaging npx electron-builder build --linux --$arch
echo $log_prefix packaging breeze fi
npx electron-builder build --$TRAVIS_OS_NAME --$arch
echo $log_prefix finished packaging echo $log_prefix finished packaging
fi
#tests #tests
echo $log_prefix no tests to run echo $log_prefix no tests to run
echo $log_prefix contents of TRAVIS_BUILD_DIR
cd $TRAVIS_BUILD_DIR cd $TRAVIS_BUILD_DIR
ls ls
echo $log_prefix contents of the app-builds folder
cd $TRAVIS_BUILD_DIR/Breeze.UI/app-builds/
ls
echo $log_prefix FINISHED build 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