hhyyrylainen / GodotPckTool

Standalone tool for extracting and creating Godot .pck files
MIT License
383 stars 31 forks source link

doesnt work or build #38

Closed zlago closed 2 months ago

zlago commented 3 months ago

trying to extract files gives this

...
terminate called after throwing an instance of 'std::runtime_error'
  what():  files for entry contents failed
Aborted (core dumped)

trying to build, regardless of where i put MD5/src/md5.h (./, build/, src/) spits out this

CMake Error at third_party/CMakeLists.txt:13 (add_library):
  Cannot find source file:

    MD5/src/md5.h

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
  .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
  .f95 .f03 .hip .ispc

CMake Error at third_party/CMakeLists.txt:13 (add_library):
  No SOURCES given to target: md5

also, is there a spec for the .pck format? id honestly rather ahead and rip the assets with dd at this point

hhyyrylainen commented 3 months ago

trying to build, regardless of where i put MD5/src/md5.h (./, build/, src/) spits out this

The third party code modules are included as git submodules, so you may have skipped doing git submodule update --init causing the missing files.

trying to extract files gives this

The error message is not exactly clear, I'll improve it for the future, but basically the error is that the tool tried to read data for a file entry in the .pck file but was unable to do so (it either found an offset into the file that was past the end of the file or the data length was wrong). So to me this seems like you have a malformed pck file or there is a very rare bug in this tool. (It should be unlikely that an unrelated file with .pck extension has the Godot magic bytes at the start)

also, is there a spec for the .pck format? id honestly rather ahead and rip the assets with dd at this point

AFAIK there is not. I wrote my tool based on reading the Godot Engine source code: https://github.com/godotengine/godot/blob/8e2141eac534f6984bb0bdbcefbd17de27ae0993/core/io/pck_packer.cpp

zlago commented 3 months ago

The third party code modules are included as git submodules

the README had no mention of how to build the software, im used to READMEs including install instructions i can follow if git clone --depth=1 foo && cd foo && make is not enough

hhyyrylainen commented 3 months ago

The readme has a section on how to build at the end: https://github.com/hhyyrylainen/GodotPckTool?tab=readme-ov-file#building

I'm not sure if cloning depth is an issue, but the readme has this section in it:

Also don't forget to init git submodules.

git submodule init
git submodule update
zlago commented 3 months ago

The readme has a section on how to build at the end: https://github.com/hhyyrylainen/GodotPckTool?tab=readme-ov-file#building

in my defence i read readmes with less ><

hhyyrylainen commented 2 months ago

I'll assume this now at least builds. If you have a .pck file that cannot be read correctly you can open a new issue and attach the file so that I can investigate further.