The thispatcher object can report the path of a patch. As soon as that patch becomes part of the application, this functionality ceases to work. If you were to make a sub patch however, that is hidden upon building the app, and stick it in manually after, it will be found and loaded as a patcher and hence reports it’s path. Since you know where in the folder structure of the built app it sits, you can work your way back to the folder that represents the app name. Does this make sense? Of course, since the abstraction is hidden when building, it can not have inlets or outlets.
– Pasted Max Patch, click to expand. –
Copy all of the following text. Then, in Max, select New From Clipboard.
thank you very much for sharing this very creative trick !!!
i build a smal example, which also filters the application name from the path.
1) build an standalone application where the patcher: "pathreport" is NOT in the searchpath
2) copy the patcher "pathreport" inside the "myApp.app/Contents/support" folder of your application package by hand
3) start your standalone application
4) press button getAppName
it is a pity, that we have to do this very handish workaround …
we have to do it after every standolone build, which can be stressy if we are in the final spurt of an project …