restore document
This commit is contained in:
89
bin/README.md
vendored
89
bin/README.md
vendored
@@ -1,15 +1,39 @@
|
||||
## 安装
|
||||
|
||||
请确保 Node 版本>=16 如 16.8,不要使用 sudo 进行安装,假如 npm 报没有权限可以参考 [How to fix npm throwing error without sudo](https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo)。
|
||||
|
||||
```bash
|
||||
npm install -g pake-cli
|
||||
```
|
||||
|
||||
如果安装失败提示没有权限,请参考该贴解决:[链接](https://gist.github.com/Giancarlos/d087f8a9e6516716da98ad0c0f5a8f58)。
|
||||
## Windows/Linux 注意点
|
||||
|
||||
此外,请确保你使用的是正确的 Node.js 版本(`^14.13 || >=16.0.0`)。如果你在使用 [nvm](https://github.com/nvm-sh/nvm) 进行 Node.js 版本管理,可以尝试在项目的目录下运行 `nvm use`,就会拿到正确的版本;其他一众 Node.js 版本工具,比如 [fnm](https://github.com/Schniz/fnm)、[tj/n](https://github.com/tj/n) 应该也有类似的功能。
|
||||
- **十分重要** 查看 Tauri 提供的[依赖指南](https://tauri.app/v1/guides/getting-started/prerequisites)
|
||||
- 对于 windows(至少安装了`Win10 SDK(10.0.19041.0)` 与`Visual Studio build tool 2022(>=17.2)`),还需要额外安装:
|
||||
|
||||
**尽量不要使用 `sudo` 权限**。 如果实在要用 sudo,请手动安装 rust 到系统环境。Mac 可以用 brew 命令安装,Linux 如 Ubuntu 可以用 apt 命令安装。
|
||||
1. Microsoft Visual C++ 2015-2022 Redistributable (x64)
|
||||
2. Microsoft Visual C++ 2015-2022 Redistributable (x86)
|
||||
3. Microsoft Visual C++ 2012 Redistributable (x86)(可选)
|
||||
4. Microsoft Visual C++ 2013 Redistributable (x86)(可选)
|
||||
5. Microsoft Visual C++ 2008 Redistributable (x86)(可选)
|
||||
|
||||
- 此外 Ubuntu 在开始之前可以运行如下命令,安装前期所需依赖。
|
||||
|
||||
```bash
|
||||
sudo apt install libdbus-1-dev \
|
||||
libsoup2.4-dev \
|
||||
libjavascriptcoregtk-4.0-dev \
|
||||
libwebkit2gtk-4.0-dev \
|
||||
build-essential \
|
||||
curl \
|
||||
wget \
|
||||
libssl-dev \
|
||||
libgtk-3-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
librsvg2-dev \
|
||||
gnome-video-effects \
|
||||
gnome-video-effects-extra
|
||||
```
|
||||
|
||||
## 用法
|
||||
|
||||
@@ -19,11 +43,12 @@ pake url [options]
|
||||
|
||||
打包完成后的应用程序默认为当前工作目录,首次打包由于需配置好环境,需要一些时间,请耐心等待即可。
|
||||
|
||||
Note: 打包需要用 `Rust` 环境,如果没有 `Rust`,会提示确认安装。如遇安装失败或超时,可[自行安装](https://www.rust-lang.org/tools/install)。
|
||||
> **Note**:
|
||||
> 打包需要用 `Rust` 环境,如果没有 `Rust`,会提示确认安装。如遇安装失败或超时,可[自行安装](https://www.rust-lang.org/tools/install)。
|
||||
|
||||
### url
|
||||
|
||||
url 为你需要打包的网页链接 🔗或者本地html文件,必须提供。
|
||||
url 为你需要打包的网页链接 🔗 或者本地 html 文件,必须提供。
|
||||
|
||||
### [options]
|
||||
|
||||
@@ -35,6 +60,8 @@ url 为你需要打包的网页链接 🔗或者本地html文件,必须提供
|
||||
|
||||
```shell
|
||||
--name <value>
|
||||
# 或者
|
||||
-n <value>
|
||||
```
|
||||
|
||||
#### [icon]
|
||||
@@ -47,6 +74,8 @@ url 为你需要打包的网页链接 🔗或者本地html文件,必须提供
|
||||
|
||||
```shell
|
||||
--icon <path>
|
||||
# 或者
|
||||
-i <path>
|
||||
```
|
||||
|
||||
#### [height]
|
||||
@@ -55,6 +84,8 @@ url 为你需要打包的网页链接 🔗或者本地html文件,必须提供
|
||||
|
||||
```shell
|
||||
--height <number>
|
||||
# 或者
|
||||
-h <number>
|
||||
```
|
||||
|
||||
#### [width]
|
||||
@@ -63,11 +94,13 @@ url 为你需要打包的网页链接 🔗或者本地html文件,必须提供
|
||||
|
||||
```shell
|
||||
--width <number>
|
||||
# 或者
|
||||
-w <number>
|
||||
```
|
||||
|
||||
#### [transparent]
|
||||
|
||||
是否开启沉浸式头部,默认为 `false` 不开启,输入下面的命令则开启沉浸式,推荐MacOS用户开启。
|
||||
是否开启沉浸式头部,默认为 `false` 不开启,输入下面的命令则开启沉浸式,推荐 MacOS 用户开启。
|
||||
|
||||
```shell
|
||||
--transparent
|
||||
@@ -89,48 +122,6 @@ url 为你需要打包的网页链接 🔗或者本地html文件,必须提供
|
||||
--fullscreen
|
||||
```
|
||||
|
||||
#### [user-agent]
|
||||
|
||||
自定义浏览器请求头, 默认为空。
|
||||
|
||||
```shell
|
||||
--user-agent <value>
|
||||
```
|
||||
|
||||
#### [show-menu]
|
||||
|
||||
显示菜单栏, 默认不显示,输入下面的命令则会显示,推荐MacOS用户开启。
|
||||
|
||||
```shell
|
||||
--show-menu
|
||||
```
|
||||
|
||||
#### [show-system-tray]
|
||||
|
||||
显示通知栏托盘, 默认不显示,输入下面的命令则会显示。
|
||||
|
||||
```shell
|
||||
--show-system-tray
|
||||
```
|
||||
|
||||
#### [system-tray-icon]
|
||||
|
||||
通知栏托盘图标,仅当显示通知栏托盘时有效, 图标必须为.ico或者.png格式的,512*512像素的图片。
|
||||
|
||||
```shell
|
||||
--system-tray-icon <value>
|
||||
```
|
||||
|
||||
|
||||
#### [copy-iter-file]
|
||||
|
||||
递归拷贝,当url为本地文件路径时候,若开启该选项,则将url路径文件所在文件夹以及所有子文件都拷贝到pake静态文件夹,默认不开启
|
||||
|
||||
```shell
|
||||
--copy-iter-file
|
||||
```
|
||||
|
||||
|
||||
#### [multi-arch]
|
||||
|
||||
打包结果同时支持英特尔和 m1 芯片,仅适用于 MacOS,默认为 `false`。
|
||||
@@ -160,7 +151,7 @@ rustup target add x86_64-apple-darwin
|
||||
|
||||
#### [targets]
|
||||
|
||||
选择输出的包格式,支持deb/appimage/all,如果选择all,则同时打包deb和appimage,该选项仅支持Linux,默认为`all`。
|
||||
选择输出的包格式,支持 deb/appimage/all,如果选择 all,则同时打包 deb 和 appimage,该选项仅支持 Linux,默认为`all`。
|
||||
|
||||
```shell
|
||||
--targets xxx
|
||||
|
||||
Reference in New Issue
Block a user