|
@@ -3,6 +3,9 @@ import fs from "fs";
|
|
|
import { app, BrowserWindow, Menu, screen, dialog, ipcMain } from "electron";
|
|
|
import installExtension, { VUEJS3_DEVTOOLS } from "electron-devtools-installer";
|
|
|
|
|
|
+import child_process from "child_process";
|
|
|
+import process from "process";
|
|
|
+
|
|
|
const isDev = process.env.NODE_ENV === "development";
|
|
|
let win: any = null;
|
|
|
let loadWin: any = null;
|
|
@@ -116,7 +119,7 @@ function createLoadWin() {
|
|
|
|
|
|
|
|
|
|
|
|
-ipcMain.on("change-win-size", (event, args) => {
|
|
|
+ipcMain.on("change-win-size", (event, args: string) => {
|
|
|
const { width, height } = screen.getPrimaryDisplay().workAreaSize;
|
|
|
let w = args === "big" ? width : 840;
|
|
|
let h = args === "big" ? height : 500;
|
|
@@ -130,6 +133,63 @@ ipcMain.on("window-min", () => {
|
|
|
win.minimize();
|
|
|
});
|
|
|
|
|
|
+function startExe(exePath: string) {
|
|
|
+ const childProcess = child_process.spawn(exePath);
|
|
|
+
|
|
|
+ childProcess.on("close", (code: any) => {
|
|
|
+ console.log("close---- code:", code);
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
app.on("ready", async () => {
|
|
|
if (isDev) {
|
|
|
try {
|