mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 11:47:46 +00:00
Combine flatpak and regular build instructions
This commit is contained in:
parent
82067195f2
commit
9037aae2dc
2 changed files with 34 additions and 59 deletions
75
BUILDING.md
75
BUILDING.md
|
@ -1,58 +1,51 @@
|
||||||
# Building Astra
|
# Building Astra
|
||||||
|
|
||||||
## Dependencies
|
There are two methods to build Astra, either via [Flatpak](https://flatpak.org/) or manually using your system libraries. It's highly recommended to prefer the Flatpak, especially if you don't have experience with CMake, C++ and such.
|
||||||
|
|
||||||
### Required
|
# Flatpak
|
||||||
|
|
||||||
All of these packages are required for Astra to build with a minimal set of features.
|
Building the Flatpak version is easy, and there's a helper script to speed up the process. You must run it from the repository root:
|
||||||
|
|
||||||
* Linux
|
```
|
||||||
|
$ cd astra
|
||||||
|
$ ./scripts/build-flatpak.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
The process should only take a few minutes on a moderately powerful machine. It does require an Internet connection and the relevant permissions to install the required Flatpak runtimes and extensions.
|
||||||
|
|
||||||
|
When it's complete, a file called `astra.flatpak` will appear in the repository root and that can be installed with the `flatpak` CLI tool or your preferred application store.
|
||||||
|
|
||||||
|
## Manual
|
||||||
|
|
||||||
|
The process to build Astra manually is a little bit more involved, but not difficult. It's easiest to do on rolling release Linux distributions.
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
#### Required
|
||||||
|
|
||||||
|
* [Linux](https://kernel.org/)
|
||||||
* Windows, macOS and other systems may work but are currently unsupported. Patches are accepted to fix any problems with those OSes though.
|
* Windows, macOS and other systems may work but are currently unsupported. Patches are accepted to fix any problems with those OSes though.
|
||||||
* CMake 3.25 or later
|
* [CMake](https://cmake.org) 3.25 or later
|
||||||
* Qt 6.5 or later
|
* [Qt](https://www.qt.io/) 6.6 or later
|
||||||
* Modules: Base, Declarative, WebView
|
* Base, Declarative, WebView, Concurrent
|
||||||
* KDE Frameworks 6
|
* [KDE Frameworks](https://develop.kde.org/products/frameworks/) 6
|
||||||
* Modules: Extra CMake Modules, Kirigami, I18n, Config, and CoreAddons.
|
* Extra CMake Modules, Kirigami, I18n, Config, CoreAddons and Archive.
|
||||||
* These are not packaged yet for any distributions, and won't be for a few months. See below for tips on where to source these.
|
* [Rust](https://www.rust-lang.org/)
|
||||||
* Rust
|
* [Corrosion](https://github.com/corrosion-rs/corrosion)
|
||||||
* Corrosion
|
* [unshield](https://github.com/twogood/unshield)
|
||||||
* unshield
|
* [QtKeychain](https://github.com/frankosterfeld/qtkeychain)
|
||||||
* QtKeychain for Qt6
|
* [QCoro](https://qcoro.dvratil.cz/)
|
||||||
* QuaZip for Qt6
|
|
||||||
|
|
||||||
### Optional
|
#### Optional
|
||||||
|
|
||||||
These are optional dependencies, that will be used if found on your system.
|
These are optional dependencies, that will be used if found on your system.
|
||||||
|
|
||||||
* Steamworks SDK
|
* Steamworks SDK
|
||||||
* You must specify `STEAMWORKS_INCLUDE_DIRS` and `STEAMWORKS_LIBRARIES` yourself.
|
* You must specify `STEAMWORKS_INCLUDE_DIRS` and `STEAMWORKS_LIBRARIES` yourself.
|
||||||
* Gamemode
|
* Gamemode
|
||||||
|
* Turn on `ENABLE_GAMEMODE` to enable integration.
|
||||||
|
|
||||||
## KDE Frameworks 6
|
### Configuring
|
||||||
|
|
||||||
Since KF6 is not going to be released for another few months minimum, you might have trouble sourcing the libraries.
|
|
||||||
|
|
||||||
### Arch Linux
|
|
||||||
|
|
||||||
You have the set of -git packages for the dependencies used, such as `kirigami2-git`. Otherwise, build from source.
|
|
||||||
|
|
||||||
### Fedora Linux
|
|
||||||
|
|
||||||
Fedora's KDE SIG has a repository for KDE Frameworks and Plasma 6 [located here](https://copr.fedorainfracloud.org/coprs/g/kdesig/kde-nightly-qt6/). I use this in my own personal [COPR](https://copr.fedorainfracloud.org/coprs/redstrate/personal/) which builds Astra from git.
|
|
||||||
|
|
||||||
### Build from source
|
|
||||||
|
|
||||||
The most time-consuming option but the one that will definitely work is building the required frameworks from source. See the [page on the KDE Community Wiki](https://community.kde.org/Get_Involved/development/Build_software_with_kdesrc-build) on how to build KDE software yourself. Then, when building Astra feed the kdesrc-build usr directory, and it will pick up on these libraries automatically: `-DCMAKE_PREFIX_PATH=/home/<username>/kde/usr`.
|
|
||||||
|
|
||||||
Remember that unless you're running in a kdesrc-build session you need to set some environment variables otherwise Astra will fail to run (because it fails to find some runtime KF6 dependencies). Make sure to `source prefix.sh` from the build directory, or from another kdesrc-build project.
|
|
||||||
|
|
||||||
## Configuring
|
|
||||||
|
|
||||||
**Note:** Some dependencies will automatically be downloaded from the Internet if not found on your system. This functionality may change in the future.
|
|
||||||
|
|
||||||
When configuring Astra, there are several optional features you may want to enable or disable:
|
|
||||||
|
|
||||||
* `ENABLE_GAMEMODE`: Gamemode integration, requires Gamemode.
|
|
||||||
|
|
||||||
To configure, run `cmake` in the source directory:
|
To configure, run `cmake` in the source directory:
|
||||||
|
|
||||||
|
|
18
FLATPAK.md
18
FLATPAK.md
|
@ -1,18 +0,0 @@
|
||||||
# Flatpak Build Instructions
|
|
||||||
|
|
||||||
This builds the Flatpak in a directory called `build` and a repository called `export`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ flatpak-builder --force-clean --user --install --repo=export build zone.xiv.astra.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
Some other useful options I use:
|
|
||||||
* `--disable-updates`: Disable updates for VCS like git, useful for quick iteration on Astra itself.
|
|
||||||
|
|
||||||
To create a bundle, use this command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ flatpak build-bundle export astra.flatpak zone.xiv.astra --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
|
|
||||||
```
|
|
||||||
|
|
||||||
This should create a bundle called `astra.flatpak`.
|
|
Loading…
Add table
Reference in a new issue