Skip to content
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

Parameterize the iso_data folder for goalc #3692

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

massimilianodelliubaldini
Copy link

@massimilianodelliubaldini massimilianodelliubaldini commented Sep 30, 2024

I hope this is everything I needed, and nothing I didn't.

What's Changed

This update adds a command-line parameter to goalc, --iso-path. Providing a path to a directory like D:\Files\Repositories\ArchipelaGOAL\iso_data\jak1 will inform the compiler to use that directory instead.

Why is this useful?

When combined with --proj-path, the compiler can be pointed to a completely different project folder, given the (mi) command, and immediately begin building from that directory, with everything it needs. This eliminates the need to copy iso_data to multiple data directories.

If a subsequent change to the Launcher is made, each mod could be passed an --iso-path pointing to a single shared folder, allowing mods to each run their own REPL without requiring a copy of iso_data in a subfolder.

Independent testing required!

My local repositories are a little suspect, with a mod, a fork of mod-base, and a fork of jak-project, all on the same drive. My decompiler_out and iso_data folders are in the mod repo, not mod-base nor jak-project. So what I did was make the change in the mod-base fork, point --proj-path and --iso-path to the mod folders, and then ran (mi). The output showed a build starting with no errors.

Then I had to create this PR, which my fork of mod-base is unable to do, so I created a patch file, forked jak-project, then applied the patch there.

All this is to say that it would be preferable if someone could apply this code to their own installation and see if it works. Even I wouldn't take my own word for this.

@OpenGOALBot
Copy link
Collaborator

Can one of the admins verify this patch?

@xTVaser xTVaser added this to the October 2024 milestone Oct 1, 2024
@xTVaser
Copy link
Member

xTVaser commented Oct 1, 2024

ok to test

@xTVaser xTVaser self-assigned this Oct 1, 2024
Copy link
Member

@xTVaser xTVaser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the main use-case on the launcher, it seems to work open-goal/launcher#582

Just one suggestion around cleaning up some of the parameter passing changes.

The compilation check failure is a weird one....i cant really explain what's going on there. I would be surprised if it was related to the PR coming in from a fork but that would be my first guess.

  • Nevermind i think it makes sense, I think you uncovered a flaw in that test since the binaries are dynamically linked, and this PR changed a function signature. I'll have to fix that. Cherry pick this commit dc957f6

goalc/compiler/Compiler.cpp Outdated Show resolved Hide resolved
@xTVaser xTVaser mentioned this pull request Oct 4, 2024
@massimilianodelliubaldini
Copy link
Author

With No Paths:
image

With Proj Path only (note: I have my own copy of iso_data inside this mod directory):
image

With Proj Path and ISO Path:
image

Compiling with the last:
image

@xTVaser xTVaser marked this pull request as ready for review October 5, 2024 02:30
common/repl/repl_wrapper.cpp Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants