Skip to content

4D Miner Mod Example for the 4D-Modding framework (using 4dm.h) using CMakeLists (for use on linux)

License

Notifications You must be signed in to change notification settings

4D-Modding/4dmod-example-cmake

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

114 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4DMod Example (but cmake)

This is a project example for making 4D Miner mods using the 4D-Modding framework.

For basic tutorials (like on how to start modding and on how to package the mod) you should check the 4dmodding-tutorials repo. More advanced tutorials are going to come later in a video format.

You can also check out 4D-Fly Source-Code.

Also if you are going to use this 4DMod Example, use it as a repo template instead of just git clone-ing it

This repo is made for people not wanting to use Visual Studio 2022 (or for Linux users), but still requires MSVC.

To setup MSVC on Linux, please follow this guide (do not proceed into the Clang part)

Then, run cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows to generate the build files (on Linux with the above MSVC setup you will need to set the CC and CXX env variables to cl, so CC=cl CXX=cl cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows).

By default on Linux it will generate a Makefile, so you can just run the make command in the build directory, which should compile the mod into the build/bin directory (there should be a .dll and a .pdb file, which you should package both with your mod).

You must use the Release config in a multi-config build system (like Visual Studio).

About

4D Miner Mod Example for the 4D-Modding framework (using 4dm.h) using CMakeLists (for use on linux)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 54.0%
  • C++ 43.3%
  • Batchfile 2.7%