godot-videodecoder icon indicating copy to clipboard operation
godot-videodecoder copied to clipboard

Compiling for Windows

Open DataPlusProgram opened this issue 5 years ago • 8 comments

I am having trouble understanding how you would compile this solely for Windows.

The build instructions refer using build_gdnative.sh but that seems to build for all platforms and has various dependencies.

If I were to compile just for x64 windows how would I go about that? Thanks

DataPlusProgram avatar Sep 03 '20 21:09 DataPlusProgram

The dependencies boil down to 'bash, docker, and the x-code sdk', but It should be possible to modify the build script to skip the Linux and OSX containers. (I use the bash built in to the git for Windows install)

Might need to run inside WSL or a Linux VM? Not sure on the compatibility of running an Ubuntu docker container directly in Windows

Or just run the docker commands for Windows only:

docker build ./ -f Dockerfile.ubuntu-bionic -t "godot-videodecoder-ubuntu-bionic" 
docker build ./ -f Dockerfile.win64 --build-arg JOBS=4 -t "godot-videodecoder-win64"
id=$(docker create godot-videodecoder-win64)
docker cp $id:/opt/target/win64 $ADDON_BIN_DIR/
docker rm -v $id

PRs are welcome if you update the script to be able to select specific targets :)

jamie-pate avatar Sep 04 '20 16:09 jamie-pate

I'm still getting errors when compiling with docker on windows.

Would you ever consider distributing the binaries on github releases?

DataPlusProgram avatar Sep 09 '20 00:09 DataPlusProgram

It's a good idea, but I've currently got no extra time to implement it.

If you got it going on GitHub actions on a fork we'd welcome the PR

jamie-pate avatar Sep 09 '20 16:09 jamie-pate

I was finally able to compile to binaries by using Linux. I still have a few issues though.

World.tscn in the test project references "res://samples/2Thursday-FortiMonitor-vp9.webm" which doesn't exist.

I've set the path of the video stream to be "res://samples/big_buck_bunny.mp4" but I get the error: "load: No loader found for resource: res://samples/big_buck_bunny.mp4. <C++ Error> Method failed. Returning: RES() <C++ Source> core/io/resource_loader.cpp:285 @ _load()"

Thanks

DataPlusProgram avatar Sep 17 '20 16:09 DataPlusProgram

.mp4 is not a vp9 file :)

The default build is basically only vp9 at the moment.

jamie-pate avatar Sep 21 '20 17:09 jamie-pate

In that case the .mp4 file in the example project is should probably not be there.

I would also suggest editing the README.md to mention that this project provides support for only the vp9 codec for clarity.

DataPlusProgram avatar Sep 21 '20 19:09 DataPlusProgram

I added a way to specify specific platforms here: https://github.com/jamie-pate/godot-videodecoder/commit/c3c270d75b59cb9be4fd532258143950eea37e45

Working towards automatic release builds via github actions. see https://github.com/jamie-pate/godot-videodecoder/releases/tag/0.0.1-draft.3

jamie-pate avatar Nov 02 '20 03:11 jamie-pate

In that case the .mp4 file in the example project is should probably not be there.

I would also suggest editing the README.md to mention that this project provides support for only the vp9 codec for clarity.

The sample project's media is pulled from another project alltogether and those haven't been converted to supported formats unfortunately.

jamie-pate avatar Nov 02 '20 04:11 jamie-pate