AcademySoftwareFoundation / xstudio

xSTUDIO is a modern, high performance and feature rich playback and review application designed for organisations and individuals in the post production, VFX and Animation industries.
Apache License 2.0
627 stars 79 forks source link

Windows build problem #57

Open BrianHanke opened 1 year ago

BrianHanke commented 1 year ago

Howdy all, I made it fairly far trying to build xStudio on Windows 10, but media_reader_ffmpeg throws about 1000 errors in Visual Studio. Stuff like:

namespace "xstudio::utility" has no member "sys_time_point"

I installed ffmpeg using vcpkg and pointed FFMPEG_ROOT to C:\source\vcpkg\installed\x86-windows.

Any suggestions how to fix this? Thanks!

nyue commented 1 year ago

@BrianHanke how did you get past the ALSA requirements ?

BrianHanke commented 1 year ago

@nyue I don't know what that is, so I'm not sure I did get past! I just followed the Windows build guide. I already have a VM set up with VS 2019, Qt and others, so it was pretty easy. All went well in CMake GUI, it's just building the solution in VS that fails on media_reader_ffmpeg.

nyue commented 1 year ago

@BrianHanke Thanks for the breadcrumb. Are you able to share the URL to the Windows build guide ? The repo has build guides for Centos, Rocky but not Windows

BrianHanke commented 1 year ago

@nyue Sure, here you go:

Windows code: https://github.com/mpkepic/xstudio/tree/windows Build guide: https://github.com/mpkepic/xstudio/blob/windows/docs/build_guides/windows.md

A6i8 commented 1 year ago

I followed all the steps and got the xstudio.exe debug file, with so many dll missing, evan after copying all dll, xstudio not showing up anything.

Any One got lucky to get build successfully.

RdMaple commented 1 year ago

visual studio can't build,many c++ error.

nyue commented 1 year ago

I get the following opencolorio/vcpkg error, any idea ?

I know there is some minimum cmake version, is there some minimum git version required ?

-- VCPKG: install from manifest; using target triplet: x64-windows
error: failed to execute: "C:\Program Files\Git\cmd\git.exe" "--git-dir=C:\Users\yueni\projects\xstudio\build\vcpkg\.git" "--work-tree=C:\Users\yueni\projects\xstudio\build\vcpkg\buildtrees\versioning_\versions\opencolorio\9569944b76966b78bec5ef83672899acd7e4febe_544.tmp" -c core.autocrlf=false read-tree -m -u 9569944b76966b78bec5ef83672899acd7e4febe
error: git failed with exit code: (128).
fatal: failed to unpack tree object 9569944b76966b78bec5ef83672899acd7e4febe
note: while checking out port opencolorio with git tree 9569944b76966b78bec5ef83672899acd7e4febe
CMake Error at cmake/modules/vcpkg.cmake:477 (message):
  VCPKG: install from manifest failed
Call Stack (most recent call first):
  cmake/modules/vcpkg.cmake:236 (vcpkg_install_manifest)
  cmake/modules/vcpkg.cmake:614 (vcpkg_init)
  CMakeLists.txt:146 (include)

-- Configuring incomplete, errors occurred!
akiraendo1 commented 11 months ago

I get the error: CMake Error at CMakeLists.txt:157 (message): Failed to ensurepip.

nyue commented 11 months ago

I have some naive questions.

  1. Why are we leveraging vcpkg, powershell (from the ASWF discussion, specific powershell version) ?
  2. Is it practical to build the individual dependencies e.g. ocio, separately and references them in xStudio build via CMake config i.e. OCIO_DIR ?

My concern is that if we use some high level packaging e.g. vcpkg, when things breaks e.g. hash mismatch, missing files, it is more challenging for contributors to dive in to help (in the ASWF discussion, someone suggested updating some JSON file to point to a different version of opencolorio because the packaging database has missing entries)

AlsonEntuna commented 11 months ago

hi, I'm also encountering issues with building the windows version. Whenever I try to configure cmake, it gives me this json issue. image What seems to the be problem? I already have evrything in my machine.

Oh btw, whenever you clone the repository, the scripts/setup folder is not there. Plus when executing the powershell script also gives errors on windows image

cedricp commented 11 months ago

Hi, I'm having trouble executing the compiled (with VS 2022) version (after some hours of tweaks!) I've launched the package_xstudio.bat to copy dependencies, but it looks that something's wrong with python install, the modules aren't found. I've been able to almost fix it by playing with PYTHONHOME/PYTHONPATH env vars, but I still can't open an image. I also compiled it on a Linux Box, it's far easier to build, but sandbox install doesn't work. I can run it from the cmake build dir, though. Best regards.

RdMaple commented 11 months ago

xstudio Sucess build😁, but cann't play any video 😂! I will write how i build, please wait for a moment!

ronnyascencio commented 11 months ago

I am having problems with : CMake Error at cmake/modules/vcpkg.cmake:477 (message): VCPKG: install from manifest failed Call Stack (most recent call first): cmake/modules/vcpkg.cmake:236 (vcpkg_install_manifest) cmake/modules/vcpkg.cmake:614 (vcpkg_init) CMakeLists.txt:146 (include)

any Idea?

RdMaple commented 11 months ago

1,make sure you are use vs2019(vs2022 not work),and vs language change to english! 2,if you get cmake error,please see log info ,if you get version not found,please modify vcpkg.json in \xstudio. vcpkg

3,then you should build sucessful! 4,when you exec package_xstudio.bat,you also need copy \build_folder\src\"all dll file " into \workspace\build\release\ copy \build_folder\vcpkg_installed\x64-windows\bin\"all dll file" into \workspace\build\release\ copy \xstudio\extern\quickpromise\qml\QuickPromise to \workspace\build\release\QuickPromise copy \Qt\5.15.2\msvc2019_64\plugins into \workspace\build\release copy \build_folder\bin\Release\xstudio.exe" into \workspace\build\release 5,then you should can sucess start xstudio.exe!

AlsonEntuna commented 11 months ago

ok apparently I saw the issue on my side because it was on a different branch when you check it out from github.

now that I have the proper branch, I tried and now have this one failed to ensurepip thing. I have pip installed but don't know what's wrong with it

The system cannot find the file specified

CMake Error at CMakeLists.txt:157 (message):
  Failed to ensurepip.

Configuring incomplete, errors occurred!
cedricp commented 11 months ago

Ok, I installed VS2019, built the sources, launched the "package_xstudio.bat" and copied all dll files as you told me, but I'm still in trouble with python :

Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'python'
  isolated = 0
  environment = 1
  user site = 0
  import site = 1
  sys._base_executable = 'C:\\Users\\cedric\\Documents\\workspace\\xstudio\\build\\bin\\Release\\xstudio.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.platlibdir = 'lib'
  sys.executable = 'C:\\Users\\cedric\\Documents\\workspace\\xstudio\\build\\bin\\Release\\xstudio.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Users\\cedric\\Documents\\workspace\\xstudio\\build\\bin\\Release\\python310.zip',
    '.\\DLLs',
    '.\\lib',
    'C:\\Users\\cedric\\Documents\\workspace\\xstudio\\build\\bin\\Release',
  ]
[2023-11-06 09:58:32.451] [xstudio] [warning] void __cdecl xstudio::embedded_python::EmbeddedPython::setup(void) Failed to setup API : failed to get the Python codec of the filesystem encoding
AttributeError: module 'sys' has no attribute 'stdout'
[2023-11-06 09:58:32.451] [xstudio] [warning] bool __cdecl xstudio::embedded_python::EmbeddedPythonActor::act::<lambda_3>::operator ()(struct caf::connect_atom,const int) const Python error AttributeError: module 'sys' has no attribute 'stdout'
[2023-11-06 09:58:32.451] [xstudio] [warning] Connected failed false
[2023-11-06 09:58:35.536] [xstudio] [warning] void __cdecl xstudio::ui::viewport::Viewport::get_colour_pipeline(void) error("create_colour_pipeline failed, invalid colour pipeline name.")
[2023-11-06 09:58:35.543] [xstudio] [warning] void __cdecl xstudio::ui::viewport::Viewport::get_colour_pipeline(void) error("create_colour_pipeline failed, invalid colour pipeline name.")
[2023-11-06 09:58:37.916] [xstudio] [info] XStudio UI launched.

Something's still missing :(

ewerybody commented 10 months ago

Hey @AlsonEntuna! :)

Oh btw, whenever you clone the repository, the scripts/setup folder is not there.

You need to turn it to the windows branch!

Plus when executing the powershell script also gives errors on windows

Yeah! I had the same issue when I just downloaded the .zip but after I cloned it and switched to windows branch it worked!

Now I'm having other issues 😅 ...

AlsonEntuna commented 10 months ago

@ewerybody yeah already got that figured out but the only issue that i have right now that's preventing me from compiling it is the ensurepip cmake macro. Everything else is fine already.

ewerybody commented 10 months ago

Yeah I have that as well. I'm left with:

Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
no such file or directory

CMake Error at CMakeLists.txt:157 (message):
  Failed to ensurepip.

Configuring incomplete, errors occurred!

but eehhh WHAT directory?!?!? 🤷

AlsonEntuna commented 10 months ago

@ewerybody , I only have the ensure pip issue right now, I did check my python env and pip is also installed, but when I took a look at the cmake macro it doesn't point me to anything that's why I'm confused on how to solve this issue,

AlsonEntuna commented 10 months ago

hello,

So I already managed to compile and package the tool but when launching it, it gives me errors on QT platform initialization. Has any encountered this before?

qt_issue

Is there anything I need to configure first before running it?

AlsonEntuna commented 10 months ago

hello,

So I already managed to compile and package the tool but when launching it, it gives me errors on QT platform initialization. Has any encountered this before?

qt_issue

Is there anything I need to configure first before running it?

nvm, I already solved it. All good on my end now!

ewerybody commented 10 months ago

how did you solve it?

OlivierArgentieri commented 10 months ago

I got the same problem as @AlsonEntuna and i have figure out by copying the 'platforms' folder from my qt installation: C:\Qt\5.15.2\msvc2019_64\plugins and paste it beside my binary, so here in my case D:\xstudio\prefix_install\bin\Release

Maybe a better solution exist, maybe an evironment variable that we can set to QT install folder, i don't know but for now it works with the platforms folder and i can go forward to the next error !

AlsonEntuna commented 10 months ago

also, the .bat file doesn't really copy the necessary .dll files. I had to write a simple python script to copy the dlls that the exe needs

OlivierArgentieri commented 10 months ago

Yes, i needed also to copy all dll files manually, same for qt dependencies

But are you able to read some exr or jpg sequence ? or like me you got errors in debug and nothing can't be read in xstudio ?

apanner commented 10 months ago
"C:\xstudioBuild\\build\src" does not exist.

"C:\xstudioBuild\\build\bin\Debug\xstudio.exe" does not exist.

"C:\xstudioBuild\\build\bin\Release\xstudio.exe" does not exist.

"C:\xstudioBuild\\build\src" does not exist.

DLL files from "Debug" folders copied to "C:\xstudioBuild\\build\bin\Debug"
DLL files from "Release" folders copied to "C:\xstudioBuild\\build\bin\Release"
Press any key to continue . . .

xstudio.exe not created.. after Visual studio 2019 -> build solution.- so many errors.

scottmcdonnell commented 10 months ago

I got the build to work with a ffmpeg 6.1 binary, I haven't tried the vcpkg ffmpeg yet. But same as a previous comment, the player is blank and will not show any video/image. Has anyone succesfully built and does your build load media?

fjallraven commented 6 months ago

The cmake install is not complete windows, you will have to copy some dependencies to bin/ or set PATH (qt, opencolorio lib) Copy python packages to ${XSTUDIO_ROOT}/lib/python Move ${XSTUDIO_ROOT}/lib/python/xstudio/core/Release/__pybind_xstudio.cp39-win_amd64.pyd to ${XSTUDIO_ROOT}/lib/python/xstudio/core/__pybind_xstudio.pyd Move xstudio plugin dlls to:

${XSTUDIO_ROOT}/share/xstudio/plugin/
annotations_tool.dll        
colour_pipeline_ocio.dll  
image_boundary_hud.dll      
media_metadata_openexr.dll  
media_reader_ffmpeg.dll   
media_reader_ppm.dll 
basic_viewport_masking.dll  
exr_data_window.dll       
media_metadata_ffprobe.dll  
media_reader_blank.dll      
media_reader_openexr.dll  
pixel_probe_hud.dll

Depending on how you plan to launch xstudio, you might have to tweak the launcher script. ex I did this, created a xstudio.bat:

set XSTUDIO_ROOT=%~dp0\\..\\share\xstudio
set PATH=%~dp0\\..\\bin;%PATH%
set PYTHONPATH=%~dp0\\..\\lib\\python
call xstudio.exe %*

I tried updating build to use ffmpeg 6.1 but got a deprecated define in xstudio ffmpeg source. Easy to fix but just a heads up.

Looks like there are issues how uri conversion is done on Windows and how it splits on ":".

mpkepic commented 4 months ago

Just wanted to follow up and point everyone to the latest commit of the windows PR;, the build system improvements addresses a lot of the comments found here; cmake install is now complete and the install script that used to be there is gone. Plugins and xstudio_root paths get set properly so the plugins that allow you to actually load media (as well as others) can be found etc.

It can now use Ninja and Visual Studio 2022; and comes with presets and a reworked build instructions to make everything super easy.

We've removed the choco script, as we've been able to get the manual build dependencies down to just a couple.

If you are still interested, I implore you to try the latest commit.

https://github.com/AcademySoftwareFoundation/xstudio/pull/50

Thanks!

7VincentGasti7 commented 4 months ago

Just wanted to follow up and point everyone to the latest commit of the windows PR;, the build system improvements addresses a lot of the comments found here; cmake install is now complete and the install script that used to be there is gone. Plugins and xstudio_root paths get set properly so the plugins that allow you to actually load media (as well as others) can be found etc.

It can now use Ninja and Visual Studio 2022; and comes with presets and a reworked build instructions to make everything super easy.

We've removed the choco script, as we've been able to get the manual build dependencies down to just a couple.

If you are still interested, I implore you to try the latest commit.

Thanks!

Thank you for your hard work ! It works well ! :)

mpkepic commented 4 months ago

Aw thank you!

I'm going to ask if we could close this issue out and open individual issues as they are discovered so we can track each separately.

Cheers!

BrianHanke commented 4 months ago

I'm the OP, feel free to close this.

jonbragado commented 3 months ago

For those of us that are not programmers, would it be possible to get an install wrapper where we double click and installs on windows? As artists we´d love to be able to test this tool but the barrier is simply too high right now. Much appreciated!

mpkepic commented 3 months ago

Prebuilt binaries are a topic being discussed in ASWF but there are barriers to be worked out in providing them. That doesn't mean it won't happen, just needs figuring out. It is a topic of heavy concern to many of us in the ASWF ORI group. Cheers.

On Tue, Jun 18, 2024 at 9:55 AM jonbragado @.***> wrote:

For those of us that are not programmers, would it be possible to get an install wrapper where we double click and installs on windows? As artists we´d love to be able to test this tool but the barrier is simply too high right now. Much appreciated!

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/AcademySoftwareFoundation/xstudio/issues/57*issuecomment-2176561494__;Iw!!N1d2nkBXpQ!KTl9iLHxYi9yJU1kfEuzFNVaIU37-S6c48C_LgiYQr77IWPSdW0euuiNYaQF2P416lJ3GoOgKBaB7CcKsVR3XQVB1RFMTxM$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AZXQR2WXGCYPRM3FMBUAIYDZIBRATAVCNFSM6AAAAAA3ZCASBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGU3DCNBZGQ__;!!N1d2nkBXpQ!KTl9iLHxYi9yJU1kfEuzFNVaIU37-S6c48C_LgiYQr77IWPSdW0euuiNYaQF2P416lJ3GoOgKBaB7CcKsVR3XQVBhV6FVpA$ . You are receiving this because you commented.Message ID: @.***>

jonbragado commented 3 months ago

Thank you for the comment. While those discussions happen, the reality is that only those with enough programming and coding experience can access it. Being a tool that is not meant to be used by coders but by artists, it seems a bit difficult to understand the current barrier of having a beta version that users can benefit from installing and trying the software.

How about somebody who has managed to build a working windows version can upload a drive link for those that we would want to test it at is current state?

UPDATE: I have gone thorugh the process of building it for Windows and it has been simplified by a lot. Thanks for that. Also watched some talks about xStudio from Dneg developers and they bring up the issue of propietary codecs, AppleProRes and the imposibility of adding those to a build due to licencing.