use launch() for applications kept in data folder

edited October 2015 in How To...

How can I, or is there a way to do this?

I can get launch to work fine if I point the string at a data path specific to that windows user. However, as this sketch is intended to be a menu to launch a bunch of games(not made in processing) that will be deployed to several different computers, I wanted all the application data to be self contained, so that I simply compile it, and not concern myself with where the .exe's are located.

this isn't working:

launch("data/games/game.exe");

Am I barking up the wrong tree here? thanks!

Answers

  • Answer ✓

    I'm not on windows, but to get a relative path sketchPath() or dataPath() should work.

    launch(dataPath("filename.exe"));

  • Thank you so much benja. That did it! And I tested it only several computers and as an exported application without issue.

    I guess this not being documented in the reference makes sense, but because of that, I didn't know it was a viable function. Anyway, thanks again.

Sign In or Register to comment.