Skip to content

Commit ce02025

Browse files
committed
Merge for building pkg.
2 parents 3afbdf7 + d271501 commit ce02025

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

Gruntfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function(grunt) {
99
pkg: grunt.file.readJSON('package.json'),
1010
exec: {
1111
get_nwjs_for_pkg: {
12-
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'
12+
command: 'if [ ! -d ./cache/0.19.4/osx64/nwjs.app ]; then mkdir -p ./cache/0.19.4/osx64; curl https://dl.nwjs.io/v0.19.5-mas-beta/nwjs-mas-v0.19.5-osx-x64.zip --output ./cache/nwjs.zip; unzip ./cache/nwjs.zip -d ./cache; cp -R ./cache/nwjs-mas-v0.19.5-osx-x64/nwjs.app ./cache/0.19.4/osx64/; fi'
1313
},
1414
create_others_dist: {
1515
command: 'sh webkitbuilds/create-others-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
@@ -296,10 +296,10 @@ module.exports = function(grunt) {
296296
},
297297
pkg: {
298298
options: {
299-
appName: '<%= pkg.nameCaseNoSpace %>',
299+
appName: '<%= pkg.title %>',
300300
platforms: ['osx64'],
301301
buildDir: './webkitbuilds/pkg',
302-
version: '0.19.5',
302+
version: '0.19.4',
303303
macIcns: './resources/<%= pkg.name %>/mac/pkg/app.icns',
304304
exeIco: './www/img/app/logo.ico',
305305
macPlist: {

app-template/create-pkg-dist.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ ln -s ../resources/bitcoin.com/mac/pkg/build.cfg build.cfg
2424
rm build_mas.py
2525
ln -s ../resources/bitcoin.com/mac/pkg/build_mas.py build_mas.py
2626

27-
echo "Signing ${APP_NAME}"
28-
export APP_PATH="pkg/${APP_NAME}/osx64/${APP_NAME}"
27+
echo "Signing ${APP_FULLNAME}"
28+
export CURRENT_PATH=`pwd`
29+
export APP_PATH="pkg/${APP_FULLNAME}/osx64/${APP_FULLNAME}"
2930
export TMP_PATH="tmp"
3031
export DIST_PATH="dist"
3132

@@ -36,10 +37,16 @@ if [ ! -d $DIST_PATH ]; then
3637
mkdir $DIST_PATH
3738
fi
3839

39-
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"
40+
cd "${APP_PATH}.app/Contents/Versions"
41+
ln -s "55.0.2883.87" "Current"
42+
43+
cd $CURRENT_PATH
44+
chmod -vR 777 "${APP_PATH}.app/Contents"
45+
46+
python build_mas.py -C build.cfg -O "${TMP_PATH}/${APP_FULLNAME}.app" -I "${APP_PATH}.app" -P "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.pkg"
4047

4148
echo "Signing Done"
4249

4350
echo "Done."
4451

45-
exit
52+
exit

resources/bitcoin.com/mac/pkg/build_mas.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,17 @@ def codesign_app(config, args):
178178

179179
plistlib.writePlist(child_entitlements, tmp_child_entitlements)
180180
info('Child entitlements: %s' % tmp_child_entitlements)
181-
framework = glob(args.output, 'nwjs Framework.framework', returnOnFound=True)
182-
system('codesign -f --verbose -s "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, framework))
183-
helperApp = glob(args.output, 'nwjs Helper.app', returnOnFound=True)
184-
system('codesign -f --verbose -s "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, helperApp))
181+
182+
libffmpeg = glob(os.path.join(args.output, 'Contents/Versions/55.0.2883.87/nwjs Framework.framework/Versions/A'), 'libffmpeg.dylib', returnOnFound=True)
183+
system('codesign --deep --force --verbose --verify --sign "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, libffmpeg))
184+
libnode = glob(os.path.join(args.output, 'Contents/Versions/55.0.2883.87/nwjs Framework.framework/Versions/A'), 'libnode.dylib', returnOnFound=True)
185+
system('codesign --deep --force --verbose --verify --sign "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, libnode))
185186

187+
helperApp = glob(args.output, 'nwjs Helper.app', returnOnFound=True)
188+
system('codesign --deep --force --verbose --verify --sign "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, helperApp))
189+
framework = glob(args.output, 'nwjs Framework.framework', returnOnFound=True)
190+
system('codesign --deep --force --verbose --verify --sign "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, framework))
191+
186192
## sign parent app
187193
(_, tmp_parent_entitlements) = tempfile.mkstemp()
188194
if config.has_option('Sign', 'ParentEntitlements'):

resources/bitcoin.com/mac/pkg/entitlements-parent.plist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
<key>com.apple.security.app-sandbox</key>
66
<true/>
77
<key>com.apple.security.application-groups</key>
8-
<string>$GROUPID</string>
8+
<array>
9+
<string>299HJ3G3BP.com.bitcoin.mwallet.mac</string>
10+
</array>
911
<key>com.apple.security.files.user-selected.read-only</key>
1012
<true/>
1113
<key>com.apple.security.network.client</key>

0 commit comments

Comments
 (0)