Create a launcher on Linux

(1/2) > >>

nicolas:
Hi ;D
If you want to create a launcher for Machinarium on Linux, it's a bit more complicated than we can think first. It's quite easy anyway. Here the problem : according to how and from where the game is launched, Flash doesn't put the saved game to the same place, or doesn't see the data (all which are in these 00-11 folders). ::)

If you launch the game directly in double-clicking on the binary extracted from the tarball, it obviously work, and the saved game (if you have put the game in /opt/Machinarium/ for instance) is located here :
Code:

/home/-username-/.macromedia/Flash_Player/#SharedObjects/-strangething-/-localsomething-/opt/Machinarium/Machinarium/

If you make a launcher (in a menu, a panel, your desktop, whatever), the most simple command to put inside could have been (still with the game folder in /opt) :
Code:

/opt/Machinarium/Machinarium
But it doesn't work (black screen in the Flash player), for the simple reason that the game is not launched from its own folder, and doesn't see its data. :-\

So, you have to do a very little script, that you can put inside a single command in your launcher. :P Something like :
Code:

bash -c "cd /opt/Machinarium/ && ./Machinarium"

In this way, it works, the game is launched, but it doesn't find your saved game from when you have launched it directly. Now, the saved game is located at :
Code:

/home/-username-/.macromedia/Flash_Player/#SharedObjects/-strangething-/-localsomething-/Machinarium/
So, if you want to use a launcher, more simple than an exploration through the folders each time you want to play, remember to move - with care - your saved game (Machinarium.sol) to its new location. ;)

mikeypoo:
Hi Nicosmos, I tried to create your launcher in Ubuntu Karmic but had problems as it didn't actually active the program, but I suddenly remembered I often had to escape with slashes, so my new launcher is created this way and works fine:

sh -c "cd /home/$USER/machinarium/Machinarium\ Demo/ && ./Machinarium\ Demo"

Just thought it might help someone. I have noticed in fullscreen the mouse was somewhat erratic, but this might be able to be fixed easily, I have downloaded the demo and will experiment with it some more, great little game and clever graphics. About as quirky as Myst3

AlwaysLearning:
Like a lot of users I have a fairly large screen running at 1920x1200, which means that even running Machinarium in its "100% mode" half of the screen is black.

I got around this issue my causing my App Launcher script to change resolution before starting Machinarium, ala:

Code:

#!/bin/sh
xrandr --size 1280x960
# A slight delay is recommended before starting Flash/Machinarium
sleep 2
cd /opt/Machinarium
./Machinarium
# Return to normal desktop resolution
xrandr --size 1920x1200

Naturally you should choose a resolution that suits your video card/screen combination (I have a 16:10 screen). According to the Machinarium FAQ the two screen modes are this size:
100% mode: 1250x790px80% mode: 1000x632px

federer:
Quote from: Nicolas on October 19, 2009, 11:36:59 pm

Hi ;D
If you want to create a launcher for Machinarium on Linux, it's a bit more complicated than we can think first. It's quite easy anyway. Here the problem : according to how and from where the game is launched, Flash doesn't put the saved game to the same place, or doesn't see the data (all which are in these 00-11 folders). ::)

If you launch the game directly in double-clicking on the binary extracted from the tarball, it obviously work, and the saved game (if you have put the game in /opt/Machinarium/ for instance) is located here :
Code:

/home/-username-/.macromedia/Flash_Player/#SharedObjects/-strangething-/-localsomething-/opt/Machinarium/Machinarium/

If you make a launcher (in a menu, a panel, your desktop, whatever), the most simple command to put inside could have been (still with the game folder in /opt) :
Code:

/opt/Machinarium/Machinarium
But it doesn't work (black screen in the Flash player), for the simple reason that the game is not launched from its own folder, and doesn't see its data. :-\

So, you have to do a very little script, that you can put inside a single command in your launcher. :P Something like :
Code:

bash -c "cd /opt/Machinarium/ && ./Machinarium"

In this way, it works, the game is launched, but it doesn't find your saved game from when you have launched it directly. Now, the saved game is located at :
Code:

/home/-username-/.macromedia/Flash_Player/#SharedObjects/-strangething-/-localsomething-/Machinarium/
So, if you want to use a launcher, more simple than an exploration through the folders each time you want to play, remember to move - with care - your saved game (Machinarium.sol) to its new location. ;)




Its really a nice info which helps specially new users like me with the help of image is more usefull.

Alex:

Full disclosure: I know nothing about Linux.  But I found this thread about how to create a menu launcher for Machinarium in Ubuntu and thought it might help someone.

link: http://ubuntuforums.org/showthread.php?p=11506818

Navigation

[0] Message Index

[#] Next page