Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 7a4c6d61 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

MISC: Update instructions to build redistribuable binaries for Linux and Windob'

parent 72baad31
Branches
Aucune étiquette associée trouvée
1 requête de fusion!197Draft: Refactor the whole code.
...@@ -106,40 +106,59 @@ For `amadeus`, you can edit its configuration file in the settings section. ...@@ -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 The lektord and related binaries and source code are under the MIT license. Please, refer to the
[CONTRIBUTING](CONTRIBUTING.md) file for any contributions. [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 Windows 64 bit binaries are built from a linux system. Here we will assume you are using an arch
`mingw-w64-gcc`, `mingw-w64-cmake` (aur), `mingw-w64-make` (aur). You may also install the linux system because it's what I'm using. Install the packages `mingw-w64-gcc`, `mingw-w64-cmake`
`mingw-w64-qt6-*` (aur) packages. For the mpv library, install the packages in [utils/arch-pkgs]. (aur), `mingw-w64-make` (aur). You may also install the `mingw-w64-qt6-*` (aur) packages. For the
Make sure that you have the windows toolchain for 64 bit installed. Run the followinf commands: 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) (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-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-mpv # Be sure to install it after building shaderc from source
yay -Sy mingw-w64-qt6-* # You may specify the packages 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 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 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 To produce the zip file for windows users, from the target folder run the following commands:
folder run either commands:
# With wine mkdir -p lektor/platforms && cd lektor # Prepare folders
WINEPATH=/usr/x86_64-w64-mingw32/bin lektord.exe 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}')
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 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 ./lektord.exe
> Be sure to have the multilib repos and install the bootstrap `minwg-w64-*-bootstrap` packages > 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. > 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 # TODO List
- Finish Amadeus. - Finish Amadeus.
- Finish popups.
- Query state from lektord in a sensible way. - 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. - 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. - Make two custom themes (one light, the other dark) for amadeus, not the default ones from iced.
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter