Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tauri support #180

Merged
merged 5 commits into from
Jan 1, 2023
Merged

add tauri support #180

merged 5 commits into from
Jan 1, 2023

Conversation

asukaminato0721
Copy link
Contributor

一些注解:

tauri 用的运行时暂时不支持 navigator.permissions.query ,所以我加了个判断。目前剪贴板不能用。

为了方便,开发时我把 pnpm run build 后的 Ctool/packages/ctool-core/dist/* 复制到了 Ctool/packages/ctool-adapter/tauri-app/src/ 里进行调试。但是不能就这么提交。所以先把 src 清空了。只需要 build tauri 前把 pnpm run build 的产物移过来。应该是 package.json 加一条命令。

看上去 electron 也是这么操作的,具体逻辑还没太看懂。


另一种方法是 https://github.com/tw93/Pakehttps://github.com/hamza72x/nativefier_tauri 直接封装 gh-page(不需要改动项目), 但也需要预判断 navigator.permissions.query 232a05c

@asukaminato0721
Copy link
Contributor Author

fix #179
may also fix #151 (comment)

@asukaminato0721 asukaminato0721 marked this pull request as draft December 30, 2022 10:00
@baiy baiy marked this pull request as ready for review December 30, 2022 10:04
@baiy
Copy link
Owner

baiy commented Dec 30, 2022

electron 适配 会在dev和release 之前调用 pnpm run sync 来同步核心文件
image

@baiy baiy marked this pull request as draft December 30, 2022 10:10
@asukaminato0721
Copy link
Contributor Author

打包写好了,目前还有个 move 产物 to _release 写不动了。

目前 tauri 的 build 的产物在 Ctool/packages/ctool-adapter/tauri-app/src-tauri/target/release/bundle/

deb 6MiB

image

不知道为何 AppImage 这么大

@asukaminato0721 asukaminato0721 marked this pull request as ready for review December 30, 2022 11:09
@baiy baiy merged commit ac52540 into baiy:master Jan 1, 2023
@asukaminato0721 asukaminato0721 deleted the fix-tauri-problem branch January 6, 2023 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants