Skip to content

Refactor CMake to create GUI free library - #1437

Open
jw098 wants to merge 11 commits into
PokemonAutomation:mainfrom
jw098:cmake3
Open

Refactor CMake to create GUI free library#1437
jw098 wants to merge 11 commits into
PokemonAutomation:mainfrom
jw098:cmake3

Conversation

@jw098

@jw098 jw098 commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

I also applied ifdef to all usages of Qt (in the files included in the Core library).

@Mysticial

Copy link
Copy Markdown
Collaborator

Why is this touching so much? It's rather invasive too. If you're trying to make the minimal Qt-less library for Python integration, why is the entire media stack being pulled in? Same with the Discord integration?

@jw098

jw098 commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator Author

It's mostly because of GlobalSettingsPanel.cpp. It includes Discord stuff, ErrorReports, which in turn pull in media stuff.

Would you prefer if we just ifdef the stuff higher up in the chain?

NintendoSwitch_ProController, NintendoSwitch_Joycon, NintendoSwitch_PABotBase2_OemController, NintendoSwitch_PABotBase2_Controller all require "NintendoSwitch/NintendoSwitch_Settings.h", which eventually includes GlobalSettingsPanel. If we ifdef NintendoSwitch_Settings, that would solve a lot of the problems.

The other problem is that ControllerState includes OperationFailedException, which includes ProgramNotifications, and all the Discord stuff. So OperationFailedException would need to be ifdef as well.

@Mysticial

Copy link
Copy Markdown
Collaborator

Yeah, ideally we break the dependencies much higher up.

GlobalSettingsPanel does seem to be the right place to if-def out all the options that aren't relevant to the Python lib.

ControllerState is a real problem as it exposes the fact that we don't have a "lightweight" exception class that doesn't have all the reporting stuff tied to it. I should take a look to see who catches those OperationFailedExceptions that are being thrown.

@jw098

jw098 commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator Author

Could ControllerState just throw a regular Exception (the base class for OperationFailed)?

EDIT: I decided to go with InternalProgramError, since I'm not sure that it should ever happen. Alternatively, maybe we could do UserSetupError?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants