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
commit c7dc901607
2 changed files with 4 additions and 1 deletions

View file

@ -58,7 +58,7 @@
<body> <body>
<script> <script>
var execPath = require('remote').process.execPath; 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) { document.onclick = function(e) {
e.preventDefault(); e.preventDefault();

View file

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