mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-25 21:57:05 +02:00
[cmake, docs] msys: allow bundled FFmpeg, update dep/caveat docs, faster linking on Release mode (#2921)
Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2921 Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
8ae7974092
commit
c70abc8e43
5 changed files with 100 additions and 9 deletions
|
|
@ -13,12 +13,11 @@
|
|||
|
||||
## Arch Linux
|
||||
|
||||
- httplib AUR package is broken. Set `httplib_FORCE_BUNDLED=ON` if you have it installed.
|
||||
- Eden is also available as an [AUR package](https://aur.archlinux.org/packages/eden-git). If you are unable to build, either use that or compare your process to the PKGBUILD.
|
||||
Eden is also available as an [AUR package](https://aur.archlinux.org/packages/eden-git). If you are unable to build, either use that or compare your process to the PKGBUILD.
|
||||
|
||||
## Gentoo Linux
|
||||
|
||||
Do not use the system sirit or xbyak packages.
|
||||
Enable the GURU repository to install [`games-emulation/eden`](https://gitweb.gentoo.org/repo/proj/guru.git/tree/games-emulation/eden). This repository also contains some additional dependencies, such as mcl, sirit, oaknut, etc.
|
||||
|
||||
## macOS
|
||||
|
||||
|
|
@ -102,3 +101,60 @@ cmake -B build -DCMAKE_BUILD_TYPE=Release
|
|||
cmake --build build -- -j`nproc`
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
## MSYS2
|
||||
|
||||
`qt6-static` isn't supported yet.
|
||||
|
||||
Only the `MINGW64` environment is tested; however, all of the others should work (in theory) sans `MINGW32`.
|
||||
|
||||
Currently, only FFmpeg can be used as a system dependency; the others will result in linker errors.
|
||||
|
||||
When packaging an MSYS2 build, you will need to copy all dependent DLLs recursively alongside the `windeployqt6`; for example:
|
||||
|
||||
```sh
|
||||
# MSYS_TOOLCHAIN is typically just mingw64
|
||||
# since Windows is case-insensitive, you can set this to $MSYSTEM
|
||||
# or, if cross-compiling from Linux, set it to usr/x86_64-w64-mingw32
|
||||
export PATH="/${MSYS_TOOLCHAIN}/bin:$PATH"
|
||||
|
||||
# grab deps of a dll or exe and place them in the current dir
|
||||
deps() {
|
||||
# string parsing is fun
|
||||
objdump -p "$1" | grep -e ".DLL Name:" | cut -d" " -f3 | while read -r dll; do
|
||||
[ -z "$dll" ] && continue
|
||||
|
||||
# bin directory is used for DLLs, so we can do a quick "hack"
|
||||
# and use command to find the path of the DLL
|
||||
dllpath=$(command -v "$dll" 2>/dev/null || true)
|
||||
|
||||
[ -z "$dllpath" ] && continue
|
||||
|
||||
# explicitly include system32/syswow64 deps
|
||||
# these aren't needed to be bundled, as all systems include them
|
||||
case "$dllpath" in
|
||||
*System32* | *SysWOW64*) continue ;;
|
||||
esac
|
||||
|
||||
# avoid copying deps multiple times
|
||||
if [ ! -f "$dll" ]; then
|
||||
echo "$dllpath"
|
||||
cp "$dllpath" "$dll"
|
||||
|
||||
# also grab the dependencies of the dependent DLL; e.g.
|
||||
# double-conversion is a dep of Qt6Core.dll but NOT eden.exe
|
||||
deps "$dllpath"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# NB: must be done in a directory containing eden.exe
|
||||
deps eden.exe
|
||||
|
||||
# deploy Qt plugins and such
|
||||
windeployqt6 --release --no-compiler-runtime \
|
||||
--no-opengl-sw --no-system-dxc-compiler --no-system-d3d-compiler eden.exe
|
||||
|
||||
# grab deps for Qt plugins
|
||||
find ./*/ -name "*.dll" | while read -r dll; do deps "$dll"; done
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue