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
Handy launch.command
Re: Handy launch.command
Or you could just add an alias to your bashrc / bash_profile.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Handy launch.command
I already do this:
But only because I can't figure out how to edit my bash profile to make it work. This works fine.
Code: Select all
#!/bin/bash
~/Documents/Projects/LÖVE/Apps/love.app/Contents/MacOS/love "${0%/*}"
Re: Handy launch.command
Not to start a flamewar, but if you use Vim, just type ":!love ."
It's like magic!
It's like magic!
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Handy launch.command
Windows only:
Notepad++ run command
That's what I use
Notepad++ run command
Code: Select all
"c:\your\path\to\love.exe" "$(CURRENT_DIRECTORY)"
Re: Handy launch.command
A simple batch file in game directory.
Code: Select all
"C:\Program Files (x86)\LOVE\love.exe" "%CD%"
Re: Handy launch.command
A simpler batch file in game directory (I edited PATH though).raidho36 wrote:A simple batch file in game directory.Code: Select all
"C:\Program Files (x86)\LOVE\love.exe" "%CD%"
Code: Select all
love .
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Who is online
Users browsing this forum: No registered users and 1 guest