-
Notifications
You must be signed in to change notification settings - Fork 80
MacOS Discord Integration Crash Fix #799
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
base: main
Are you sure you want to change the base?
Conversation
Added missing locale environment variables for Discord integration
2f02fc7 to
28aa1d3
Compare
34cbd17 to
e888483
Compare
|
On the x86 runner, some warnings are present with version 10.0.22 of DPP library so those warnings are waived to allow compilation with Discord Integration enabled. Shorten-64-to-32 warning is due to this Which truncates a 64 bit unsigned long into 32 bit unsigned int Unused parameter warning is due to trivial base implementations like this |
|
Thanks for finding those errors! I feel it's better to fix DPP than to add one more compiler flag variations! Let me discuss with DPP author on what to do with that. As for the language locale, I don't know much about it. Would this added language setting have any problem on non-English environment for non-English-speaking users? |
|
Does SerialPrograms have any support for other languages besides english? I guess there might be a difference between US english and other variants (MMDDYYYY vs DDMMYYYY, and such). I think at the moment, the bundle should be using the US format so this would be consistent with that. Some of these issues have already been fixed in DPP in later versions so this would likely tie back to #753 |
|
Looking at the files changed, do we still need a different compiler flag for arm and non-arm macOS? |
|
x86 will throw warnings if you have -Wshorten-64-to-32 and if you dont have -Wno-unused-parameter. Both arm and non-arm can have the same compiler flags (dont include -Wshorten-64-to-32 and include -Wno-unused-parameter) but that would make the arm build more permissive with those warnings removed |
|
Kuro's philosophy is to have as many warnings as errors as possible. What about having both -Wshorten-64-to-32 and -Wunused-parameter? I can fix the warnings on x86. Can you point to how to check for those warnings on Github? |
|
To reproduce the issue, you can checkout this pull request from the deployment CI: https://github.com/PokemonAutomation/AutoBuildRelease/pull/8/files Then kick off the workflow, the defaults with the main branch and any tag should do. My question is if there's anything that can be done to resolve the warnings from Arduino-Source? These come from the compilation of the DPP 10.0.22 library source code and my understanding was that the options are to waive the warnings, update DPP (not sure if that will even fix everything), or write our own patches for version 10.0.22 of DPP |
|
theoretically those warnings should have been suppressed already by SYSTEM keyword: target_include_directories(${target_name} SYSTEM PRIVATE ../3rdParty/)how about changing one line below: pkg_search_module(DPP dpp=10.0.22)
if (DPP_FOUND) # enable dpp integration
target_compile_definitions(SerialProgramsLib PUBLIC PA_DPP)
## to build against headers within this repo and properly set flags ##
## don't enable the following line ##
# target_include_directories(SerialProgramsLib PRIVATE ${DPP_INCLUDE_DIRS})
target_link_directories(SerialProgramsLib PUBLIC ${DPP_LIBRARY_DIRS})
target_link_libraries(SerialProgramsLib PUBLIC ${DPP_LIBRARIES})
endif()to include homebrew one but with target_include_directories(SerialProgramsLib SYSTEM PRIVATE ${DPP_INCLUDE_DIRS}) |
f486d30 to
e888483
Compare
|
I've tried this, let me know if I misunderstood your comment. The warnings are still present unfortunately, possibly because it's not apart of the headers and is a template in DPP code |
|
on arm macOS, building would be failed without and with Can you open |
|
but if the compiler on x64 doesn't respect that, we may not have other choices |
Set locale on MacOS
This resolves a crash that occurs when Discord Integration on MacOS sends a message to Discord when the app is opened via the bundle. The environment when opening the app via bundle differs from when it's opened via the executable and may be missing certain variables that prevent the locale from being automatically set.
Stacktrace: