love-release - in Lua ! - makes LÖVE game release easier

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: Love-Release. Bash script to make it easier.

Post by Kingdaro »

josefnpat wrote:
Kingdaro wrote:
Rucikir wrote:the only global, convenient format for linux is a binary
This is true so long as you have a binary for every architecture (there are some cross arch) and every system with the set of whatever version libraries that love is dependent on. Of course, in this case, you are referring to yum, apt, pacman, etc.

The major advantage of .deb (in a love game's case) is that it DOESN'T contain a binary (just the .love file), and has the package manager / user install love and it's dependencies on their own terms.

I will mention that I have a working .love to .deb script, and you can test the results here;

http://missingsentinelsoftware.com/syst ... 1d_all.deb

I plan on releasing this script, but it isn't ready for public consumption yet. If you're interested in helping me develop, or just test the script out, you can hit me up on IRC.
T-Bone wrote:The point of .deb files is that those Linux users who are least likely to understand instructions such as how to install LÖVE on their own are the ones most likely to use Ubuntu (because it's the most common one, and also considered the most user friendly by many). So having a .deb would make it easy for the non-tech savvy while everyone else can work with a .love and a readme. So if there was a simply way to build .deb files which work for just Ubuntu (or something based on it, like Mint) that would help a lot. Especially for LÖVE programmers who themselves aren't familiar with Linux.

I'm not forcing you to implement it (of course), I just want to point out that it really would be helpful and not pointless.
It kind of seems like people missed this part:
Kingdaro wrote:Though I suppose just a .deb would probably be fair enough, since most people do use Ubuntu or some other Ubuntu/Debian-based distribution, that and LÖVE is outdated in Debian's repositories IIRC.
User avatar
Rucikir
Party member
Posts: 129
Joined: Tue Nov 05, 2013 6:33 pm

Re: Love-Release. Bash script to make it easier.

Post by Rucikir »

Kingdaro wrote: It kind of seems like people missed this part:
Kingdaro wrote:Though I suppose just a .deb would probably be fair enough, since most people do use Ubuntu or some other Ubuntu/Debian-based distribution, that and LÖVE is outdated in Debian's repositories IIRC.
There is bartbes/love-unstable PPA for Ubuntu... and it's in 0.9.0.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: Love-Release. Bash script to make it easier.

Post by Kingdaro »

That's a PPA of an unreleased, unstable version though, and not the official repositories. Even if it is updated, it usually takes weeks and sometimes months to actually get to the latest version.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Love-Release. Bash script to make it easier.

Post by T-Bone »

Kingdaro, are you implying that I missed something in your post? If so, what?
Though I suppose just a .deb would probably be fair enough, since most people do use Ubuntu or some other Ubuntu/Debian-based distribution, that and LÖVE is outdated in Debian's repositories IIRC.
User avatar
Rucikir
Party member
Posts: 129
Joined: Tue Nov 05, 2013 6:33 pm

Re: Love-Release. Bash script to make it easier.

Post by Rucikir »

First, thanks for your replies.

Secondly, i'll just list the new changes.
  • The script creates a cache in ~/.cache/love-release (think it's a standard directory), where all the downloaded zips are saved. There is one subdirectory for every Love version you ask for. You can replace those files by your own, as the script will always pick them rather than downloading again, but remember that the filenames MUST match. They are love-LOVE_VERSION-win-x86.zip, love-LOVE_VERSION-win-x64.zip and love-LOVE_VERSION-macosx-ub.zip (yes, even for the 0.9.0 nightly builds). Replace LOVE_VERSION by any real Love version, like 0.8.0, 0.7.2, or dev for nightly builds.
  • If you wish to refresh the cache, or simply to remove it, run love-release.sh --refresh. It will remove the cache directory. The Love files will be downloaded later, if needed. I don't think that it needs a specific by-version removal, that is specifying the Love version you want to delete the cache for, but in case of demands I will consider it. Maybe 'clean' would have been a better name than 'refresh', as it just removes the directory...
  • To use the nightly builds provided by slime and Boolsheet, type love-release.sh -v dev. Of course, love-release.sh -v 0.9.0 will work, but not until the next official release of Love.
Thirdly, I have to say that I am not really familliar with the structure of .deb packages. I'm very interested by josefnpat's script, but I'm afraid that I would not bring so much help.
I guess that the next step is the support of .deb, but seems a long way to go.
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: Love-Release. Bash script to make it easier.

Post by jjmafiae »

i think you should make it so it can compile it to as many packages as possible but .deb are most important of course.
User avatar
Rucikir
Party member
Posts: 129
Joined: Tue Nov 05, 2013 6:33 pm

Re: Love-Release. Bash script to make it easier.

Post by Rucikir »

Hi everybody !
New version, few improvements. Debian packages will come soon, but I need your help for a few things.
  • There is now a config file in ~/.config/love-release.cfg, which is basically a Bash script that is sourced by the main script.
    If you want to use it, you have to declare your project's name in the array PROJECTS=("My First Project" "My Second Awesome Project"). Be carefull, it MUST match your project's root directory. Like, huh, when you create a new git repo, it is named after the directory you're in.
    Also, any options passed by the CLI will override the options of the config file.
  • Then, you can enter your config. I have decided for now to store it in an associative array, but it could change in the future. Depends on you !
    Below are all the currently availble options.
    CFG[${PROJECTS}"_company-name"]="MyCompany"
    CFG[${PROJECTS}"_love-version"]="0.8.0"
    CFG[${PROJECTS}"_release-dir"]="releases"
    CFG[${PROJECTS}"_release-love"]=true
    CFG[${PROJECTS}"_release-osx"]=true
    CFG[${PROJECTS}"_release-win32"]=true
    CFG[${PROJECTS}"_release-win64"]=true
    ((i++))

    It is also very important to add this ((i++)) after each project's config. It makes the key in the associative array project-specific.
  • I have removed the -n option that was used to name the project. The script will now only takes the current directory as project's name.
  • There is now a --debug option that dumps all the variables used by the script and stops before making any releases, so you can check your final configuration.


But what is this config stuff for ? Well, in order to make prober Deb packages, you must include a description of your project. Do you want to retype it every time you generate releases ? I do not. So I had two choices: make one config file per project, or make one big config file. I chosed the big file, but I can implement a lookup in a file that would be part of your project.

I plan on releasing the .deb stuff in a few days. I still have one or two questions. One especially: if you have already installed a package and you want to install a newer one, the two version have to be different. (The newer one must be greater than the older). That means either the user must specify his project's version in the config file or in the CLI with an -V options that would take any valid number OR (and not XOR) there should be a way to detect if the project is based on Git, SVN, Mercurial, Baazar, ... and get the last commit number.
Debian will add a few requirements: project's description and version, maintainer's email, and GNOME will require PNG icon. I want to make it compatible with Vapor to make it easy for you.

The Vapor scripts are really, really interresting. I will inspire myself from them.

As usual, if you have any suggestions, ideas, ... Help is needed !
User avatar
Rucikir
Party member
Posts: 129
Joined: Tue Nov 05, 2013 6:33 pm

Re: Love-Release. Bash script to make it easier.

Post by Rucikir »

Hi everybody !
It's been a while since I've not made anything with this script, so before Xmas, I've rewritten some part of it.
Here is a small list of the new changes...
But with the things here, with StackMachine and stuff, it seems my work is obsolete.
  • + FULL SUPPORT OF LOVE 0.9.0 !!
  • + Short help, accessible with -h, and a long help that lookes like a man page accessible with --help.
  • ~ Now using curl instead of wget (because wget is not installed everywhere, and curl seems to).
  • - Removed the Löve nightlies support. Will probably be back soon.
  • - Removed the configuration (it was crappy). I'm working on an interaction Bash/JSON.
  • - Got rid of the few Debian pkg tests. But I'm still working on it.
NAME
love-release.sh -- Bash script to generate Love 2D game releases

SYNOPSIS
love-release.sh [-lmw] [-n project_name] [-r release_dir] [-u company_name] [-v love_version] [FILES...]

DESCRIPTION
You can use love-release.sh to generate Love 2D game applications and get over the fastidious zipping commands you had to do.
The script fully supports Windows, MacOS either on x86 or x64.
It needs an Internet connection to download Love files, and relies on curl, zip and unzip commands.

OPTIONS
  • -h Print a short help
  • --help Print this longer help
OPERATING SYSTEMS
  • -l Create a plain Love file. It is just a zip of your sources, renamed in *.love.
    Mostly aimed at Linux players or developpers and the most common distribution process.
  • -m Create MacOS application.
    Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
    If you are targeting one of these, your project must be developped with Love 0.8.0 or lower.
    Depending on the Love version used, the script will choose which one, between x64 only or Universal Build to create.
  • -w Create Windows application.
    Starting with Love 0.8.0, a release is specially available for Windows x64.
    If you are targeting one of these, your project must be developped with Love 0.8.0 or newer.
    Remember that x86 is always backwards compatible with x64.
    Depending on the Love version used, the script will choose which one, between x64 and x86 or x86 only to create.
    • -w32 Create Windows x86 executable only
    • -w64 Create Windows x64 executable only
PROJECT OPTIONS
  • -n Set the projects name. By default, the name of the current directory is used.
  • -r Set the release directory. By default, a subdirectory called releases is created.
  • -u Set the company name. Provide it for MacOS CFBundleIdentifier.
  • -v Love version. Default is 0.9.0.
    Starting with Love 0.8.0, a release is specially available for Windows x64.
    Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
OTHERS
  • --refresh Refresh the cache located in ~/.cache/love-release. One can replace the Love files there.
  • --debug Dump the scripts variables without making releases.
It Should also work better too than the old one. I hope it will serve you well !
Rucikir
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: Love-Release. Bash script to make it easier.

Post by jjmafiae »

Awesome!
User avatar
Rucikir
Party member
Posts: 129
Joined: Tue Nov 05, 2013 6:33 pm

Re: Love-Release. Bash script to make it easier.

Post by Rucikir »

Hi everybody,
I've just added something to ensure the script's posterity: one can simply at the beginning of the script edit this line.

Code: Select all

## Edit this if you want to use another Löve version.
LOVE_VERSION=0.9.0
And then the rest of the script will follow your choice.
Have a good day.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 36 guests