Name | Project Address |
---|---|
Pake | https://github.com/tw93/Pake |
Supports Mac / Windows / Linux. For more information about common package downloads, one-click packaging on the command line, and custom development, please refer to the documentation below. You are also welcome to join the discussion area for communication.
Features#
🎐 Compared to traditional Electron shell packaging, it is nearly 20 times smaller, around 5M.
🚀 Pake uses the Rust Tauri framework at its core, providing a faster performance compared to JS frameworks and using less memory.
📦 It is not just a simple packaging tool, it also enables shortcut key passthrough, immersive windows, dragging, style rewriting, ad blocking, and customization of the product's minimalist style.
👻 It is just a simple toy, replacing the old idea of packaging web pages with Rust, and actually PWA is also good.
Packaging xLog Personal Homepage#
Create a virtual environment:#
python3 -m venv myenv
Activate the virtual environment:#
source myenv/bin/activate
Install using npm#
npm install -g pake-cli
Find the installation path of Pake#
npm bin -g
Edit the configuration file#
nano ~/.bash_profile
Add the PATH environment variable#
Add the following line at the end of the file: (the address may vary)
export PATH=$PATH:/Users/geek/.npm-packages/bin
Press Ctrl
and X
, then Y
to save and exit.
Reload the Bash configuration file#
source ~/.bash_profile
Generate a desktop application#
Let's try it with my xLog homepage (it's slow the first time, but it will be faster afterwards)
pake https://x.geekbb.ml --name Geek --transparent
*If you encounter a rustc error, please see the note at the end
Demo#
GIF loading...
But the default icon is not good, so let's find a website to convert a JPG to ICNS
👉JPG to ICNS - Convert image files online (aconvert.com)
- Must be
.icns
on MacOS- Must be
.ico
on Windows- Must be
.png
on Linux
Change the default icon#
Add: --icon <path>
at the end
pake https://x.geekbb.ml --name Geek --transparent --icon /Users/geek/Documents/123/Geek.icns
Packaging Chatbot UI#
Chatbot UI is deployed locally, so it can be packaged to avoid entering the URL every time
pake http://192.168.2.100:3000 --name Chatbot --transparent --icon /Users/geek/Documents/123/chatgpt.icns
Demo#
GIF loading...
If you encounter the zsh: command not found: rustc error👇
- Open the terminal and execute the following commands one by one:
curl --proto '=https' --tlsv 1.2 -sSf https://sh.rustup.rs | sh
- Open the terminal and enter the following command to open the terminal's configuration file:
nano ~/.zshrc
- Add the following code at the end of the file:
export PATH="$HOME/.cargo/bin:$PATH"
-
This command adds
$HOME/.cargo/bin
to the PATH environment variable. -
Press
Control + X
, then pressY
to save the changes and exit. -
Enter the following command to update the terminal's configuration file:
source ~/.zshrc