This commit is contained in:
crusader 2018-10-02 21:42:02 +09:00
parent df1c926c67
commit 5a0f024519
2 changed files with 6 additions and 4 deletions

View File

@ -185,8 +185,6 @@ export class AppWindow {
registerWindowStateChangedEvents(this.window);
console.log(`NODE_ENV: ${process.env.NODE_ENV}`);
if (process.env.NODE_ENV === 'development') {
const indexUrl = URL.format({
pathname: path.join('//localhost:4200'),

View File

@ -186,8 +186,8 @@ app.on('ready', () => {
return;
}
const dbPath = __DEV__ ?
path.join(__dirname, '..', '..', 'config', '_database.sqlite')
const dbPath = __DEV__
? path.join(__dirname, '..', '..', 'config', '_database.sqlite')
: path.join(__dirname, '..', '..', 'bin', 'database.sqlite');
@ -410,6 +410,8 @@ app.on('web-contents-created', (event, contents) => {
});
app.on('before-quit', function (event) {
console.log(`before-quit`);
event.preventDefault();
if (null !== db) {
@ -458,6 +460,8 @@ function createWindow() {
}
window.onClose(() => {
console.log(`closed`);
mainWindow = null;
if (!__DARWIN__ && !preventQuit) {
app.quit();