Skip to content

Fix kauai tests, followed by various fixes for Linux to enable 3dmovie to build and launch#13

Merged
benstone merged 23 commits into
benstone:mainfrom
mcayland:feature/linux-platform-part4
Nov 25, 2025
Merged

Fix kauai tests, followed by various fixes for Linux to enable 3dmovie to build and launch#13
benstone merged 23 commits into
benstone:mainfrom
mcayland:feature/linux-platform-part4

Conversation

@mcayland
Copy link
Copy Markdown
Contributor

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, KauaiGuiTest and khello all build and run on Linux, followed by a final set of fixes that enable 3dmovie to 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 😄

Comment thread kauai/src/platlinux.cpp
Comment thread kauai/src/platlinux.cpp Outdated
Comment thread src/engine/movie.cpp Outdated
Comment thread src/studio/utest.cpp Outdated
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.
@mcayland mcayland force-pushed the feature/linux-platform-part4 branch from 81a5d8b to ce570f9 Compare November 24, 2025 22:13
@benstone
Copy link
Copy Markdown
Owner

Thanks @mcayland for all your awesome work on this PR series! It is amazing to see 3DMMEx running on Linux 😀

@benstone benstone merged commit e49ee35 into benstone:main Nov 25, 2025
1 check passed
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