Repository navigation
[V3-Linux] Support for deb,rpm,arch linux packager packaging #3909
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5b5aa4a
Support for linux deb,rpm,arch linux packager packaging
atterpac 7f13eca
remove optional tasks from linux:package task
atterpac 8783d21
Merge branch 'v3-alpha' into v3/linux-packaging
atterpac 6e12413
Update Taskfile.linux.yml
leaanthony 475ba28
Integrated nfpm into CLI.
leaanthony 8d7f763
package tool fixes and add bundle name field
atterpac c222803
add linux depdencies
atterpac 2276b73
Add some docs
leaanthony 473bbfb
Fixed tests. Updated task to latest.
leaanthony bd568e6
Update v3/internal/commands/tool_package.go
leaanthony 0f2bd0e
Remove doctor references to nfpm
leaanthony c778b72
Merge branch 'v3-alpha' into v3/linux-packaging
leaanthony File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 | ||
| ``` | ||
|
leaanthony marked this conversation as resolved.
|
||
|
|
||
| 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 <your.email@example.com>" | ||
| 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 | ||
| ``` | ||
|
leaanthony marked this conversation as resolved.
|
||
|
|
||
| For detailed information about all available configuration options, please refer to the [nfpm configuration documentation](https://nfpm.goreleaser.com/configuration/). | ||
This file contains hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.