-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce reccmp project file concept #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just some minor issue in the CI
Just starting to play with this now. I like the YAML config setup because it nicely solves the problem of "where do you put the files?" that (I assume) we've all had to figure out in our own way. I'm less sure about the sample code files and cmake stuff. A new recomp project might not use C++ or might be a DOS program that would require a specific compiler under emulation. Any way to disable that from the |
I can't promise a detailed review before tomorrow, but the approach looks good so far! I'll try and see how well the Ghidra import works. |
124fdb9
to
1fbc4a3
Compare
1fbc4a3
to
63695fa
Compare
I added a Speaking about DOS. I added a Rename to |
Sorry for the spam - didn't want to open a pointless issue but would this PR make this tool usable for other projects. I'd like to integrate it into https://github.com/CriminalRETeam/gta2_re/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall! Here are some remarks on what I found:
-
README:
- It'd be great if you could add the descriptions you made in this PR to this repo's README, (either in the main README.md or in another referenced file). I'm also happy with doing that in a separate PR if you feel like the interface is still too unstable.
- new ticket: Update README based on #1 #6
- Make sure no README gets lost (for example: I can't find the info on recompiling BETA10 here or on your branch). I think we'll double check that anyway once we migrate
isle
, just wanted to raise the awareness.
- It'd be great if you could add the descriptions you made in this PR to this repo's README, (either in the main README.md or in another referenced file). I'm also happy with doing that in a separate PR if you feel like the interface is still too unstable.
-
I encountered some issues when I tried to set up BETA10 (see e.g. here):
- I added the following to
reccmp-project.yml
:BETA10: filename: BETA10.DLL source-root: LEGO1
- Neither auto-generated
reccmp-build.yml
(inbuild
orbuild_debug
) contains an entry for BETA10. The manual fix is to addtoBETA10: path: '[...]/build_debug/LEGO1.DLL' pdb: '[...]/build_debug/LEGO1.DLL'
build/reccmp-build.yml
.build_debug/reccmp-build.yml
is obsolete and can be removed. I am not sure if this workflow can be improved significantly, partly because the build artifact for BETA10 is also calledLEGO1.DLL
. - This is an actual bug: With BETA10 set up, I get hundreds of false positive
duplicate_offset
warnings inisledecomp
, likely because of the shared codebase between BETA10 and LEGO1.
- I added the following to
-
Others:
- I assume it's by design that you can only run scripts like
reccmp.tools.reccmp
from thebuild
folder since it doesn't find thereccmp-build.yml
otherwise? I don't see an easy way around this right now, just wanted to make sure that it's intentional. - The Ghidra import does not work correctly. I'll open a ticket here to find a solution once this PR is merged. IMHO this should be fixed before we migrate
isle
-> Fix the Ghidra import #2 - General question: What is your personal intended workflow if you want to work on the LEGO1 decompile and
reccmp
at the same time? Install them next to each other and do apip install -e
?
- I assume it's by design that you can only run scripts like
On this point: should Another option is to use the base filename of the original binary. This is what the main |
Given the extremely low runtime of |
I agree, but we should solve the args.paths = list(target.source_root for target in project.targets.values()) If no paths are specified at the command line, we combine all the source roots from the reccmp-project file. If your yaml looks like this then the files in the LEGO1 directory will appear twice: targets:
beta10:
filename: BETA10.DLL
source-root: LEGO1
lego1:
filename: LEGO1.DLL
source-root: LEGO1 If we isolate based on the target name (to match the other scripts) then this won't happen. |
I fixed this by going through a python set: list(set(target.source_root for target in project.targets)) |
I can confirm that the issue is gone, thank you! |
There are 3 kind of project files:
reccmp-project.yml
: should be part of the git repoe.g.
reccmp-user.yml
: should not be committed to the repoe.g.
reccmp-build.yml
: should not be committed to the repoe.g.
reccmp-project
andreccmp-user.yml
are expected to be in the same directory.reccmp-build.yml
can be in the build directory, and contains a reference to the project root.The
reccmp-project
script can generate a new reccmp project with the commandreccmp-project create ...
The
reccmp-project
script can createproject-user.yml
andproject-build.yml
with the commandreccmp-project detect ...
I modified the various
reccmp-*
utilities such that it will look forreccmp-build.yml
in the working directory.It uses a similar search procedure as git uses for finding a
.git
folder: walk the tree until it find either areccmp-build.yml
file, or areccmp-project.yml
file, depending on whether it needs recompiled binaries.There is also cmake support to automatically generate a
reccmp-build.yml
file. Thereccmp.cmake
file should be committed to foreign recompilation projects.I modified the isle project to make use of the reccmp scripts in this branch on my fork.
I made it a git submodule in order to be able to run the unittests, that depend on isle executables.
Ideally, the isle project should just need to install
git+https://github.com/isledecomp/reccmp.git
.