diff --git a/README.md b/README.md index 9cd6adb9608a4230698bd8b7a3f79a895c0a20b1..0d30e6980a7f90ec0aa2e5fc2f413d41cc851db8 100644 --- a/README.md +++ b/README.md @@ -106,40 +106,59 @@ For `amadeus`, you can edit its configuration file in the settings section. The lektord and related binaries and source code are under the MIT license. Please, refer to the [CONTRIBUTING](CONTRIBUTING.md) file for any contributions. -## Building for windows +## Building a lektord distribution for windows (Cross Compilation) -Windows 64 bit binaries are built from a linux system. On arch, install the packages -`mingw-w64-gcc`, `mingw-w64-cmake` (aur), `mingw-w64-make` (aur). You may also install the -`mingw-w64-qt6-*` (aur) packages. For the mpv library, install the packages in [utils/arch-pkgs]. -Make sure that you have the windows toolchain for 64 bit installed. Run the followinf commands: +Windows 64 bit binaries are built from a linux system. Here we will assume you are using an arch +linux system because it's what I'm using. Install the packages `mingw-w64-gcc`, `mingw-w64-cmake` +(aur), `mingw-w64-make` (aur). You may also install the `mingw-w64-qt6-*` (aur) packages. For the +mpv library, install the packages in [utils/arch-pkgs]. Make sure that you have the windows +toolchain for 64 bit installed. Run the followinf commands: (cd utils/arch-pkgs/mingw-w64-shaderc && makepkg -si) yay -Sy mingw-w64-gcc mingw-w64-cmake mingw-w64-make mingw-w64-dlfcn x86_64-w64-mingw32-ldd - yay -Sy mingw-w64-mpv # Be sure to install it after building shaderc from source - yay -Sy mingw-w64-qt6-* # You may specify the packages - rustup target add x86_64-pc-windows-gnu + yay -Sy mingw-w64-mpv # Be sure to install it after building shaderc from source + yay -Sy mingw-w64-qt6-* # You may specify the packages, you may doo the bootstrap thingy here + rustup target add x86_64-pc-windows-gnu # Add the windows target, here we build 64bit applications MAKE=x86_64-w64-mingw32-make CMAKE=x86_64-w64-mingw32-cmake CXX=x86_64-w64-mingw32-g++ cargo build --target x86_64-pc-windows-gnu -To run on linux, don't forget to tell wine where to find all the dlls for Qt/mpv, from the build -folder run either commands: +To produce the zip file for windows users, from the target folder run the following commands: - # With wine - WINEPATH=/usr/x86_64-w64-mingw32/bin lektord.exe + mkdir -p lektor/platforms && cd lektor # Prepare folders + cp ../{lkt,amadeus,lektord}.exe . # Copy the produced executables + cp ../lektor_c.dll . # Copy the dll for lektord - # Copy DLL files - for F in $(WINEPATH=/usr/x86_64-w64-mingw32/bin x86_64-w64-mingw32-ldd lektor_c.dll | grep -v "not found" | awk '{print $3}'); do cp "$F" .; done + for F in $(WINEPATH=/usr/x86_64-w64-mingw32/bin x86_64-w64-mingw32-ldd lektor_c.dll | grep -v "not found" | awk '{print $3}') + do + cp "$F" . # Copy DLL files + done + chmod +x *.dll *.dll.* # Set DLL executable for linux, just in case + cp /usr/x86_64-w64-mingw32/lib/qt6/plugins/platforms/qwindows.dll platforms/ # Copy the windows platform dll for Qt + cp /usr/x86_64-w64-mingw32/lib/qt6/plugins/styles/qwindowsvistastyle.dll styles/ # Copy the style dll + (cd .. && zip lektor.zip lektor/* lektor/platforms/*) # Create the zip file + + # Now you can run lektord and distribute the zip file! ./lektord.exe > Be sure to have the multilib repos and install the bootstrap `minwg-w64-*-bootstrap` packages > first, to avoid the circular dependencies... And be sure to have a lot of time to waste. +## Building a lektord distribution for linux (AppImage) + +First you need the AppImageKit. We will assume you are using an *x86_64* system. You can download it +from the github [repository](https://github.com/AppImage/AppImageKit/releases/tag/continuous). As an +alternative you can use the following commands and add the `$HOME/.local/bin` folder to you path. + + wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage + mv appimagetool-x86_64.AppImage ~/.local/bin/ + chmod +x ~/.local/bin/appimagetool-x86_64.AppImage + +After building the lektord executable and .so files, you can use the following commands: + --- # TODO List - Finish Amadeus. - - Finish popups. - Query state from lektord in a sensible way. -- The windows build. - Implements a kurisu server in lektord to be able to synchronize with other lektord instances. - Make two custom themes (one light, the other dark) for amadeus, not the default ones from iced.