English | 简体中文
Ensure that your Node.js version is 16.0 or higher (e.g., 16.8). Avoid using sudo
for the installation. If you encounter permission issues with npm, refer to How to fix npm throwing error without sudo.
npm install pake-cli -g
-
CRITICAL: Consult Tauri prerequisites before proceeding.
-
For Windows users (ensure that
Win10 SDK (10.0.19041.0)
andVisual Studio build tool 2022 (>=17.2)
are installed), additional installations are required:- Microsoft Visual C++ 2015-2022 Redistributable (x64)
- Microsoft Visual C++ 2015-2022 Redistributable (x86)
- Microsoft Visual C++ 2012 Redistributable (x86) (optional)
- Microsoft Visual C++ 2013 Redistributable (x86) (optional)
- Microsoft Visual C++ 2008 Redistributable (x86) (optional)
-
For Ubuntu users, execute the following commands to install the required libraries before compiling:
sudo apt install libdbus-1-dev \ libsoup2.4-dev \ libjavascriptcoregtk-4.0-dev \ libwebkit2gtk-4.0-dev \ build-essential \ curl \ wget \ libssl-dev \ libgtk-3-dev \ libayatana-appindicator3-dev \ librsvg2-dev \ gnome-video-effects \ gnome-video-effects-extra
pake [url] [options]
The packaged application will be located in the current working directory by default. The first packaging might take some time due to environment configuration. Please be patient.
Note: Packaging requires the Rust environment. If Rust is not installed, you will be prompted for installation confirmation. In case of installation failure or timeout, you can install it manually.
The URL is the link to the web page you want to package or the path to a local HTML file. This is mandatory.
Various options are available for customization. You can pass corresponding arguments during packaging to achieve the desired configuration.
Specify the application name. If not provided, you will be prompted to enter it. It is recommended to use English.
--name <value>
Specify the application icon. Supports both local and remote files. By default, it uses the Pake brand icon. For custom icons, visit icon icons or macOSicons.
- For macOS, use
.icns
format. - For Windows, use
.ico
format. - For Linux, use
.png
format.
--icon <path>
Set the height of the application window. Default is 780px
.
--height <number>
Set the width of the application window. Default is 1200px
.
--width <number>
Enable or disable immersive header. Default is false
. Use the following command to enable this feature, macOS only.
--transparent
Determine whether the application launches in full screen. Default is false
. Use the following command to enable full screen.
--fullscreen
Package the application to support both Intel and M1 chips, exclusively for macOS. Default is false
.
- Note: After enabling this option, Rust must be installed using rustup from the official Rust website. Installation via brew is not supported.
- For Intel chip users, install the arm64 cross-platform package to support M1 chips using the following command:
rustup target add aarch64-apple-darwin
- For M1 chip users, install the x86 cross-platform package to support Intel chips using the following command:
rustup target add x86_64-apple-darwin
--multi-arch
Select the output package format for Linux. Options include deb
, appimage
, or all
. If all
is selected, both deb
and appimage
will be packaged. Default is all
.
--targets <format>
Customize the browser user agent. Default is empty.
--user-agent <value>
Display the menu bar. Default is not to display. Use the following command to enable the menu bar. Recommended for macOS users.
--show-menu
Display the system tray. Default is not to display. Use the following command to enable the system tray.
--show-system-tray
Specify the system tray icon. This is only effective when the system tray is enabled. The icon must be in .ico
or .png
format and should be an image with dimensions ranging from 32x32 to 256x256 pixels.
--system-tray-icon <path>
Enable recursive copying. When the URL is a local file path, enabling this option will copy the folder containing the file specified in the URL, as well as all sub-files, to the Pake static folder. This is disabled by default.
--copy-iter-file
After completing the above steps, your application should be successfully packaged. Please note that the packaging process may take some time depending on your system configuration and network conditions. Be patient, and once the packaging is complete, you can find the application installer in the specified directory.