Preenv/FAQ

(How to get Driver working)
(Added Shrek Karting)
Line 147: Line 147:
==How to get Driver working==
==How to get Driver working==
-
'''Install libgles1'''
+
'''Install libgles'''
* get root
* get root
  root
  root
-
* install preenv, OpenGLES1 and OpenGLES2 (need extras-devel)
+
* install OpenGLES1 and OpenGLES2 (need extras-devel)
-
  apt-get install libgles1 libgles2 preenv
+
  apt-get install libgles1 libgles2
'''Fix corrupted/black graphics problem'''
'''Fix corrupted/black graphics problem'''
Line 160: Line 160:
see [http://talk.maemo.org/showpost.php?p=862561&postcount=455]
see [http://talk.maemo.org/showpost.php?p=862561&postcount=455]
 +
 +
==How to get Shrek Karting working==
 +
'''Install libgles1'''
 +
* get root
 +
root
 +
* install OpenGLES1 and OpenGLES2 (need extras-devel)
 +
apt-get install libgles1 libgles2
 +
 +
'''Improve corrupted/black graphics problem'''
 +
* Create file /etc/powervr.d/ShrekKarting.ini containing these 2 lines:
 +
 +
[default]
 +
ForceExternalZBuffer=0
 +
 +
Graphics are stil not perfect - lighting textures are still not good.
 +
== Save space (Transfer games to MyDocs folder) ==
== Save space (Transfer games to MyDocs folder) ==

Revision as of 12:21, 5 November 2010

Contents

How to install Preenv?

Gain root access and use apt-get in the terminal:

$ root
# apt-get install preenv
# exit

What do I use to extract an ipk file?

7-zip or any other tool able to extract Debian packages (dpkg, file-roller, ...)

Here is the Video guide on how to install WebOS games to the N900 http://www.youtube.com/watch?v=pGQwWZ_VriA

Or you can follow the steps below...

How to install a game

use 7-zip to extract -> game-folder

Copy the game folder to /home/user/[webOS-games]:

$ sudo gainroot
$ cd game-folder
$ chmod a+x filename

e.g. filename = nfsuc in need for speed case or sims in case of sims3

$ preenv
$ ./filename

Once you know that the file plays properly. you can add the menu button:

$ sudo gainroot
# preenv
# desktopgen game-folder/appinfo.json
# exit

How to delete a game

Enter preenv and cd into the game folder:

$ preenv
$ cd game-folder

Become root and use desktopgen to delete game icons:

$ root
# preenv
# desktopgen -r appinfo.json
# exit
# exit

Now you can delete the game folder itself:

$ cd ..
$ rm -r game-folder

Deleting games installed with old preenv 0.1

Become root and delete the folder:

$ sudo gainroot
$ rm -r game-folder

To remove the icon, you need to delete three files:

$ rm /usr/share/applications/hildon/filename.desktop
$ rm /usr/share/dbus-1/services/filename.service
$ rm /usr/share/icons/hicolor/scalable/hildon/filename.png

Refresh your menu:

$ killall hildon-desktop

How to get N.O.V.A working?

Install extra packages for N.O.V.A, then follow the regular install guide.

$ sudo gainroot
$ apt-get update
$ apt-get install libsdl-net1.2

How to get Monopoly Classic working with an icon?

After installation and creating an icon, lastly follow it with this step

$ cd *monopoly
$ root
# chmod -R 777 monopolyclassic/save

How to get Asphalt5 working?

Here is another video guide http://www.youtube.com/watch?v=8rDCbZ3gyYE

How to make it run:

$ mkdir -p /home/user/webos/gamesave 
$ ln -s /home/user/webos/gamesave /media/internal
$ chown -R user:root /home/user/webos/
$ chmod -R 755 /home/user/webos/
$ chown -R user:root /home/user/webos/gamesave
$ chmod -R 755 /home/user/webos/gamesave

How to get NFSU Working?

Easy way:

install nfsu-installer from extras-devel via Application Manager and run it. See youtube video on how it works.

Manual way:

get root

root

install preenv and OpenGLES1 (need extras-devel)

apt-get install libgles1 preenv

create main game dir on eMMC card

mkdir -p /home/user/MyDocs/Games/nfs

go to that dir and copy dowloaded .ipk file from desktop (or download directly here)

cd /home/user/MyDocs/Games/nfs
scp user@COMPUTER:/path/to/game/com.ea.app.nfsuc_20.0.28_all.ipk /home/user/MyDocs/Games/nfs

create file for loopback mount

dd if=/dev/zero of=/home/user/MyDocs/Games/nfs/nfsu.ext2 count=120 bs=1024k

create ext2 filesystem on it

mkfs.ext2 /home/user/MyDocs/Games/nfs/nfsu.ext2

press 'y'
make mountpoint

mkdir /mnt/nfsu

save it to the fstab

echo -e "/home/user/MyDocs/Games/nfs/nfsu.ext2\t/mnt/nfsu\text2\tloop,auto\t0\t0" >> /etc/fstab 

finally, mount it

mount  /mnt/nfsu/

create symlynk from /usr/palm (NFSU installs there)

ln -s /mnt/nfsu/ /usr/palm

extrack .ipk file

dpkg -X /home/user/MyDocs/Games/nfs/com.ea.app.nfsuc_20.0.28_all.ipk /mnt/nfsu/

make binary executable

chmod +x /mnt/nfsu/applications/com.ea.app.nfsuc/nfsuc

create desktop launcher

desktopgen /mnt/nfsu/applications/com.ea.app.nfsuc/appinfo.json

Unable to connect to USB after above method?

If after following the following tutorial, you are unable to connect your N900 to your PC's USB, open xterm on your device:

get root

root

unmount the image file

umount /mnt/nfsu

Once you're done with USB you can remount the image

mount /mnt/nfsu

How to get Driver working

Install libgles

  • get root
root
  • install OpenGLES1 and OpenGLES2 (need extras-devel)
apt-get install libgles1 libgles2

Fix corrupted/black graphics problem

  • Create file /etc/powervr.d/driver.ini containing these 2 lines:
[default]
ForceExternalZBuffer=0

see [1]

How to get Shrek Karting working

Install libgles1

  • get root
root
  • install OpenGLES1 and OpenGLES2 (need extras-devel)
apt-get install libgles1 libgles2

Improve corrupted/black graphics problem

  • Create file /etc/powervr.d/ShrekKarting.ini containing these 2 lines:
[default]
ForceExternalZBuffer=0

Graphics are stil not perfect - lighting textures are still not good.


Save space (Transfer games to MyDocs folder)

If running out of space in the /home/user/[webos] directory, part of the game that usually takes up the most space can be copied to /home/user/MyDocs. NOTE: You still need the game folders to be in the /home/user/[webos] directory, only some of the files are transferred to MyDocs.

Example using NFSU

The example assumes NFSU does not exist in /home/user/[webos].

Open xterm, create a folder in MyDocs:

mkdir /home/user/MyDocs/preenv
mkdir /home/user/MyDocs/preenv/nfsu

Create NFSU folder in /home/user/[webos]:

mkdir /home/user/[webos]/com.ea.app.nfsuc

Copy only the files indicated as below from the NFSU source (location where ipk file has been extracted) to /home/user/[webos]

cp [SOURCE]/com.ea.app.nfsuc/appinfo.json /home/user/[webos]/com.ea.app.nfsuc/
cp [SOURCE]/com.ea.app.nfsuc/nfsuc /home/user/[webos]/com.ea.app.nfsuc/

Copy res_nfusc folder from NFSU to MyDocs:

cp -r [SOURCE]/com.ea.app.nfsuc/res_nfsuc /home/user/MyDocs/preenv/nfsu/

Now create a symbolic link res_nfsuc in the [webos] nfsuc folder that points to the actual res_nfsuc folder in the MyDocs folder:

ln -s /home/user/MyDocs/preenv/nfsu/res_nfsuc /home/user/[webos]/com.ea.app.nfsuc/res_nfsuc

Don't forget to change the permission of the executable nfsu file in [webos]:

sudo gainroot
chmod +rwx /home/user/[webos]/com.ea.app.nfsuc/res_nfsuc/nfsuc
exit

Now you should still be able to play NFSU, having saved roughly 110MB on /home/user/[webos].

Example using BrainChallenge

The example assumes BrainChallenge does not exist in /home/user/[webos].

Open xterm, create a folder in MyDocs:

mkdir /home/user/MyDocs/preenv
mkdir /home/user/MyDocs/preenv/brainchallenge

Create BrainChallenge folder in /home/user/[webos]:

mkdir /home/user/[webos]/com.gameloft.app.brainchallenge

Copy only the files indicated as below from the BrainChallenge source (location where ipk file has been extracted) to /home/user/[webos]

cp [SOURCE]/com.gameloft.app.brainchallenge/appinfo.json /home/user/[webos]/com.gameloft.app.brainchallenge/
cp [SOURCE]/com.gameloft.app.brainchallenge/icon.png /home/user/[webos]/com.gameloft.app.brainchallenge/

Copy files from the brainchallenge folder from BrainChallenge source to MyDocs:

cp [SOURCE]/com.gameloft.app.brainchallenge/brainchallenge/*.* /home/user/MyDocs/preenv/brainchallenge/

Also copy any subdirectories in the brainchallenge folder to MyDocs:

cp -r [SOURCE]/com.gameloft.app.brainchallenge/brainchallenge/sounds /home/user/MyDocs/preenv/brainchallenge/

Copy the following code and save it to a file with the name 'createln.sh'. NOTE: Do not save this file using Windows Notepad; if using Windows, use software like TextPad to save the file in unix format. Copy this file to any folder on your N900.

#!/bin/sh

cd $1
files="`ls -1 $1`"

for file in $files
do
    echo $file
    ln -s $1/$file $2/$file
done

Create folder brainchallenge in [webos] brainchallenge folder:

mkdir /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge

Copy the brainchallenge executable file from Brainchallenge source location to the [webos] folder:

cp [source]/com.gameloft.app.brainchallenge/brainchallenge/brainchallenge /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/

Now create symbolic links in the [webos] nfsuc folder that point to the actual files in the brainchallenge folder located in MyDocs (using createln):

sh [..]/createln /home/user/MyDocs/preenv/brainchallenge/brainchallenge/ /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge

Also create symbolic links to any folders inside the brainchallenge folder in MyDocs:

ln -s /home/user/MyDocs/preenv/brainchallenge/brainchallenge/sounds /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/sounds

Don't forget to change the permission of the executable brainchallege file in [webos]:

sudo gainroot
chmod +rwx /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/brainchallenge
exit

Now you should still be able to play BrainChallenge, having saved roughly 114MB on /home/user/[webos].

The method used for the BrainChallenge game has also been tested and works with Asphalt 5, Blades of Fury, Oregon Trail and X-Plane Airliner.