Skip to content

Commit

Permalink
🐛 调整结构/升级wry支持手势/flomo地址替换
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Dec 7, 2022
1 parent af50514 commit d6ee153
Show file tree
Hide file tree
Showing 22 changed files with 54 additions and 157 deletions.
44 changes: 19 additions & 25 deletions docs/README.md → .github/workflows/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
# Github actions 编译配置教程

## 1.Fork本项目
## 1.Fork 本项目

[Fork本项目](https://github.com/tw93/Pake/fork)
[Fork 本项目](https://github.com/tw93/Pake/fork)

## 2.前往actions页面启用GitHub actions
## 2.前往 actions 页面启用 GitHub actions

![image-20221205230324046](assets/image-20221205230324046.png)





## 3.修改app.csv文件
## 3.修改 app.csv 文件

![image-20221205230432205](assets/image-20221205230432205.png)

修改app.csv文件,自行将第二行以后的内容替换成自定义内容
修改 app.csv 文件,自行将第二行以后的内容替换成自定义内容

![image-20221205230553980](assets/image-20221205230553980.png)

格式为:`Linux下应用名称,Mac和Windows下应用名称,中文名称,网址`,注意使用英文逗号分隔

## 4.上传图标

- 上传.icns文件至`/src-tauri/icons`目录下(必须)
- 上传.ico和.png文件至`/src-tauri/png`目录下(如果使用脚本自动转换可以跳过此步)

**注意:需要两个.ico文件和一个.png文件,参考下表**

- 上传.icns 文件至`/src-tauri/icons`目录下(必须)
- 上传.ico 和.png 文件至`/src-tauri/png`目录下(如果使用脚本自动转换可以跳过此步)

**注意:需要两个.ico 文件和一个.png 文件,参考下表**

| 文件名称 | 说明 |
| ----------- | ---------------- |
| app_32.ico | 32*32的ico图标 |
| app_256.ico | 256*256的ico图标 |
| app_512.png | 512*512的png图片 |
| 文件名称 | 说明 |
| ----------- | -------------------- |
| app_32.ico | 32\*32 的 ico 图标 |
| app_256.ico | 256\*256 的 ico 图标 |
| app_512.png | 512\*512 的 png 图片 |

> 你也可以直接git整个项目到本地,使用项目根目录下的icns2png.py文件批量将.icns文件转换成.ico和.png文件(.icns文件是必须的
> 你也可以直接 git 整个项目到本地,使用项目根目录下的 icns2png.py 文件批量将.icns 文件转换成.ico 和.png 文件(.icns 文件是必须的
>
> 转换完成后别忘了将对应文件上传
Expand All @@ -51,7 +45,7 @@

## 6.发布以开始运行自动编译

- 点击前往Releases页面
- 点击前往 Releases 页面

![image-20221205233624044](assets/image-20221205233624044.png)

Expand All @@ -61,7 +55,7 @@

![image-20221205233806355](assets/image-20221205233806355.png)

- 点击**Choose a tag**,输入`V0.1.0`(版本号可自定义,但是**必须以大写V开头**
- 点击**Choose a tag**,输入`V0.1.0`(版本号可自定义,但是**必须以大写 V 开头**

![image-20221205233956978](assets/image-20221205233956978.png)

Expand All @@ -70,10 +64,10 @@
![image-20221205234436283](assets/image-20221205234436283.png)

- 填写标题和内容(可选)
- 如果不是在`master`分支修改,需要在target下拉栏选择对应分支
- 如果不是在`master`分支修改,需要在 target 下拉栏选择对应分支
- 点击**Publish release**
- 此时,前往actions页面,确保出现新workflows
- 此时,前往 actions 页面,确保出现新 workflows

![image-20221205234306770](assets/image-20221205234306770.png)

在编译完成后,即可在release页面看到编译完成后生成的文件(编译大约需要10-30分钟
在编译完成后,即可在 release 页面看到编译完成后生成的文件(编译大约需要 10-30 分钟
18 changes: 6 additions & 12 deletions docs/README_EN.md → .github/workflows/docs/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

![image-20221205230324046](assets/image-20221205230324046.png)





## 3. Modify the app.csv file

![image-20221205230432205](assets/image-20221205230432205.png)
Expand All @@ -29,13 +25,11 @@ The format is: `Linux application name, Mac and Windows application name, Chines

**Note: Two .ico files and one .png file are required, refer to the table below**



| File Name | Description |
| ----------- | --------------------------------- |
| app_32.ico | A ico file with a size of 32*32 |
| app_256.ico | A ico file with a size of 256*256 |
| app_512.png | A png file with a size of 512*512 |
| File Name | Description |
| ----------- | ---------------------------------- |
| app_32.ico | A ico file with a size of 32\*32 |
| app_256.ico | A ico file with a size of 256\*256 |
| app_512.png | A png file with a size of 512\*512 |

> You can also directly git the entire project to the local, and use the icns2png.py file in the project root directory to batch convert .icns files into .ico and .png files (.icns files are required)
>
Expand Down Expand Up @@ -76,4 +70,4 @@ Refer to the picture below to customize the configuration. **It is recommended t

![image-20221205234306770](assets/image-20221205234306770.png)

After the compilation is completed, you can see the files generated after the compilation is completed on the release page (compilation takes about 10-30 minutes)
After the compilation is completed, you can see the files generated after the compilation is completed on the release page (compilation takes about 10-30 minutes)
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@

注意:Windows 下不能安装到 `C:\Program File`,会直接闪退,建议安装到其他非管理员权限目录,比如 `D:\Program Files (x86)`

对于轻度使用用户,使用 **GitHub Actions 在线编译多系统版本** 也是一个不错的选择,可查看[文档](/docs/README.md)

## 命令行打包

<kbd>
Expand All @@ -117,6 +115,8 @@ pake url [options]
pake https://weekly.tw93.fun --name Weekly --transparent
```

假如你是不太会使用命令行的小白,使用 **GitHub Actions 在线编译多系统版本** 也是一个不错的选择,可查看[文档](./.github/workflows/docs/README.md)

## 快捷键

| Mac | Windows/Linux | 功能 |
Expand Down Expand Up @@ -275,9 +275,9 @@ Pake 的发展离不开这些 Hacker 们,一起贡献了大量能力,也欢

## 支持

- 我有两只猫,一只叫汤圆,一只叫可乐,假如觉得 Pake 让你生活更美好,可以给汤圆可乐 <a href="https://miaoyan.app/cats.html?name=Pake" target="_blank">喂罐头 🥩🍤</a>。
- 如果你喜欢 Pake,可以在 Github Star,更欢迎 [推荐](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=Pake%20%E4%B8%80%E4%B8%AA%E5%BE%88%E7%AE%80%E5%8D%95%E7%9A%84%E7%94%A8%20Rust%20%E6%89%93%E5%8C%85%E7%BD%91%E9%A1%B5%E7%94%9F%E6%88%90%20Mac%20App%20%E7%9A%84%E5%B7%A5%E5%85%B7%EF%BC%8C%E7%9B%B8%E6%AF%94%E4%BC%A0%E7%BB%9F%E7%9A%84%20Electron%20%E5%A5%97%E5%A3%B3%E6%89%93%E5%8C%85%EF%BC%8C%E5%A4%A7%E5%B0%8F%E8%A6%81%E5%B0%8F%E5%B0%86%E8%BF%91%2040%20%E5%80%8D%EF%BC%8C%E4%B8%80%E8%88%AC%202M%20%E5%B7%A6%E5%8F%B3%EF%BC%8C%E5%BA%95%E5%B1%82%E4%BD%BF%E7%94%A8Tauri%20%EF%BC%8C%E6%80%A7%E8%83%BD%E4%BD%93%E9%AA%8C%E8%BE%83%20JS%20%E6%A1%86%E6%9E%B6%E8%A6%81%E8%BD%BB%E5%BF%AB%E4%B8%8D%E5%B0%91%EF%BC%8C%E5%86%85%E5%AD%98%E5%B0%8F%E5%BE%88%E5%A4%9A%EF%BC%8C%E6%94%AF%E6%8C%81%E5%BE%AE%E4%BF%A1%E8%AF%BB%E4%B9%A6%E3%80%81Twitter%E3%80%81Youtube%E3%80%81RunCode%E3%80%81Flomo%E3%80%81%E8%AF%AD%E9%9B%80%E7%AD%89%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%BE%88%E6%96%B9%E4%BE%BF%E4%BA%8C%E6%AC%A1%E5%BC%80%E5%8F%91~) 给你志同道合的朋友使用。
- 可以关注我的 [Twitter](https://twitter.com/HiTw93) 获取到最新的 Pake 更新消息,也欢迎加入 [Telegram](https://t.me/miaoyan) 聊天群。
- 我有两只猫,一只叫汤圆,一只叫可乐,假如觉得 Pake 让你生活更美好,可以给汤圆可乐 <a href="https://miaoyan.app/cats.html?name=Pake" target="_blank">喂罐头 🥩🍤</a>。
- 如果你喜欢 Pake,可以在 Github Star,更欢迎 [推荐](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=Pake%20%E4%B8%80%E4%B8%AA%E5%BE%88%E7%AE%80%E5%8D%95%E7%9A%84%E7%94%A8%20Rust%20%E6%89%93%E5%8C%85%E7%BD%91%E9%A1%B5%E7%94%9F%E6%88%90%20Mac%20App%20%E7%9A%84%E5%B7%A5%E5%85%B7%EF%BC%8C%E7%9B%B8%E6%AF%94%E4%BC%A0%E7%BB%9F%E7%9A%84%20Electron%20%E5%A5%97%E5%A3%B3%E6%89%93%E5%8C%85%EF%BC%8C%E5%A4%A7%E5%B0%8F%E8%A6%81%E5%B0%8F%E5%B0%86%E8%BF%91%2040%20%E5%80%8D%EF%BC%8C%E4%B8%80%E8%88%AC%202M%20%E5%B7%A6%E5%8F%B3%EF%BC%8C%E5%BA%95%E5%B1%82%E4%BD%BF%E7%94%A8Tauri%20%EF%BC%8C%E6%80%A7%E8%83%BD%E4%BD%93%E9%AA%8C%E8%BE%83%20JS%20%E6%A1%86%E6%9E%B6%E8%A6%81%E8%BD%BB%E5%BF%AB%E4%B8%8D%E5%B0%91%EF%BC%8C%E5%86%85%E5%AD%98%E5%B0%8F%E5%BE%88%E5%A4%9A%EF%BC%8C%E6%94%AF%E6%8C%81%E5%BE%AE%E4%BF%A1%E8%AF%BB%E4%B9%A6%E3%80%81Twitter%E3%80%81Youtube%E3%80%81RunCode%E3%80%81Flomo%E3%80%81%E8%AF%AD%E9%9B%80%E7%AD%89%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%BE%88%E6%96%B9%E4%BE%BF%E4%BA%8C%E6%AC%A1%E5%BC%80%E5%8F%91~) 给你志同道合的朋友使用。
- 可以关注我的 [Twitter](https://twitter.com/HiTw93) 获取到最新的 Pake 更新消息,也欢迎加入 [Telegram](https://t.me/miaoyan) 聊天群。

## 最后

Expand Down
12 changes: 6 additions & 6 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,14 @@
</table>
Note: it cannot be installed to C:\Program File under Windows, and it will crash directly. It is recommended to install to other non-administrator directories, such as D:\Program Files (x86) .

Also for light users, a good option is to use **GitHub Actions online compilation**, see the [tutorial](/docs/README_EN.md).

## Command line packing

<kbd>
<img src="https://cdn.fliggy.com/upic/cOC1lF.gif" width="100%">
</kbd>
<br/><br/>

**Pake provides a command line tool that makes it quicker and easier to customize the packages you need, as detailed in [documentation](./bin/README_EN.md).**
**Pake provides a command line tool that makes it quicker and easier to customize the packages you need, as detailed in [documentation](./.github/workflows/docs/README_EN.md).**

```bash
// Install with npm
Expand All @@ -116,6 +114,8 @@ pake url [options]
pake https://weekly.tw93.fun --name Weekly --transparent
```

If you are a little white who doesn't know how to use the command line, a good option is to use **GitHub Actions online compilation**, see the [tutorial](/docs/README_EN.md).

## Shortcuts

| Mac | Windows/Linux | Function |
Expand Down Expand Up @@ -172,9 +172,9 @@ Refer to the communication code in `pake.js` with `postMessage`, write the event

## Support

- I have two cats, one is called TangYuan, and one is called Coke, If you think Pake makes your life better, you can give my cats <a href="https://miaoyan.app/cats.html?name=Pake" target="_blank">feed canned food 🥩🍤</a>.
- If you like Pake, you can star it in Github. We are more welcome to [recommend Pake](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=Pake%20-%20A%20simple%20Rust%20packaged%20web%20pages%20to%20generate%20Mac%20App%20tool,%20compared%20to%20traditional%20Electron%20package,%20the%20size%20of%20nearly%2040%20times%20smaller,%20generally%20about%202M,%20the%20underlying%20use%20of%20Tauri,%20performance%20experience%20than%20the%20JS%20framework%20is%20much%20lighter~) to your like-minded friends.
- You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake, or join [Telegram](https://t.me/miaoyan) chat group.
- I have two cats, one is called TangYuan, and one is called Coke, If you think Pake makes your life better, you can give my cats <a href="https://miaoyan.app/cats.html?name=Pake" target="_blank">feed canned food 🥩🍤</a>.
- If you like Pake, you can star it in Github. We are more welcome to [recommend Pake](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=Pake%20-%20A%20simple%20Rust%20packaged%20web%20pages%20to%20generate%20Mac%20App%20tool,%20compared%20to%20traditional%20Electron%20package,%20the%20size%20of%20nearly%2040%20times%20smaller,%20generally%20about%202M,%20the%20underlying%20use%20of%20Tauri,%20performance%20experience%20than%20the%20JS%20framework%20is%20much%20lighter~) to your like-minded friends.
- You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake, or join [Telegram](https://t.me/miaoyan) chat group.

## Finally

Expand Down
2 changes: 1 addition & 1 deletion app.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ youtube,YouTube,YouTube,https://youtube.com
reference,Reference,Reference,https://wangchujiang.com/reference/index.html
code,Code,Code,https://riju.codes/
yuque,YuQue,语雀,https://www.yuque.com/
flomo,Flomo,浮墨,https://flomoapp.com/mine
flomo,Flomo,浮墨,https://v.flomoapp.com/mine
qwerty,Qwerty,Qwerty,https://qwerty.kaiyi.cool/
weread,WeRead,微信阅读,https://weread.qq.com/
6 changes: 3 additions & 3 deletions bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ url 为你需要打包的网页链接 🔗,必须提供。

应用 icon,支持本地/远程文件,默认为 Pake 自带图标。

- MacOS 下必须为 `.icns`
- Windows 下必须为 `.ico`
- Linux 下必须为 `.png`
- MacOS 下必须为 `.icns`
- Windows 下必须为 `.ico`
- Linux 下必须为 `.png`

```shell
--icon <path>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"start": "npm run dev",
"dev": "npm run tauri dev",
"dev:debug": "npm run tauri dev -- --features devtools",
"build": "npm run tauri build --release",
"build:release": "npm run tauri build --release",
"build:all-unix": "chmod +x ./script/build.sh && ./script/build.sh",
"build:all-windows": ".\\script\\build.bat",
Expand Down
80 changes: 11 additions & 69 deletions src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ tauri = { version = "1.2.1", features = [] }
image = "0.24.5"
tauri-utils = "1.2.1"
webbrowser = "0.8.2"
wry = "0.21.1"
wry = "0.23.1"

[features]
# by default Tauri runs in production mode
Expand Down
Loading

0 comments on commit d6ee153

Please sign in to comment.