refactor: eliminate duplicate C++ / JavaScript implementation of app.isPackaged (#29464)
This commit is contained in:
parent
f0d3e1d1cf
commit
44491b023a
4 changed files with 19 additions and 22 deletions
|
@ -55,14 +55,6 @@ Object.defineProperty(app, 'applicationMenu', {
|
|||
}
|
||||
});
|
||||
|
||||
(app as any).isPackaged = (() => {
|
||||
const execFile = path.basename(process.execPath).toLowerCase();
|
||||
if (process.platform === 'win32') {
|
||||
return execFile !== 'electron.exe';
|
||||
}
|
||||
return execFile !== 'electron';
|
||||
})();
|
||||
|
||||
// The native implementation is not provided on non-windows platforms
|
||||
app.setAppUserModelId = app.setAppUserModelId || (() => {});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue