BetterChatGPT icon indicating copy to clipboard operation
BetterChatGPT copied to clipboard

Use tauri bundle

Open jiawei397 opened this issue 1 year ago • 2 comments

Fix: https://github.com/ztjhz/BetterChatGPT/issues/187

The file is now officially built and can be used, and an example is available at https://github.com/jiawei397/FreeChatGPT/releases. These files can be downloaded, installed, and used.

The existing code will not affect the original web usage. If you have local Rust installed, you can use yarn dev:tauri to start and yarn build:tauri to complete the build.

There are several areas that require further processing by the author:

  1. The Github build file github/workflows/release.yml has been set to publish when tagging, and it can be considered for removal. The advantage of Tauri is that it generates relatively small resources, but the disadvantage is that it is also caused by Rust, which is very slow. It takes about 15 minutes in the Github pipeline.
  2. Before each release build, it is necessary to modify the version number package.version in the file src-tauri/tauri.conf.json. It may not be necessary if the technology of detecting version numbers for updating prompts is not used. You can also consider removing the tag title displayed on the release page from the release.yml file. I didn't study this carefully, just found a sample online.
  3. Several icons in the path src-tauri/icons might need to be modified, and currently, the default Tauri icons are being used.
  4. My several download methods all return Promise and might fail (though it is not highly likely). Therefore, when using them on the upper layer, I added a catch method and wrote a TODO, which can be considered to add error prompts there.
  5. Several Tauri exports have been implemented, including the original PDF, but there was an error during packaging. You have already commented out this feature, which was caused by a conflict with topLevelAwait. If you resolve it later, you can annotate my code in src/utils/tauri.ts.

By the way, due to the update of the deploy.yml file, my fork project can no longer be built directly on GitHub and must be restored to its original version. However, regardless of the situation, it's still an excellent job. Thank you.

jiawei397 avatar Apr 06 '23 07:04 jiawei397

Amazing work! 🔥

ztjhz avatar Apr 06 '23 08:04 ztjhz

Good job!

hamaron avatar Apr 08 '23 17:04 hamaron