shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
1.9k stars 496 forks source link

`ninja -C build pssh-box.py` not working #1389

Closed BelgianNoise closed 2 months ago

BelgianNoise commented 2 months ago

System info

Operating System: Windows 10 Shaka Packager Version: v3.0.4

Issue and steps to reproduce the problem

cmake -B build
ninja -C build pssh-box.py

What is the expected result?

No errors :) and a useable output file

What happens instead?

shaka-packager git:(main) cmake -B build
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
CMake Deprecation Warning at packager/third_party/c-ares/source/CMakeLists.txt:3 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- curl version=[7.83.1-DEV]
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- Enabled features: SSL IPv6 unixsockets AsynchDNS Largefile SSPI alt-svc HSTS SPNEGO Kerberos NTLM
-- Enabled protocols: DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS LDAP MQTT POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP
-- Enabled SSL backends: Schannel
CMake Deprecation Warning at packager/third_party/json/source/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Using the multi-header code from H:/Users/Gebruiker/Documenten/shaka-packager/packager/third_party/json/source/include/
CMake Deprecation Warning at packager/third_party/libpng/source/CMakeLists.txt:21 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at packager/third_party/libpng/source/CMakeLists.txt:22 (cmake_policy):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at packager/third_party/libwebm/source/CMakeLists.txt:8 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

--
-- No build type selected, default to: Release
-- Override standard malloc (MI_OVERRIDE=ON)
-- Use the C++ compiler to compile (MI_USE_CXX=ON)
--
-- Library base name: mimalloc
-- Version          : 2.1
-- Build type       : release
-- C++ Compiler     : C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe
-- Compiler flags   : /Zc:__cplusplus
-- Compiler defines :
-- Link libraries   : psapi;shell32;user32;advapi32;bcrypt
-- Build targets    : object
--
--
-- 25.2.0
Cannot find version tag!
Version hash: 84009d82ef
Final output: 84009d82ef
-- Configuring done (1.7s)
-- Generating done (11.1s)
-- Build files have been written to: H:/Users/Gebruiker/Documenten/shaka-packager/build
➜  shaka-packager git:(main) ninja -v -C .\build\ pssh-box.py
ninja: error: loading 'build.ninja': GetLastError() = 2
ninja: Entering directory `.\build\'
➜  shaka-packager git:(main)

I have installed everything using choco + executed the commands listed on the page on how to build the project. (I might be doing something completely wrong, I have never worked with such a project)

I just need that one file :/

Thanks in advance for the help.

cosmin commented 2 months ago

That's not the right target name. I think you can do ninja -vC build pssh_box_py or ninja -vC build packager/pssh-box.py and either would work.

That said during the build step we're merely copying the pssh-box.py file from the source directory to the build output directory. If that's the only file you need why not grab it directly from the source tree?

BelgianNoise commented 2 months ago

That's not the right target name. I think you can do ninja -vC build pssh_box_py or ninja -vC build packager/pssh-box.py and either would work.

ah my bad, I had also tried without the -v with the same result.

That said during the build step we're merely copying the pssh-box.py file from the source directory to the build output directory. If that's the only file you need why not grab it directly from the source tree?

Hm, I was under the impression that I would not be able to run that code elsewhere because of the import widevine_pssh_data_pb2 import.


I am sorry if I am expecting something that's not possible, I was sent here with minimal guidance and usually don't work with python, let alone VS projects.

cosmin commented 2 months ago

Ah ok, so you'll need more than just this file then. You can try to surgically build just the parts you need but it might be easier to build everything then only keep whatever you're interested in.

joeyparrish commented 2 months ago

Each release also has an attachment with the pre-built protos and python script. See, for example, v3.0.4 and the pssh-box.py.tar.gz attachment.

BelgianNoise commented 2 months ago

Thanks for all your quick responses ! I was able to achieve my goal by using the pre-built files from the release.