diff --git a/mkdocs-website/docs/en/getting-started/your-first-app.md b/mkdocs-website/docs/en/getting-started/your-first-app.md index 0cb65f9fa4f..2d0a9099261 100644 --- a/mkdocs-website/docs/en/getting-started/your-first-app.md +++ b/mkdocs-website/docs/en/getting-started/your-first-app.md @@ -79,6 +79,42 @@ You'll notice that the build time was faster this time. That's because the new b You should see a new executable in the `build` directory. +## Step 6: Packaging Your Application + +Once your application is ready for distribution, you can create platform-specific packages: + +=== "Mac" + + To create a `.app` bundle: + ```bash + wails3 package + ``` + This will create a production build and package it into a `.app` bundle in the `bin` directory. + +=== "Windows" + + To create an NSIS installer: + ```bash + wails3 package + ``` + This will create a production build and package it into an NSIS installer in the `bin` directory. + +=== "Linux" + + Wails supports multiple package formats for Linux distribution: + ```bash + # Create all package types (AppImage, deb, rpm, and Arch Linux) + wails3 package + + # Or create specific package types + wails3 task linux:create:appimage # AppImage format + wails3 task linux:create:deb # Debian package + wails3 task linux:create:rpm # Red Hat package + wails3 task linux:create:aur # Arch Linux package + ``` + +For more detailed information about packaging options and configuration, check out our [Packaging Guide](../learn/guides/packaging.md). + ## Conclusion -Congratulations! You've just created and built your first Wails application. This is just the beginning of what you can achieve with Wails v3 Alpha. Explore the documentation, experiment with different features, and start building amazing applications! +Congratulations! You've just created, developed and packaged your first Wails application. This is just the beginning of what you can achieve with Wails v3. Explore the documentation, experiment with different features, and start building amazing applications! diff --git a/mkdocs-website/docs/en/learn/guides/packaging.md b/mkdocs-website/docs/en/learn/guides/packaging.md new file mode 100644 index 00000000000..0ea4c4268de --- /dev/null +++ b/mkdocs-website/docs/en/learn/guides/packaging.md @@ -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 " +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/). diff --git a/mkdocs-website/mkdocs.yml b/mkdocs-website/mkdocs.yml index 66d1745b3b9..8bdec59d739 100644 --- a/mkdocs-website/mkdocs.yml +++ b/mkdocs-website/mkdocs.yml @@ -153,6 +153,7 @@ nav: - Guides: - Customising Windows: learn/guides/customising-windows.md - File Associations: learn/guides/file-associations.md + - Packaging: learn/guides/packaging.md - Feedback: getting-started/feedback.md - Feedback: getting-started/feedback.md - What's New in v3?: whats-new.md @@ -175,4 +176,4 @@ watch: - overrides - shared copyright: - Copyright © 2024 Lea Anthony + Copyright 2024 Lea Anthony