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
Positive07
Party member
Posts: 999
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

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

Post by Positive07 » Mon Dec 12, 2016 3:05 am

Yeah, it may... but indie has that kind of community... I mean indie games are less likely to be cracked and redistributed than AAA games. Indie games are usually copied (not cracked) during developing time if the idea is good enough and has traction.
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(Github.com/Positive07)

Mariscal
Prole
Posts: 16
Joined: Sat Jun 25, 2016 4:51 pm
Location: London
Contact:

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

Post by Mariscal » Mon Dec 12, 2016 2:23 pm

Thanks for the answers, I just wanted to make sure this was the case and I wasn't missing a step while building the final exe
Currently working on Breaking Fast, a competitive 2D "mario kart alike" racing game! Already passed steam greenlight, hopefully soon to be released! :D

jonthysell
Prole
Posts: 10
Joined: Fri Nov 03, 2017 5:19 pm
Location: Pacific Northwest
Contact:

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

Post by jonthysell » Sat Dec 02, 2017 4:36 am

For those who want an easy command-line way of creating a zip archive on Windows without requiring any external tools, I find it easy enough to create a simple PowerShell script and embed it inside a batch file.

There's an example of what I mean here: https://github.com/jonthysell/RetroLove ... /build.cmd

User avatar
Karasuro
Prole
Posts: 10
Joined: Wed Aug 21, 2013 5:32 am

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

Post by Karasuro » Mon Dec 25, 2017 3:07 am

Or if you have 7-zip you can use the command-line 7z.exe in a batch file. I use this method to create .love archives.
I can even provide my own name for the Archiver. Simply make a .bat in your working directory and then run it.

Code: Select all

@ECHO OFF
title LOVE 7z Archiver
CLS
ECHO Name the Archive!
SET /p name=:
ECHO Archiving Directory...
CALL %Program Files%\7-zip\7z.exe a %name%.love .\* -xr!*.bat -xr!*.love -xr!*.cmd
ECHO Archive Complete!
PAUSE
EXIT

User avatar
zorg
Party member
Posts: 2367
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post by zorg » Mon Dec 25, 2017 9:57 am

Karasuro wrote:
Mon Dec 25, 2017 3:07 am
Or if you have 7-zip you can use the command-line 7z.exe in a batch file. I use this method to create .love archives.
I can even provide my own name for the Archiver. Simply make a .bat in your working directory and then run it.

Code: Select all

@ECHO OFF
title LOVE 7z Archiver
CLS
ECHO Name the Archive!
SET /p name=:
ECHO Archiving Directory...
CALL %Program Files%\7-zip\7z.exe a %name%.love .\* -xr!*.bat -xr!*.love -xr!*.cmd
ECHO Archive Complete!
PAUSE
EXIT
Unless one of those switches ensures that a plain zip archive is created, not all OS-es will be able to handle the unarchiving by default.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

User avatar
Karasuro
Prole
Posts: 10
Joined: Wed Aug 21, 2013 5:32 am

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

Post by Karasuro » Sat Dec 30, 2017 6:08 am

zorg wrote:
Mon Dec 25, 2017 9:57 am
Unless one of those switches ensures that a plain zip archive is created, not all OS-es will be able to handle the unarchiving by default.
7z.exe uses a -t switch to specify what type of archive you want. Example.. -tzip is a standard .zip archive. -ttar for .tar, -tiso for a .iso archive, etc.

so in my code you could change the CALL to:

Code: Select all

...
CALL %Program Files%\7-zip\7z.exe a -tzip %name%.love .\* -xr!*.bat -xr!*.love -xr!*.cmd
...
Although, whatever you give your archive's extension as will cause 7z.exe to automatically apply a compatible type depending on your system. Usually .7z as it is compatible with most all systems that have 7z installed. ;)

User avatar
zorg
Party member
Posts: 2367
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post by zorg » Sat Dec 30, 2017 7:08 am

Karasuro wrote:
Sat Dec 30, 2017 6:08 am
Although, whatever you give your archive's extension as will cause 7z.exe to automatically apply a compatible type depending on your system. Usually .7z as it is compatible with most all systems that have 7z installed. ;)
Exactly what i mean, 7zip doesn't come standard on some systems, just saying; but if you always create a zip-compatible archive, then yes, löve.exe can handle it.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

User avatar
Tricky
Citizen
Posts: 71
Joined: Thu Dec 18, 2014 4:07 pm
Location: Breda, the Netherlands
Contact:

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

Post by Tricky » Sat Dec 30, 2017 9:36 am

What's that? Is it possible to run a .love file that is in 7z-format providing that 7z is installed? Or is it really zip only? (some posts confuse me a bit in that direction).
I personally only use zip though, although 7z takes pride to be able to create "pure zip files" that are smaller than with the original zip. Never tried that though.

And what I saw about "ripping" stuff, and "hacking/cracking" games. Well with LÖVE games it's of course (since they are just .zip files) a lot easier to do, but since I have lived in the old days where DOS and AMIGA were the big systems I know how AAA devs were trying one thing after another keeping crackers at bay. Nothing worked. I even remember a friend of mine saying one of the games (he obtained illegally ONE DAY after its official release) with a cracker scroll saying: "Stupid devs. Did you really think spending 1 million bucks would keep me away from removing your copy-protection. Next time, use something better (but it won't help you)." If you have at least set out the license well you have some ways to get rippers sued, but that also reminds me of the Dutch proverb "Dweilen met de kraan open" (lit. Mobbing while the tap's open).

When it comes to that batch file above. I am a Mac user and thus I have to do it with Unix variants, so lemme translate that batch file into a shell script:

Code: Select all

#!/bin/sh

# title LOVE 7z Archiver
clear
read -r -p 'Name the Archive: ' NAME
echo Archiving Directory...
7z a $NAME.love -tzip ./* -xr!*.bat -xr!*.love -xr!*.cmd
echo Archive Complete!
Now I've my own ways to build love files, but this is the simplistic one using 7z (providing you installed it). I didn't try this is Linux, but I can't think of a reason why this wouldn't work in Linux (aside from not having 7z installed that is).

Rubbermaid
Prole
Posts: 6
Joined: Fri Jan 05, 2018 10:56 pm

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

Post by Rubbermaid » Wed Jan 10, 2018 12:20 am

Show-and-tell time for zip scripts? :awesome:

I'm just coming back into development after stopping when I started university. As a result I just use a lazy batch script I wrote back in school, which is probably the most useful piece of code I've written:

Code: Select all

if exist game.love rename game.love game.zip
7z a -tzip game.zip *.lua -x!*.zip
ren game.zip game.love
start game.love
See the problem? Back in the days all of my art came in the form of circles and lines. ^^

DarkShroom
Citizen
Posts: 86
Joined: Mon Jul 17, 2017 2:07 pm

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

Post by DarkShroom » Sun Jul 08, 2018 8:00 pm

here's my masterpiece for mac OSX, worked on Mavericks, works on High Sirrera :cool: (mac users are cool obviously)

Code: Select all

# builds the entire current folder into a love file
# designed to be double clicked from mac OSX finder
# should be saved as a .command file with "sudo chmod +x" applied to it (allows it to execute)

# filename=EntityEngine_0_2_0_Alpha.love # would dump the file to the current directory
filename=~/Desktop/EntityEngine_0_2_0_Alpha.love # dump the file on the desktop

cd "`dirname "$0"`" # OSX hack that means the double clicked command file runs in the directory it is in
zip -9 -r $filename .
read # OSX hack allows waiting for a key press before command box is closed
the clever bit is them weird quotes, because macs, being superior an all don't run their bloody equivalent of the .bat file from the same folder, they run it from your home directory... unless you use that weird unknown hack i can't remember where i found it from

so i double click the file it dumps to the desktop, i save all my little functions as .command files so they're not tied to like any knowledge or editor etc

edit: oh sorry i think i just accidentally raised the dead lol, my bad

edit2: notice whether it's shell or batch files, it always comes down to something that makes less sense than regex but "just works"

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests