-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add MacOS Utility executable #20647
Add MacOS Utility executable #20647
Conversation
I'm going to guess it was #18955 |
Adding the label since we need to figure out what to do with the duplication/if we can reuse the existing launcher. |
I'd expect this to be directly invoking the hostfxr instead of using an NSTask (which is there to provide the crash dialog!). |
Invoking hostfxr directly now. I've resolved part of the duplication issue and the utility can now be properly terminated with ctrl + c |
b23b06d
to
7fcc7da
Compare
014967d
to
dc7c31b
Compare
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.
Some more style comments (not yet tested):
90cab6d
to
27f1d92
Compare
packaging/macos/utility.m
Outdated
for (int i = argc; i > 0; i--) | ||
argv[i + 1] = argv[i - 1]; | ||
|
||
argv[0] = (char*)[hostPath UTF8String]; |
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.
These in general wouldn't be safe (UTF8String
returns a pointer to an internal buffer that will be overwritten and/or released, which is why the types don't match without the cast), but since we're immediately calling into _mono_main
I think it will be safe.
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.
It might be better to just rewrite it in regular C so these conversions wouldn't be necessary. But I won't be doing that.
ca42c18
to
9b13cb0
Compare
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.
I'm just going to put this here for the record and if noone complains or reviews I'll just merge.
👍
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.
ok
I was made aware that that
OpenRA.Utility.exe
was removed from macOS builds as part of upgrading to dotnet 6, but I'm unable to find the PR. This change was less than ideal as now in order to be able to use the utility, macOS users are forced to download and compile source.Compiled utility Utility.zip
You use it by cd'ing to game files
MacOS
folder and running./Utility [yaml-command]
As this was the first time I've programmed in C / Objective C this most likely is low quality code and needs a refactor. Ping @pchote