更新项目文件说明

This commit is contained in:
Tlntin
2022-12-11 17:24:21 +08:00
parent 23d3a750d6
commit f130a40b88
2 changed files with 148 additions and 0 deletions

View File

@@ -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.csvUsed for batch replacement and packaging of bash/bat command.
- binIt 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.jsThe entry file of pake-cli. This file calls the 'dist cli. js' file, which is basically not modified and can be ignored.
- dist\cli.jsGenerated by `npm run cli: build`.
- icns2png.pyWritten in python 3, it is used to convert Mac default icns icons to windows/Linux icons in ico and png formats.
- package.jsonThe 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.icnsThe default icon of pake, applicable to MacOS.
- scriptA 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/assetsIt stores a Linux desktop icon configuration file and a Windows msi installation configuration file.
- src-tauri/build.rsThe tauri compiler entry does not need to be modified and can be ignored.
- src-tauri/Cargo.lockThe cargo package management configuration result file can be ignored.
- src-tauri/Cargo.tomlThe 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/iconsA series of icon files in icns format are stored, which are suitable for MacOS application icons.
- src-tauri/pngGenerated from the icons folder above, it stores ico and png files, which are applicable to Linux/Windows application icons.
- src-tauri/src/main.rcThe main program file needs to be modified. The cross platform migration scheme focuses on this.
- src-tauri/src/pake.jsThe 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.jsonThe main configuration file is used to control the package name, version number, open link, window size, etc.
- src-tauri/tauri.linux.conf.jsonThe configuration file used when compiling the Linux platform, including Linux specific icons, maintainers, binary formats, mapping, etc.
- src-tauri/tauri.macos.conf.jsonConfiguration files used for compiling the MacOS platform, including MacOS specific icons, maintainers, binary formats, and so on.
- src-tauri/tauri.windows.conf.jsonThe 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.jsonTypeScript 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.