-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[V3-Linux] Support for deb,rpm,arch linux packager packaging (#3909)
* Support for linux deb,rpm,arch linux packager packaging * remove optional tasks from linux:package task CHANGELOG.md * Update Taskfile.linux.yml * Integrated nfpm into CLI. Fixed task update. * package tool fixes and add bundle name field empty name guard * add linux depdencies * Add some docs * Fixed tests. Updated task to latest. * Update v3/internal/commands/tool_package.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Remove doctor references to nfpm --------- Co-authored-by: Lea Anthony <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
43659cc
commit 9173537
Showing
28 changed files
with
892 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Packaging Your Application | ||
|
||
This guide explains how to package your Wails application for different platforms. | ||
|
||
## Windows | ||
|
||
Windows applications are packaged as `.exe` files. Wails automatically handles this during the build process, creating a standalone executable that includes all necessary resources. | ||
|
||
## macOS | ||
|
||
macOS applications are packaged as `.app` bundles. Wails creates these bundles automatically during the build process, including proper code signing and notarization if configured. | ||
|
||
## Linux | ||
|
||
Linux applications can be packaged in various formats. Wails v3 uses [nfpm](https://github.com/goreleaser/nfpm), an excellent packaging tool that makes it easy to create `.deb`, `.rpm`, and Arch Linux packages. nfpm is a powerful tool that handles the complexities of Linux packaging, making it easy to create professional-grade packages. | ||
|
||
### Package Types | ||
|
||
Wails supports creating the following types of Linux packages: | ||
- Debian packages (`.deb`) - for Debian, Ubuntu, and related distributions | ||
- Red Hat packages (`.rpm`) - for Red Hat, Fedora, CentOS, and related distributions | ||
- Arch Linux packages - for Arch Linux and related distributions | ||
- AppImage - a distribution-independent package format | ||
|
||
### Building Packages | ||
|
||
Wails provides several task commands for building Linux packages. These are defined in `Taskfile.linux.yml` and can be invoked using the `wails3 task` command: | ||
|
||
```bash | ||
# Build all package types (AppImage, deb, rpm, and Arch Linux) | ||
wails3 task linux:package | ||
|
||
# Build specific package types | ||
wails3 task linux:create:appimage # Create an AppImage | ||
wails3 task linux:create:deb # Create a Debian package | ||
wails3 task linux:create:rpm # Create a Red Hat package | ||
wails3 task linux:create:aur # Create an Arch Linux package | ||
``` | ||
|
||
Each of these tasks will: | ||
1. Build your application in production mode | ||
2. Generate necessary desktop integration files | ||
3. Create the appropriate package using nfpm | ||
|
||
### Configuration | ||
|
||
The package configuration file should follow the nfpm configuration format and is typically located at `build/nfpm/nfpm.yaml`. Here's an example: | ||
|
||
```yaml | ||
name: "myapp" | ||
arch: "amd64" | ||
version: "v1.0.0" | ||
maintainer: "Your Name <[email protected]>" | ||
description: | | ||
A short description of your application | ||
vendor: "Your Company" | ||
homepage: "https://yourcompany.com" | ||
license: "MIT" | ||
contents: | ||
- src: ./build/bin/myapp | ||
dst: /usr/bin/myapp | ||
- src: ./assets/icon.png | ||
dst: /usr/share/icons/myapp.png | ||
- src: ./assets/myapp.desktop | ||
dst: /usr/share/applications/myapp.desktop | ||
``` | ||
For detailed information about all available configuration options, please refer to the [nfpm configuration documentation](https://nfpm.goreleaser.com/configuration/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.