很久以后得整理

This commit is contained in:
zilong
2023-01-29 15:06:46 +08:00
parent b7c25adeee
commit a3c872c7d7
37 changed files with 2488 additions and 2165 deletions

View File

@@ -6,13 +6,13 @@ let exec = require('child_process').exec;
const isDev = process.env.IS_DEV == "true" ? true : false;
//计算NMApi路径
let NMApiPath = isDev ? '../NMApi.asar' : path.join(process.resourcesPath, 'NMApi.asar')
let p = require('path').join(NMApiPath + '/node_modules');
require('module').globalPaths.unshift(p); //加入到module的路径列表
// let NMApiPath = isDev ? '../NMApi.asar' : path.join(process.resourcesPath, 'NMApi.asar')
// let p = require('path').join(NMApiPath + '/node_modules');
// require('module').globalPaths.unshift(p); //加入到module的路径列表
console.log(process.resourcesPath, NMApiPath)
let svc
if(!isDev)svc = require(NMApiPath + '/app.js')
// console.log(process.resourcesPath, NMApiPath)
// let svc
// if(!isDev)svc = require(NMApiPath + '/app.js')
function createWindow() {
// Create the browser window.