Love Distribution Tool v0.3 [Mac contributor needed!]

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Re: Love Distribution Tool [Mac contributor needed!]

Post by easy82 »

In order to create proper .deb or .rpm files for Linux, I need to detect which distribution LDT runs on. I've found some great information at this link which I could use for detecting most common distros.

I've also found some info on detecting Mac version, but is it neccessary?
If I recall correctly it's unnecessary to do this for Windows, as it can run binaries no matter on which Windows version it was created on.

I'm thinking about a directory structure like this:

Code: Select all

Windows-x86/
  MyGame-Windows-x86.zip
Windows-AMD64/
  MyGame-Windows-AMD64.zip
Linux-i686/
  Ubuntu-12.04-i686/
    MyGame-Ubuntu-12.04-i686.deb
  Fedora-18-i686/
    MyGame-Fedora-18-i686.rpm
MacOSX/
  MyGame-MacOSX.app
But meanwhile I'm wondering that maybe this whole detecting thing is unneccessary. Detecting the OS type, version, and architecture will never be 100% punctual. Maybe I should just let the user choose these options?

By the way, on Linux I think the easiest solution would be to actually install LÖVE as a dependency and run the .love version when the user clicks on the game in the menu.

Right now, to run a Linux executable created with LDT on an Ubuntu derivative you need to copy this into the terminal:

Code: Select all

sudo apt-get -y install libmpg123-0 libmodplug1 libphysfs1 libfreetype6 libdevil1c2 liblua5.1-0 libopenal1 libsdl1.2debian libvorbis0a libvorbisenc2 libvorbisfile3 libglee0d1
I've found this out by checking out the package at packages.ubuntu.com. It also lists 'libc6 libgcc1 libstdc++6 libgl1-mesa-glx' but I guess everyone has those packages. I only needed to install 'libphysfs1 libdevil1c2 libglee0d1' in order to run the 64-bit executable on Linux Mint 15 64-bits, because all the other packages were installed alread. Also, the LÖVE wiki doesn't list libglee as a dependency!
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Love Distribution Tool [Mac contributor needed!]

Post by Robin »

easy82 wrote:By the way, on Linux I think the easiest solution would be to actually install LÖVE as a dependency and run the .love version when the user clicks on the game in the menu.
Yes. The only thing a .deb or .rpm for your game needs is:
  1. The .love
  2. A .desktop file or similar, to get it into the menu.
  3. A dependency on the relevant version of LÖVE
Help us help you: attach a .love.
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Love Distribution Tool [Mac contributor needed!]

Post by slime »

easy82 wrote:I've also found some info on detecting Mac version, but is it neccessary?
It shouldn't be, nope. LÖVE won't work on Mac OS 10.4 and below, but no one uses those versions anymore.
easy82 wrote:I only needed to install 'libphysfs1 libdevil1c2 libglee0d1' in order to run the 64-bit executable on Linux Mint 15 64-bits, because all the other packages were installed alread. Also, the LÖVE wiki doesn't list libglee as a dependency!
It's not a dependency - the GLEE source is in the LÖVE source and gets compiled into the LÖVE binary.
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Re: Love Distribution Tool [Mac contributor needed!]

Post by easy82 »

Robin wrote:
easy82 wrote:By the way, on Linux I think the easiest solution would be to actually install LÖVE as a dependency and run the .love version when the user clicks on the game in the menu.
Yes. The only thing a .deb or .rpm for your game needs is:
  1. The .love
  2. A .desktop file or similar, to get it into the menu.
  3. A dependency on the relevant version of LÖVE
This sounds like a plan! Does the Linux users agree on this?
It'd be stupid anyway to do the same work again what packagers of different distributions have already done. I suspect the love package name does not vary too much over time, so the .deb and .rpm files would last longer.

I've already dowloaded a bunch of .deb and .rpm files, info on how to build them, and also some distributions with different DEs to test them out.

slime wrote:
easy82 wrote:I've also found some info on detecting Mac version, but is it neccessary?
It shouldn't be, nope. LÖVE won't work on Mac OS 10.4 and below, but no one uses those versions anymore.

Thanks for the info!
easy82 wrote:I only needed to install 'libphysfs1 libdevil1c2 libglee0d1' in order to run the 64-bit executable on Linux Mint 15 64-bits, because all the other packages were installed alread. Also, the LÖVE wiki doesn't list libglee as a dependency!
It's not a dependency - the GLEE source is in the LÖVE source and gets compiled into the LÖVE binary.
You're right! But it seems like on Raring, it is a dependency.

easy82 wrote:If I recall correctly it's unnecessary to do this for Windows, as it can run binaries no matter on which Windows version it was created on.
I quote myself here, but I've read that this is not entirely true.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Love Distribution Tool [Mac contributor needed!]

Post by bartbes »

easy82 wrote: You're right! But it seems like on Raring, it is a dependency.
I looked up the changelog for the package, and apparently it's because of this debian bug report. I wonder what's going on there, too bad there's no easy reply button.

EDIT: Further research seems to indicate they rip out our version of GLee manually.. the bastards.
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Love Distribution Tool [Mac contributor needed!]

Post by Germanunkol »

easy82 wrote:
Robin wrote:
easy82 wrote:By the way, on Linux I think the easiest solution would be to actually install LÖVE as a dependency and run the .love version when the user clicks on the game in the menu.
Yes. The only thing a .deb or .rpm for your game needs is:
  1. The .love
  2. A .desktop file or similar, to get it into the menu.
  3. A dependency on the relevant version of LÖVE
This sounds like a plan! Does the Linux users agree on this?
It'd be stupid anyway to do the same work again what packagers of different distributions have already done. I suspect the love package name does not vary too much over time, so the .deb and .rpm files would last longer.
I don't know enough about the packaging systems, but this does seem like the best way to do it.
If I'm not mistaken, this is the only way to install as little as possible when one installs more than one love game.
Otherwise, the love executable will always be packed with the game, so it'll be on the PC multiple times, but if you just install love, it'll be on the PC only once, no matter how many love games you install.
But this way you need to watch out for different love versions - you need to remember which love version the game runs on and install that correct version.

You asked what distro I was testing on before: Just plain old Ubuntu 12.10, 64bit
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Re: Love Distribution Tool [Mac contributor needed!]

Post by easy82 »

bartbes wrote:EDIT: Further research seems to indicate they rip out our version of GLee manually.. the bastards.
:P

Germanunkol wrote:I don't know enough about the packaging systems, but this does seem like the best way to do it.
If I'm not mistaken, this is the only way to install as little as possible when one installs more than one love game.
Otherwise, the love executable will always be packed with the game, so it'll be on the PC multiple times, but if you just install love, it'll be on the PC only once, no matter how many love games you install.
But this way you need to watch out for different love versions - you need to remember which love version the game runs on and install that correct version.

You asked what distro I was testing on before: Just plain old Ubuntu 12.10, 64bit
Yes, on Linux it would install LÖVE if the user does not have it installed already, plus the game in .love format, and a menu entry. If he or she already has LÖVE, then only the rest would be installed. LÖVE could be shared this way. The package manager would check if the user has the appropriate version of LÖVE. On the sidenote, I hope once it will be possible to play older LÖVE games without crashing.

On other platforms however, a game is distributed with its own copy of LÖVE. Although this situation is a little bit schizophrenic, but at least it is a solution!


I've updated first post! New version is out with a Mac fix, and a universal Linux distro detection. This latter will most probably fail on Debian as I've just discovered this case.
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Re: Love Distribution Tool [Mac contributor needed!]

Post by easy82 »

Updated first post (again)! Now with a hotfix for Ubuntu and Debian detection.
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Re: Love Distribution Tool v0.3 [Mac contributor needed!]

Post by easy82 »

Hello again!

After a lot of struggling I can finally confirm that it works on Fedora 18 XFCE, Ubuntu 12.04 and 13.04 (both on Unity), Linux Mint 13 (32 bit XFCE and 64 bit Cinnamon versions), Windows XP 32 bit and Windows 7 64 bit versions. Unfortunately I couldn't make my Debian work, so I'll look for a distro that is built on top of it (I used to like CrunchBang so maybe I'll try it again). I've also downloaded OpenSUSE with KDE so I'll install it soon. I need some distros with .deb and some with .rpm support for testing.

As I see .deb is easier to create, as they are just renamed .zip files with extra content. Then we can create .rpm from the .deb with e.g. 'alien'. The package name of LÖVE doesn't vary too much amongst different distos, see here.

The .desktop file content would be something like this:

Code: Select all

[Desktop Entry]
Name=My Game
Version=0.3
Comment=My Game Created with LÖVE
Categories=Application;Game;
Exec="/usr/bin/love" "/usr/games/mygame/mygame.love"
Terminal=false
Encoding=UTF-8
Type=Application
Icon=love
StartupNotify=true
NoDisplay=true
I'm thinking about adding a config file to store the project meta data:

Code: Select all

meta = {
  exclude = 
  {
    -- Insert files, directories, or widecard selections here, that you DON'T
    -- want to include into the project, for example:
    -- 'data/*' --> This will exclude the 'data' folder and everything in it.
    -- '*.mp3' --> Excludes all the .mp3 music files.
    -- 'data/icon.png' --> Excludes 'icon.png' inside 'data' folder.
    '',
  },

  -- Title of your project. For example: 'Astronauts'.
  title = '',

  -- Description of your project. For example: 'Survival Game in the Space'.
  description = '',

  -- Version of your project. For example: '1.0'.
  version = '',

  -- Icon to use for your project. For example: 'data/icon.png'.
  icon = '',

  -- Etc...
}
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 0 guests