2024-12-17, 11:16 PM
(2024-12-15, 01:07 PM)qwerty12 Wrote:(2024-12-14, 02:37 PM)raulo1985 Wrote: Thanks for your reply, greatly appreciate it. I'm trying to create a x64 build, I used Cross tools because that's what the instructions said. When I use x64 Native Tools Command Prompt for VS 2022 I get many "PlayerComponent.cpp.obj : error LNK2019: unresolved external symbol" messages (related to mpv) and it ends with a fatal error. So I'm still stuck.
I did manage to build it on my system (although I didn't then carry on with the instructions for building an installer) by following the steps from the automated workflow used by JMP that I linked in my previous post and the README. I have no idea how your system is configured and what steps you've followed (and omitted), but I can go through what I did with a clean tree in the hopes it may help you. If you started building a 32-bit build and are now switching to produce a 64-bit build, I'd start by cleaning the build folder.
I already had CMake and Ninja installed via Scoop, so they were already the latest versions and were in my%PATH%
. Git for Windows was installed, of course. I did have to install Qt's 5.15.2 Qt WebEngine and MSVC 2019 64-bit from Qt's installer (username and password taken from BugMeNot).
---
- I ran "x64 Native Tools Command Prompt for VS 2022"
- Cloned the code:
git clone --single-branch --branch master https://github.com/jellyfin/jellyfin-media-player.git
cd jellyfin-media-player && mkdir build && cd build
- I downloaded and extracted https://github.com/shinchiro/mpv-winbuil...e52f975.7z into
jellyfin-media-player\build\mpv
- I extracted gendef.exe from https://mirror.msys2.org/mingw/mingw64/m...kg.tar.zst (WinRAR/7-Zip), placed it into
jellyfin-media-player\build\mpv
and rangendef libmpv-2.dll
- From the
jellyfin-media-player\build
folder, I rancmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=CQt/5.15.2/msvc2019_64 -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output ..
- I ran
lib /def:mpv\libmpv-2.def /out:mpv\libmpv-2.dll.lib /MACHINE:X64
- I finally ran
ninja
and got a src\JellyfinMediaPlayer.exe for my troubles
- Running it failed; I had to run
set "PATH=C:\Qt\5.15.2\msvc2019_64\bin;%PATH%"
so the Qt DLLs are found andcopy mpv\libmpv-2.dll src\
forsrc\JellyfinMediaPlayer.exe
to start
Now, the actual loading of JMP fails - I imagine it's looking for some resource or for more (QtWebEngine) DLLs to load at runtime l that I need to copy from elsewhere (presumably the steps to create an installer bundles everything together) - but it did build for a 64-bit system, on a 64-bit machine, using the latest 64-bit libmpv dll from shinchiro:
Thank you very much for your detailed guide. I was doing exactly what you said, I guess what did the trick was generating the .def file. That's the only thing you did differently, so that must have been the issue.
This is kinda new for me and I'm trying to learn by myself, but I got stuck again and a little more help would be highly appreciated. I ended on the exact same spot that you did, and JMP in fact fails when I load it (looks exactly the same as your screenshot), it asks for some qt5 dlls (like qt5webengine.dll). But the thing is that I'm trying to create an installer (like the official ones), specially if you say that probably by doing so it would bundle everything together, including the missing resources. That's where I get stuck, I'm trying to figure how to create an installer.
Could you please help me with that, or point me in the right direction so I can figure it out?
Thanks again!