Handy launch.command
Posted: Sun Sep 01, 2013 11:47 am
I've begun to set myself up learning love, in order to begin prototyping a series of possible ideas
When i work on any coding projects I tend to always get quite messy, with multiple copies of prototypes, so for my purpose i wanted a little generic launcher that would allow me to copy paste a whole love project, rename it, and it would automatically work whatever path it is in.
I'm sure people have already done this in the past, but I just thought i'd share it, since it might be handy to have in the wiki or something. Its just a very small tip i wanted to share, sorry if its too basic to warrant a forum thread etc.
For my mac os x, i stuck this in a file called launch.command
#!/bin/bash
SCRIPTPATH=`dirname "$0"`
exec /Applications/love.app/Contents/MacOS/love $SCRIPTPATH
then i made it executable by doing this in terminal
cd thepathtothedirectory
chmod +x launch.command
When i work on any coding projects I tend to always get quite messy, with multiple copies of prototypes, so for my purpose i wanted a little generic launcher that would allow me to copy paste a whole love project, rename it, and it would automatically work whatever path it is in.
I'm sure people have already done this in the past, but I just thought i'd share it, since it might be handy to have in the wiki or something. Its just a very small tip i wanted to share, sorry if its too basic to warrant a forum thread etc.
For my mac os x, i stuck this in a file called launch.command
#!/bin/bash
SCRIPTPATH=`dirname "$0"`
exec /Applications/love.app/Contents/MacOS/love $SCRIPTPATH
then i made it executable by doing this in terminal
cd thepathtothedirectory
chmod +x launch.command