bruvzg / gdsdecomp

Godot reverse engineering tools
MIT License
1.44k stars 142 forks source link

Unpack project.binary #16

Closed ealione closed 2 years ago

ealione commented 3 years ago

Can the project.binary file be decompiled also? If not then this could be an enhancement idea. I've forgotten my "pixel perfect" settings that I made 3 years ago and would be nice to also be able to do that.

nikitalita commented 3 years ago

yep, I'm doing that on my fork. https://github.com/nikitalita/gdsdecomp/tree/3.2-cli-stuff just unpack the pak/exe and it will do that automatically

vmtest888 commented 3 years ago

yep, I'm doing that on my fork. https://github.com/nikitalita/gdsdecomp/tree/3.2-cli-stuff just unpack the pak/exe and it will do that automatically

Has the binary been uploaded?

nikitalita commented 3 years ago

its since been merged in here. There are no binaries, you have to compile it yourself.

godecomp commented 2 years ago

The v0.0.7 pre-release binary located here: https://github.com/bruvzg/gdsdecomp/releases/tag/v0.0.7 extracted project.binary from the pck file but it's not in readable form. Is there a way to decompile it and what are the steps to do so?

In the case the pre-release didn't contain the 3.2-cli-stuff fork code I tried compiling the current master using the following build configuration (same as v0.07):

tools=no use_lto=yes warnings=extra disable_3d=yes target=release debug_symbols=no optimize=size no_editor_splash=yes module_assimp_enabled=no module_bmp_enabled=no module_bullet_enabled=no module_camera_enabled=no module_csg_enabled=no module_cvtt_enabled=no module_jpg_enabled=no module_mbedtls_enabled=no module_tga_enabled=no module_enet_enabled=no module_mobile_vr_enabled=no module_upnp_enabled=no module_gdnative_enabled=no module_opensimplex_enabled=no module_pvr_enabled=no module_webm_enabled=no module_recast_enabled=no module_webp_enabled=no module_websocket_enabled=no module_gridmap_enabled=no module_xatlas_unwrap_enabled=no module_squish_enabled=no use_static_cpp=yes builtin_freetype=yes builtin_libpng=yes builtin_zlib=yes

it produced godot.windows.opt.64.exe which couldn't be run because it was missing the *.pck file. How do I create that for gdsdecomp?

Thank you!

nikitalita commented 2 years ago

it produced godot.windows.opt.64.exe which couldn't be run because it was missing the *.pck file. How do I create that for gdsdecomp?

You have to compile both the editor and the template, then export the standalone project using the editor using that template.

Just use the standalone artifact from this action result: https://github.com/nikitalita/gdsdecomp/actions/runs/1339048875

all my branches are pretty old and all the stuff I was working on that is actually working is in master right now, so don't worry about those.

ultima-gay commented 2 years ago

I really do not understand at all, is it possible to to turn a "project.binary" file (from using the Explore a PCK archive option on a godot .exe file) into a usable "project.godot" file with any of the current branches of RE tools and if so, how?

godecomp commented 2 years ago

Thank you for the instructions. I managed to compile both and now they are renamed correctly. However, I'm still struggling with getting the project.binary into a readable form. Can you look over the steps I'm taking and tell me what I'm doing incorrectly?

  1. launch RETools.exe (based on master)
  2. from the menu, select: "Resources" > "Convert binary resources to text..."
  3. (an "Open File(s)" dialog appears)
  4. navigate to the folder with the files extracted from the pck
  5. change the file filter from "Binary resource files (.scn, .res)" to "*All Files ()**"
  6. select project.binary
  7. click the "Open" button

at this point a "Convert resources" dialog appears with the text "At least one error was detected!": .. "project.binary (ResourceFormatLoaderText error)"

Any suggestions?

nikitalita commented 2 years ago

Use the CLI option.

GDRE_tools.exe --extract=path/to/pack.pck --output-dir=output/dir

Use the "Standalone" artifacts from this run: https://github.com/nikitalita/gdsdecomp/actions/runs/1358643185

godecomp commented 2 years ago

Thank you! The CLI option on the executable I built didn't work but the one from your run did. I'll have to compare the build options to find out what I did wrong.