Tools, documentation, and reference implementation of a Max Package built using the Max-API.
For full backwards compatibility or additional functionality, the legacy Max SDK may provide an alternate path for those wishing to create their own package including Max external objects written in C/C++.
There are two levels of material included in the Max-DevKit package. The outer level is a Max package folder named, appropriately, "max-devkit". The inner level is a folder called "max-api".
max-devkit
is an example package following current best-practices package creation.max-api
is a folder containing all of the support files you will need to compile an external object written in C/C++. This folder you will include in your own package's source folder.
To build the externals in this package you will need some form of compiler support on your system.
- On the Mac this means Xcode (you can get from the App Store for free).
- On Windows this most likely means some version of Visual Studio (the free versions should work fine).
You will also need to install CMake.
- Get the code from Github, or download a zip and unpack it into a folder.
- In the Terminal or Console app of your choice, change directories (cd) into the folder you created in step 0.
mkdir build
to create a folder with your various build filescd build
to put yourself into that folder- Now you can generate the projects for your choosen build environment:
You can build on the command line using Makefiles, or you can generate an Xcode project and use the GUI to build.
- Xcode: Run
cmake -G Xcode ..
and then runcmake --build .
or open the Xcode project from this "build" folder and use the GUI. - Make: Run
cmake ..
and then runcmake --build .
ormake
. Note that the Xcode project is preferrable because it is able substitute values for e.g. the Info.plist files in your builds.
If you are using Visual Studio, You can run cmake --help
to get a list of the options available. Assuming some version of Visual Studio 2017, the commands to generate the projects will look like this:
- 32 bit:
cmake -G "Visual Studio 15 2017" ..
- 64 bit:
cmake -G "Visual Studio 15 2017 Win64" ..
Having generated the projects, you can now build by opening the .sln file in the build folder with the Visual Studio app (just double-click the .sln file) or you can build on the command line like this:
cmake --build . --config Release
It is highly recommended that you test your code thoroughly. One option is use the max-test package.
Continuous Integration (CI) is...
The Max-DevKit project models CI using two different services, both of which are free and very easy to set up if your project is hosted publically on Github.
- Mac: go to http://travis-ci.org and sign up. If your repository follows the same model as Max-DevKit, you can copy
.travis.yml
directly with no changes. Now every push to your repository will trigger an automatic build for the Mac with Travis CI. - Windows: go to http://appveyor.com and sign up. If your repository follows the same model as Max-DevKit, you can copy
appveyor.yml
directly with no changes. Now every push to your repository will trigger automatic builds for both 32 and 64-bit Windows with Appveyor.
- Windows: On Appveyor it is simple. You go to the latest build, choose the "Platform" and then look under the "Artifacts" tab.
- Mac: Travis CI does not host your build files for you like Appveyor. Instead, you need to configure a place for Travis to upload your builds. This is most easily done by signing up for a free Amazon Web Services account.
The builds from Travis for this package can be found on this S3-hosted page.
To setup your own page:
- Sign up for a free AWS account as mentioned above
- Create a "bucket" for your Travis builds
- Add the correct info to your
.travis.yml
file for your S3 bucket as described in the Travis S3 Documentation. - At this point, builds should go from Travis to a folder in your S3 bucket.
- To access the build, you can log in to your S3 account and download it. Alternatively you may want to make your builds publically available. If you wish to do the later, read on...
- upload the files from this folder's
source/max-api/site
folder to your S3 bucket's root folder. For more information on the content of these files, please visit the Github page for the S3 Bucket Listing Code. - As described on the above Github page, you will need to set the permissions for your bucket such that "Everyone" has both
listing
andviewing
access.
For support, please use the developer forums at: http://cycling74.com/forums/