How_to_add_new_external.rtf from Jamoma at Krugle
Show How_to_add_new_external.rtf syntax highlighted
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Oblique;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Bold;
\f3\fnil\fcharset77 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid1\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid1}
{\list\listtemplateid2\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid2}
{\list\listtemplateid3\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid3}
{\list\listtemplateid4\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid4}
{\list\listtemplateid5\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid1\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid5}
{\list\listtemplateid6\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid1\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid6}
{\list\listtemplateid7\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listlevel\levelnfc0\levelnfcn0\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid1\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid7}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}}
\margl1440\margr1440\vieww15960\viewh13280\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\f0\i\fs34 \cf0 \
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
\fs66 \cf0 How to\
create a new project for externals\
to include in Jamoma
\f1\i0\fs24 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
\
\
\
This document suppose that development environments, MaxMSP SDK and Jamoma are properly installed.\
\
\
\
\f2\b\fs36 Develop and build for Mac
\f1\b0\fs24 \
\
\f2\b\fs26 Step 1) Create Mac OSX Universal Binary Xcode project
\f1\b0\fs24 \
\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls1\ilvl0\cf0 {\listtext 1. }In the Finder, copy e.g. the jmod_change folder and rename it. For the sake of this example, we'll call our renamed project jmod_foo.\
{\listtext 2. }Open your jmod_foo folder and rename the Xcode project jmod.change.xcodeproj to be jmod.foo.xcodeproj.\
{\listtext 3. }If you have an existing C source file, copy it into the project folder. Make sure that the file ending of the source file is .cpp, even if the file itself is not C++. This will make sure that project references will work.\
{\listtext 4. }Right-click (ctrl-click) the Xcode project and choose "show package contents" then open the .pbxproj file in a text editor such as BBEdit, TextMate, Emacs, etc.\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }do a find-and-replace for "jmod.change" replacing it with "jmod.foo"\
{\listtext \uc0\u8259 }do a find-and-replace for "jmod_change" replacing it with "jmod_foo"\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls1\ilvl0\cf0 {\listtext 5. }Now you're ready to open and build your object.\
\pard\tx566\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\f2\b\fs26 \cf0 Step 2) Further Mac OSX development and building:
\f1\b0\fs24 \
\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls2\ilvl0\cf0 {\listtext 1. }While developing, build using the Xcode project. This is set to use Development as active build configuration, platform specific build, thus faster to compile, easier to debug, more thorough crash log. The built object will be found in the Jamoma/library/externals/build_mac/Development folder.\
{\listtext 2. }When the object is completed, add it to the Batch_Compile_Mac.command script (details below).\
{\listtext 3. }Rebuild using the script (details below). This builds the object (and all other objects) using the Deployment build configuration, thus being Universal Binary and fully optimized. The built object will be found in the Jamoma/library/externals/build_mac/Development folder.\
\pard\tx566\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
Please note that you should never send anyone a development build. It will not work on any computers other than the one it was built on. You MUST use a deployment build to get a version that will work on another computer.\
\
\pard\tx566\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\f2\b\fs26 \cf0 Step 3) Using the Batch_Compile_Mac.command script
\f1\b0\fs24 \
\
Add the new external to the Batch_Compile_Mac.command script by adding the following lines of text:\
\
cd jmod_foo\
xcodebuild -configuration Deployment clean build\
cd ..\
\
Run the batch script:\
\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls3\ilvl0\cf0 {\listtext 1. }Open the terminal application\
{\listtext 2. }cd to the externals folder, e.g. "cd ~/Developer/Jamoma/library/externals"\
{\listtext 3. }Then run "./Batch_compile_Mac"\
\pard\tx566\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
\
\pard\tx566\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\f2\b\fs26 \cf0 Step 4) Add documentation:
\f1\b0\fs24 \
\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls4\ilvl0\cf0 {\listtext 1. }Make a help file for the object. This should go in the Jamoma/documentation/jamoma-help folder. Save the help file as text.\
{\listtext 2. }Add your object to the Jamoma-overview patch.\
\pard\tx566\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
\
\pard\tx566\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\f2\b\fs26 \cf0 Step 5) Commit the new project to the repository.
\f1\b0\fs24 \
\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls5\ilvl0\cf0 {\listtext 1. }If you copied the new project folder from a working copy of the repository, you have most likely also ended up copying a bunch of hidden .svn folders. These have to be removed before adding the project files to the repository. You can either do this using a utility such as InVisibles (http://www.versiontracker.com/dyn/moreinfo/macosx/14722), or from the Terminal:\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls5\ilvl1\cf0 {\listtext \uc0\u8259 }cd /path/to/something.xcodeproj\
{\listtext \uc0\u8259 }rm -rf .svn \
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls5\ilvl0\cf0 {\listtext 2. }Prepare externals by deleting the /build_mac/Development folder and the build_mac.zip file.\
{\listtext 3. }Zip the build_mac file. Do not use DropStuff for this. Instead choose "Create archive from build_mac" from the contextual menu.\
{\listtext 4. }The build folder in the jmod_foo folder should be trashed before adding things to the repository (this contains many megabytes of machine-specific garbage generated by Xcode)\
{\listtext 5. }Any files in the .xcodeproj bundle except for the .pbxproj should be trashes (i.e. the user preferences).\
{\listtext 6. }Add the project folder jmod_foo to the repository.\
{\listtext 7. }Add the following files from the project folder:\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls5\ilvl1\cf0 {\listtext \uc0\u8259 }jmod.foo.cpp\
{\listtext \uc0\u8259 }jmod.foo.def\
{\listtext \uc0\u8259 }jmod_foo.sln\
{\listtext \uc0\u8259 }jmod.foo.vcproj\
{\listtext \uc0\u8259 }jmod.foo.xcodeproj\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls5\ilvl0\cf0 {\listtext 8. }Add the help file\
{\listtext 9. }Commit these files as well:\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls5\ilvl1\cf0 {\listtext \uc0\u8259 }/library/externals/build_mac.zip\
{\listtext \uc0\u8259 }/library/externals/
\f3 Batch_Compile_Mac.command\
\ls5\ilvl1
\f1 {\listtext \uc0\u8259 }/documentation/jamoma-overview.mxt\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
\pard\tx566\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\f2\b\fs36 \cf0 Develop and build for Windows
\f1\b0\fs24 \
\
\f2\b\fs26 Step 1) Set up Windows project
\f1\b0\fs24 \
\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls6\ilvl0\cf0 {\listtext 1. }Rename the three files:\
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls6\ilvl1\cf0 {\listtext \uc0\u8259 }jmod.change.def to jmod.foo.def\
{\listtext \uc0\u8259 }jmod.change.sin to jmod.foo.sin\
{\listtext \uc0\u8259 }jmod.change.vcproj to jmod.foo.vcproj\
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural\pardirnatural
\ls6\ilvl0\cf0 {\listtext 2. }Open each of the files in a text editor, search for "jmod.change" and replace all by "jmod.foo".\
{\listtext 3. }On Windows, make sure you have a copy of the c74support folder of the MaxMSP SDK at the following location:\uc0\u8232 C:\\Program Files\\Cycling '74\\MaxMSP SDK\\maxmspsdk_win\\c74-support\
{\listtext 4. }Windows externals when successfully built as Release and tested, they are added to the repository. Windows externals can be found in \uc0\u8232 /library/externals/build_windows\
\pard\tx566\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
\pard\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-1440\ql\qnatural\pardirnatural
\ls7\ilvl1\cf0 \
\
Last update: 2006-08-15}
See more files for this project here