Current best practices for Max 7 with min-devkit
I haven't been doing any object development for a couple years now, and it seems the old max-sdk workflow is now deprecated. I'm not in a position to upgrade to Max 8 at this time, and it seems from this video that at least version 0.3.6 is compatible with Max 7, but my Max package manager doesn't go back that far. I'd prefer to have a good understanding of how to set up my XCode environment in a terminal window instead of the min-devkit patch that creates new packages and objects, and I cloned the git repository, but I don't have enough background in C/C++ compilation to really get a handle on the standard file structure that the readme outlines (what do I do with the build folder files?).
I was able to get my old Max 7 workflow in order and compile some sample objects, but I'd prefer to work in C++ over C... Does anyone have advice or a guide for managing this without using the min-devkit initialization patch? Compatibility (particularly with M4L) is important to the project. Thank you!
Hi there!
So first, you should be able to grab a zipped copy of the min-devkit source code from https://github.com/Cycling74/min-devkit/releases/tag/v0.4.7 . This version is compatible with Max 7.
The most convenient place to keep these source files is in your Max 7 Packages directory (~/Documents/Max 7/Packages/min-devkit) since Max already knows to search for externals on the packages path. (You can of course place this directory anywhere on your computer you'd like as long as the path is added to the Max file search path.)
Pre-requisites for the next steps are that you have Xcode and cmake installed.
As in the readme steps, you'll want to open a terminal window and cd into the min-devkit directory. From there, you're going to create a build folder where all of the output of cmake will be kept. This helps us keep the source files and build files separated so that when we want to clean out builds, we can just remove the build directory.
$ cd min-devkit
$ mkdir build
$ cd build
Now you can use cmake (which is a "meta build tool" -- cmake generates the Makefiles that generate the commands to your compile) to generate the Xcode workspace for all of your projects.
Since you're on XCode, you should run $ cmake -G Xcode ..
to tell cmake that you're generating for the Xcode environment and it should use the root level CMakeLists.txt.
Now that you've done that, I should get on to answering your question of what to do with these build files! Inside the build directory, you should see a min-devkit.xcodeproj that you can use to open up, edit, and build your Max externals as you would have likely been doing with your old Max 7 workflow. The compatibility with Max4Live should be no different than C externals.
I hope this helps you get started!
Thanks so much for the quick response! In case anyone else is searching the forum for the same question, the zipped 0.4.7 release won't pull the necessary Git submodules when running cmake (it's not a .git repository). I tried the following in the Packages folder:
$ git clone https://github.com/Cycling74/min-devkit.git
$ cd min-devkit
$ git checkout 76168d8
Running $ git submodule update --init --recursive gave me a "The authenticity of host 'github.com' can't be established" error that fails repeatedly (and I'm not even cloning via ssh?)... My backup plan was:
$ cd source
$ rmdir min-lib
$ git clone https://github.com/Cycling74/min-lib.git
$ cd min-lib
$ git checkout 55fde59
$ cd ..
$ rmdir min-api
$ git clone https://github.com/Cycling74/min-api.git
$ cd min-api
$ git checkout a083d5d
(source for these commits)
I was glad to see all of the examples in the build/source/projects folder; I don't believe the most recent version spawns these in a larger Xcode project. I copied min.edge_tilde and renamed (to bandit_tilde) using this guide, made some small edits, and successfully built/opened bandit~ in Max 7, although a bundle under my Xcode products is still named "min.edge~.mxo/Contents/MacOS/min.edge~". Without asking for a complete lesson on Xcode to begin with, any tips for starting new objects from scratch (or at least renaming this one)? I appreciate the help!
Nice, glad you got up and running!
This guide should help you get started (more specifically, sections 2 and 3): https://github.com/Cycling74/min-devkit/blob/76168d82b8cabdb862848a041dc54d4110e768b0/HowTo-NewObject.md
Make sure you re-run the CMake command to generate your updated Xcode project.
Came back to this after sleeping on it and I think I got to the source of my misunderstanding. I was generating the files in the build folder as outlined in the main readme, but I should have copied them in the /source/projects folder (as the New Object readme shows) before running cmake -G Xcode .. from /build. Thanks again for the guidance, I've got a great workflow now!
Awesome!
Yup, any time you create a new object in the /source/projects folder, you'll want to re-run that CMake command to generate everything for you.