Program to load and run multiple apps

Is it feasible to compile OF apps in a way that they can be loaded and run with a separate ‘loader / runner’ program? so result looks something like this:

compile apps into some binary form. Put those in some directory:

/apps/app1
/apps/app2
/apps/app3

Then the loader program looks the ‘apps’ directory and loads them all (calling setup() for each one), but only runs one at a time, but allows some mechanism to switch between them. So you can switch between each one without having to stop and restart OF

assuming this is possible, just wondering if it has been done already ?

If you’re on OSX or Linux machine, you can think of a simple shell script that will do to perform the cascade applications.

Example:

#/usr/bin/bash
/home/user/openFrameworks/apps/myApps/./app1/bin/app1 &
/home/user/openFrameworks/apps/myApps/./app2/bin/app2 &
/home/user/openFrameworks/apps/myApps/./app3/bin/app3 &

Example 2:

#/usr/bin/bash
while [1]
do 
     /home/user/openFrameworks/apps/myApps/./app1/bin/app1 
done

if you want the application to resume alone in case of a sudden crash, you can run the binary in a while loop without &

Maybe you could have a look at ofxScene or OfxOpenVJ, you can load several program and switch between them.

Cyril

Thanks for these. ofxScene and ofxOpenVJ look interesting. I also ran across this :

Similar to ofxOpenVJ, it looks like you have to compile the scenes together with the parent app. Ideally you could compile scenes separately and have them loaded by the parent app. I guess this would require compiling the scenes as shared objects to be loaded at run time.