Skip to content

Commit

Permalink
Add some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
leaanthony committed Nov 24, 2024
1 parent c222803 commit 2276b73
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 2 deletions.
38 changes: 37 additions & 1 deletion mkdocs-website/docs/en/getting-started/your-first-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
68 changes: 68 additions & 0 deletions mkdocs-website/docs/en/learn/guides/packaging.md
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/).
3 changes: 2 additions & 1 deletion mkdocs-website/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -175,4 +176,4 @@ watch:
- overrides
- shared
copyright:
Copyright © 2024 Lea Anthony
Copyright 2024 Lea Anthony

0 comments on commit 2276b73

Please sign in to comment.