On http://love2d.org/wiki/Game_Distribution, it is written that on Linux, you can create an excecutable from a .love file by writing "cat love game.love > game" (of course changing "game" to the name of your game). This simply does not work (it can't find "love" even if it's installed). I think I understand what it tries to do (create a text file called "game" containing the text "love game.love"), and this can be done graphically with gedit very easily, but if cat can really create text files (never used it that way) then the code on the wiki should be corrected.
Or maybe I have misunderstood something? Perhaps it's referring to some binary version of LÖVE for Linux, which cat merges with your .love file?
Strange question about cat
Strange question about cat
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Strange question about cat
You are very wrong indeed.
cat concatenates files. It needs a copy of LÖVE in the same directory, otherwise it will not work. (You can of course do something like "cat /usr/bin/love ...", though.)
What that particular line is, it copies the executable from love and pastes a .love at the end of it, where "game" is the name of the new executable, which runs the provided game.
It is pretty much exactly the same as the Windows version of that action.
EDIT: example:
cat concatenates files. It needs a copy of LÖVE in the same directory, otherwise it will not work. (You can of course do something like "cat /usr/bin/love ...", though.)
What that particular line is, it copies the executable from love and pastes a .love at the end of it, where "game" is the name of the new executable, which runs the provided game.
It is pretty much exactly the same as the Windows version of that action.
EDIT: example:
Code: Select all
$ cat a
first file
$ cat b
second file
$ cat a b
first file
second file
$ cat a b > c
$ cat c
first file
second file
Help us help you: attach a .love.
Re: Strange question about cat
I see. That makes a lot of sense. Perhaps the wiki should be clarified, or am I just stupid?
But since this seems to copy LÖVE in binary format, will it work on another computer? I'm guessing you would have to, at the very least, make sure to have the 32-bit version of LÖVE installed.
But since this seems to copy LÖVE in binary format, will it work on another computer? I'm guessing you would have to, at the very least, make sure to have the 32-bit version of LÖVE installed.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Strange question about cat
It is, indeed, of limited use, because you need not just compatible architectures, but also libraries etc, that's why it is common to distribute the .love for linux users. Something you can do with most package management systems is the creation of a launcher that runs your .love with love, then add love as a dependency for the package.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Strange question about cat
In practice it might work better to make a package (.deb or .rpm) from of the .love and add the right version of LÖVE as a dependency.
Help us help you: attach a .love.
Re: Strange question about cat
A simple install script will probably be sufficient for Ubuntu users (first run sudo apt-get install love, then make a launcher and put it in /usr/share/applications)
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- TechnoCat
- Inner party member
- Posts: 1612
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Strange question about cat
Robin wrote:(You can of course do something like "cat /usr/bin/love ...", though.)
Code: Select all
$ cat `which love` game.love > game.bin
Who is online
Users browsing this forum: Google [Bot] and 9 guests