Skip to content

MacOS ARM support <3#147

Closed
enzofrnt wants to merge 111 commits intoBeamMP:masterfrom
enzofrnt:master
Closed

MacOS ARM support <3#147
enzofrnt wants to merge 111 commits intoBeamMP:masterfrom
enzofrnt:master

Conversation

@enzofrnt
Copy link

@enzofrnt enzofrnt commented Nov 8, 2024

Here is the support for MacOS on ARM64 using crossover (proton like but on Mac) <3

This pull request introduces support for building and running the project on macOS, alongside existing support for Windows and Linux. The changes include updates to the build configuration, source code modifications to handle macOS-specific functionality, and additional code to support macOS-specific paths and libraries.

Build Configuration:

  • Added a new GitHub Actions workflow for building the project on macOS using CMake. (.github/workflows/cmake-macos.yml)
  • Updated CMakeLists.txt to include macOS-specific build configurations and dependencies. [1] [2]

Source Code Modifications:

  • Updated various source files to include macOS-specific preprocessor directives and handle macOS-specific paths and libraries. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Added macOS-specific implementations for functions in GameStart.cpp to handle game initialization and execution. [1] [2] [3]

Header File Updates:

  • Updated Options.h to include macOS in the platform-specific executable name definition.
  • Added macOS-specific function declarations in Security/Init.h.
  • Included additional headers and macOS-specific code in vdf_parser.hpp. [1] [2]

Additional Functionality:

  • Implemented macOS-specific functions for handling file paths and validating game installations in BeamNG.cpp. [1] [2] [3]

```bash
Book • ➜  ~/GithubRepo/BeamMP-Launcher git:(ghcw-session-d22d) ✗ cmake --build . --config $BUILD_TYPE
[  5%] Building CXX object CMakeFiles/Launcher.dir/src/GameStart.cpp.o
In file included from /Users/enzofournet/GithubRepo/BeamMP-Launcher/src/GameStart.cpp:13:
/Users/enzofournet/GithubRepo/BeamMP-Launcher/include/vdf_parser.hpp:134:43: warning: 'codecvt_utf8<wchar_t>' is deprecated [-Wdeprecated-declarations]
  134 |                 std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
      |                                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/codecvt:194:28: note: 'codecvt_utf8<wchar_t>' has been explicitly marked deprecated here
  194 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 : public __codecvt_utf8<_Elem> {
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:1022:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
 1022 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
      |                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:995:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  995 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
In file included from /Users/enzofournet/GithubRepo/BeamMP-Launcher/src/GameStart.cpp:13:
/Users/enzofournet/GithubRepo/BeamMP-Launcher/include/vdf_parser.hpp:134:22: warning: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated [-Wdeprecated-declarations]
  134 |                 std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
      |                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/locale:3114:28: note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked deprecated here
 3114 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:1022:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
 1022 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
      |                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:995:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  995 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
2 warnings generated.
[ 11%] Building CXX object CMakeFiles/Launcher.dir/src/Security/BeamNG.cpp.o
In file included from /Users/enzofournet/GithubRepo/BeamMP-Launcher/src/Security/BeamNG.cpp:13:
/Users/enzofournet/GithubRepo/BeamMP-Launcher/include/vdf_parser.hpp:134:43: warning: 'codecvt_utf8<wchar_t>' is deprecated [-Wdeprecated-declarations]
  134 |                 std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
      |                                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/codecvt:194:28: note: 'codecvt_utf8<wchar_t>' has been explicitly marked deprecated here
  194 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 : public __codecvt_utf8<_Elem> {
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:1022:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
 1022 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
      |                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:995:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  995 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
In file included from /Users/enzofournet/GithubRepo/BeamMP-Launcher/src/Security/BeamNG.cpp:13:
/Users/enzofournet/GithubRepo/BeamMP-Launcher/include/vdf_parser.hpp:134:22: warning: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated [-Wdeprecated-declarations]
  134 |                 std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
      |                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/locale:3114:28: note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked deprecated here
 3114 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:1022:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
 1022 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
      |                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:995:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  995 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
2 warnings generated.
[ 17%] Linking CXX executable BeamMP-Launcher
ld: warning: ignoring duplicate libraries: 'vcpkg_installed/arm64-osx/lib/libz.a'
[100%] Built target Launcher
Book • ➜  ~/GithubRepo/BeamMP-Launcher git:(ghcw-session-d22d) ✗ Book • ➜  ~/GithubRepo/BeamMP-Launcher git:(ghcw-session-d22d) ✗ cmake --build . --config $BUILD_TYPE
[  5%] Building CXX object CMakeFiles/Launcher.dir/src/GameStart.cpp.o
In file included from /Users/enzofournet/GithubRepo/BeamMP-Launcher/src/GameStart.cpp:13:
/Users/enzofournet/GithubRepo/BeamMP-Launcher/include/vdf_parser.hpp:134:43: warning: 'codecvt_utf8<wchar_t>' is deprecated [-Wdeprecated-declarations]
  134 |                 std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
      |                                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/codecvt:194:28: note: 'codecvt_utf8<wchar_t>' has been explicitly marked deprecated here
  194 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 : public __codecvt_utf8<_Elem> {
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:1022:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
 1022 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
      |                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:995:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  995 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
In file included from /Users/enzofournet/GithubRepo/BeamMP-Launcher/src/GameStart.cpp:13:
/Users/enzofournet/GithubRepo/BeamMP-Launcher/include/vdf_parser.hpp:134:22: warning: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated [-Wdeprecated-declarations]
  134 |                 std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
      |                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/locale:3114:28: note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked deprecated here
 3114 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:1022:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
 1022 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
      |                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:995:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  995 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
2 warnings generated.
[ 11%] Building CXX object CMakeFiles/Launcher.dir/src/Security/BeamNG.cpp.o
In file included from /Users/enzofournet/GithubRepo/BeamMP-Launcher/src/Security/BeamNG.cpp:13:
/Users/enzofournet/GithubRepo/BeamMP-Launcher/include/vdf_parser.hpp:134:43: warning: 'codecvt_utf8<wchar_t>' is deprecated [-Wdeprecated-declarations]
  134 |                 std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
      |                                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/codecvt:194:28: note: 'codecvt_utf8<wchar_t>' has been explicitly marked deprecated here
  194 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 : public __codecvt_utf8<_Elem> {
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:1022:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
 1022 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
      |                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:995:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  995 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
In file included from /Users/enzofournet/GithubRepo/BeamMP-Launcher/src/Security/BeamNG.cpp:13:
/Users/enzofournet/GithubRepo/BeamMP-Launcher/include/vdf_parser.hpp:134:22: warning: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated [-Wdeprecated-declarations]
  134 |                 std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1;
      |                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/locale:3114:28: note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked deprecated here
 3114 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:1022:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
 1022 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
      |                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/__config:995:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  995 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
2 warnings generated.
[ 17%] Linking CXX executable BeamMP-Launcher
ld: warning: ignoring duplicate libraries: 'vcpkg_installed/arm64-osx/lib/libz.a'
[100%] Built target Launcher
Book • ➜  ~/GithubRepo/BeamMP-Launcher git:(ghcw-session-d22d) ✗
```
@enzofrnt enzofrnt requested a review from WiserTixx November 27, 2024 12:35
@enzofrnt
Copy link
Author

@WiserTixx finished

@enzofrnt
Copy link
Author

@WiserTixx done !

@enzofrnt enzofrnt requested a review from WiserTixx December 4, 2024 21:50
@enzofrnt
Copy link
Author

enzofrnt commented Dec 4, 2024

Any news ?

@enzofrnt
Copy link
Author

I think that I have answered all your concerns.

@enzofrnt enzofrnt requested a review from lionkor February 11, 2025 11:10
@WiserTixx
Copy link
Collaborator

Hey, could you make this work with just wine? It has come to my attention that crossover is a paid product that uses wine under the hood. Also it seems like some code got messed up after you updated your branch, could you fix that?

@Ethen-Blackett
Copy link

Hey, could you make this work with just wine? It has come to my attention that crossover is a paid product that uses wine under the hood. Also it seems like some code got messed up after you updated your branch, could you fix that?

Compatibility with Whiskey would be much appreciated 🙌
https://github.com/Whisky-App/Whisky

@enzofrnt
Copy link
Author

enzofrnt commented Jan 9, 2026

Clode in favor of #221.

@enzofrnt enzofrnt closed this Jan 9, 2026
@github-project-automation github-project-automation bot moved this from In progress to Done in BeamMP - Development Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add support for MacOS using CrossOver Add support for MacOS Wine - Especially for CrossOver

5 participants