Don_Stewatd

Script to install neverwinter nights on Fedora 16

Feb 22nd, 2012
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. #!/bin/bash
  2. #uncomment the following line out if you aren't sure what packages are needed to run NWN+Kingmaker properly
  3. #su -c 'yum install wine wine-tools SDL'
  4. #change to homedir and make the folder for NWN to install into. then change to that so we may put content in it
  5. cd ~/
  6. mkdir 'Neverwinter Nights'
  7. cd ~/'Neverwinter Nights'
  8. #Extract the Linux/Game stuff from the DVD at /media/NW_DIAMOND
  9. unzip /media/NW_DIAMOND/Data_Shared.zip
  10. unzip /media/NW_DIAMOND/Data_linux.zip
  11. unzip -o /media/NW_DIAMOND/data/XP1.zip
  12. unzip -o /media/NW_DIAMOND/data/XP2.zip
  13. #COMMENT THIS OUT IF YOU DO NOT WANT KINGMAKER INSTALLED (no harm in having it, tho! you paid for it! (i hope)
  14. cp /media/NW_DIAMOND/KingmakerSetup.exe ~/Neverwinter\ Nights/KingmakerSetup.exe
  15. #download needed tarballs from the offical site
  16. wget http://nwdownloads.bioware.com/neverwinternights/linux/gold/nwclientgold.tar.gz
  17. wget http://nwdownloads.bioware.com/neverwinternights/linux/161/nwclienthotu.tar.gz
  18. wget http://files.bioware.com/neverwinternights/updates/linux/168/English_linuxclient168_xp2.tar.gz
  19. #extract what we just downloaded, in order
  20. tar zxfv ~/Neverwinter\ Nights/nwclientgold.tar.gz
  21. tar zxfv ~/Neverwinter\ Nights/nwclienthotu.tar.gz
  22. tar zxfv ~/Neverwinter\ Nights/English_linuxclient168_xp2.tar.gz
  23. #run fixinstall to make sure everything is installed properly
  24. ./fixinstall
  25. #set startup options/configure 'nwn' to execute from any directory, not just the current
  26. echo "#!/bin/sh
  27. # This script runs Neverwinter Nights from the current directory
  28. #export SDL_MOUSE_RELATIVE=0
  29. #export SDL_VIDEO_X11_DGAMOUSE=0
  30. # If you do not wish to use the SDL library included in the package, remove
  31. # ./lib from LD_LIBRARY_PATH
  32. #export LD_LIBRARY_PATH=./lib:./miles:\$LD_LIBRARY_PATH
  33. #./nwmain \$@
  34. # change to the nwn directory
  35. cd \$(dirname \$0)
  36. # set enviroment variables
  37. export SDL_MOUSE_RELATIVE=0
  38. export SDL_VIDEO_X11_DGAMOUSE=0
  39. export SDL_AUDIODRIVER=esd
  40. # set library search path
  41. export LD_LIBRARY_PATH=./miles:\$LD_LIBRARY_PATH
  42. # fire up the game
  43. ~/Neverwinter\ Nights/nwmain \$@" > ~/Neverwinter\ Nights/nwn
  44. #YOU NEED WINE FOR THIS!
  45. #make the n: drive
  46. ln -s $PWD $HOME/.wine/dosdevices/n\:
  47.  
  48. #create a registry hack -- stupid Windows(TM)
  49. cat > ~/Neverwinter\ Nights/nwn.reg << EOF
  50. [HKEY_LOCAL_MACHINE\Software\BioWare\NWN\Neverwinter]
  51. "Location"="n:\\\"
  52. EOF
  53. #apply it
  54. regedit ~/Neverwinter\ Nights/nwn.reg
  55. #create a symbolic link for KingmakerSetup/WINE to behave -- obsolete
  56. #ln -s $NW_DIAMOND/KingmakerSetup.exe .
  57. #install
  58. wine ~/Neverwinter\ Nights/KingmakerSetup.exe
  59. #make symlink to /usr/local/bin so you can run it by typing 1 command
  60. #su -c 'ln -s ~/Neverwinter\ Nights/nwn /usr/local/bin/playnwn'
  61. #clean up
  62. rm -f KingmakerSetup.exe nwn.reg 'premium/uninst Neverwinter\ Nights(TM)\ Kingmaker.exe'
  63. #happy day msg
  64. echo 'Hopefully you can play by making a launcher and putting in the command "playnwn"
  65.  
  66. enjoy,
  67. downhillgames
  68. irc.freenode.net/#Fedora'
  69. #quit the script, for good measure
  70. exit 0;
Advertisement
Add Comment
Please, Sign In to add comment