const semver = require('semver')
if (semver.gt(process.versions.electron, '3.0.0')) {
const gotTheLock = app.requestSingleInstanceLock()
app.on('second-instance', (event, commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
global.p3x.onenote.setVisible(true);
global.p3x.onenote.window.onenote.webContents.reload();
})
if (!gotTheLock) {
app.quit()
return
}