mirror of
https://gitee.com/viarotel-org/escrcpy.git
synced 2024-11-29 18:01:34 +08:00
perf: 🚀 为 windows 添加 ARM64 软件包编译
This commit is contained in:
parent
83601984ec
commit
368e8ee455
4
.github/workflows/release-assets.yml
vendored
4
.github/workflows/release-assets.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
- os: macos-latest
|
||||
arch: [arm64, amd64]
|
||||
- os: windows-latest
|
||||
arch: amd64
|
||||
arch: [arm64, amd64]
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v3
|
||||
@ -66,4 +66,4 @@ jobs:
|
||||
dist-release/*.yml
|
||||
dist-release/*.blockmap
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
@ -15,7 +15,7 @@
|
||||
"updaterCacheDirName": "escrcpy-updater"
|
||||
},
|
||||
"nsis": {
|
||||
"artifactName": "${productName}-${version}-win-setup.${ext}",
|
||||
"artifactName": "${productName}-${version}-win-setup-${arch}.${ext}",
|
||||
"shortcutName": "${productName}",
|
||||
"uninstallDisplayName": "${productName}",
|
||||
"oneClick": false,
|
||||
@ -24,7 +24,7 @@
|
||||
"deleteAppDataOnUninstall": false
|
||||
},
|
||||
"portable": {
|
||||
"artifactName": "${productName}-${version}-win-portable.${ext}",
|
||||
"artifactName": "${productName}-${version}-win-portable-${arch}.${ext}",
|
||||
"requestExecutionLevel": "user"
|
||||
},
|
||||
"win": {
|
||||
@ -32,17 +32,18 @@
|
||||
"target": [
|
||||
{
|
||||
"target": "nsis",
|
||||
"arch": ["x64"]
|
||||
"arch": ["x64", "arm64"]
|
||||
},
|
||||
{
|
||||
"target": "zip",
|
||||
"arch": ["x64"]
|
||||
"arch": ["x64", "arm64"]
|
||||
},
|
||||
{
|
||||
"target": "portable",
|
||||
"arch": ["x64"]
|
||||
"arch": ["x64", "arm64"]
|
||||
}
|
||||
],
|
||||
"artifactName": "${productName}-${version}-win-${arch}.${ext}",
|
||||
"extraResources": {
|
||||
"from": "electron/resources/extra",
|
||||
"to": "extra"
|
||||
|
@ -11,6 +11,9 @@ export const logoPath = buildResolve('logo.png')
|
||||
export const icoLogoPath = buildResolve('logo.ico')
|
||||
export const icnsLogoPath = buildResolve('logo.icns')
|
||||
|
||||
export const trayPath = extraResolve('tray.png')
|
||||
export const macTrayPath = extraResolve('tray-Template.png')
|
||||
|
||||
export const adbPath
|
||||
= process.platform === 'win32'
|
||||
? extraResolve('core/adb.exe')
|
||||
|
@ -5,12 +5,11 @@ import handles from './handles/index.js'
|
||||
import tray from './tray/index.js'
|
||||
|
||||
export default (mainWindow) => {
|
||||
handles(mainWindow)
|
||||
updater(mainWindow)
|
||||
tray(mainWindow)
|
||||
|
||||
ipcMain.on('restart-app', () => {
|
||||
app.relaunch()
|
||||
app.quit()
|
||||
})
|
||||
handles(mainWindow)
|
||||
updater(mainWindow)
|
||||
tray(mainWindow)
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Menu, Tray, app, dialog } from 'electron'
|
||||
import { logoPath } from '@electron/configs/index'
|
||||
import { macTrayPath, trayPath } from '@electron/configs/index'
|
||||
import appStore from '@electron/helpers/store.js'
|
||||
|
||||
export default (mainWindow) => {
|
||||
@ -29,7 +29,9 @@ export default (mainWindow) => {
|
||||
else if (response === 1) {
|
||||
mainWindow.hide()
|
||||
|
||||
tray = new Tray(logoPath)
|
||||
const trayIcon = process.platform === 'darwin' ? macTrayPath : trayPath
|
||||
|
||||
tray = new Tray(trayIcon)
|
||||
|
||||
tray.setToolTip('escrcpy')
|
||||
|
||||
@ -44,6 +46,13 @@ export default (mainWindow) => {
|
||||
showApp()
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '重启服务',
|
||||
click: () => {
|
||||
app.relaunch()
|
||||
quitApp()
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '退出',
|
||||
click: () => {
|
||||
@ -84,8 +93,8 @@ export default (mainWindow) => {
|
||||
checkboxLabel: '是否记住选择?',
|
||||
})
|
||||
|
||||
console.log('response', response)
|
||||
console.log('checkboxChecked', checkboxChecked)
|
||||
// console.log('response', response)
|
||||
// console.log('checkboxChecked', checkboxChecked)
|
||||
|
||||
if (checkboxChecked) {
|
||||
appStore.set('appCloseCode', response)
|
||||
|
@ -10,7 +10,7 @@ export const extraResolve = (value) => {
|
||||
}
|
||||
|
||||
export const buildResolve = value =>
|
||||
resolve(`electron/resources/build/${value}`)
|
||||
resolve(process.env.CWD, `electron/resources/build/${value}`)
|
||||
|
||||
export function exposeContext(key, value) {
|
||||
if (process.contextIsolated) {
|
||||
|
@ -11,3 +11,5 @@ if (process.platform === 'darwin') {
|
||||
process.env.IS_PACKAGED = JSON.stringify(app.isPackaged)
|
||||
|
||||
process.env.DESKTOP_PATH = app.getPath('desktop')
|
||||
|
||||
process.env.CWD = process.cwd()
|
||||
|
BIN
electron/resources/extra/tray-Template.png
Normal file
BIN
electron/resources/extra/tray-Template.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 78 KiB |
BIN
electron/resources/extra/tray.png
Normal file
BIN
electron/resources/extra/tray.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 78 KiB |
Loading…
Reference in New Issue
Block a user