更新项目文件说明
This commit is contained in:
74
README.md
74
README.md
@@ -149,6 +149,80 @@ npm run build
|
||||
|
||||
```
|
||||
|
||||
### 文档说明
|
||||
|
||||
- 总的项目文档树
|
||||
|
||||
```bash
|
||||
.
|
||||
├── app.csv
|
||||
├── bin
|
||||
│ ├── builders
|
||||
│ ├── cli.ts
|
||||
│ ├── defaults.ts
|
||||
│ ├── helpers
|
||||
│ ├── options
|
||||
│ ├── README_EN.md
|
||||
│ ├── README.md
|
||||
│ ├── types.ts
|
||||
│ └── utils
|
||||
├── cli.js
|
||||
├── CODE_OF_CONDUCT.md
|
||||
├── CONTRIBUTING.md
|
||||
├── dist
|
||||
│ └── cli.js
|
||||
├── icns2png.py
|
||||
├── LICENSE
|
||||
├── package.json
|
||||
├── pake-default.icns
|
||||
├── README_EN.md
|
||||
├── README.md
|
||||
├── rollup.config.js
|
||||
├── script
|
||||
│ ├── build.bat
|
||||
│ ├── build.sh
|
||||
│ ├── sd-apple-x64
|
||||
│ ├── sd.exe
|
||||
│ └── sd-linux-x64
|
||||
├── src-tauri
|
||||
│ ├── assets
|
||||
│ ├── build.rs
|
||||
│ ├── Cargo.lock
|
||||
│ ├── Cargo.toml
|
||||
│ ├── icons
|
||||
│ ├── png
|
||||
│ ├── src
|
||||
│ ├ ├──main.rs
|
||||
│ ├ └──pake.js
|
||||
│ ├── tauri.conf.json
|
||||
│ ├── tauri.linux.conf.json
|
||||
│ ├── tauri.macos.conf.json
|
||||
│ └── tauri.windows.conf.json
|
||||
└── tsconfig.json
|
||||
```
|
||||
|
||||
- app.csv:用于bash/bat命令批量替换打包。
|
||||
- bin:采用TypeScript编写,为pake-cli,即pake命令行打包工具的源码,可以使用`npm run cli:build`来生成最终配置文件`dist\cli.js`。
|
||||
- cli.js:pake-cli的入口文件,该文件调用`dist\cli.js`文件,基本不用修改,可以忽略。
|
||||
- dist\cli.js:由`npm run cli:build`生成。
|
||||
- icns2png.py:python3编写,用于将Mac默认的icns图标转化为windows/Linux的ico与png格式图标。
|
||||
- package.json:npm模块依赖配置文件,运行`npm i`与`npm run xxx`时候需要用到该文件,用于构建基础开发环境。
|
||||
- pake-default.icns:pake默认的图标,适用于MacOS。
|
||||
- script:用于批量打包多个app的脚本,内置了[sd](https://github.com/chmln/sd)二进制包。可以用`npm run build:all-unix`和`npm run build:all-windows`分别调用Mac/Linux与Windows的批量打包功能。
|
||||
- src-tauri/assets:储存了一个Linux的desktop图标配置文件和Windows msi安装配置文件。
|
||||
- src-tauri/build.rs:tauri编译入口,基本不用修改,可忽略。
|
||||
- src-tauri/Cargo.lock:cargo包管理配置结果文件,可忽略。
|
||||
- src-tauri/Cargo.toml:cargo包依赖配置文件,用于管理各个crate版本信息,基本不用修改,可忽略。
|
||||
- src-tauri/icons:储存了一系列icns格式的图标文件,适用于MacOS应用图标。
|
||||
- src-tauri/png:由上面的icons文件夹生成,储存了ico与png格式文件,适用于Linux/Windows的应用图标。
|
||||
- src-tauri/src/main.rc:主程序文件,需要修改程序,跨平台移植方案,重点修改这个。
|
||||
- src-tauri/src/pake.js:主程序文件配套的js代码,用于添加快捷键监听,页面渲染效果等等。
|
||||
- src-tauri/tauri.conf.json:主配置文件,用于控制包名,版本号,打开链接,窗口大小等等。
|
||||
- src-tauri/tauri.linux.conf.json:Linux平台编译时用到的配置文件,包含Linux专用图标,维护者,二进制格式,映射相关等等。
|
||||
- src-tauri/tauri.macos.conf.json:MacOS平台编译时用到的配置文件,包含MacOS专用图标,维护者,二进制格式等等。
|
||||
- src-tauri/tauri.windows.conf.json:Windows平台编译时用到的配置文件,包含Windows专用图标,维护者,二进制格式,左上角小图标映射相关等等。
|
||||
- tsconfig.json:TypeScript配置,基本不需要修改,可忽略。
|
||||
|
||||
## 打新包
|
||||
|
||||
1. 修改 `src-tauri` 目录下的 `tauri.conf.json` 中的 `url、productName、icon、identifier` 这 4 个字段,其中 icon 可以从 icons 目录选择一个,也可以去 [macOSicons](https://macosicons.com/#/) 下载符合产品名称的
|
||||
|
||||
74
README_EN.md
74
README_EN.md
@@ -148,6 +148,80 @@ npm run build
|
||||
|
||||
```
|
||||
|
||||
### Document Description
|
||||
|
||||
- file tree
|
||||
|
||||
```bash
|
||||
.
|
||||
├── app.csv
|
||||
├── bin
|
||||
│ ├── builders
|
||||
│ ├── cli.ts
|
||||
│ ├── defaults.ts
|
||||
│ ├── helpers
|
||||
│ ├── options
|
||||
│ ├── README_EN.md
|
||||
│ ├── README.md
|
||||
│ ├── types.ts
|
||||
│ └── utils
|
||||
├── cli.js
|
||||
├── CODE_OF_CONDUCT.md
|
||||
├── CONTRIBUTING.md
|
||||
├── dist
|
||||
│ └── cli.js
|
||||
├── icns2png.py
|
||||
├── LICENSE
|
||||
├── package.json
|
||||
├── pake-default.icns
|
||||
├── README_EN.md
|
||||
├── README.md
|
||||
├── rollup.config.js
|
||||
├── script
|
||||
│ ├── build.bat
|
||||
│ ├── build.sh
|
||||
│ ├── sd-apple-x64
|
||||
│ ├── sd.exe
|
||||
│ └── sd-linux-x64
|
||||
├── src-tauri
|
||||
│ ├── assets
|
||||
│ ├── build.rs
|
||||
│ ├── Cargo.lock
|
||||
│ ├── Cargo.toml
|
||||
│ ├── icons
|
||||
│ ├── png
|
||||
│ ├── src
|
||||
│ ├ ├──main.rs
|
||||
│ ├ └──pake.js
|
||||
│ ├── tauri.conf.json
|
||||
│ ├── tauri.linux.conf.json
|
||||
│ ├── tauri.macos.conf.json
|
||||
│ └── tauri.windows.conf.json
|
||||
└── tsconfig.json
|
||||
```
|
||||
|
||||
- app.csv:Used for batch replacement and packaging of bash/bat command.
|
||||
- bin:It is written in TypeScript and is the source code of the Pake cli, the Pake command line packaging tool. You can use `npm run cli: build` to generate the final configuration file 'dist cli. js'.
|
||||
- cli.js:The entry file of pake-cli. This file calls the 'dist cli. js' file, which is basically not modified and can be ignored.
|
||||
- dist\cli.js:Generated by `npm run cli: build`.
|
||||
- icns2png.py:Written in python 3, it is used to convert Mac default icns icons to windows/Linux icons in ico and png formats.
|
||||
- package.json:The npm module depends on the configuration file, which is used to build the basic development environment when running `npm i` and `npm run xxx`.
|
||||
- pake-default.icns:The default icon of pake, applicable to MacOS.
|
||||
- script:A script for batch packaging multiple apps, with [sd]( https://github.com/chmln/sd) built-inBinary package. You can use `npm run build: all unix` and `npm run build: all windows` to call the batch packaging function of Mac/Linux and Windows respectively.
|
||||
- src-tauri/assets:It stores a Linux desktop icon configuration file and a Windows msi installation configuration file.
|
||||
- src-tauri/build.rs:The tauri compiler entry does not need to be modified and can be ignored.
|
||||
- src-tauri/Cargo.lock:The cargo package management configuration result file can be ignored.
|
||||
- src-tauri/Cargo.toml:The cargo package depends on the configuration file, which is used to manage the information of various crate versions. It basically does not need to be modified and can be ignored.
|
||||
- src-tauri/icons:A series of icon files in icns format are stored, which are suitable for MacOS application icons.
|
||||
- src-tauri/png:Generated from the icons folder above, it stores ico and png files, which are applicable to Linux/Windows application icons.
|
||||
- src-tauri/src/main.rc:The main program file needs to be modified. The cross platform migration scheme focuses on this.
|
||||
- src-tauri/src/pake.js:The js code matched with the main program file is used to add shortcut key monitoring, page rendering effects, and so on.
|
||||
- src-tauri/tauri.conf.json:The main configuration file is used to control the package name, version number, open link, window size, etc.
|
||||
- src-tauri/tauri.linux.conf.json:The configuration file used when compiling the Linux platform, including Linux specific icons, maintainers, binary formats, mapping, etc.
|
||||
- src-tauri/tauri.macos.conf.json:Configuration files used for compiling the MacOS platform, including MacOS specific icons, maintainers, binary formats, and so on.
|
||||
- src-tauri/tauri.windows.conf.json:The configuration file used when compiling the Windows platform, including Windows specific icons, maintainers, binary formats, small icon mapping in the upper left corner, and so on.
|
||||
- tsconfig.json:TypeScript configuration. It basically does not need to be modified and can be ignored.
|
||||
|
||||
## New pack
|
||||
|
||||
1. Modify the `tauri.conf.json` in the `src-tauri` directory to include 4 fields `url, productName, icon, identifier`, icon can be selected from the `icons` directory or downloaded from [macOSicons](https://macosicons.com/#/) to match the product.
|
||||
|
||||
Reference in New Issue
Block a user