Skip to content

Build Mortise from source

Build Mortise yourself to run a version that has no release, or to work on it. To install a release instead, see Install Mortise.

  1. Install rustup. Mortise needs Rust 1.100. The file rust-toolchain.toml in the repository selects it, and rustup installs it on the first build.

  2. On Linux, install the libraries the window needs. On Debian and Ubuntu:

    Terminal window
    sudo apt-get install -y libxkbcommon-dev libwayland-dev

    macOS and Windows need nothing more.

  3. Clone the repository:

    Terminal window
    git clone https://github.com/mortise-dev/mortise.git
    cd mortise
  4. Run Mortise. The path of a Laravel app is optional:

    Terminal window
    cargo run -p mortise-app -- /path/to/laravel-app

The window opens. Its binary is mortise-desktop. For a build without the debug checks, add --release after run. To keep the settings of this build apart from those of your installed Mortise, see the environment variables in Files and folders.

The command line tool is the binary mortise, in the crate mortise-cli. It needs no window libraries. Run it from the clone:

Terminal window
cargo run -p mortise-cli -- check /path/to/laravel-app

Or install it on your path:

Terminal window
cargo install --locked --path crates/mortise-cli

See Command line tool for what it prints.

  1. Install cargo-packager, at the version the project uses:

    Terminal window
    cargo install cargo-packager --locked --version 0.11.8
  2. Build the installers of your platform. cargo-packager builds Mortise in release mode first.

    Terminal window
    cargo packager -p mortise-app --release --formats app,dmg

    A local build is signed ad hoc, not with a Developer ID.

The installers are in target/packages.