Skip to content

Commit

Permalink
finish osx packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Burnett committed Jul 2, 2018
1 parent a601073 commit f25a75e
Show file tree
Hide file tree
Showing 8 changed files with 181 additions and 10 deletions.
5 changes: 0 additions & 5 deletions exeChmod.js

This file was deleted.

148 changes: 148 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod && node exeChmod.js",
"build": "ng build",
"prepack": "ng build --delete-output-path=false && npm --prefix ./dist i ./dist --production && node postBuild.js",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"srv": "ng serve --no-live-reload",
"dev": "electron ./src/electron.dev",
"prod": "npm run build && electron ./dist/electron.prod",
"reprod": "electron ./dist/electron.prod",
"package:win": "npm run build && cross-var electron-packager dist $npm_package_name-$npm_package_version --out=packages --arch=all --overwrite --platform=win32",
"package:osx": "npm run build && cross-var electron-packager dist $npm_package_name-$npm_package_version --out=packages --arch=all --overwrite --platform=darwin",
"package:lnx": "npm run build && cross-var electron-packager dist $npm_package_name-$npm_package_version --out=packages --arch=all --overwrite --platform=linux",
"package:win": "npm run prepack && cross-var electron-packager dist $npm_package_name-$npm_package_version --out=packages --arch=all --overwrite --icon=ystock.icns --platform=win32",
"package:osx": "npm run prepack && cross-var electron-packager dist $npm_package_name-$npm_package_version --out=packages --arch=all --overwrite --icon=ystock.icns --platform=darwin",
"package:lnx": "npm run prepack && cross-var electron-packager dist $npm_package_name-$npm_package_version --out=packages --arch=all --overwrite --icon=ystock.icns --platform=linux",
"erb": "electron-rebuild"
},
"private": true,
Expand Down Expand Up @@ -74,6 +75,7 @@
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"replace-in-file": "^3.4.0",
"shelljs": "^0.8.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
Expand Down
21 changes: 21 additions & 0 deletions postBuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//set geth exec permissions
var sh = require('shelljs');
sh.find('./dist/assets/exe').forEach(f => {
sh.chmod('+x', f);
});

//replace baseref
const replace = require('replace-in-file');
const options = {
files: './dist/index.html',
from: /base href="\/"/g,
to: 'base href="./"',
};

replace(options)
.then(changes => {
console.log('Modified files:', changes.join(', '));
})
.catch(error => {
console.error('Error occurred:', error);
});
Binary file modified src/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/stacked-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@
"version": "0.0.1",
"description": "Tokenized Selfhood",
"main": "electron.prod.js",
"license": "MIT"
"license": "MIT",
"dependencies": {
"electron-default-menu": "^1.0.1",
"untildify": "^3.0.3",
"web3": "^1.0.0-beta.34"
}
}
Binary file added ystock.icns
Binary file not shown.

0 comments on commit f25a75e

Please sign in to comment.