Scripting rebuild of multiple projects?
Suppose there is an external in multiple projects, and the external changes. Is there a way to script rebuilding of multiple projects containing the external?
Being that patches are essentially text files, if it is ONLY the name of the external that changed (no change in inlet/outlet number, or wiring requirements), I’d be willing to bet you could just open the patch in TextEdit and do a find/replace.
If it’s something more complex, like a wiring change, I would probably still do a TextEdit find/replace, with the added step of making an abstraction, in your search path, that takes the wiring expected by the original object, and reroutes inside the abstraction – that way you could (I think, this is all theoretical) find the old object, and replace with ‘abstraction.maxpat’ and hopefully be golden.
Well, I understand what you’re saying, maybe I shouldn’t ask in the dev forum, because it’s not just externals that could change, but shared bpatcher objects, image files, and pattr data.
I plan a set of Windows.exe builds which share subsets of functionality, and if any portion updates in one, to be able to rebuild all the .exe files. at once.
Is it possible to make a project file containing multiple projects and rebuild them all at once? Or, can I write a Windows batch file to ‘make’ projects UNIX style?
I suppose I see what you’re saying – you’ve got the same chunk of (MaxMSP) code in multiple Max standalones, correct?
If that’s the case, the new Project workflow in Max 6 is probably helpful – have your bpatchers all point at the same file (store it in your Cycling74 folder somewhere, and tell the project not to store that file ‘locally’) — If you update the .maxpat your bpatchers are referencing, they’ll all update.
I _believe_ (though I haven’t tested) that when you build your project to a standalone, it will grab a copy of any referenced files that are not ‘stored locally’ and include them in the standalone.
Image files should work the same way (store them in your C74 folder) and the project will update whenever you tell it to.
Not sure about Pattr data.
If you’re asking if there’s a way to build multiple standalones at once, I do not believe there is, sorry to say. If you were on a Mac, you could probably script something up with something like QuicKeys (something along the lines of ‘open files x y z t and r, select menu item ‘build collective’, ‘choose application’, hit enter, wait X seconds, hit command-W to close project R, loop to step 2) but on Windows I don’t know of a solution, unless there’s an equivalent program that can select menu items programatically.
Perhaps someone with more Windows Max experience will have a better solution.
Thank you, that is exactly what I was thinking, and I could make something in Windows via autoit, which is similar to quickeys.
Somehow with software as sophisticated as Max it seems strangely backwards to write menu manipulation scrip, though.
Is there any command-line interface for the project file?
(Follow up): for Windows, autohotkey is now much better than autoit.
Tip: maximize the project window before recording mouse actions,. so the toolbar is at predictable screen coordinates.
Forums > Dev