Skip to content

Commit

Permalink
fix: 🐛 修复打包后图标丢失的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Oct 16, 2023
1 parent 73c6713 commit 58a66f1
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 81 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: true
files: |
dist-release/*.exe
dist-release/*.zip
Expand All @@ -60,4 +61,4 @@ jobs:
dist-release/*.yml
dist-release/*.blockmap
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
51 changes: 33 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

📱 使用图形界面的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动

📱 Use Scrcpy with a graphical interface to display and control your Android device, driven by Electron

<div style="display:flex;">
<img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/570065a5683b4cf7af9cfa9743c06ab4~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1360&h=693&s=140693&e=jpg&b=ffffff" alt="viarotel-escrcpy" style="width: 100%;">
</div>
Expand All @@ -15,7 +13,7 @@
- ⚡️ 性能:30~120 帧每秒,取决于设备
- 🌟 质量:1920×1080 或更高
- 🕒 低延迟:35~70 毫秒
- 🚀 快速启动:显示第一张图片仅需约1秒钟
- 🚀 快速启动:显示第一张图片仅需约 1 秒钟
- 🙅‍♂️ 非侵入性:不会在安卓设备上留下任何安装文件
- 🤩 用户收益:无需账户、无广告、无需互联网连接
- 🗽 自由:免费且开源软件
Expand All @@ -39,7 +37,7 @@

> 注意:如果首次无线连接失败,你可能需要无线配对请参阅 [常见问题](#常见问题)
>
> 注意:需同时开启无线调试功能,并在无线调试页面中获取你的当前设备的无线地址(通常为你连接WIFI时分配的IP地址)及端口号(默认为 5555)
> 注意:需同时开启无线调试功能,并在无线调试页面中获取你的当前设备的无线地址(通常为你连接 WIFI 时分配的 IP 地址)及端口号(默认为 5555)
1. 同 USB 连接中的 1-2 步骤
2. 将获取到的设备 IP 地址及端口号填写到 Escrcpy 中,然后点击连接设备
Expand All @@ -54,29 +52,43 @@

> 持续完善中 目前支持 Scrcpy 中以下常用配置
### 显示配置
### 视频控制

- 分辨率
- 比特率
- 刷新率
- 屏幕旋转
- 视频解码器
- 视频编码器
- 屏幕旋转
- 屏幕裁剪
- 多显示器
- 视频缓冲
- 音频缓冲
- 接收器(v4l2)缓冲
- 禁用视频

### 设备控制

- 保持设备清醒
- 连接设备后自动关闭屏幕

### 音频控制

- 镜像时禁用音频
- 展示触摸点
- 保持清醒
- 控制时关闭屏幕
- 控制结束关闭屏幕
- 控制时停止充电

### 窗口控制

- 无边框模式
- 全屏幕模式

### 音视频录制

- 文件保存路径
- 录制视频格式

### 音频控制

- 禁用音频

## 下一步做什么?

> 优先级从高到低
Expand All @@ -85,10 +97,11 @@
2. 内置的软件更新功能 ✅
3. 录制和保存音视频 ✅
4. 添加设备快捷交互控制栏 ✅
5. 支持自定义 Adb 及 Scrcpy 依赖,并支持生成精简版本和完整版本以满足不同用户需求
6. 添加 macOS 及 linux 操作系统的支持 🚧
7. 支持语言国际化功能 🚧
8. 添加对游戏的增强功能,如游戏键位映射 🚧
5. 支持自定义 Adb 及 Scrcpy 依赖,并支持生成精简版本和完整版本以满足不同用户需求 🚧
6. 支持自定义设备名称,以及用户配置的导出及导入 🚧
7. 添加 macOS 及 linux 操作系统的支持 🚧
8. 支持语言国际化功能 🚧
9. 添加对游戏的增强功能,如游戏键位映射 🚧

## 常见问题

Expand All @@ -102,7 +115,7 @@
该问题是已知的, Scrcpy 似乎并未直接对中文输入进行测试和支持 需要在手机端安装第三方输入法 以下输入法经测试可以很好支持

- 搜狗输入法
- QQ输入法
- QQ 输入法
- 谷歌拼音输入法
- Gboard

Expand All @@ -115,7 +128,7 @@

### 无线连接提示: 目标计算机积极拒绝访问

第一次无线连接可能需要配对 或 插入USB 以保证与电脑建立连接即授权成功后方可使用
第一次无线连接可能需要配对 或 插入 USB 以保证与电脑建立连接即授权成功后方可使用

### 通过数据线连接后点击无线模式没有反应

Expand Down Expand Up @@ -148,6 +161,8 @@

> 如果该项目帮到你的话,可以请我吃包辣条,可以使我更有动力完善该项目
> 注意:非 BUG 或计划外的需求,有偿处理;至于金额,根据问题难易程度,你觉得帮助了多少,看着给吧(维护这些项目已经耗费了大量精力,还要免费花时间解答问题就说不过去了吧...所以白嫖的一律不通过。)
<div style="display:flex;">
<img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/79dcbc40246743e2b6870419e88e0392~tplv-k3u1fbpfcp-watermark.image?" alt="viarotel-wepay" style="width: 36%;">
<img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1e5e69b83dd746deade95afd4a6864ec~tplv-k3u1fbpfcp-watermark.image?" alt="viarotel-alipay" style="width: 36%;">
Expand Down
10 changes: 0 additions & 10 deletions binary.js

This file was deleted.

18 changes: 15 additions & 3 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
"appId": "org.viarotel.escrcpy",
"asar": true,
"productName": "escrcpy",
"productName": "Escrcpy",
"directories": {
"output": "dist-release/${version}",
"buildResources": "electron/resources/build"
Expand All @@ -16,10 +16,20 @@
"updaterCacheDirName": "escrcpy-updater"
},
"mac": {
"icon": "logo.icns",
"target": ["dmg"],
"artifactName": "${productName}-${version}-mac-installer.${ext}"
"artifactName": "${productName}-${version}-mac-installer.${ext}",
"entitlementsInherit": "electron/resources/build/entitlements.mac.plist",
"extendInfo": {
"NSCameraUsageDescription": "Application requests access to the device's camera.",
"NSMicrophoneUsageDescription": "Application requests access to the device's microphone.",
"NSDocumentsFolderUsageDescription": "Application requests access to the user's Documents folder.",
"NSDownloadsFolderUsageDescription": "Application requests access to the user's Downloads folder."
},
"notarize": false
},
"win": {
"icon": "logo.ico",
"target": [
{
"target": "nsis",
Expand All @@ -45,7 +55,9 @@
"requestExecutionLevel": "user"
},
"linux": {
"icon": "logo.png",
"target": ["AppImage"],
"artifactName": "${productName}-${version}-linux.${ext}"
}
},
"npmRebuild": false
}
2 changes: 1 addition & 1 deletion electron/exposes/adbkit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const watch = async (callback) => {

export default () => {
client = Adb.createClient({ bin: adbPath })
console.log('client', client)
// console.log('client', client)

return {
shell,
Expand Down
8 changes: 5 additions & 3 deletions electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import path from 'node:path'
import { BrowserWindow, app, shell } from 'electron'
import { electronApp, optimizer } from '@electron-toolkit/utils'

import logoPath from '@resources/extra/icons/logo.png?path'
import icoLogoPath from '@resources/extra/icons/logo.ico?path'
import icnsLogoPath from '@resources/extra/icons/logo.icns?path'
import logoPath from '@resources/build/logo.png?path'
import icoLogoPath from '@resources/build/logo.ico?path'
import icnsLogoPath from '@resources/build/logo.icns?path'

import events from './events/index.js'

console.log('logoPath', logoPath)

// The built directory structure
//
// ├─┬─┬ dist
Expand Down
12 changes: 12 additions & 0 deletions electron/resources/build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>
File renamed without changes.
File renamed without changes.
File renamed without changes
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
"scripts": {
"dev": "vite",
"build": "vite build && electron-builder",
"build:win": "vite build && electron-builder --win",
"build:mac": "vite build && electron-builder --mac",
"build:linux": "vite build && electron-builder --linux",
"preview": "vite preview",
"lint": "eslint . --ext .md,.vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .eslintignore --fix"
"lint": "eslint . --ext .md,.vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .eslintignore --fix",
"postinstall": "electron-builder install-app-deps"
},
"dependencies": {
"vue": "^3.3.4"
Expand All @@ -23,6 +27,7 @@
"@viarotel-org/eslint-config": "^0.7.0",
"@viarotel-org/postcss-config": "^0.7.0",
"@viarotel-org/unocss-config": "^0.7.4",
"@viarotel-org/vite-plugin-path": "^0.8.1",
"@vitejs/plugin-vue": "^4.3.4",
"dayjs": "^1.11.10",
"electron": "^26.1.0",
Expand Down
33 changes: 26 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 0 additions & 34 deletions public/electron-vite.animate.svg

This file was deleted.

Loading

0 comments on commit 58a66f1

Please sign in to comment.