> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/nicotine-plus/nicotine-plus/llms.txt
> Use this file to discover all available pages before exploring further.

# Packaging

> Guidelines for packaging Nicotine+ for various distributions and platforms

<Note>
  For distribution packagers: GitHub provides a standard feature to be notified of new package releases. Click the **Watch** option in the top right bar and select *releases only* to subscribe. This ensures you won't miss any new releases.
</Note>

## Dependencies

Dependencies for Nicotine+ are described in [DEPENDENCIES.md](https://github.com/nicotine-plus/nicotine-plus/blob/HEAD/doc/DEPENDENCIES.md).

## GNU/Linux Packaging

### Building a Source Distribution

To build a source distribution archive `.tar.gz` from the Git repository:

<Steps>
  <Step title="Run the build command">
    ```sh theme={null}
    python3 -m build --sdist
    ```
  </Step>

  <Step title="Locate the archive">
    The source distribution archive will be located in the `dist/` subfolder.
  </Step>
</Steps>

### Building a Debian Package

<Info>
  Unstable and stable PPAs are already provided for pre-compiled packages. Use these instructions if you wish to build your own package.
</Info>

<Steps>
  <Step title="Install build dependencies">
    ```sh theme={null}
    sudo apt build-dep .
    ```
  </Step>

  <Step title="Generate the upstream tarball">
    ```sh theme={null}
    python3 -m build --sdist
    mk-origtargz dist/nicotine-plus-*.tar.gz
    ```
  </Step>

  <Step title="Build the Debian package">
    ```sh theme={null}
    debuild -sa -us -uc
    ```
  </Step>
</Steps>

## Windows Packaging

<Info>
  GitHub Actions currently builds Nicotine+ installers for Windows. These instructions are useful if you wish to generate an installer on your own machine.
</Info>

### Building a Frozen Application with cx\_Freeze

<Steps>
  <Step title="Install MSYS2">
    Follow the instructions on [installing MSYS2](https://www.msys2.org/#installation). Once installed, launch the CLANG64 environment.
  </Step>

  <Step title="Clone the repository">
    ```sh theme={null}
    pacman -S git
    git clone https://github.com/nicotine-plus/nicotine-plus
    cd nicotine-plus
    ```
  </Step>

  <Step title="Install dependencies">
    ```sh theme={null}
    export ARCH=x86_64
    pacman --noconfirm -S --needed mingw-w64-clang-$ARCH-python
    python3 build-aux/windows/dependencies.py
    ```
  </Step>

  <Step title="Build the application">
    ```sh theme={null}
    python3 build-aux/windows/setup.py bdist_msi
    ```
  </Step>

  <Step title="Locate the build">
    When the application has finished building, it is located in the `build-aux\windows\build\` subfolder.

    To run the application, launch the executable `build-aux\windows\build\package\Nicotine+\Nicotine+.exe`.
  </Step>
</Steps>

## macOS Packaging

<Info>
  GitHub Actions currently builds Nicotine+ packages for macOS. These instructions are useful if you wish to generate a package on your own machine.
</Info>

### Building a Frozen Application with cx\_Freeze

<Steps>
  <Step title="Install Homebrew">
    Follow the instructions on [installing Homebrew](https://brew.sh/).
  </Step>

  <Step title="Clone the repository">
    ```sh theme={null}
    git clone https://github.com/nicotine-plus/nicotine-plus
    cd nicotine-plus
    ```
  </Step>

  <Step title="Install dependencies">
    ```sh theme={null}
    brew install python@3.14
    python3.14 -m venv venv
    venv/bin/python3 build-aux/macos/dependencies.py
    ```
  </Step>

  <Step title="Build the application">
    ```sh theme={null}
    venv/bin/python3 build-aux/macos/setup.py bdist_dmg
    ```
  </Step>

  <Step title="Locate the build">
    When the application has finished building, it is located in the `build-aux/macos/build/` subfolder as a `.dmg` file.
  </Step>
</Steps>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.