Fix kauai tests, followed by various fixes for Linux to enable 3dmovie to build and launch#13
Merged
Merged
Conversation
benstone
reviewed
Nov 24, 2025
When compiling under Linux, including the util.h header eventually pulls in the X11/X.h header which causes compilation of gtest-type-util.h to fail since it redefines None (see google/googletest#371 for more information). Work around the issue by reversing the include header order.
…for non-Windows platforms This includes an implementation for platlinux.cpp.
This file is unused on Windows and so can simply be removed.
This allows the KauaiGuiTest target to be built directly.
…latforms The in-built BRender memory functions can be used directly on non-Windows platforms since there is no requirement to allocate and deallocate memory from within the same library.
Replace the Windows-specific UCHAR type with the cstdint standard uint8_t type.
This enables msnd.cpp to compile on non-Windows platforms.
For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform.
Replace the Windows-specific DWORD type with the cstdint standard uint32_t type.
Replace the Windows-specific BOOL type with the cstdint standard bool type.
…n-Windows platforms The existing __try/__except is a MSVC-specific construct.
The existing #ifdef WIN32 is in the correct place, however it fails to compile on non-Windows platforms because the DWORD declarations are outside of it. Also separate the initialisation from the declaration as otherwise MSVC generates an error because it doesn't like that the static initialiser can occur after the goto.
…or pszValue The definition of pszValue in the StaticConfigItem_t type is a constant string and not an integer.
… (Classic) Mac For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform.
Replace the Windows-specific BYTE type with the cstdint standard uint8_t type.
…) for non-Windows platforms These functions are used to convert between Windows CP1252 strings and UTF-8 strings as used on non-Windows POSIX platforms.
…s platforms This function is used to compare a range of characters between two strings.
…dows platforms This includes an implementation for platlinux.cpp.
Use the existing logic in FNI::FRename() to provide a separate FNI::FIsReadOnly() method and add implementations to fniwin.cpp and fniposix.cpp. The new function can be immediately used in FNI::FRename() to test its functionality.
Use the new FNI::FIsReadOnly() function to set the value of _fReadOnly in MVIE::_FSetPfilSave(). This is to avoid having platform-specific code in movie.cpp.
…linux-release presets These can be used to generate debug and release builds on a system running Linux.
This is to help ensure that any changes do not break the Linux gcc x86_64 build.
81a5d8b to
ce570f9
Compare
Owner
|
Thanks @mcayland for all your awesome work on this PR series! It is amazing to see 3DMMEx running on Linux 😀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series is last set of changes required in order to be able to build and run 3DMMEx on Linux!
It is mainly a set of trivial fixes that update the tests so that
KauaiTest,KauaiGuiTestandkhelloall build and run on Linux, followed by a final set of fixes that enable3dmovieto build and launch. Once running it is possible to enter the studio and create, load and save movies in a similar manner to on Windows with only the video player and sound/midi playback missing.Huge thanks to @benstone for all the amazing work on adding an SDL frontend to 3DMMEx and their help and support, without which this would have been an almost impossible task. The aim is to further build upon this work to ensure that McZee and the full 3DMM experience will remain accessible for future generations to come, so watch this space 😄