Improvement 335 - Automation desktop building by grunt
This commit is contained in:
parent
dae994007e
commit
1a28ae6c2b
13 changed files with 247 additions and 76 deletions
95
Gruntfile.js
95
Gruntfile.js
|
|
@ -7,16 +7,22 @@ module.exports = function(grunt) {
|
||||||
|
|
||||||
// Project Configuration
|
// Project Configuration
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
curl: {
|
|
||||||
'./cache/nwjs.zip': 'https://dl.nwjs.io/v0.19.5-mas-beta/nwjs-mas-v0.19.5-osx-x64.zip',
|
|
||||||
},
|
|
||||||
unzip: {
|
|
||||||
'./cache/': './cache/nwjs.zip'
|
|
||||||
},
|
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
exec: {
|
exec: {
|
||||||
replaceNWJS: {
|
get_nwjs_for_pkg: {
|
||||||
command: 'rm -R ./cache/0.19.5/osx64/nwjs.app; cp -R ./cache/nwjs-mas-v0.19.5-osx-x64/nwjs.app ./cache/0.19.5/osx64/'
|
command: 'if [ ! -d ./cache/0.19.5-pkg/osx64/nwjs.app ]; then cd ./cache; curl https://dl.nwjs.io/v0.19.5-mas-beta/nwjs-mas-v0.19.5-osx-x64.zip --output nwjs.zip; unzip nwjs.zip; mkdir -p ./0.19.5-pkg/osx64; cp -R ./nwjs-mas-v0.19.5-osx-x64/nwjs.app ./0.19.5-pkg/osx64/; fi'
|
||||||
|
},
|
||||||
|
create_others_dist: {
|
||||||
|
command: 'sh webkitbuilds/create-others-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
|
||||||
|
},
|
||||||
|
create_dmg_dist: {
|
||||||
|
command: 'sh webkitbuilds/create-dmg-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
|
||||||
|
},
|
||||||
|
create_pkg_dist: {
|
||||||
|
command: 'sh webkitbuilds/create-pkg-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
|
||||||
|
},
|
||||||
|
sign_desktop_dist: {
|
||||||
|
command: 'sh webkitbuilds/sign-desktop-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>"'
|
||||||
},
|
},
|
||||||
appConfig: {
|
appConfig: {
|
||||||
command: 'node ./util/buildAppConfig.js'
|
command: 'node ./util/buildAppConfig.js'
|
||||||
|
|
@ -30,9 +36,6 @@ module.exports = function(grunt) {
|
||||||
cordovaclean: {
|
cordovaclean: {
|
||||||
command: 'make -C cordova clean'
|
command: 'make -C cordova clean'
|
||||||
},
|
},
|
||||||
macos: {
|
|
||||||
command: 'sh webkitbuilds/build-macos.sh sign'
|
|
||||||
},
|
|
||||||
coveralls: {
|
coveralls: {
|
||||||
command: 'cat coverage/report-lcov/lcov.info |./node_modules/coveralls/bin/coveralls.js'
|
command: 'cat coverage/report-lcov/lcov.info |./node_modules/coveralls/bin/coveralls.js'
|
||||||
},
|
},
|
||||||
|
|
@ -71,7 +74,7 @@ module.exports = function(grunt) {
|
||||||
stdin: true,
|
stdin: true,
|
||||||
},
|
},
|
||||||
desktopsign: {
|
desktopsign: {
|
||||||
cmd: 'gpg -u E0AE67E7 --output webkitbuilds/<%= pkg.title %>-linux.zip.sig --detach-sig webkitbuilds/<%= pkg.title %>-linux.zip ; gpg -u E0AE67E7 --output webkitbuilds/<%= pkg.title %>.exe.sig --detach-sig webkitbuilds/<%= pkg.title %>.exe'
|
cmd: 'gpg -u E0AE67E7 --output webkitbuilds/others/<%= pkg.title %>-linux.zip.sig --detach-sig webkitbuilds/others/<%= pkg.title %>-linux.zip ; gpg -u E0AE67E7 --output webkitbuilds/others/<%= pkg.title %>.exe.sig --detach-sig webkitbuilds/others/<%= pkg.title %>.exe'
|
||||||
},
|
},
|
||||||
desktopverify: {
|
desktopverify: {
|
||||||
cmd: 'gpg --verify webkitbuilds/<%= pkg.title %>-linux.zip.sig webkitbuilds/<%= pkg.title %>-linux.zip; gpg --verify webkitbuilds/<%= pkg.title %>.exe.sig webkitbuilds/<%= pkg.title %>.exe'
|
cmd: 'gpg --verify webkitbuilds/<%= pkg.title %>-linux.zip.sig webkitbuilds/<%= pkg.title %>-linux.zip; gpg --verify webkitbuilds/<%= pkg.title %>.exe.sig webkitbuilds/<%= pkg.title %>.exe'
|
||||||
|
|
@ -232,20 +235,54 @@ module.exports = function(grunt) {
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: 'webkitbuilds/',
|
cwd: 'webkitbuilds/',
|
||||||
src: ['.desktop', '../www/img/app/favicon.ico', '../resources/<%= pkg.name %>/linux/512x512.png'],
|
src: ['.desktop', '../www/img/app/favicon.ico', '../resources/<%= pkg.name %>/linux/512x512.png'],
|
||||||
dest: 'webkitbuilds/<%= pkg.title %>/linux64/',
|
dest: 'webkitbuilds/others/<%= pkg.title %>/linux64/',
|
||||||
flatten: true,
|
flatten: true,
|
||||||
filter: 'isFile'
|
filter: 'isFile'
|
||||||
}],
|
}],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nwjs: {
|
nwjs: {
|
||||||
|
others: {
|
||||||
options: {
|
options: {
|
||||||
appName: '<%= pkg.title %>',
|
appName: '<%= pkg.nameCaseNoSpace %>',
|
||||||
platforms: ['win64', 'osx64', 'linux64'],
|
platforms: ['win64', 'linux64'],
|
||||||
buildDir: './webkitbuilds',
|
buildDir: './webkitbuilds/others',
|
||||||
|
version: '0.19.5',
|
||||||
|
exeIco: './www/img/app/logo.ico'
|
||||||
|
},
|
||||||
|
src: ['./package.json', './www/**/*']
|
||||||
|
},
|
||||||
|
dmg: {
|
||||||
|
options: {
|
||||||
|
appName: '<%= pkg.nameCaseNoSpace %>',
|
||||||
|
platforms: ['osx64'],
|
||||||
|
buildDir: './webkitbuilds/dmg',
|
||||||
version: '0.19.5',
|
version: '0.19.5',
|
||||||
macIcns: './resources/<%= pkg.name %>/mac/app.icns',
|
macIcns: './resources/<%= pkg.name %>/mac/app.icns',
|
||||||
exeIco: './www/img/app/logo.ico',
|
exeIco: './www/img/app/logo.ico',
|
||||||
|
macPlist: {
|
||||||
|
'CFBundleDisplayName': '<%= pkg.title %>',
|
||||||
|
'CFBundleShortVersionString': '<%= pkg.version %>',
|
||||||
|
'CFBundleVersion': '<%= pkg.androidVersion %>',
|
||||||
|
'LSApplicationCategoryType': 'public.app-category.finance',
|
||||||
|
'CFBundleURLTypes': [
|
||||||
|
{
|
||||||
|
'CFBundleURLName': 'URI Handler',
|
||||||
|
'CFBundleURLSchemes': ['bitcoin', '<%= pkg.name %>']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
src: ['./package.json', './www/**/*']
|
||||||
|
},
|
||||||
|
pkg: {
|
||||||
|
options: {
|
||||||
|
appName: '<%= pkg.nameCaseNoSpace %>',
|
||||||
|
platforms: ['osx64'],
|
||||||
|
buildDir: './webkitbuilds/pkg',
|
||||||
|
version: '0.19.5',
|
||||||
|
macIcns: './resources/<%= pkg.name %>/mac/pkg/app.icns',
|
||||||
|
exeIco: './www/img/app/logo.ico',
|
||||||
macPlist: {
|
macPlist: {
|
||||||
'CFBundleIdentifier': 'com.bitcoin.mwallet.mac',
|
'CFBundleIdentifier': 'com.bitcoin.mwallet.mac',
|
||||||
'CFBundleDisplayName': '<%= pkg.title %>',
|
'CFBundleDisplayName': '<%= pkg.title %>',
|
||||||
|
|
@ -262,13 +299,14 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
src: ['./package.json', './www/**/*']
|
src: ['./package.json', './www/**/*']
|
||||||
},
|
},
|
||||||
|
},
|
||||||
compress: {
|
compress: {
|
||||||
linux: {
|
linux: {
|
||||||
options: {
|
options: {
|
||||||
archive: './webkitbuilds/<%= pkg.title %>-linux.zip'
|
archive: './webkitbuilds/others/<%= pkg.title %>-linux.zip'
|
||||||
},
|
},
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: './webkitbuilds/<%= pkg.title %>/linux64/',
|
cwd: './webkitbuilds/others/<%= pkg.title %>/linux64/',
|
||||||
src: ['**/*'],
|
src: ['**/*'],
|
||||||
dest: '<%= pkg.title %>-linux/'
|
dest: '<%= pkg.title %>-linux/'
|
||||||
}
|
}
|
||||||
|
|
@ -287,9 +325,6 @@ module.exports = function(grunt) {
|
||||||
grunt.registerTask('default', ['nggettext_compile', 'exec:appConfig', 'exec:externalServices', 'browserify', 'sass', 'concat', 'copy:ionic_fonts', 'copy:ionic_js']);
|
grunt.registerTask('default', ['nggettext_compile', 'exec:appConfig', 'exec:externalServices', 'browserify', 'sass', 'concat', 'copy:ionic_fonts', 'copy:ionic_js']);
|
||||||
grunt.registerTask('prod', ['default', 'uglify']);
|
grunt.registerTask('prod', ['default', 'uglify']);
|
||||||
grunt.registerTask('translate', ['nggettext_extract']);
|
grunt.registerTask('translate', ['nggettext_extract']);
|
||||||
grunt.registerTask('desktop', ['prod', 'nwjs', 'fix-nwjs-macos', 'nwjs', 'copy:linux', 'compress:linux']);
|
|
||||||
grunt.registerTask('osx', ['prod', 'nwjs', 'exec:macos', 'exec:osxsign']);
|
|
||||||
grunt.registerTask('osx-debug', ['default', 'nwjs']);
|
|
||||||
grunt.registerTask('chrome', ['default','exec:chrome']);
|
grunt.registerTask('chrome', ['default','exec:chrome']);
|
||||||
grunt.registerTask('wp', ['prod', 'exec:wp']);
|
grunt.registerTask('wp', ['prod', 'exec:wp']);
|
||||||
grunt.registerTask('wp-copy', ['default', 'exec:wpcopy']);
|
grunt.registerTask('wp-copy', ['default', 'exec:wpcopy']);
|
||||||
|
|
@ -302,6 +337,22 @@ module.exports = function(grunt) {
|
||||||
grunt.registerTask('android', ['exec:android']);
|
grunt.registerTask('android', ['exec:android']);
|
||||||
grunt.registerTask('android-release', ['prod', 'exec:android', 'exec:androidsign']);
|
grunt.registerTask('android-release', ['prod', 'exec:android', 'exec:androidsign']);
|
||||||
grunt.registerTask('desktopsign', ['exec:desktopsign', 'exec:desktopverify']);
|
grunt.registerTask('desktopsign', ['exec:desktopsign', 'exec:desktopverify']);
|
||||||
grunt.registerTask('fix-nwjs-macos', ['curl', 'unzip', 'exec:replaceNWJS']);
|
|
||||||
|
|
||||||
|
// Build desktop
|
||||||
|
grunt.registerTask('desktop-build', ['desktop-others', 'desktop-osx-dmg', 'desktop-osx-pkg']);
|
||||||
|
|
||||||
|
// Build desktop win64 & linux64
|
||||||
|
grunt.registerTask('desktop-others', ['prod', 'nwjs:others', 'copy:linux', 'exec:create_others_dist']);
|
||||||
|
|
||||||
|
// Build desktop osx pkg
|
||||||
|
grunt.registerTask('desktop-osx-pkg', ['prod', 'exec:get_nwjs_for_pkg', 'nwjs:pkg', 'exec:create_pkg_dist']);
|
||||||
|
|
||||||
|
// Build desktop osx dmg
|
||||||
|
grunt.registerTask('desktop-osx-dmg', ['prod', 'nwjs:dmg', 'exec:create_dmg_dist']);
|
||||||
|
|
||||||
|
// Sign desktop
|
||||||
|
grunt.registerTask('desktop-sign', ['exec:sign_desktop_dist']);
|
||||||
|
|
||||||
|
// Release desktop
|
||||||
|
grunt.registerTask('desktop-release', ['desktop-build', 'desktop-sign']);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,10 @@ var templates = {
|
||||||
'ionic.config.json': '/',
|
'ionic.config.json': '/',
|
||||||
'.desktop': 'webkitbuilds/',
|
'.desktop': 'webkitbuilds/',
|
||||||
'setup-win.iss': 'webkitbuilds/',
|
'setup-win.iss': 'webkitbuilds/',
|
||||||
'build-macos.sh': 'webkitbuilds/',
|
'scripts/create-dmg-dist.sh': 'webkitbuilds/',
|
||||||
|
'scripts/create-others-dist.sh': 'webkitbuilds/',
|
||||||
|
'scripts/create-pkg-dist.sh': 'webkitbuilds/',
|
||||||
|
'scripts/sign-desktop-dist.sh': 'webkitbuilds/',
|
||||||
'manifest.json': 'chrome-app/',
|
'manifest.json': 'chrome-app/',
|
||||||
// 'bower.json': '/',
|
// 'bower.json': '/',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
],
|
],
|
||||||
"main": "www/index.html",
|
"main": "www/index.html",
|
||||||
"title": "*USERVISIBLENAME*",
|
"title": "*USERVISIBLENAME*",
|
||||||
|
"nameCaseNoSpace": "*NAMECASENOSPACE*",
|
||||||
"window": {
|
"window": {
|
||||||
"title": "*USERVISIBLENAME*",
|
"title": "*USERVISIBLENAME*",
|
||||||
"icon": "www/img/app/icon.png",
|
"icon": "www/img/app/icon.png",
|
||||||
|
|
|
||||||
49
app-template/build-macos.sh → app-template/scripts/create-dmg-dist.sh
Executable file → Normal file
49
app-template/build-macos.sh → app-template/scripts/create-dmg-dist.sh
Executable file → Normal file
|
|
@ -1,11 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SHOULD_SIGN=$1
|
|
||||||
if [ "$SHOULD_SIGN" ]
|
|
||||||
then
|
|
||||||
echo "Will sign the APP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# by Andy Maloney
|
# by Andy Maloney
|
||||||
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
|
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
|
||||||
|
|
||||||
|
|
@ -16,21 +10,25 @@ if [ -d "$dir" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set up your app name, architecture, and background image file name
|
# set up your app name, architecture, and background image file name
|
||||||
APP_NAME="*USERVISIBLENAME*"
|
APP_PACKAGE=$1
|
||||||
|
APP_VERSION=$2
|
||||||
|
APP_NAME=$3
|
||||||
|
APP_FULLNAME=$4
|
||||||
|
|
||||||
rm dmg-background.tiff
|
rm dmg-background.tiff
|
||||||
ln -s ../resources/*PACKAGENAME*/mac/dmg-background.tiff dmg-background.tiff
|
ln -s ../resources/bitcoin.com/mac/dmg-background.tiff dmg-background.tiff
|
||||||
rm volume-icon.icns
|
rm volume-icon.icns
|
||||||
ln -s ../resources/*PACKAGENAME*/mac/volume-icon.icns volume-icon.icns
|
ln -s ../resources/bitcoin.com/mac/volume-icon.icns volume-icon.icns
|
||||||
DMG_VOLUME_ICON="volume-icon.icns"
|
DMG_VOLUME_ICON="volume-icon.icns"
|
||||||
DMG_BACKGROUND_IMG="dmg-background.tiff"
|
DMG_BACKGROUND_IMG="dmg-background.tiff"
|
||||||
|
|
||||||
PATH_NAME="${APP_NAME}/osx64/"
|
PATH_NAME="dmg/${APP_NAME}/osx64/"
|
||||||
# you should not need to change these
|
# you should not need to change these
|
||||||
APP_EXE="${PATH_NAME}${APP_NAME}.app/Contents/MacOS/nwjs"
|
APP_EXE="${PATH_NAME}${APP_NAME}.app/Contents/MacOS/nwjs"
|
||||||
|
|
||||||
VOL_NAME="${APP_NAME}"
|
VOL_NAME="${APP_NAME}"
|
||||||
DMG_TMP="${VOL_NAME}-temp.dmg"
|
DMG_TMP="dmg/${VOL_NAME}-temp.dmg"
|
||||||
DMG_FINAL="${VOL_NAME}.dmg"
|
DMG_FINAL="dmg/${VOL_NAME}.dmg"
|
||||||
STAGING_DIR="tmp"
|
STAGING_DIR="tmp"
|
||||||
|
|
||||||
# Check the background image DPI and convert it if it isn't 72x72
|
# Check the background image DPI and convert it if it isn't 72x72
|
||||||
|
|
@ -156,31 +154,14 @@ hdiutil detach "${DEVICE}"
|
||||||
echo "Creating compressed image"
|
echo "Creating compressed image"
|
||||||
hdiutil convert "${DMG_TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FINAL}"
|
hdiutil convert "${DMG_TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FINAL}"
|
||||||
|
|
||||||
# Sign Code (MATIAS)
|
export DIST_PATH="dist"
|
||||||
if [ $SHOULD_SIGN ]
|
|
||||||
then
|
|
||||||
|
|
||||||
rm entitlements-child.plist
|
|
||||||
ln -s ../resources/bitcoin.com/mac/entitlements-child.plist entitlements-child.plist
|
|
||||||
|
|
||||||
rm entitlements-parent.plist
|
|
||||||
ln -s ../resources/bitcoin.com/mac/entitlements-parent.plist entitlements-parent.plist
|
|
||||||
|
|
||||||
rm build.cfg
|
|
||||||
ln -s ../resources/bitcoin.com/mac/build.cfg build.cfg
|
|
||||||
|
|
||||||
rm build_mas.py
|
|
||||||
ln -s ../resources/bitcoin.com/mac/build_mas.py build_mas.py
|
|
||||||
|
|
||||||
echo "Signing ${APP_NAME}"
|
|
||||||
export APP_PATH=${STAGING_DIR}/${APP_NAME}.app
|
|
||||||
|
|
||||||
python build_mas.py -C build.cfg -I "${APP_PATH}" -P "${APP_NAME}.pkg"
|
|
||||||
|
|
||||||
echo "Signing Done"
|
|
||||||
|
|
||||||
|
if [ ! -d $DIST_PATH ]; then
|
||||||
|
mkdir $DIST_PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cp -vR "${DMG_FINAL}" "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.dmg"
|
||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
rm -rf "${DMG_TMP}"
|
rm -rf "${DMG_TMP}"
|
||||||
rm -rf "${STAGING_DIR}"
|
rm -rf "${STAGING_DIR}"
|
||||||
54
app-template/scripts/create-others-dist.sh
Normal file
54
app-template/scripts/create-others-dist.sh
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# make sure we are in the correct dir when we double-click a .command file
|
||||||
|
dir=${0%/*}
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
cd "$dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set up your app name, architecture, and background image file name
|
||||||
|
APP_PACKAGE=$1
|
||||||
|
APP_VERSION=$2
|
||||||
|
APP_NAME=$3
|
||||||
|
APP_FULLNAME=$4
|
||||||
|
|
||||||
|
export APP_LINUX_PATH="others/${APP_NAME}/linux64"
|
||||||
|
export APP_WIN_PATH="others/${APP_NAME}/win64"
|
||||||
|
export DIST_PATH="dist"
|
||||||
|
|
||||||
|
if [ ! -d $DIST_PATH ]; then
|
||||||
|
mkdir $DIST_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
##
|
||||||
|
# LINUX
|
||||||
|
|
||||||
|
echo "Building Linux..."
|
||||||
|
|
||||||
|
# Building package
|
||||||
|
cp -R $APP_LINUX_PATH bitcoin-com-wallet
|
||||||
|
tar -cvzf "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-linux-x64.tar.gz" bitcoin-com-wallet
|
||||||
|
|
||||||
|
# Clean
|
||||||
|
rm -R bitcoin-com-wallet
|
||||||
|
|
||||||
|
echo "Linux Done."
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
# WINDOWS
|
||||||
|
|
||||||
|
echo "Building Windows..."
|
||||||
|
|
||||||
|
# Building package
|
||||||
|
cp -R $APP_WIN_PATH bitcoin-com-wallet
|
||||||
|
zip -r "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-win-x64.zip" bitcoin-com-wallet
|
||||||
|
|
||||||
|
# Clean
|
||||||
|
rm -R bitcoin-com-wallet
|
||||||
|
|
||||||
|
echo "Windows Done."
|
||||||
|
|
||||||
|
echo "Done."
|
||||||
|
|
||||||
|
exit
|
||||||
45
app-template/scripts/create-pkg-dist.sh
Normal file
45
app-template/scripts/create-pkg-dist.sh
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# make sure we are in the correct dir when we double-click a .command file
|
||||||
|
dir=${0%/*}
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
cd "$dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set up your app name, architecture, and background image file name
|
||||||
|
APP_PACKAGE=$1
|
||||||
|
APP_VERSION=$2
|
||||||
|
APP_NAME=$3
|
||||||
|
APP_FULLNAME=$4
|
||||||
|
|
||||||
|
rm entitlements-child.plist
|
||||||
|
ln -s ../resources/bitcoin.com/mac/pkg/entitlements-child.plist entitlements-child.plist
|
||||||
|
|
||||||
|
rm entitlements-parent.plist
|
||||||
|
ln -s ../resources/bitcoin.com/mac/pkg/entitlements-parent.plist entitlements-parent.plist
|
||||||
|
|
||||||
|
rm build.cfg
|
||||||
|
ln -s ../resources/bitcoin.com/mac/pkg/build.cfg build.cfg
|
||||||
|
|
||||||
|
rm build_mas.py
|
||||||
|
ln -s ../resources/bitcoin.com/mac/pkg/build_mas.py build_mas.py
|
||||||
|
|
||||||
|
echo "Signing ${APP_NAME}"
|
||||||
|
export APP_PATH="pkg/${APP_NAME}/osx64/${APP_NAME}"
|
||||||
|
export TMP_PATH="tmp"
|
||||||
|
export DIST_PATH="dist"
|
||||||
|
|
||||||
|
rm -rf $TMP_PATH
|
||||||
|
mkdir $TMP_PATH
|
||||||
|
|
||||||
|
if [ ! -d $DIST_PATH ]; then
|
||||||
|
mkdir $DIST_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
python build_mas.py -C build.cfg -O "${TMP_PATH}/${APP_NAME}.app" -I "${APP_PATH}.app" -P "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.pkg"
|
||||||
|
|
||||||
|
echo "Signing Done"
|
||||||
|
|
||||||
|
echo "Done."
|
||||||
|
|
||||||
|
exit
|
||||||
36
app-template/scripts/sign-desktop-dist.sh
Normal file
36
app-template/scripts/sign-desktop-dist.sh
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# make sure we are in the correct dir when we double-click a .command file
|
||||||
|
dir=${0%/*}
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
cd "$dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
APP_PACKAGE=$1
|
||||||
|
APP_VERSION=$2
|
||||||
|
export DIST_PATH="dist"
|
||||||
|
|
||||||
|
##
|
||||||
|
# LINUX
|
||||||
|
|
||||||
|
# Sig tar.gz
|
||||||
|
gpg --output "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-linux-x64.tar.gz.sig" --detach-sig "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-linux-x64.tar.gz"
|
||||||
|
gpg --verify "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-linux-x64.tar.gz.sig" "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-linux-x64.tar.gz"
|
||||||
|
|
||||||
|
##
|
||||||
|
# WINDOWS
|
||||||
|
|
||||||
|
# Sig zip
|
||||||
|
gpg --output "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-win-x64.zip.sig" --detach-sig "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-win-x64.zip"
|
||||||
|
gpg --verify "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-win-x64.zip.sig" "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-win-x64.zip"
|
||||||
|
|
||||||
|
##
|
||||||
|
# OSX
|
||||||
|
|
||||||
|
# Sig dmg
|
||||||
|
gpg --output "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.dmg.sig" --detach-sig "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.dmg"
|
||||||
|
gpg --verify "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.dmg.sig" "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.dmg"
|
||||||
|
|
||||||
|
# Sig pkg
|
||||||
|
gpg --output "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.pkg.sig" --detach-sig "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.pkg"
|
||||||
|
gpg --verify "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.pkg.sig" "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.pkg"
|
||||||
Binary file not shown.
BIN
resources/bitcoin.com/mac/pkg/app.icns
Normal file
BIN
resources/bitcoin.com/mac/pkg/app.icns
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue