Page 27 of 28

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

Posted: Mon Dec 12, 2016 3:05 am
by Positive07
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.

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

Posted: Mon Dec 12, 2016 2:23 pm
by Mariscal
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

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

Posted: Sat Dec 02, 2017 4:36 am
by jonthysell
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

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

Posted: Mon Dec 25, 2017 3:07 am
by Karasuro
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

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

Posted: Mon Dec 25, 2017 9:57 am
by zorg
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.

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

Posted: Sat Dec 30, 2017 6:08 am
by Karasuro
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. ;)

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

Posted: Sat Dec 30, 2017 7:08 am
by zorg
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.

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

Posted: Sat Dec 30, 2017 9:36 am
by Tricky
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).

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

Posted: Wed Jan 10, 2018 12:20 am
by Rubbermaid
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. ^^

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

Posted: Sun Jul 08, 2018 8:00 pm
by DarkShroom
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"