Distributing your games (making a .love file)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Distributing your games (making a .love file)

Post by BlackBulletIV »

For a Linux and Mac friendly version, here's a Ruby script.
Make sure you're in the project directory when executing, and that you provide a filename for the .love file (with or without the extension).

Code: Select all

#!/usr/bin/env ruby

if ARGV.length == 0
    print "Usage: ./make_love_file.rb love_file_location\n"
    print "Make sure you are in the project folder when using this command..\n"
    exit 0
end

unless File.exists? 'main.lua'
    print "Directory does not contain a main.lua file.\n"
    exit 1
end

if ARGV[0]
    file = ARGV[0]
    file += '.love' unless file.end_with? '.love'
    
    `zip -r #{file} *`
    
    if $?.exitstatus == 0
        print "#{ARGV[0]}.love created successfully.\n"
    else
        print "An error occurred file creating the file.\n"
    end
else
    print "Please give a name for the .love file.\n"
    exit 1
end
EDIT: On Mac OSX, a cool thing to do is add this to your ~/.bash_profile file:

Code: Select all

alias lovemake="path/to/where/you/placed/script.rb"
Then you can execute like this from anywhere:

Code: Select all

lovemake LoveFileName
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Distributing your games (making a .love file)

Post by BlackBulletIV »

I've expanded the script above into "Love Builder". Here's the topic: http://love2d.org/forums/viewtopic.php?f=5&t=2436
User avatar
Victor Bjelkholm
Prole
Posts: 9
Joined: Tue Feb 15, 2011 2:38 am
Location: Småland, Sweden
Contact:

Re: Distributing your games (making a .love file)

Post by Victor Bjelkholm »

How can this be stickied when the video in the first post doesn't work?
Visit my homepage for designer madness
http://victorbjelkholm.se
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Distributing your games (making a .love file)

Post by BlackBulletIV »

Spreken ze web page? :P

EDIT: Oh so there was a video here earlier...
Last edited by BlackBulletIV on Tue Feb 15, 2011 8:36 pm, edited 1 time in total.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Distributing your games (making a .love file)

Post by Robin »

Victor Bjelkholm wrote:How can this be stickied when the video in the first post doesn't work?
Check the date.

Mike has removed the videos since.
Help us help you: attach a .love.
User avatar
Victor Bjelkholm
Prole
Posts: 9
Joined: Tue Feb 15, 2011 2:38 am
Location: Småland, Sweden
Contact:

Re: Distributing your games (making a .love file)

Post by Victor Bjelkholm »

Robin wrote:
Victor Bjelkholm wrote:How can this be stickied when the video in the first post doesn't work?
Check the date.

Mike has removed the videos since.
I understand that he removed the video... But I can't understand why this is still a sticky.
Visit my homepage for designer madness
http://victorbjelkholm.se
obur
Prole
Posts: 11
Joined: Sun Feb 20, 2011 2:03 pm

Re: Distributing your games (making a .love file)

Post by obur »

hey, i'm sorry to waste your time and blablabla, but i have a problem in making my .love file to .exe in win (of course).
when i navigate to my folder that my game.love exists in dos, then when i write "copy /b love.exe+game.love game.exe" it says it's ok, everything done and stuff, but when i open the newly created game.exe, i just see love.exe's turning worms. that's all. no game, nothing else.
i can see my work clearly when i drag&drop my game to love.exe, but i just couldn't do this exe thing.
please help me.
thanks in advance.
(if i act bad, i mean rude, sorry about that. my hands are shaking because of anger..)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Distributing your games (making a .love file)

Post by bartbes »

I ehm.. probably broke it.
obur
Prole
Posts: 11
Joined: Sun Feb 20, 2011 2:03 pm

Re: Distributing your games (making a .love file)

Post by obur »

so, what must i do now? :)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Distributing your games (making a .love file)

Post by bartbes »

You could try the 0.7.0 binary, but yeah...
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot], zorg and 1 guest