-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.js
44 lines (40 loc) · 989 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
const { app, BrowserWindow } = require("electron");
//const { PythonShell } = require("python-shell");
function createWindow() {
let mainWindow = new BrowserWindow({
backgroundColor: "#000000",
title: "Phomeme",
show: false,
webPreferences: {
nodeIntegration: true,
webSecurity: false
}
});
mainWindow.loadFile("editor.html");
mainWindow.maximize();
//mainWindow.webContents.openDevTools();
mainWindow.on("ready-to-show", function() {
mainWindow.show();
mainWindow.focus();
});
/*PythonShell.run("align.py", {
args: ["gentle/examples/data/lucier.mp3", "gentle/examples/data/lucier.txt"],
scriptPath: "gentle"
}, function(err, results) {
if (err) {
console.log(err);
}
console.log(results);
});*/
}
app.whenReady().then(createWindow);
app.on("window-all-closed", function() {
if (process.platform !== "darwin") {
app.quit();
}
});
app.on("activate", function () {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});