[Linux/Ubuntu] .love mime type AKA Double-click=Run

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

[Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by bartbes »

Tested on Ubuntu Intrepid Ibex.

Instructions:
  1. Download the mime file below
  2. Copy/Move the file to /usr/share/mime/packages/
  3. Run (as root/with sudo): update-mime-database /usr/share/mime
  4. Restart nautilus (kill it, restart your session, or restart your pc)
  5. Assign love to the .love files (right click->Open with application find love, or add it manually)
  6. Enjoy!
For the icons:
  1. Download the icon below
  2. Copy/Move it to /usr/share/icons/gnome/scalable/mimetypes/
  3. Run (as root/with sudo): gtk-update-icon-cache --force /usr/share/icons/gnome
  4. Restart nautilus (kill it, restart your session, or restart your pc)
  5. If love files are assigned properly (as done above): Enjoy!
If this doesn't work, try and do the same, but in /usr/share/icons/<theme name>

Both steps at once:
  1. Download both files below
  2. Copy/Move the xml file to /usr/share/mime/packages/
  3. Copy/Move the png to /usr/share/icons/gnome/scalable/mimetypes/
  4. Run (as root/with sudo) no quotes: "update-mime-database /usr/share/mime; gtk-update-icon-cache --force /usr/share/icons/gnome"
  5. Restart nautilus (kill it, restart your session, or restart your pc)
  6. Assign love to the .love files (right click->Open with application find love, or add it manually)
  7. Enjoy!
Attachments
gnome-mime-application-love-game.png
gnome-mime-application-love-game.png (2.38 KiB) Viewed 5163 times
love.xml
(240 Bytes) Downloaded 224 times
Last edited by bartbes on Sun Mar 01, 2009 3:16 pm, edited 1 time in total.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: [Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by rude »

And this does not result in normal .zip-files being opened with love?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: [Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by bartbes »

No, it defines a new mime type, icons would be nice though (none included in package)
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: [Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by rude »

Any common way to automate this in the .deb?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: [Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by bartbes »

Include the mimetype file (and preferably add an icon) and run update-mime-database in the post-install script?
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: [Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by rude »

Here are the icons, if you would like to add them.

The "Vista" ones contain 16x16, 24x24, 32x32, 48x48 and 256x256. The non-Vista ones contain all those except 256x256.

The game-icons should be used for the .love files. The love-icons are meant for the binary itself, but I don't know if there's any point in adding that.
Attachments
love-icons.zip
(52.33 KiB) Downloaded 180 times
User avatar
Skofo
Party member
Posts: 146
Joined: Mon Dec 22, 2008 10:55 pm

Re: [Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by Skofo »

Whoa, wicked useful! :ultraglee: Thanks for this!
Working on: Viator
Need a 64-bit Debian package for LÖVE? Here it is!
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: [Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by bartbes »

@rude found out how to change icons, updated first post.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: [Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by bartbes »

I can create a shell script for the time being, should I?
User avatar
Skofo
Party member
Posts: 146
Joined: Mon Dec 22, 2008 10:55 pm

Re: [Linux/Ubuntu] .love mime type AKA Double-click=Run

Post by Skofo »

I'd use it. :oops: I was waiting until the next version with this built-in, but I definitely wouldn't mind just quickly downloading a bash script and running it.
Working on: Viator
Need a 64-bit Debian package for LÖVE? Here it is!
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests