compiling.md

August 22, 2025 ยท View on GitHub

Setting up Environment

Linux Users

  1. Set Up Development Environment:

    • Install Nix and Flakes.

    • Clone the repository:

      git clone https://github.com/losses/rune.git
      cd rune
      
    • Set up the environment:

      nix develop
      
  2. Compile Rune:

    • Compile for Linux:

      rinf gen
      flutter build linux --release
      
  3. Android Build Setup:

    For Nix users:

    • Enter the Nix shell:

      nix develop .
      
    • Set up Android environment:

      setup_android_env
      
    • Build Android APK:

      flutter build apk --release
      

      Note: The x86 build will not work with this command after setting up the Android environment.

    • To switch back from Android environment:

      teardown_android_env
      

    For non-Nix users:

    • Use the provided build script that automatically sets up the environment and builds the APK:

      ./android/build.sh
      

Windows Users

  1. Configure Development Environment:

    Verify your setup with:

    rustc --version
    flutter doctor
    
  2. Compile Rune:

    flutter pub get
    rinf gen
    flutter build windows --release
    

Protobuf Messages

If you've cloned the project or modified .proto files in the ./messages directory, run:

rinf gen

Running the App

Build and run the app with:

flutter run

For detailed integration instructions, refer to Rinf's documentation.

macOS

This chapter provides instructions for building Rune on macOS for development. If you want to fork Rune and build your own version for production, you need to set up your own code signing, provisioning profiles, etc., which is not covered in this chapter.

Prerequisites

Steps

  1. Clone the repository:
git clone https://github.com/losses/rune.git
cd rune
  1. Install all development dependencies:
./scripts/macos_1_install.sh

If you're an employee of Inkwire Tech, make sure you have an Apple Account in Inkwire Tech's Developer Program logged in on your Xcode, and skip to Step #6. Ask @laosb if you can't make it work.

  1. Open the project in Xcode:
open ./macos/Runner.xcworkspace
  1. In Xcode, select the Runner project in the project navigator, then select the Runner target.
  2. In the Signing & Capabilities tab:
  3. Uncheck Automatically manage signing.
  4. Select None for Provisioning Profile.
  5. Select None for Team.
  6. Select Sign to Run Locally for Signing Certificate.
  7. Build / run the project:
./scripts/macos_2_build.sh
# or
./scripts/macos_2_run.sh

We use the signing configuration in our production GitHub Actions workflow, so please don't commit and push any changes to the signing configuration.