This package was created using the Min-DevKit for Max, an API and supporting tools for writing externals in modern C++.
The Package builds on Xcode 9 or Later or Visual Studio 2017 or later:
- On Mac this means Xcode 9 or later (you can get from the App Store for free).
- On Windows this means Visual Studio 2017 (you can download a free version from Microsoft). The installer for Visual Studio 2017 offers an option to install Git, which you should choose to do.
Building the package requires Cmake:
-
On Mac use homebrew to install Cmake.
- Go to
https://brew.shto get homebrew - Follow the directions at the end of the install script to add homebrew to your PATH
- Use
brew install cmaketo install cmake - After installing cmake you may need to reset the Xcode configuration with
sudo xcode-select --reset - You may also need to open Xcode. Go to Xcode->Settings->Locaton. Find the Command Line tools and specifically set the Xcode version. This will allow cmake to find Clang for your Xcode Version. Reset command abvove should take care of this, but you can set it here if not.
- Follow the instructions at the end of the homebrew install to add brew to your PATH.
- Go to
-
on Windows install binaires and add Cmake to path (TODO: Confirm)
- Clone this the repo to your Max Packages folder or a folder that is attached to the Max Packages folder by symbolic link. Make sure you clone recursively so that all submodules are properly initiated. Use your Compiler's clone command or in the terminal, from the Packages folder use
git clone https://github.com/jkaplan55/ISOr3.git --recursive ISOr3 - Download additional libraries appropriate to your platform from Google Drive and extract into the folder where you cloned the repo.
- On Windows: Copy both .dll's in the "shared libs" into your max folder (where max.exe lives). The release .dll must also be included in the
resources\supportfolder of any standalones that use the externals. - In the Terminal or Console app of your choice, change directories (cd) into the folder you cloned the repo, then Download additional submodules:
git submodule update --init --recursive
- In folder you cloned the repo,
mkdir buildto create a folder with your various build files cd buildto put yourself into that folder Build Project Files:- on Mac:
cmake -G Xcode .. - on Windows:
cmake -G "Visual Studio 17 2022" ..
For each Max Object Target (ignore ALL BUILD, LIB, and RUN_TESTS):
- Build Settings -> Architectures: remove
x86_64 - Build Settings -> Header Search Paths: add
"$(SRCROOT)/includes/NakamaMac/lib/nakama-sdk.framework,$(SRDROOT)/includes/cpr/include, and$(SRCROOT)/includes - Build Settings -> Runpath Search Paths: add
$(SRCROOT)/includes/NakamaMac/lib - Build Settings -> Library Search Paths: add
$(SRCROOT)/includes/NakamaMac/lib - General -> Frameworks and Libraries: add
libnakama-sdk.dylibfrom../includes/NakamaMac/lib - You may need to update the search paths of some of the Max Libraries do to bad quoting around paths with spaces.
- Set MacOS Deployment Target to 10.15. Only Seqouia and later is supported.
- Set the Build Target in the bar at the top to All Build (An xcconfig file can be found int he settings folder off the root. But it does work correclty in the current version)
View->Other Windows->Property Manager For each Max Object Target (ignore ALL BUILD, LIB, and RUN_TESTS):
- Select
Debug | x64andRelWithDebInfo | x64configurations. Right click and choose "Add Existing Property Sheet". Navigate to../project settingsand selectISO Project Debugx64. - Select
Release | x64andMinSizeRel | x64configurations. Right click and choose "Add Existing Property Sheet". Navigate to../project settingsand selectISO Project Releasex64. - Select all configurations: Right click and choose Properties. Then Linker->Input-> Additional Dependencies-> edit ->check "Inherit from parent or project defaults"-> OK-> Apply
OR
Configure Properites directly for each Max Object Target (ignore ALL BUILD, LIB, and RUN_TESTS):
- C++ -> General -> Additional Include Directories: add
$(SolutionDir)..\includes\NakamaWindows\[Debug or Release]\include,$(SolutionDir)..\includes\cpr\include, and$(SolutionDir)..\includes - Linker -> General -> add paths:
$(SolutionDir)..\includes\NakamaWindows\[Debug or Release]\liband$(SolutionDir)..\includes\cpr\lib - Edit Linker-Input-Additional Dependencies:
add
nakama-sdk.lib,cpr.lib, andlibcurl-d_imp.lib - Edit Linker->Input-> Additiona Dependencies: check "Inherit from parent or project defaults"
Setup Debugging
- Select all configurations: right click and choose properties. Configuration Properties->Debugging->Command. Enter the full path for Max.exe or a particular patcher you want to test with.
- In Solution Explorer, Right click on the object you are testing and select "Set as Startup Project."
- Now Max will launch when you run your program and you will get debug info from the selected starup project.
- Select ALL BUILD and build.
- The Max externals will be found in
..\externals
If you changed the names of the source files then the code for the Max SDK Objects needs to be corrected. In ext_main for all Max objects is a class_new() function. The first argument needs to match the name of the file.
If creating a new repo from scratch remember the following:
package-info.json.inis required for Min to build.git init- Be sure to add the submodules to your repo even though they are included in .gitsubmodules.
git submodule add https://github.com/Cycling74/min-lib.git source/min-libgit submodule add https://github.com/Cycling74/min-api.git source/min-apigit submodule update --init --recursivegit add --allgit commit -m "First Commit- Test to make sure the solution builds. It will not build if a commit doesn't exist.
git remote add origin [GithubRepoOrigin]git push -u origin main
- Rebuild the externals in Release Configuration
- Build the package in the max package editor
- Add any additional resources. Fonts go in the resources/fonts folder
- WINDOWS: Add release .dlls to the resources/support folder
- MAC: Add nakama-sdk.framework to Context/MacOS folder
ISOr3 is the work of Joseph Kaplan, Attainable Solutions. Special thanks to Chris Pasillas and Steph Grush for their peerless guidance and advise.
For support, please contact the developer of this package.