Merge pull request #10530 from vector-im/t3chguy/electron_help
Add --help to electron apppull/10543/head
commit
906045b215
|
@ -23,7 +23,10 @@ limitations under the License.
|
||||||
const checkSquirrelHooks = require('./squirrelhooks');
|
const checkSquirrelHooks = require('./squirrelhooks');
|
||||||
if (checkSquirrelHooks()) return;
|
if (checkSquirrelHooks()) return;
|
||||||
|
|
||||||
const argv = require('minimist')(process.argv);
|
const argv = require('minimist')(process.argv, {
|
||||||
|
alias: {help: "h"},
|
||||||
|
});
|
||||||
|
|
||||||
const {app, ipcMain, powerSaveBlocker, BrowserWindow, Menu, autoUpdater, protocol} = require('electron');
|
const {app, ipcMain, powerSaveBlocker, BrowserWindow, Menu, autoUpdater, protocol} = require('electron');
|
||||||
const AutoLaunch = require('auto-launch');
|
const AutoLaunch = require('auto-launch');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
@ -37,6 +40,19 @@ const { migrateFromOldOrigin } = require('./originMigrator');
|
||||||
const windowStateKeeper = require('electron-window-state');
|
const windowStateKeeper = require('electron-window-state');
|
||||||
const Store = require('electron-store');
|
const Store = require('electron-store');
|
||||||
|
|
||||||
|
if (argv["help"]) {
|
||||||
|
console.log("Options:");
|
||||||
|
console.log(" --profile-dir {path}: Path to where to store the profile.");
|
||||||
|
console.log(" --profile {name}: Name of alternate profile to use, allows for running multiple accounts.");
|
||||||
|
console.log(" --devtools: Install and use react-devtools and react-perf.");
|
||||||
|
console.log(" --no-update: Disable automatic updating.");
|
||||||
|
console.log(" --hidden: Start the application hidden in the system tray.");
|
||||||
|
console.log(" --help: Displays this help message.");
|
||||||
|
console.log("And more such as --proxy, see:" +
|
||||||
|
"https://github.com/electron/electron/blob/master/docs/api/chrome-command-line-switches.md");
|
||||||
|
app.exit();
|
||||||
|
}
|
||||||
|
|
||||||
// boolean flag set whilst we are doing one-time origin migration
|
// boolean flag set whilst we are doing one-time origin migration
|
||||||
// We only serve the origin migration script while we're actually
|
// We only serve the origin migration script while we're actually
|
||||||
// migrating to mitigate any risk of it being used maliciously.
|
// migrating to mitigate any risk of it being used maliciously.
|
||||||
|
|
Loading…
Reference in New Issue