|
@@ -128,23 +128,23 @@ function createMainWindow() {
|
|
|
let window = new BrowserWindow({ autoHideMenuBar: true, show: false, webPreferences: { nodeIntegration: true }, width: 1280, height: 920, minWidth: 601, minHeight: 670 });
|
|
|
|
|
|
|
|
|
- window.loadURL(formatUrl({
|
|
|
- pathname: path.join(__dirname, '..', '..', 'cocoblockly-x/index.html'),
|
|
|
- protocol: 'file',
|
|
|
- slashes: true,
|
|
|
- search: "lang=zh-hans",
|
|
|
- }));
|
|
|
-
|
|
|
- // if (isDevelopment) {
|
|
|
- // window.loadURL(`http://localhost:${process.env.ELECTRON_WEBPACK_WDS_PORT}`);
|
|
|
- // } else {
|
|
|
- // window.loadURL(formatUrl({
|
|
|
- // pathname: path.join(__dirname, 'cocoblockly-x/index.html'),
|
|
|
- // protocol: 'file',
|
|
|
- // slashes: true,
|
|
|
- // search: "lang=zh-hans",
|
|
|
- // }));
|
|
|
- // }
|
|
|
+ // window.loadURL(formatUrl({
|
|
|
+ // pathname: path.join(__dirname, '..', '..', 'cocoblockly-x/index.html'),
|
|
|
+ // protocol: 'file',
|
|
|
+ // slashes: true,
|
|
|
+ // search: "lang=zh-hans",
|
|
|
+ // }));
|
|
|
+
|
|
|
+ if (isDevelopment) {
|
|
|
+ window.loadURL(`http://localhost:${process.env.ELECTRON_WEBPACK_WDS_PORT}`);
|
|
|
+ } else {
|
|
|
+ window.loadURL(formatUrl({
|
|
|
+ pathname: path.join(__dirname, 'cocoblockly-x/index.html'),
|
|
|
+ protocol: 'file',
|
|
|
+ slashes: true,
|
|
|
+ search: "lang=zh-hans",
|
|
|
+ }));
|
|
|
+ }
|
|
|
window.once('ready-to-show', () => window.show());
|
|
|
|
|
|
window.on('closed', () => { app.quit() });
|