get standalone name
i am trying to detect the name of my standalone application on macox.
i only can get the path of the application and the main patcher name.
thanks in advance,
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.----------begin_max5_patcher---------- 397.3ocuTEsaBBCE8Y3qno9JyPAc519GVxdYurXVpvcRMPKos5by3+9nW.EW bFbl3K2l64VN2y8zR256Qmq1.FJ4QxaDOus9ddHjCvqI2iVv2jjyM31nR3S0 7kzf5RVXiEgMjRtMypJf1RenjVi3avUlwFF1.KWUHj4fEYic.Tsx1h1t0JFS xDxEuqgDasFiFGUwDgM9d2xjXWLJbXHYVy2HRQ4TIw6F0UIRdApD5qfNkK4T Woc99tPv0M5Vbzu9wtEsFx9UITOyTj98S3IbE1C0tR3T2xny5Jw2HWQSVHJJ fK0ZBuLqoO1xzQXL5btRzs5tRlvfJEzW+Eln+zUB5myvhwkIm0ZXm0ZZpY3q aa9fmcs+nAkPexEF7hKBxzZDxrN9J1YZtP96WiPRb3Ga1F0JcRaKajIgsW+o fwJjbqPI6rmpWDHGlwLQZJH6doKUX3yyAb1CO4gdeUS7Qc5zpgcyTSTOTS7+ TM0Gb7xx0f1zPIJjp+GVpztz6CvTgrNEYjpg0h18G66Xam+OxxOgsA -----------end_max5_patcher-----------
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 …
Forums > MaxMSP