Welcome, Guest. Please login or register.
March 19, 2024, 03:08:31 am

Pages: [1]
  Print  
Author Topic: Air installer failed? Use the SDK without installing instead!  (Read 74123 times)
SouseMouse
little robot
*
Posts: 4


« on: April 22, 2012, 07:20:57 am »

I have tested this on 64-bit (Linux Mint 12) and 32-bit (Linux Mint 11)You don't have to do anything as root with this method, and it doesn't actually install anything.  Everything will be contained within one directory, so you can easily move or remove it.

First off, I didn't figure this out myself.  I just think it needs to be a top-level post, because it works, it's easy, and I've made a minor change to the method described here:
http://amanita-design.net/forum/index.php?PHPSESSID=7dfe1581bb668a5038cf83744605033d&/topic,3727.msg10978.html#msg10978

Okay, not so much a minor change.  I wrote a script that hopefully makes it easy for less technical users to get the game running.

DarkStarSword is right- the Air runtime is fail, at least on 64-bit, but the SDK works fine.

Download:  Direct link to Air SDK 2.6  <- Right click, save as.
(If that link breaks, scroll down to 2.6 SDK (not runtime!) at http://helpx.adobe.com/air/kb/archived-air-sdk-version.html.)

Put that file and your downloaded Botanicula in a new folder.

Copy the following into a new text file and save it as botanicula.sh
Code:
#!/bin/bash
# botanicula.sh - Launch Botanicula without having to install Adobe Air.
# Using the current directory as HOME avoids cluttering your home directory.
# Error checking isn't very robust in this, but it shouldn't clobber anything.
# If you're feeding this a .zip for the game files, it'll leave the
# "Botanicula.air" file behind.  You can safely delete this file, as it's not
# needed.  You probably should, because it's big.

##### These first lines set file and directory names.
##### You can change most of these, but you shouldn't need to.

# Adobe Air should be or will be here.
ADIR='air'

# The Air SDK filename, so this script can unpack it for you.
AIRBALL='AdobeAIRSDK.tbz2'

# Beginning of game files zip name.  This will be globbed.
ZIP='botanicula-linux-'
#  NOTE:  If you have multiple botanicula-linux-*.zip in the dir,
#         this script won't unzip any of them.

BAIR='Botanicula.air'  # The .air file in the .zip
BDIR='Botanicula'  # Game files directory name
HOME="$PWD"  # Save directory will be stored here
SAVE='BotaniculaSaves'  # Save directory name (Don't change this.)

##### You should understand some Bourne shell to edit below this line.

# Is Adobe Air already decompressed?
[ -d "$ADIR/bin" ] || {
# Is there AdobeAIRSDK.tbz2 in current directory?
# If there is, we'll be helpful and decompress it.
[ -f "$AIRBALL" ] && mkdir "$ADIR" && tar -xjvf "$AIRBALL" -C "$ADIR" || {
echo "ERROR: Adobe Air SDK not found"; exit 1
}
}
# What about the Botanicula game files?
[ -d "$BDIR/data" ] || {
# We can decompress these if the .zip or .air is present.
# Try decompressing the .air if it's here.
[ -f "$BAIR" ]  && unzip -d "$BDIR" "$BAIR" || {
# No .air or unzip failed, so check for .zip
[ -f $ZIP*.zip ] && unzip $ZIP*.zip "$BAIR" \
&& unzip -d "$BDIR" "$BAIR" || {
echo "ERROR: Botanicula game files missing"; exit 1
}
}
}
# If there's no save dir yet, create one
[ -d "$SAVE" ] || mkdir "$SAVE"
# If there's no settings file, make one with sane defaults
[ -f "$SAVE/settings.txt" ] || echo '100,off,high,en,1,0' > "$SAVE/settings.txt"
# Now try running the game
HOME="$HOME" ./"$ADIR"/bin/adl -nodebug "$BDIR"/META-INF/AIR/application.xml "$BDIR/"

##### mab 201204212303 vim:ts=3

Now you should have a directory with three files in it:
  • AdobeAIRSDK.tbz2
  • botanicula-linux-1.0-0123456789.zip  (Ignore the numbers.)
  • botanicula.sh  (The file we've just created.)

Now you need to set botanicula.sh as executable.  Right-click it and select Properties from the menu.  On the Permissions tab, check "Allow executing file as program".

Now you should be able to double-click botanicula.sh, select Run, and have the game run.
This may take a while the first time if the script has to unpack the .bz2, .zip, and .air files.

Oh, and after you run this the first time, there may be a big Botanicula.air file in the directory.  You can delete it to save some disk space.  You can actually delete AdobeAIRSDK.tbz2 and botanicula-linux-1.0-0123456789.zip too if you want to.  (That's assuming that everything worked, of course.  If the game runs, those files aren't needed anymore.)

Edit on 20120424 to clarify the post title.  "Zero-Install Air Method" wasn't a very good choice.
« Last Edit: April 25, 2012, 07:12:13 am by SouseMouse » Logged
nicolas
Global Moderator
space invader
*****
Gender: Male
Posts: 107


pains-aux-raisins-based life-form.


WWW
« Reply #1 on: April 22, 2012, 11:07:12 am »

Thank you for this contribution! Cheesy
Made this a sticky post!

(I didn't test it yet as my Linux laptop doesn't have a working screen anymore, so I'm stuck on a mac for now, but I will certainly use your launching script thing as soon as it get fixed, as well as for installing the game for my mother and at my grand-parents' home to play with my family. So thanks!)

Logged
stevenaaus
little robot
*
Posts: 5


« Reply #2 on: April 24, 2012, 12:52:48 pm »

Hmmm , thanks, but i found this link too late, and have installed the game on another version of Linux and have played half of it.

Where are the game saves located under linux , and can i copy them over ?
Logged
SouseMouse
little robot
*
Posts: 4


« Reply #3 on: April 25, 2012, 05:59:37 am »

Botanicula stores its settings and savegames in $HOME/BotaniculaSaves/

My script actually lies to Botanicula by setting $HOME to whatever directory you have the AIR SDK and Botanicula game files in, in order to fool the game into storing that data there instead.  You can actually run the game from a removable disk this way, and if you connect it to another Linux computer it should run fine there too, including your saved game.  (I just tried this, and it won't work on most distributions.  As a security precaution it's common to disallow execution on removable devices.)

Anyhow, for your particular question, if you're running an Ubuntu variant (and this probably applies to many other distributions as well) just open Places -> Home Folder on the menu, and there should be a BotaniculaSaves folder there.  That's where I'd expect them to be.
« Last Edit: April 25, 2012, 07:13:09 am by SouseMouse » Logged
SouseMouse
little robot
*
Posts: 4


« Reply #4 on: April 25, 2012, 08:00:42 am »

Man, do I love the edit option, but I've only been using it to try to clarify things.  I haven't had reason to change the script yet, because even though I've now had the time to test it more thoroughly, it still works as I expected it to.

I'm pleased to report that my full test of this on my little 32-bit Netbook worked perfectly.  (It's a wimpy machine, though.  I had to turn "quality" down so the audio wouldn't lag.)  I think I can now claim that this is truly the preferred method for running the game.

I must admit that it's a bit disappointing not to see anyone reply that this has helped them, but I realize that there are potentially many people who have tried this and not bothered to register to say so.  If there's anyone who appreciates this, or maybe it didn't work for you, but you don't want to register for yet another forum just to say so, you can email me:  sousemouse@gmail.com
Logged
insonifi
little rusty robot

Posts: 1


« Reply #5 on: April 25, 2012, 10:28:17 am »

SouseMouse, many thanks for installation method you provided. I spent several hours trying to install AIR on Fedora 16 64bit, but no luck. With yours, got game running after 5 minutes.

However, I still have one issue left, I don't have any sound coming from the game. Despite I see "ALSA plug-in[adl]" application in Sound settings. Could you help me fixing this?

Found the problem. My bad, sound output device was different from one connected to speakers.

Finally, I will enjoy the game! Good luck to everybody!
« Last Edit: April 25, 2012, 10:41:26 am by insonifi » Logged
Mike_IronFist
little robot
*
Posts: 2


« Reply #6 on: May 01, 2012, 12:47:13 am »

SouseMouse, what you've made is fantastic!

I decided to create a sister script to yours. It will create a launcher so that you can run the game with a click from your app menu, whether you're using Unity, GNOME, KDE or whatever else desktop environment supports .desktop launchers. It will also create said launcher in the current directory.

NOTE: This script must be in the same directory as SouseMouse's botanicula.sh when you run it, or else it will do nothing.

You should run SouseMouse's script before at least once before you run this one. If you don't, the launcher won't have an icon until the SouseMouse script finishes unpacking the game files.

Copy the following into a new text file and save it as create-botanicula-launcher.sh
Code:
#!/bin/bash
# The name of SouseMouse's script.
SOUSESCRIPT=botanicula.sh

# If SouseMouse's botanicula.sh script is not in this directory, the script does nothing and immediately quits.
if [ ! -e $PWD/$SOUSESCRIPT ]
then
exit
fi

# Make sure that /home/user/.local/share/applications exists. If not, create that folder.
if [ ! -e ~/.local/ ]
then
mkdir ~/.local/
fi
if [ ! -e ~/.local/share/ ]
then
mkdir ~/.local/share/
fi
if [ ! -e ~/.local/share/applications/ ]
then
mkdir ~/.local/share/applications/
fi

# Create a launcher for Botanicula
echo "[Desktop Entry]
Encoding=UTF-8
Type=Application
Categories=Application;Game;
Path=$PWD
Exec=$PWD/botanicula.sh
Icon=$PWD/Botanicula/data/icons/b512.png
Name=Botanicula
GenericName=Epic Forest Adventure Game
Comment=Adventure game by Amanita Design
Terminal=false">botanicula.desktop

# Permit the launcher to run.
chmod +x botanicula.desktop

# Move the launcher to /home/user/.local/share/applications
mv botanicula.desktop ~/.local/share/applications/

Just like SouseMouse's script, you need to set create-botanicula-launcher.sh as executable.  Right-click it and select Properties from the menu.  On the Permissions tab, check "Allow executing file as program."

Once again, this script must be in the same directory as SouseMouse's botanicula.sh when you run it, or else it will do nothing.

Once you've done this, just double-click create-botanicula-launcher.sh and click Run when prompted. This will create the launcher. You might have to log out and log back in for the game to appear in your app menu/Unity dashboard/whatever.

Screenshot!
« Last Edit: May 01, 2012, 12:50:47 am by Mike_IronFist » Logged
faizan
little rusty robot

Posts: 1


« Reply #7 on: May 01, 2012, 07:01:18 am »

Thanks for this Amazing Script. Run game smoothly on ubuntu 10.10 32bit. Not any lagging come and games save data work perfect.
Ubuntu 10.10 runing from usb flash drive ad persistence feature available.
Thanks SouseMouse.
Logged
SouseMouse
little robot
*
Posts: 4


« Reply #8 on: May 01, 2012, 12:22:03 pm »

SouseMouse, many thanks for installation method you provided. I spent several hours trying to install AIR on Fedora 16 64bit, but no luck. With yours, got game running after 5 minutes.
. . .
Finally, I will enjoy the game! Good luck to everybody!
Excellent!  But I learned how from DarkStarSword.  I've just tried to make it easier.

I decided to create a sister script to yours. It will create a launcher so that you can run the game with a click from your app menu, whether you're using Unity, GNOME, KDE or whatever else desktop environment supports .desktop launchers. It will also create said launcher in the current directory.
It never occurred to me to even try to add this to the menu.  I've never tried to do that with anything.  I guess I'm too console-oriented...
However, if you approve, I'd be pleased to steal from you and add this near the end of the script, just before "Now try running the game":
Code:
# Launcher icon implementation stolen from:
#   Mike_IronFist on amanita-design.net/forum
# Thanks, Mike!  I didn't even think to do this myself, and I'm sure
# many people would appreciate it, so I think it's worth stealing.
#
# Create a .desktop file for launching the game.
# First off- is there a Botanicula.desktop file in $PWD already?
# If there is, we won't create one, nor will we copy it to the menu.
# We don't want to annoy anyone who doesn't want one there.
# NOTE:  Creating a junk "Botanicula.desktop" file in this directory will
# cause this script to NOT add an icon to your menu.
[ -f Botanicula.desktop ] || (
# Use a loop to avoid dependency upon "mkdirhier".
# (I wanted "IFS='/' for N in .local/share/applications", but no joy.)
# (I guess you can't use variable set on shell built-ins?)
# (Or maybe whole line is parsed, so set takes effect after word splitting?)
M='~/' ; for N in .local share applications ; do
M="$M$N/" ; [ -d "$M" ] || mkdir "$M"
done
# Use a "Here Document" for fun and because Mike didn't.
# Refer to "man 1 bash" if confused.  Shell scripting is FUN!
# (Not using <<- because I can't assume tabs won't get converted to spaces.)
cat > Botanicula.desktop << ANTITRANSUBSTANTIATIONALIST
[Desktop Entry]
Encoding=UTF-8
Type=Application
Categories=Application;Game;
Path=$PWD
Exec=$PWD/botanicula.sh
Icon=$PWD/Botanicula/data/icons/b512.png
Name=Botanicula
GenericName=Epic Forest Adventure Game
Comment=Adventure game by Amanita Design
Terminal=false
ANTITRANSUBSTANTIATIONALIST
# Add execute permission to our new launcher
chmod +x Botanicula.desktop
# Now copy it to ~/.local/share/applications to add to menu
cp -p Botanicula.desktop ~/.local/share/applications \
&& echo -e '#!/bin/bash\nrm -f '"~/.local/share/applications/Botanicula.desktop" \
> 'Remove Botanicula from App menu.sh' \
&& chmod +x 'Remove Botanicula from App menu.sh'
# (I also create a one-line script to remove it from the menu again.)
)


Thanks for this Amazing Script. Run game smoothly on ubuntu 10.10 32bit. Not any lagging come and games save data work perfect.
Ubuntu 10.10 runing from usb flash drive ad persistence feature available.
Thanks SouseMouse.
Thanks for letting me know.  I hadn't tried this from a removable boot media.  I think that it works is more due to Ubuntu's robustness in this configuration than anything I did, but it's nice to know that it works even in the less-than-usual use cases.


Again, I stole (and automated) this AIR-SDK method from DarkStarSword.  What I really SHOULD have done is bring it to his attention that he needed to make a top-level thread for this, and automate it somewhat.  I feel like I'm stealing credit here.  I didn't do the tricky make-it-work bit.  I've just done the make-it-slightly-easier bit.
Logged
grahamuk2012
little robot
*
Posts: 2


« Reply #9 on: May 02, 2012, 10:04:51 pm »

Hi,

I am running Ubuntu 12.04 64 bit and put all of the 3 files mentioned in a folder and created the botanicula.ch file which on the first run extracted the save data directory and on the 2nd run extracted the game data but the game does not run. When i double click the botanicula.ch file nothing happens.

Any ideas?

Thanks,

Graham
Logged
Mike_IronFist
little robot
*
Posts: 2


« Reply #10 on: May 03, 2012, 05:28:27 am »

It never occurred to me to even try to add this to the menu.  I've never tried to do that with anything.  I guess I'm too console-oriented...
However, if you approve, I'd be pleased to steal from you and add this near the end of the script, just before "Now try running the game":

I absolutely approve!
Apparently there's going to be .deb and .rpm files for buyers of the Humble Bundle version soon, but if you add my launcher-creation stuff to your script, we'll basically have a distro-independent solution for people who run distros like Arch, Puppy, etc.
« Last Edit: May 03, 2012, 05:33:38 am by Mike_IronFist » Logged
grahamuk2012
little robot
*
Posts: 2


« Reply #11 on: May 03, 2012, 02:12:20 pm »

Got this working by using another method. Just after i got it to work I went back to the download page on Humble Bundle and there was a .deb, .rpm and a .tar.gz  Huh Typical!
Logged
magopian
little rusty robot

Posts: 1


« Reply #12 on: May 03, 2012, 03:20:37 pm »

Hello there,

I tried various ways to install adobe Air and the game (installing adobe-air + sdk from AUR, and following the first post's steps) but all seem to leed to the same error for me: an empty black screen with nothing displaying whatsoever, and the following error messages in the console:

Code:
mathieu@zen:~/Downloads/games/botanicula$ ./botanicula.sh

(adl:7956): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

(adl:7956): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",

[... several more duplicated lines ...]

(adl:7956): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",
TypeError: Error #1009


I'm trying that on an Archlinux updated a few days ago.

Any clue?

Thanks in advance

Mathieu

P.S: btw, I already played and finished Machinarium and Samorost2, two awesome games (Machinarium is the one i preferred Wink
« Last Edit: May 03, 2012, 04:00:35 pm by magopian » Logged
confluence
citizen robot
**
Posts: 8


« Reply #13 on: May 19, 2012, 10:40:40 am »

To anyone who is getting a black screen and an ActionScript error 1009 when running the game with the SDK (the packaged deb and I assume also the rpm do this) or just an inexplicable black screen when running it with Air: are you using a window manager other than GNOME?  I do, and I had the same problem.

I found one cryptic comment which suggested that running the game from GNOME works (https://plus.google.com/103555773917939181320/posts/M7r7ZC6Z8WY).  I tried it, and it worked.  So it looks like the game is looking for something which is present in the GNOME environment. I haven't tried to debug this in greater detail; I just spent a few hours in GNOME until I finished the game.

I also had the mouse stop working in the startup screen (after the settings); it looks like this is a problem with fullscreen mode.  I've seen hacks for changing the settings in the save files, but you can also turn off fullscreen mode if you've gone past the settings screen by using keyboard shortcuts -- I think it was escape to launch the menus, and then you can use tab and enter to select things.

I hope more users of other WMs can verify the ActionScript error thing, and perhaps shed some light on what specific component is needed.
Logged
confluence
citizen robot
**
Posts: 8


« Reply #14 on: May 19, 2012, 10:51:12 am »

P.S. I use Ubuntu and Fluxbox.  I can verify that it worked for me in GNOME.  I assume it also works in Unity, or we'd be hearing a lot more people complain about this.
Logged
Pages: [1]
  Print  
 
Jump to: