Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moodyhunter/qtbuildscript
A fish shell script to simplify your Qt build experience
https://github.com/moodyhunter/qtbuildscript
android automation build-system buildfromzero cmake cross-platform fish-shell linux qt qt6 script webassembly
Last synced: 22 days ago
JSON representation
A fish shell script to simplify your Qt build experience
- Host: GitHub
- URL: https://github.com/moodyhunter/qtbuildscript
- Owner: moodyhunter
- License: wtfpl
- Created: 2022-01-23T21:12:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-08T11:36:39.000Z (10 months ago)
- Last Synced: 2024-02-08T12:37:29.991Z (10 months ago)
- Topics: android, automation, build-system, buildfromzero, cmake, cross-platform, fish-shell, linux, qt, qt6, script, webassembly
- Language: Shell
- Homepage:
- Size: 332 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QtBuildScript
A personal [fish-shell](https://github.com/fish-shell/fish-shell) script to [cross-] compile Qt from source.
Supported Platforms:
- Linux
- Android
- WebAssembly## Demo
![look at me](./images/build-android-demo.png)
## Usage
### Concepts
- A "Platform" is an environment where the compiled Qt will be executed in.
- A "kit" is a set of CMake argument preset, which can be combined to form a "kit set", or "kits".### Arguments
```
-p, --platform Target platform, default value is 'desktop'
-a, --arch Target architecture, default='x86_64', platform-specific.
-h, --host-path Path to the Qt host build directory, can be automatically detected if unspecified.
-j, --parallel Run N jobs at once, can be automatically detected from nproc if unspecified.
-k, --skip-cleanup Skip cleanup the build directory.
-E, --export Export build configuration to a script.
```### Defaults
- Default Platform: `desktop`
- Default KitSet: `ccache`, `shared`, `release` (See `./.default-kits`)### Kits Applying Order
1. Apply base kits, stored in `./.base-kits`
2. Apply kits given from the argument
3. If kits are still empty, apply default kits## Example
- Compile Qt for Linux desktop, a shared library debug build.
```bash
# desktop, shared, release is the default
./build-qt.fish
# or:
# ./build-qt.fish shared release
# ./build-qt.fish -pdesktop shared release
# ./build-qt.fish --platform=desktop shared release
```- Compile Qt for Linux desktop, a shared library release build.
```bash
./build-qt.fish shared debug
# or:
# ./build-qt.fish -pdesktop shared debug
# ./build-qt.fish --platform=desktop shared debug
```- Compile Qt for Android (default architecture x86_64), a static debug build, with parallel 128
```bash
./build-qt.fish -p android static debug -j128
# or:
# ./build-qt.fish --platform=android static debug --parallel=128
```- Compile Qt for Android with architecture `arm64-v8a`, a static release build, keep previous build directory
```bash
./build-qt.fish -p android -a arm64-v8a static release -k
# or:
# ./build-qt.fish --platform=android --arch=arm64-v8a static release --skip-cleanup
```- Compile Qt for Android with architecture `armeabi-v7a`, a static release build, keep previous build directory, with custom Qt host path
```bash
./build-qt.fish -p android -a armeabi-v7a static release -k -h /my/own/qt/installation
# or:
# ./build-qt.fish --platform=android --arch=armeabi-v7a static release --skip-cleanup --host-path=/my/own/qt/installation
```- Compile Qt for WASM, with static build (you can't use shared build anyway)
```bash
./build-qt.fish -p wasm static
# or:
# ./build-qt.fish --platform=wasm static
```## License
WTFPL :)