-
-
Notifications
You must be signed in to change notification settings - Fork 216
Build
You can either build Saber on your local computer, or use GitHub Actions to build it in the cloud.
You can build Saber via GitHub Actions without having to set up a local environment.
I will assume you already have some prior understanding of GitHub. If you don't, I recommend following the regular installation instructions instead.
Here is how to run a build through your web browser:
- Fork the Saber repository.
- Go to the "Actions" tab of your forked repository.
- Select a build workflow from the list on the left, e.g. "Build for Android".
- Press the "Run workflow" button, and confirm it.
- The build will start running, and you will see it after refreshing the page.
- Once the build is complete, open the run and scroll down to the "Artifacts" section.
- Download and extract the artifact for your platform, e.g.
Saber-Android
.
You will need a computer and technical skills to build Saber yourself.
Install Flutter either by:
-
Following the official instructions at https://flutter.dev/docs/get-started/install, or;
-
Using my script to install Flutter and its dependencies automatically on Linux:
curl -s https://raw.githubusercontent.com/adil192/adil192-linux/main/bootstrap/install_flutter.sh | bash
Important
Always exercise caution when running scripts from the internet. This script should be fairly easy to understand if you're familiar with linux, but if you're unsure, follow the official instructions instead.
Install Rust following the instructions at https://www.rust-lang.org/tools/install, e.g.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install the dependencies:
# For Debian/Ubuntu...
sudo apt install libsecret-1-dev libjsoncpp-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev webkit2gtk-4.1-dev
# Or for Fedora/RHEL...
sudo dnf install libsecret-devel jsoncpp-devel gstreamer1-devel gstreamer1-plugins-base-devel webkit2gtk4.1-devel
Then run the build command:
flutter build linux
You can run the built binary with:
./build/linux/x64/release/bundle/saber
(Optional) If you wish to share your build, you should generate a signing certificate and create the android/key.properties
file.
More information on https://docs.flutter.dev/deployment/android#create-an-upload-keystore
(Optional) If you want to build the apk without any proprietary code (e.g. for F-Droid), run:
./patches/remove_proprietary_dependencies.sh
Now run the build command:
flutter build apk
Run the build command to generate a folder with saber.exe and all its dlls:
flutter build windows
If you want to create an installer, edit and run installers/desktop_inno_script.iss with Inno Setup Compiler.
Run the build command on a macOS computer:
flutter build apk
# or
flutter build macos
If you don't have access to a Mac, use the GitHub Actions build as mentioned above.