二期:打包IM

This commit is contained in:
朱浩 2024-08-19 16:30:57 +08:00
parent 49c4c7245a
commit f98fa5a3f3
5 changed files with 33 additions and 9 deletions

View File

@ -1,7 +1,16 @@
appId: com.electron.app appId: com.electron.app
productName: AIx productName: AIx
directories: directories:
output: dist
buildResources: build buildResources: build
win:
executableName: AIx
icon: resources/logo2.ico
extraFiles:
- from: ./node_modules/im_electron_sdk/lib/
to: ./resources
filter:
- '**/*'
files: files:
- '!**/.vscode/*' - '!**/.vscode/*'
- '!src/*' - '!src/*'
@ -10,9 +19,6 @@ files:
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}' - '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
asarUnpack: asarUnpack:
- resources/** - resources/**
win:
executableName: AIx
icon: resources/logo2.ico
nsis: nsis:
oneClick: false oneClick: false
allowToChangeInstallationDirectory: true allowToChangeInstallationDirectory: true

View File

@ -13,7 +13,12 @@ asarUnpack:
win: win:
executableName: AIx executableName: AIx
icon: resources/logo2.ico icon: resources/logo2.ico
nsis: extraFiles:
- from: ./node_modules/im_electron_sdk/lib/
to: ./resources
filter:
- '**/*'
nsis:
oneClick: false oneClick: false
allowToChangeInstallationDirectory: true allowToChangeInstallationDirectory: true
artifactName: ${name}-${version}-setup.${ext} artifactName: ${name}-${version}-setup.${ext}

View File

@ -15,10 +15,10 @@ win:
icon: resources/logo2.ico icon: resources/logo2.ico
extraFiles: extraFiles:
- from: ./node_modules/im_electron_sdk/lib/ - from: ./node_modules/im_electron_sdk/lib/
- to: ./resources to: ./resources
- filter: filter:
- '**/*' - '**/*'
nsis: nsis:
oneClick: false oneClick: false
allowToChangeInstallationDirectory: true allowToChangeInstallationDirectory: true
artifactName: ${name}-${version}-setup.${ext} artifactName: ${name}-${version}-setup.${ext}

View File

@ -62,5 +62,18 @@
"vite-plugin-windicss": "^1.9.3", "vite-plugin-windicss": "^1.9.3",
"vue": "^3.4.30", "vue": "^3.4.30",
"windicss": "^3.5.6" "windicss": "^3.5.6"
},
"build": {
"win": {
"extraFiles": [
{
"from": "./node_modules/im_electron_sdk/lib/",
"to": "./resources",
"filter": [
"**/*"
]
}
]
}
} }
} }

View File

@ -110,7 +110,7 @@ export const createWindow = async (type, data) => {
wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口 wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口 wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见 wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
// win.webContents.openDevTools() // 打开调试工具 // wins_tool.webContents.openDevTools() // 打开调试工具
eventHandles(type, wins_tool) // 事件监听处理 eventHandles(type, wins_tool) // 事件监听处理
return wins_tool return wins_tool
} }