refactor: eliminate duplicate C++ / JavaScript implementation of app.isPackaged (#29464)

This commit is contained in:
Milan Burda 2021-06-02 21:17:08 +02:00 committed by GitHub
parent f0d3e1d1cf
commit 44491b023a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 22 deletions

View file

@ -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 || (() => {});