Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • 81addda9ecd3c93e54cf45ad196627537ea44f11
  • master par défaut protégée
  • rust-playlist-sync
  • rust
  • fix-qt-deprecated-qvariant-type
  • fix-mpris-qtwindow-race-condition
  • rust-appimage-wayland
  • windows-build-rebased
  • v2.5 protégée
  • v2.4 protégée
  • v2.3-1 protégée
  • v2.3 protégée
  • v2.2 protégée
  • v2.1 protégée
  • v2.0 protégée
  • v1.8-3 protégée
  • v1.8-2 protégée
  • v1.8-1 protégée
  • v1.8 protégée
  • v1.7 protégée
  • v1.6 protégée
  • v1.5 protégée
  • v1.4 protégée
  • v1.3 protégée
  • v1.2 protégée
  • v1.1 protégée
  • v1.0 protégée
27 résultats

lektor

Lektor mk7

pipeline status matrix chat platform support stable version

A Karaoke player made to replace the old bash scripts on Sakura.

Table of content

Building the player

Prerequisites

  • cmake with at least the version 3.17
  • a C compiler with C11 support
  • a C++ compiler with C++20 support (for the Qt6 module)
  • a rust compiler with version >= 1.65
  • the sqlite3 development library
  • a POSIX.1-2008 compatible system (for MS Windows, use something like WSL2)

For the Qt module, you will need the following prerequisites:

  • the mpv development library
  • the Qt6 development library, QtCore, QtWidgets, QtOpenGL, QtOpenGLWidgets

You will also need the clang-format command line utility, for a beautifull and uniform C++ code style. Here is the list of all the options to put in the .clang-format file.

You will also need diesel for all the database stuff, use the following command to install diesel cli with the correct sqlite support on your system. You may also install depgraph if you want to visualize the dependency graphs.

cargo install diesel_cli --no-default-features --features sqlite
cargo install cargo-depgraph

To visualize dependencies of the rust part of lektor, you can write the following commands from the root of each rust workspaces:

cargo depgraph --all-deps --dedup-transitive-deps | dot -Tpng > dependencies.png

Building instructions

The manual way of installing and setting up lektor:

cmake -Bbuild \
    -DCMAKE_C_COMPILER=clang           \ # Choose the compiler
    -DCMAKE_CXX_COMPILER=clang++       \ # Choose the compiler
    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ # For clangd/ccls
    -DCMAKE_BUILD_TYPE=Debug             # The debug stuff

Note that the last option is here to generate the compile_commands.json, you should copy it at the root of the project.

The sqlite database and the config file will be created automatically if needed, i.e. on the first run. If you are upgrading lektor, the config might not be correct. You can delete the config file or use the lkt admin config to generate the config file again. If you are using special modules or are compiling lektor without static modules, you may set their absolute path inside the lektor's config file.

Important note: Upgrading the database from version 2.4 to version 3 is not possible. You need to delete the database and re-dl all the karas from kurisu.

How to use lektor

Launch instructions

To run lektor, you can simply run the binary like: ./lektord. If lektord did not exit normally (i.e. without the lkt adm kill command), the database will still store the fact that lektord is running. To by-pass it, you will need to launch lektord with the -F (forced) option, like lektord -F. It is not recommended to launch always lektord with the -F option, because that way you could launch multiple instances of the lektod daemon, which could results in undefined behaviours. Lektor will use specialized software (hwdec set to yes), if you have an nvidia card with optimus (in almose every laptop), please use optirun or primusrun: optirun ./lektord

How to update the lektord database

To update the lektor database, you first need to launch lektord, then use the lkt adm update to update the database and lkt adm import to import users' favorite lists as playlists.

How to send commands to lektor

Lektor is compatible with mpd, which means that you can use any client (only mpc is tested) to interact with lektor. Some functions are not really compatible (somme work to be done) because mpc really makes some assumptions. The ideal way is to use lkt.

How to configure lektor

Lektor configuration is done with an INI file. Modules' configuration is also done by the same INI file using diferent sections. Lektor searches for the configuration file in that order:

  1. $PWD/lektor.ini
  2. if XDG_CONFIG_HOME defined? $XDG_CONFIG_HOME/lektor/lektor.ini : $HOME/.config/lektor/lektor.ini
  3. /opt/lektor/lektor.ini
  4. /usr/local/etc/lektor.ini
  5. /etc/lektor.ini

To get the default config file, you can use the lkt adm conf command. If no config file is found, lektord will try to create the $HOME/.config/lektor/lektor.ini config file with the default content.

Be aware that if the home directory or the XDG_CONFIG_HOME are too long they will be ignored and truncated. You may then get uncomprehensible errors.

Misc

Contributing

Please, refer to the CONTRIBUTING file.

Licenses

The lektord and related binaries and source code are under the ISC license. The amadeus and related binaries abd siyrce code are under the MIT license.

MPD

Lektor is almost MPD compatible, at least it uses the same protocol, which can be consulted here. The full support for MPD clients (like mpc and ncmpc) is still WIP. For the MPD compatibility list, see the CONTRIBUTING file.