Dunno if there's one already, but I created a workflow that automates compilation so that you can test if your game is working. It doesn't create a stand-alone executable, but rather a .love file from your game folder that can be run by love2d. The compiled game file deletes itself upon quitting it, so don't save over the master file.
All you have to do is:
1. Open the workflow
2. Drag your game folder into the "Get Specified Finder Items" action
3. Save it as whatever you want and change the file format into application (don't save over the master file). I like to save it into the game folder so I don't get them mixed up.
4. Run the automator application and you're done! This is the only thing you'll have to do from now on Well for this game anyways. If you want to do this for another game, just repeat steps 1-3 to set it up again.
Requirements:
-Love2d must be named as "love" without the quotations. Basically, the default title.
-Mac computer? lol. Dunno what the minimum required OS version is.
Mac compile and test automator workflow
-
- Citizen
- Posts: 63
- Joined: Sun May 13, 2012 2:49 am
Mac compile and test automator workflow
- Attachments
-
- Compile&Test Mac OS.zip
- (129.33 KiB) Downloaded 97 times
Last edited by onedaysnotice on Sat May 19, 2012 2:58 pm, edited 1 time in total.
Re: Mac compile and test automator workflow
A little tip, open terminal and
It will run the game without needing to create a .love file.
You can create a shortcut to love by opening or creating, if it doesn't exist
and add in
Cool thing about launching from terminal is you can pass arguments to your love.load function, if I want to start in server mode I just
Code: Select all
cd 'my_game_directory'
/applications/love.app/contents/macos/love .
You can create a shortcut to love by opening or creating, if it doesn't exist
Code: Select all
~/.bash_profile
Code: Select all
alias love=/applications/love.app/contents/macos/love
Code: Select all
love . server
Code: Select all
function love.load( args )
if args[2] == 'server' then startServer() end
end
Re: Mac compile and test automator workflow
ouch... It's so much easier drag the folder to love.app or a love alias just for run it.
as "compile" as .love it takes so little effort zip the files and rename it that I didn't ever care create scripted workflows.
as "compile" as .love it takes so little effort zip the files and rename it that I didn't ever care create scripted workflows.
-
- Citizen
- Posts: 63
- Joined: Sun May 13, 2012 2:49 am
Re: Mac compile and test automator workflow
I totally do not understand terminal. Hence, automator xDljdp wrote:A little tip, open terminal andIt will run the game without needing to create a .love file.Code: Select all
cd 'my_game_directory' /applications/love.app/contents/macos/love .
You can create a shortcut to love by opening or creating, if it doesn't existand add inCode: Select all
~/.bash_profile
Cool thing about launching from terminal is you can pass arguments to your love.load function, if I want to start in server mode I justCode: Select all
alias love=/applications/love.app/contents/macos/love
Code: Select all
love . server
Code: Select all
function love.load( args ) if args[2] == 'server' then startServer() end end
Really? After setting it up (which is just a matter of establishing the folder which it will compile and saving the workflow into that folder, which together can be done in like 10 secs) all you have to do is select the workflow app and press cmd+O for every time you want to test it. No need to continuously zip it and change it to .love and then trash it.coffee wrote:ouch... It's so much easier drag the folder to love.app or a love alias just for run it.
as "compile" as .love it takes so little effort zip the files and rename it that I didn't ever care create scripted workflows.
So basically, the workflow reduces like 3 steps into 1. Maybe I'm just rediculously lazy AHAHAHAHAHA.
Last edited by onedaysnotice on Sat May 19, 2012 3:02 pm, edited 1 time in total.
Re: Mac compile and test automator workflow
You don't need to understand it. Just copy and paste what i've said.
Press cmd-space, type terminal, press enter, type 'cd' without the quotes and then a space, then drag your folder onto to terminal window and press enter.
Now type '/applications/love.app/contents/macos/love .' without the quotes and your game will run. As long as you keep the terminal window open you only have to do this once. To quickly launch your game press; up, enter.
edit:
An added benefit of using terminal is debugging. If you're unsure cetain parts of your code is being called add a in there and it will be printed to the terminal window when it gets called.
Press cmd-space, type terminal, press enter, type 'cd' without the quotes and then a space, then drag your folder onto to terminal window and press enter.
Now type '/applications/love.app/contents/macos/love .' without the quotes and your game will run. As long as you keep the terminal window open you only have to do this once. To quickly launch your game press; up, enter.
edit:
An added benefit of using terminal is debugging. If you're unsure cetain parts of your code is being called add a
Code: Select all
print('some message')
-
- Citizen
- Posts: 63
- Joined: Sun May 13, 2012 2:49 am
Re: Mac compile and test automator workflow
Oh wow. That's pretty cool xD Terminal always scares me so I always try to avoid it LOL Thanks for telling me this Guess my workflow is obsolete now huh? DX The only thing that my workflow has over this method is that you don't have to retype/re-drag all the stuff when starting terminal and love up again. lolljdp wrote:You don't need to understand it. Just copy and paste what i've said.
Press cmd-space, type terminal, press enter, type 'cd' without the quotes and then a space, then drag your folder onto to terminal window and press enter.
Now type '/applications/love.app/contents/macos/love .' without the quotes and your game will run. As long as you keep the terminal window open you only have to do this once. To quickly launch your game press; up, enter.
edit:
An added benefit of using terminal is debugging. If you're unsure cetain parts of your code is being called add ain there and it will be printed to the terminal window when it gets called.Code: Select all
print('some message')
The debugging aspect is nice to know as well, since goature's tutorials didn't mention how to do it with mac :S well i think so...
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Mac compile and test automator workflow
The terminal is a rich and powerful way to interact with your computer. Give it a try some time!onedaysnotice wrote:Terminal always scares me so I always try to avoid it
If you set up an alias, you only have to type love ., and I'm sure there is something like "Open Terminal in this folder" for OS X (don't use it myself).onedaysnotice wrote:The only thing that my workflow has over this method is that you don't have to retype/re-drag all the stuff when starting terminal and love up again.
Help us help you: attach a .love.
Who is online
Users browsing this forum: No registered users and 2 guests