add --app parameter and update the example usage in the default_app #1877

This commit is contained in:
Jan Wiemers 2015-10-07 23:14:49 +02:00
parent 5bdc077b48
commit c7dc901607
2 changed files with 4 additions and 1 deletions

View file

@ -58,7 +58,7 @@
<body>
<script>
var execPath = require('remote').process.execPath;
var command = execPath + ' path-to-your-app';
var command = execPath + '--app=path-to-your-app';
document.onclick = function(e) {
e.preventDefault();

View file

@ -18,6 +18,9 @@ for (var i = 0; i < argv.length; i++) {
if (argv[i] == '--version' || argv[i] == '-v') {
option.version = true;
break;
} else if (argv[i].match(/^--app=/)) {
option.file = argv[i].split('=')[1];
break;
} else if (argv[i] == '--help' || argv[i] == '-h') {
option.help = true;
break;