-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
main.js
executable file
·45 lines (34 loc) · 934 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
'use strict';
var fs = require('fs');
var electron = require('electron');
var app = electron.app;
var BrowserWindow = electron.BrowserWindow;
var crashReporter = electron.crashReporter;
var mainWindow = null;
const DEBUG = false;
crashReporter.start({
productName: 'Blender Add-on Manager',
companyName: 'COLORFUL PICO',
submitURL: '',
autoSubmit: false
});
app.on('window-all-closed', function() {
if (process.platform != 'darwin') {
app.quit();
}
});
app.on('ready', function() {
mainWindow = new BrowserWindow({
width: 1024,
height: 768,
nodeIntegration: false,
icon: __dirname + '/icon/icon.png'
});
mainWindow.setMenu(null);
if (DEBUG) { mainWindow.openDevTools(); }
mainWindow.loadURL('file://' + __dirname + '/html/index.html');
mainWindow.show();
mainWindow.on('closed', function() {
mainWindow = null;
});
});