PDA

View Full Version : Loki installer, CDs and Fedora Core 5


Thetargos
2006-07-12, 03:57 PM CDT
Has any one else noticed that some older Loki installers that copy stuff from the CDs to the HDD don't work as they used to in Fedora Core 5? I have found that this is because of the new way Fedoa mounts removable drives, especially optical media like CDs and DVDs.

I got struck by this problem when the other day I wanted to install Neverwinter Nights onto a friends computer. She owns the game, and I'm trying to convert her to Linux (as she's an avid NWN player). So I installed FC5 on her computer, I could not get NWN installed, a closer inspection at the installer (the installer was found over at: http://icculus.org/~ravage/nwn/) revealed it tried to make use of the standard mount points for the CD rom media (/media/cdrecorder|cdrom, /mnt/cdrom, etc). Since Fedora Core 5 uses this new way to mount devices, and what you actually see is the name of the volume as its mount point (which should make it easier in the long run to write installers for specific disk versions), the disks could not be found, and hence exited with an error that there was a problem decompressing the contents from CD 1...

Looking around apparently other Loki installers for other programs that require the media to be accessible through one of the standard mount points might be affected as well...

So I got to think what would be the best way to solve this problem, and still be able to use the installer... The easiest solution seems to be adding the old /media/cdrecorder|cdrom lines to /etc/fstab and install as root. There is a problem, though as since there is no pam control for this mechanism any more only root will able to mount and umount the drives, which can be problematic with multiple disk programs (NWN, UT2003/4).

Another way to solve this problem is by adding another test for the paths already present in the scripts, this could be something as simple as:


if [ `mount | grep iso9660 | awk {print $3}` = $VOLUME_NAME | $VOLUME_NAME_LIST ]
then
SETUP_CDROM=`mount | grep iso9660 | awk {print $3}`

The mount statement could even be made into a variable to make it simpler to read, something like VOL_NAME=`mount | grep iso9660 | awk {print $3}` or the like. This method has a problem that will need to be worked out, though... What if a user has more than one optical drive and has several inserted CD/DVD media on them? How to descern which to use? Even if they are the disks of a multi disk program... maybe a function to deal with this would be more appropriate.

I'm not sure if others have found that Loki installers have trouble finding CD media or not..

Maikel
2006-07-12, 05:33 PM CDT
Ok I have this game too and decided to install it also. But I dont think I installed the language pack correctly if at all. I try to start the game and the screen goes black like its about to start but then pops me back to my desktop. When I run the language pack I press y enter, then it says to enter installation path and I enter where the game is. It then enters my path but is waiting for me to enter something else....? What ever I put in replaces the path I put in. What do I do at this point?

Thetargos
2006-07-12, 06:02 PM CDT
Are you talking about Neverwinter Nights or Unreal Tournament or what?

How did you install the game? How big is the installation path? Does your user have read perms to the directory? Please be a bit more specific...

Maikel
2006-07-12, 06:08 PM CDT
Sorry, Neverwinter Nights. I got the installer from your link in your post. Had disc1 in when I ran it, then it asked for disc2 I clicked ok, then it asked for play disc poped it in and hit ok. Then it installed (I guess), but in the icculus site it says must have language pack and I dont think I installed that. The size of my nwn folder is 811.7MB (is that what you want to know?) Not sure about the read perms.

Thetargos
2006-07-12, 07:08 PM CDT
For NWN only if you want to install it in another language other than English then you need the language packs, otherwise, you may just use the one provided in the installer, which will use the game's resources which are English.

A couple questions regarding the installation:


When installing, and readin contents off disk 1, did take a while reading the disk before asking for disk 2?
Did you install as root or as your regular user? Maybe the game is not starting as when it first runs, it must create some files in the directory, unless you use nwuser (a helper program which will force NWN to have a .nwn directory in your home directory for your prefs, saves and even CDKEY).

Yes I was asking about the size of the directory (if some files were missing)... The size seems about right for a fresh install of ONLY NWN, as I have the exansions also and some other modules, my installation directory is roughly about 4.4 Gb.

What do you see in the console when the game "crashes"? Do you have 3D acceleration working?

Maikel
2006-07-12, 07:47 PM CDT
1: Now that you mention it no, it asked for disc2 almost as soon as I clicked install.
2: Regular user

3d is working for all my other games.
When I double click it and choose "run in term" after it starts and falls back to desktop the terminal is gone so I dont know what it says.

One thing I think you should know, (been doing some searching) is I didnt install the "1.29 linux client resources" (which Im downloading now) which is probably my problem. Im thinking of deleting the file and starting over from scratch.

Thetargos
2006-07-12, 07:51 PM CDT
The installer has the patch on it, so that shouldn't be necessary, but you are running into the same problem I had with my friend about the installer skipping entirely disk 1 due to not finding it. If you are downloading the resources, you my very well then just follow the instructions at nwn.bioware.com

Maikel
2006-07-13, 08:15 PM CDT
Ok Thetargos I did exactly as the bioware site instructed and its working :) . Only thing is I created a desktop launcher and even downloaded the icons (it didnt come with its own), but it doesnt start the game. The only way I can start it is from the game folder and double click "nwn.sh" file, which is the file I choose when I created the the launcher. However when I double click it from its game folder I either choose "run" or "run in terminal" and it starts the game. So Im guessing that extra step my desktop launcher is missing. Did you have this problem too, and do you know how I can fix it? Thanks for all you help so far too.

Thetargos
2006-07-13, 10:41 PM CDT
That is a launcher script to set some paths for libraries and other stuff... You want to make sure that script has the correct information. For instance, you can copy/paste the following script and use it in /usr/local/bin or /usr/bin (just create it as root, and change its perms to +x) and the game will be launchable.


#!/bin/sh
# This script runs Neverwinter Nights.

export SDL_MOUSE_RELATIVE=0
export SDL_VIDEO_X11_DGAMOUSE=0

cd /media/archivo/Juegos/nwn

# If you do not wish to use the SDL library included in the package, remove
# ./lib from LD_LIBRARY_PATH
export XCURSOR_PATH=/media/archivo/Juegos/nwn/
export XCURSOR_THEME=nwmouse
export LD_PRELOAD=./nwuser.so:./nwmouse.so
export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH

#strace -o nwn.out -f ./nwmain $@
./nwmain $@

Ok, this is my modified launcher script, basically it instructs the shell to first go into the directory where NWN is installed, in my case /media/archivo/Juegos/nwn, in your case, this can be any other directory, so change that... You will also notice that I have other extensions to NWN, nwuser and nwmouse, one adds per user settings, and the other adds hardware mouse support (so the mouse is responsive independently of the actual FPS), hence the need for the LD_PRELOAD, you may verywell remove these lines:

export XCURSOR_PATH=/media/archivo/Juegos/nwn/
export XCURSOR_THEME=nwmouse
export LD_PRELOAD=./nwuser.so:./nwmouse.so

Just point your launcher to nwn if you save this in either of the bin directories, and it should work just fine.

Maikel
2006-07-14, 01:49 PM CDT
Edit: Nevermind I figured it out. Thanks again