A container-based build script for generating a Citron AppImage for Steam Deck (and Linux). It automates setup and ensures a clean build environment.
Find a file
2025-03-11 11:55:02 -06:00
.gitignore Add Steam Deck script and update README and build script for Distrobox support 2025-03-03 18:58:57 -06:00
build-citron.sh fix: chmod +x *.sh 2025-03-09 18:09:10 -07:00
CONTRIBUTING.md docs: Add basic contributing guidelines to the repository 2025-03-11 11:55:02 -06:00
Dockerfile Initial commit: Citron Arch Linux Docker Builder 2025-02-14 16:21:54 -06:00
LICENSE Initial commit: Citron Arch Linux Docker Builder 2025-02-14 16:21:54 -06:00
readme.md Add Linux/macOS automated build script for Citron AppImage and update README 2025-03-09 15:25:31 -06:00
start_build_linux_macOS.sh fix: chmod +x *.sh 2025-03-09 18:09:10 -07:00
start_build_steamdeck_podman.sh fix: chmod +x *.sh 2025-03-09 18:09:10 -07:00
start_build_windows_wsl.bat Remove redundant Docker image check from Windows build script 2025-03-06 11:57:07 -06:00

Citron AppImage Builder

This repository contains scripts to build Citron using either an Arch Linux Docker container or a Podman container for Steam Deck. It automates the process of setting up a clean environment and generating a Citron AppImage with support for multiple build modes.

Features

  • Uses Docker or Podman to provide a consistent build environment.
  • Supports multiple build modes:
    • release: Release mode builds Citron with optimizations for better performance.
    • steamdeck: Steamdeck mode builds Citron with optimizations for better performance.
    • compatibility: Compatibility mode builds Citron with optimizations for older architectures.
    • debug: Debug mode includes additional debugging symbols but is slower.
  • Included startup scripts for Windows, Steam Deck, Linux, and macOS (start_build_<OS>...) that automate the build process with an interactive prompt for all options.
  • Outputs a Citron AppImage in the current working directory.
  • Option to output Linux binaries separately.
  • Option to cache the Citron Git repository for subsequent builds.

Requirements

Windows

Steam Deck

  • Podman should be pre-installed with SteamOS 3.5+. Verify installation by running:
    podman --version
    
    If Podman is not installed, you can install it from the SteamOS Software Center.
  • Sufficient disk space (~5GB for the build process).

Linux / macOS

Note for users on ARM-based devices (e.g., macOS M1/M2 or similar ARM64 platforms):

If you encounter issues during the build process, it may be due to architecture incompatibilities with the docker image. Try one of the following solutions:

  • Use an ARM64-compatible container image by specifying the platform explicitly:
    docker build --platform=linux/arm64 -t citron-builder .
    docker run --platform=linux/arm64 --rm -v "$(pwd)":/output citron-builder
    
  • Install Rosetta 2 (for macOS) and run the container in x86_64 emulation mode:
    softwareupdate --install-rosetta
    docker run --platform=linux/amd64 --rm -v "$(pwd)":/output citron-builder
    

Any feedback or contributions to improve the script for ARM-based host builds is welcome.

Usage

Windows

  1. Clone this repository:

    git clone https://github.com/azazelv5/citron-appimage-builder.git
    cd citron-appimage-builder
    

    Alternatively, download and extract the repository as a ZIP file.

  2. Run the batch script:

    start_build_windows_wsl.bat
    
  3. Follow the on-screen prompts to select your build options.

  4. Ensure an active internet connection for downloading dependencies.

  5. The Citron AppImage file will be created in the current directory.

  6. After the build process, the script will prompt you to perform optional disk cleanup.

Linux / macOS

  1. Clone this repository:

    git clone https://github.com/azazelv5/citron-appimage-builder.git
    cd citron-appimage-builder
    

    Alternatively, download and extract the repository as a ZIP file.

  2. Make the start script executable:

    chmod +x start_build_linux_macOS.sh
    
  3. Run the linux/macOS build script:

    ./start_build_linux_macOS.sh
    
  4. Follow the on-screen prompts to select your build mode and Citron version.

  5. Ensure an active internet connection for downloading dependencies.

  6. The Citron AppImage file will be created in the current directory.

  7. The script will prompt you about optional disk cleanup.

Steam Deck (Podman)

  1. Switch to Desktop Mode.

  2. Open a terminal (Konsole is the default terminal app).

  3. Ensure you are in a writable directory:

    cd ~
    
  4. Clone this repository:

    git clone https://github.com/azazelv5/citron-appimage-builder.git
    cd citron-appimage-builder
    
  5. Make the start script executable:

    chmod +x start_build_steamdeck_podman.sh
    
  6. Run the Steam Deck build script:

    ./start_build_steamdeck_podman.sh
    
  7. Follow the on-screen prompts to select your build mode and Citron version.

  8. The Steam Deck may enter sleep mode during the build process. To prevent sleep mode, click the battery icon in the system tray and select "Manually block sleep and screen locking."

  9. The Citron AppImage file will be created in the current directory.

  10. The script will prompt you about optional disk cleanup.

Advanced Docker Usage

The startup scripts for each OS cover most use cases, but you can manually run the Docker container using the examples below:

  • Use the default command for the latest Citron build optimized for Steam Deck:

    docker run --rm -v "$(pwd)":/output citron-builder
    
  • Specify a version tag, branch name or commit hash if you need a specific release:

    docker run --rm -e CITRON_VERSION=v0.5-canary-refresh -v "$(pwd)":/output citron-builder
    
  • Choose a different build mode (release, steamdeck, compatibility, debug):

    docker run --rm -e CITRON_BUILD_MODE=compatibility -e CITRON_VERSION=v0.5-canary-refresh -v "$(pwd)":/output citron-builder
    
  • Enable Linux binary output if you need separate non-AppImage executables:

    docker run --rm -e OUTPUT_LINUX_BINARIES=true -v "$(pwd)":/output citron-builder
    
  • Use cache options to speed up subsequent builds by preserving Citron's source repository between runs:

    docker run --rm -e USE_CACHE=true -v "$(pwd)":/output citron-builder
    

Output Naming

The generated AppImage filename will follow this format:

  • Latest builds: citron-nightly-<build_mode>-<timestamp>-<commit_hash>.AppImage
  • Versioned builds: citron-<version>-<build_mode>.AppImage

For example:

citron-nightly-steamdeck-20250228-153045-abcdefg.AppImage
citron-v0.5-canary-refresh-release.AppImage

Troubleshooting

  • If the build process fails, check your internet connection and verify that the Citron repository and external dependencies are accessible. Check the Citron Discord community for more information.

Credits

This script was created with the help of the Citron Wiki and members of the Citron Discord community.

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE. See the LICENSE file for details.