Compare commits
5 Commits
d824620472
...
0f0c21144a
Author | SHA1 | Date |
---|---|---|
Jixun Wu | 0f0c21144a | |
Jixun Wu | a59ef69d2a | |
Jixun Wu | 4454fb8508 | |
Jixun Wu | 7f861a5142 | |
Jixun Wu | fd3b0aef75 |
|
@ -27,3 +27,6 @@ dist-ssr
|
||||||
# Files created when running "drone exec" locally
|
# Files created when running "drone exec" locally
|
||||||
/.pnpm-store/
|
/.pnpm-store/
|
||||||
/*.zip
|
/*.zip
|
||||||
|
|
||||||
|
/um-react-wry-*
|
||||||
|
/um-react*.exe
|
||||||
|
|
|
@ -79,6 +79,10 @@
|
||||||
- [Unlock Music (Cli)](https://git.unlock-music.dev/um/cli) - 命令行批量处理版
|
- [Unlock Music (Cli)](https://git.unlock-music.dev/um/cli) - 命令行批量处理版
|
||||||
- [um-react (Electron 前端)](https://github.com/CarlGao4/um-react-electron) - 使用 Electron 框架封装的本地可执行文件。
|
- [um-react (Electron 前端)](https://github.com/CarlGao4/um-react-electron) - 使用 Electron 框架封装的本地可执行文件。
|
||||||
- [GitHub 下载](https://github.com/CarlGao4/um-react-electron/releases/latest) | [仓库镜像](https://git.unlock-music.dev/CarlGao4/um-react-electron)
|
- [GitHub 下载](https://github.com/CarlGao4/um-react-electron/releases/latest) | [仓库镜像](https://git.unlock-music.dev/CarlGao4/um-react-electron)
|
||||||
|
- [um-react-wry](https://git.unlock-music.dev/um/um-react-wry) - 使用 WRY 框架封装的 Win64 单文件 (需要[安装 Edge WebView2 运行时][webview2_redist],Win10+ 操作系统自带)
|
||||||
|
- [本地下载](https://git.unlock-music.dev/um/um-react/releases/latest) | 寻找文件名为 `um-react-win64-` 开头的附件
|
||||||
|
|
||||||
|
[webview2_redist]: https://go.microsoft.com/fwlink/p/?LinkId=2124703
|
||||||
|
|
||||||
有新的项目提交?欢迎[提交 issue][project-issues],请带上项目名称和链接。
|
有新的项目提交?欢迎[提交 issue][project-issues],请带上项目名称和链接。
|
||||||
|
|
||||||
|
|
|
@ -33,3 +33,31 @@ pnpm build
|
||||||
如果需要预览构建版本,运行 `pnpm preview` 然后打开[项目预览页面][vite-preview-url]即可。
|
如果需要预览构建版本,运行 `pnpm preview` 然后打开[项目预览页面][vite-preview-url]即可。
|
||||||
|
|
||||||
[vite-preview-url]: http://localhost:4173/
|
[vite-preview-url]: http://localhost:4173/
|
||||||
|
|
||||||
|
## 打包 `.zip`
|
||||||
|
|
||||||
|
建议在 Linux 环境下执行,可参考 `.drone.yml` CI 文件。
|
||||||
|
|
||||||
|
1. 确保上述的构建步骤已完成。
|
||||||
|
2. 确保 `python3` 已安装。
|
||||||
|
3. 执行下述代码
|
||||||
|
```sh
|
||||||
|
python3 -m zipfile -c um-react.zip dist/.
|
||||||
|
```
|
||||||
|
|
||||||
|
## 打包 win64 单文件
|
||||||
|
|
||||||
|
利用 Windows 系统自带的 [Edge WebView2 组件](https://learn.microsoft.com/zh-cn/microsoft-edge/webview2/)
|
||||||
|
和 [wry](https://github.com/tauri-apps/wry) 进行一个单文件的打包。
|
||||||
|
|
||||||
|
大部分 Windows 10 或以上版本的操作系统已经集成了 WebView2 运行时。若无法正常启动,请[下载并安装 Edge WebView2 运行时](https://go.microsoft.com/fwlink/p/?LinkId=2124703)。
|
||||||
|
|
||||||
|
其它系统兼容性未知。
|
||||||
|
|
||||||
|
1. 确保你现在在 `linux-amd64` 环境下。
|
||||||
|
2. 确保上述的 `um-react.zip` 构建已完成。
|
||||||
|
3. 执行下述代码
|
||||||
|
```sh
|
||||||
|
./scripts/make-win64.sh
|
||||||
|
```
|
||||||
|
4. 等待提示 `[Build OK]` 即可。
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "um-react",
|
"name": "um-react",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.2.6",
|
"version": "0.2.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
|
||||||
|
|
||||||
|
dl_file() {
|
||||||
|
local FILE="$1"
|
||||||
|
if [[ ! -f "$FILE" ]]; then
|
||||||
|
curl -fsL "https://um-react.app/files/${FILE}.gz" | gzip -d >"${FILE}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
dl_file "um-react-wry-builder-0.1.0-linux-amd64"
|
||||||
|
dl_file "um-react-wry-stub-0.1.0-win64.exe"
|
||||||
|
chmod a+x um-react-wry-builder-0.1.0-linux-amd64
|
||||||
|
|
||||||
|
APP_VERSION="$(jq -r '.version' <package.json)"
|
||||||
|
EXE_NAME="um-react-win64-${APP_VERSION}.exe"
|
||||||
|
ZIP_NAME="um-react-win64-${APP_VERSION}.zip"
|
||||||
|
./um-react-wry-builder-0.1.0-linux-amd64 \
|
||||||
|
-t um-react-wry-stub-0.1.0-win64.exe \
|
||||||
|
-r um-react.zip \
|
||||||
|
-o "${EXE_NAME}"
|
||||||
|
|
||||||
|
touch -d 1970-01-01T00:00:00Z "${EXE_NAME}"
|
||||||
|
zip -9oX "${ZIP_NAME}" -- "${EXE_NAME}"
|
||||||
|
echo "[Build OK] '${ZIP_NAME}'."
|
||||||
|
|
||||||
|
popd
|
|
@ -95,8 +95,36 @@ export function OtherFAQ() {
|
||||||
<Code>um-react-electron</Code>
|
<Code>um-react-electron</Code>
|
||||||
</strong>
|
</strong>
|
||||||
</ExtLink>
|
</ExtLink>
|
||||||
: 利用 Electron 框架打包的本地版,提供适用于 Windows、Linux 和 Mac 平台的可执行文件。
|
:利用 Electron 框架打包的本地版,提供适用于 Windows、Linux 和 Mac 平台的可执行文件。
|
||||||
</Text>
|
</Text>
|
||||||
|
<UnorderedList>
|
||||||
|
<ListItem>
|
||||||
|
<Text>
|
||||||
|
<ExtLink href="https://github.com/CarlGao4/um-react-electron/releases/latest">GitHub 下载</ExtLink>
|
||||||
|
</Text>
|
||||||
|
</ListItem>
|
||||||
|
</UnorderedList>
|
||||||
|
</ListItem>
|
||||||
|
<ListItem>
|
||||||
|
<Text>
|
||||||
|
<ExtLink href="https://git.unlock-music.dev/um/um-react-wry">
|
||||||
|
<strong>
|
||||||
|
<Code>um-react-wry</Code>
|
||||||
|
</strong>
|
||||||
|
</ExtLink>
|
||||||
|
: 使用 WRY 框架封装的 Win64 单文件(需要
|
||||||
|
<ExtLink href="https://go.microsoft.com/fwlink/p/?LinkId=2124703">安装 Edge WebView2 运行时</ExtLink>
|
||||||
|
{',Win10+ 操作系统自带)'}
|
||||||
|
</Text>
|
||||||
|
<UnorderedList>
|
||||||
|
<ListItem>
|
||||||
|
<Text>
|
||||||
|
<ExtLink href="https://git.unlock-music.dev/um/um-react/releases/latest">仓库下载</ExtLink>
|
||||||
|
{' | 寻找文件名为 '}
|
||||||
|
<Code>um-react-win64-</Code> 开头的附件
|
||||||
|
</Text>
|
||||||
|
</ListItem>
|
||||||
|
</UnorderedList>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</UnorderedList>
|
</UnorderedList>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue