Prep for LCI
This commit is contained in:
@@ -730,14 +730,25 @@ exports.check_file_cache_and_open_local_file = async function ({local_file_cache
|
||||
|
||||
// Kill processes
|
||||
// Updated 2022-05-07
|
||||
exports.kill_processes = async function ({process_name = null}) {
|
||||
exports.kill_processes = async function ({process_name = null, process_id = null, signal = null}) {
|
||||
console.log('*** Electron framework export: kill_processes() ***');
|
||||
console.log(process_name); // process_name or grep pattern
|
||||
|
||||
let cmd = '';
|
||||
if (os.platform == 'darwin') {
|
||||
// cmd = `osascript -e 'quit app "${process_name}" saving no'`;
|
||||
cmd = `osascript -e 'quit application "${process_name}" saving no'`;
|
||||
if (signal == 'quit') {
|
||||
cmd = `killall -QUIT '${process_name}'`;
|
||||
} else if (signal == 'kill') {
|
||||
cmd = `killall -KILL '${process_name}'`;
|
||||
} else if (process_id && signal == 'quit') {
|
||||
cmd = `killall -QUIT ${process_id}`;
|
||||
} else if (process_id && signal == 'kill') {
|
||||
cmd = `killall -KILL ${process_id}`;
|
||||
} else {
|
||||
// cmd = `osascript -e 'quit app "${process_name}" saving no'`;
|
||||
cmd = `osascript -e 'quit application "${process_name}" saving no'`;
|
||||
}
|
||||
|
||||
} else {
|
||||
cmd = `pkill ${process_name}`;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"developer_tools": false,
|
||||
"native_app_js_css_option": "default",
|
||||
|
||||
"account_id": "_XY7DXtc9MY",
|
||||
"event_id": "pjrcghqwert",
|
||||
"event_device_id": "dbgMWS3KEHE",
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"developer_tools": false,
|
||||
"native_app_js_css_option": "default",
|
||||
|
||||
"account_id": "",
|
||||
"account_code": "",
|
||||
"event_id": "",
|
||||
|
||||
4
index.js
4
index.js
@@ -93,7 +93,9 @@ function createWindow () {
|
||||
}
|
||||
|
||||
// Open the DevTools.
|
||||
win.webContents.openDevTools(); // Comment out for production
|
||||
if (config.developer_tools) {
|
||||
win.webContents.openDevTools(); // Comment out for production
|
||||
}
|
||||
|
||||
// Emitted when the window is closed.
|
||||
win.on('closed', () => {
|
||||
|
||||
Reference in New Issue
Block a user