-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat!: Split Inkay into a module and a plugin #50
base: main
Are you sure you want to change the base?
Conversation
This is necessary for a future Aroma feature. This also makes more clear the immutability of the patches that Pretendo requires, since they cannot be reverted easily. All patching code is now managed inside the module, which the plugin triggers by calling an exported function from it. The WWP reset code remains within the plugin as it isn't strictly tied to the patches.
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.
Haven't tested it yet but generally seems ok. I still find the whole split kinda strange since removing the plugin would just mean users can't control what's going on anymore, but I like that the module calls into ShowNotification too so they're still informed about what's up
|
||
CXXFLAGS := $(CFLAGS) -std=c++20 | ||
|
||
ASFLAGS := -g $(ARCH) | ||
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -Wl,-gc-sections |
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.
-gc-sections is useful to reduce binary size (which is a concern for us as a project listed on aroma.foryour.cafe) - any particular reason to yoink it here?
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.
There is no particular reason, I had just imported the Makefile from the example module and adapted what I saw. I will add it back
|
||
if (OSDynLoad_FindExport(module, OS_DYNLOAD_EXPORT_FUNC, "Inkay_Initialize", reinterpret_cast<void * *>(&moduleInitialize)) != OS_DYNLOAD_OK) { | ||
DEBUG_FUNCTION_LINE("Failed to find initialization function"); | ||
return; |
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.
Might be good to call ShowNotification on these error paths
|
||
#include <kernel/kernel.h> | ||
#include <mocha/mocha.h> | ||
#include <function_patcher/function_patching.h> | ||
#include "patches/account_settings.h" | ||
#include "patches/dns_hooks.h" | ||
#include "patches/eshop_applet.h" | ||
#include "patches/olv_applet.h" |
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 ones are arguably mutable where the IOSU-side ones aren't
Probably better to keep it all together though to prevent weird half-patched failure modes
Resolves #XXX
Changes:
This is necessary for a future Aroma feature. This also makes more clear the immutability of the patches that Pretendo requires, since they cannot be reverted easily.
All patching code is now managed inside the module, which the plugin triggers by calling an exported function from it. The WWP reset code remains within the plugin as it isn't strictly tied to the patches.
The language files haven't been moved for backwards compatibility with Weblate.