Welcome, Guest. Please login or register.
Did you miss your activation email?
May 21, 2012, 04:12:39 PM

Pages: [1]
  Print  
Author Topic: Create a launcher on Linux  (Read 9553 times)
Nicolas
Global Moderator
space invader
*****
Gender: Male
Posts: 112


WWW
« on: October 19, 2009, 11:36:59 PM »

Hi Grin
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). Roll Eyes

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. Undecided

So, you have to do a very little script, that you can put inside a single command in your launcher. Tongue 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. Wink

« Last Edit: December 22, 2009, 10:08:46 AM by Nicosmos » Logged
mikeypoo
little robot
*
Posts: 2


« Reply #1 on: May 19, 2010, 12:11:31 PM »

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
Logged
AlwaysLearning
little robot
*
Posts: 2


« Reply #2 on: December 21, 2010, 07:56:48 AM »

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: 1250x790px
  • 80% mode: 1000x632px
Logged
federer
little robot
*
Posts: 6


« Reply #3 on: May 07, 2011, 12:53:06 PM »

Hi Grin
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). Roll Eyes

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. Undecided

So, you have to do a very little script, that you can put inside a single command in your launcher. Tongue 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. Wink



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

27. Love to spend time on forums.
Alex
Global Moderator
mayor robot
*****
Posts: 493



WWW
« Reply #4 on: December 03, 2011, 06:13:41 AM »


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

Logged
Pages: [1]
  Print  
 
Jump to: