forked from quickshell/quickshell
docs: add build instructions to README
This commit is contained in:
parent
5ac04649aa
commit
f32b4175fb
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,7 +1,7 @@
|
||||||
# build files
|
# build files
|
||||||
/result
|
/result
|
||||||
/build/
|
/build/
|
||||||
compile_commands.json
|
/compile_commands.json
|
||||||
|
|
||||||
# clangd
|
# clangd
|
||||||
/.cache
|
/.cache
|
||||||
|
|
6
Justfile
6
Justfile
|
@ -8,7 +8,7 @@ lint:
|
||||||
|
|
||||||
configure target='debug' *FLAGS='':
|
configure target='debug' *FLAGS='':
|
||||||
cmake -GNinja -B {{builddir}} \
|
cmake -GNinja -B {{builddir}} \
|
||||||
-DCMAKE_BUILD_TYPE={{ if target == "debug" { "Debug" } else { "Release" } }} \
|
-DCMAKE_BUILD_TYPE={{ if target == "debug" { "Debug" } else { "RelWithDebInfo" } }} \
|
||||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON {{FLAGS}}
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON {{FLAGS}}
|
||||||
|
|
||||||
ln -sf {{builddir}}/compile_commands.json compile_commands.json
|
ln -sf {{builddir}}/compile_commands.json compile_commands.json
|
||||||
|
@ -19,6 +19,8 @@ _configure_if_clean:
|
||||||
build: _configure_if_clean
|
build: _configure_if_clean
|
||||||
cmake --build {{builddir}}
|
cmake --build {{builddir}}
|
||||||
|
|
||||||
|
release: (configure "release") build
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f compile_commands.json
|
rm -f compile_commands.json
|
||||||
rm -rf {{builddir}}
|
rm -rf {{builddir}}
|
||||||
|
@ -29,5 +31,5 @@ run *ARGS='': build
|
||||||
test *ARGS='': build
|
test *ARGS='': build
|
||||||
ctest --test-dir {{builddir}} --output-on-failure {{ARGS}}
|
ctest --test-dir {{builddir}} --output-on-failure {{ARGS}}
|
||||||
|
|
||||||
install *ARGS='': clean (configure "release") build
|
install *ARGS='':
|
||||||
cmake --install {{builddir}} {{ARGS}}
|
cmake --install {{builddir}} {{ARGS}}
|
||||||
|
|
80
README.md
80
README.md
|
@ -7,6 +7,86 @@ Hosts: [outfoxxed's gitea], [github]
|
||||||
[outfoxxed's gitea]: https://git.outfoxxed.me/outfoxxed/quickshell
|
[outfoxxed's gitea]: https://git.outfoxxed.me/outfoxxed/quickshell
|
||||||
[github]: https://github.com/outfoxxed/quickshell
|
[github]: https://github.com/outfoxxed/quickshell
|
||||||
|
|
||||||
|
Documentation can be built from the [quickshell-docs](https://git.outfoxxed.me/outfoxxed/quickshell-docs) repo,
|
||||||
|
though is currently pretty lacking.
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
## Nix
|
||||||
|
This repo has a nix flake you can use to install the package directly:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
quickshell = {
|
||||||
|
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Quickshell's binary is available at `quickshell.packages.<system>.default` to be added to
|
||||||
|
lists such as `environment.systemPackages` or `home.packages`.
|
||||||
|
|
||||||
|
## Manual
|
||||||
|
|
||||||
|
If not using nix, you'll have to build from source.
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
To build quickshell at all, you will need the following packages (names may vary by distro)
|
||||||
|
|
||||||
|
- just
|
||||||
|
- cmake
|
||||||
|
- pkg-config
|
||||||
|
- ninja
|
||||||
|
- Qt6 [ QtBase, QtDeclarative ]
|
||||||
|
|
||||||
|
To build with wayland support you will additionally need:
|
||||||
|
- wayland
|
||||||
|
- wayland-scanner (may be part of wayland on some distros)
|
||||||
|
- wayland-protocols
|
||||||
|
- Qt6 [ QtWayland ]
|
||||||
|
|
||||||
|
### Building
|
||||||
|
|
||||||
|
To make a release build of quickshell run:
|
||||||
|
```sh
|
||||||
|
$ just release
|
||||||
|
```
|
||||||
|
|
||||||
|
If you have all the dependencies installed and they are in expected
|
||||||
|
locations this will build correctly.
|
||||||
|
|
||||||
|
To install to /usr/local/bin run as root (usually `sudo`) in the same folder:
|
||||||
|
```
|
||||||
|
$ just install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building (Nix)
|
||||||
|
|
||||||
|
You can build directly using the provided nix flake or nix package.
|
||||||
|
```
|
||||||
|
nix build
|
||||||
|
nix build -f package.nix # calls default.nix with a basic callPackage expression
|
||||||
|
```
|
||||||
|
|
||||||
|
# Development
|
||||||
|
|
||||||
|
For nix there is a devshell available from `shell.nix` and as a devShell
|
||||||
|
output from the flake.
|
||||||
|
|
||||||
|
The Justfile contains various useful aliases:
|
||||||
|
- `just configure [<debug|release> [extra cmake args]]`
|
||||||
|
- `just build` (runs configure for debug mode)
|
||||||
|
- `just run [args]`
|
||||||
|
- `just clean`
|
||||||
|
- `just test [args]` (configure with `-DBUILD_TESTING=ON` first)
|
||||||
|
- `just fmt`
|
||||||
|
- `just lint`
|
||||||
|
|
||||||
#### License
|
#### License
|
||||||
|
|
||||||
<sup>
|
<sup>
|
||||||
|
|
2
docs
2
docs
|
@ -1 +1 @@
|
||||||
Subproject commit 1ca13d9ffded3fbddb0380c0d0df85304065efa9
|
Subproject commit 32aae34d4bf77f4455628bd13091474d67461527
|
|
@ -88,8 +88,7 @@ Q_ENUM_NS(Enum);
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// Text {
|
/// Text {
|
||||||
/// anchors.horizontalCenter: parent.horizontalCenter
|
/// anchors.centerIn: parent
|
||||||
/// anchors.verticalCenter: parent.verticalCenter
|
|
||||||
/// text: "Hello!"
|
/// text: "Hello!"
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
|
Loading…
Reference in a new issue