hyperfang8

Forsaken World on PlayOnLinux

Nov 25th, 2012
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.69 KB | None | 0 0
  1. #!/bin/bash
  2. #Date : (17-11-2012)
  3. # Last revision : (25-11-2012)
  4. # Wine version used : 1.3.3
  5. # Distribution used to test : Lubuntu 12.10 32bit
  6. # Author : Hyperfang8
  7. # Script licence : Public Domain
  8. # Program licence : Freeware/Shareware
  9. # Depend : Play On Linux
  10. #Language variables
  11. #$(eval_gettext '')
  12.  
  13. [ "$PLAYONLINUX" = "" ] && exit
  14. source "$PLAYONLINUX/lib/sources"
  15.  
  16. #"System" variables
  17. TITLE="Forsaken World"
  18. TITLE1="Update Forsaken World"
  19. PREFIX="ForsakenWorld"
  20. WORKING_WINE_VERSION="1.3.3"
  21. VIRTUAL_WIDTH="800"
  22. VIRTUAL_HEIGHT="640"
  23. DEFAULT_SETUP_EXE="Installer.exe"
  24. SETUP_DOWNLOAD_URL="" # .tar.gz file with all the things from torrent version ??
  25. TORRENT_URL="http://fw.perfectworld.com/download/torrent"
  26. MD5SUM="none"
  27. LAUNCHERNAME="patcher.exe "
  28. #it seems to be the same file in FW :/
  29. PATCHERNAME="patcher.exe"
  30.  
  31. #Setup wine
  32. POL_SetupWindow_Init
  33. POL_RequiredVersion "4.0.18" || POL_Debug_Fatal "$APPLICATION_TITLE >= 4.0.18 "
  34. POL_Debug_Init
  35. POL_SetupWindow_presentation "$TITLE" "Jade Dynasty" "http://jd.perfectworld.com" "Hyperfang8" "$PREFIX"
  36. POL_Wine_SelectPrefix "$PREFIX"
  37. POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
  38.  
  39. #Installing mandatory dependencies
  40. POL_Call POL_Install_vcrun6
  41. POL_SetupWindow_VMS "64"
  42. #POL_SetupWindow_textbox "$(eval_gettext 'Enter your desktop width!')" "$TITLE" "800"
  43. #VIRTUAL_WIDTH="$APP_ANSWER"
  44. #POL_SetupWindow_textbox "$(eval_gettext 'Enter your desktop height!') " "$TITLE" "600"
  45. #VIRTUAL_HEIGHT="$APP_ANSWER"
  46.  
  47. #Add some stuff to registry to make it work
  48. POL_SetupWindow_pulsebar "$(eval_gettext 'Please wait while installer is updating registry!')" "$TITLE" #To make it more user friendly
  49. POL_Wine_DirectSound "DefaultSampleRate" "48000"
  50. POL_SetupWindow_pulse "10"
  51. POL_Wine_Direct3D "DirectDrawRenderer" "opengl"
  52. POL_SetupWindow_pulse "20"
  53. POL_Wine_Direct3D "Nonpower2Mode" "repack"
  54. POL_SetupWindow_pulse "30"
  55. #the original script sugest to use "fbo" but "backbuffer" seems to work best!!
  56. POL_Wine_Direct3D "OffscreenRenderingMode" "backbuffer"
  57. POL_SetupWindow_pulse "40"
  58. POL_Wine_Direct3D "PixelShaderMode" "enabled"
  59. POL_SetupWindow_pulse "50"
  60. POL_Wine_Direct3D "RenderTargetLockMode" "auto"
  61. POL_SetupWindow_pulse "60"
  62. POL_Wine_Direct3D "UseGLSL" "disabled"
  63. POL_SetupWindow_pulse "70"
  64. POL_Wine_Direct3D "Multisampling" "disabled"
  65. POL_SetupWindow_pulse "80"
  66. Set_Desktop "Off"
  67. POL_SetupWindow_pulse "90"
  68. Set_SoundDriver "alsa"
  69. POL_SetupWindow_pulse "100"
  70.  
  71.  
  72. #Get installation mode: install,preinstalled or download
  73. POL_SetupWindow_menu_list "$SELECTMODE" "$TITLE" "$(eval_gettext 'Manual Download')-$(eval_gettext 'PreInstalled')" "-" "$(eval_gettext 'Manual Download')"
  74. INSTALL_METHOD="$APP_ANSWER"
  75.  
  76.  
  77. #Advice user to be sure to use best setup file
  78. if [ "$INSTALL_METHOD" = "$(eval_gettext 'Manual Download')" ]
  79. then
  80. POL_SetupWindow_question "$(eval_gettext 'Did you already downloaded setup file from (official) torrent?? You can download it here: $TORRENT_URL')" "$TITLE"
  81. fi
  82. if [ "$APP_ANSWER" = "FALSE" ] && [ "$INSTALL_METHOD" = "$(eval_gettext 'Manual Download')" ]
  83. then
  84. POL_SetupWindow_message "$(eval_gettext 'Installer will download .torrent with your favorite browser! After that you should use bittorrent client to download the setup. Once download is finished press Next!')" "$TITLE"
  85. POL_Browser "$TORRENT_URL"
  86. fi
  87.  
  88.  
  89. #Manual Download
  90. if [ "$INSTALL_METHOD" = "$(eval_gettext 'Manual Download')" ]
  91. then
  92. POL_SetupWindow_browse "$(eval_gettext 'Select the setup file!')" "$TITLE"
  93. SETUP_EXE="$APP_ANSWER"
  94. POL_Wine start /unix "$SETUP_EXE"
  95. POL_Wine_WaitExit "$TITLE"
  96. POL_SetupWindow_message "$(eval_gettext 'Finish the game installation and press Next!')" "$TITLE"
  97. POL_Shortcut "$LAUNCHERNAME" "$TITLE"
  98. POL_Shortcut "$PATCHERNAME" "$TITLE1"
  99.  
  100. #user already has file downloaded and just wants to add them
  101. elif [ "$INSTALL_METHOD" = "$(eval_gettext 'PreInstalled')" ]
  102. then
  103. POL_SetupWindow_browse "$(eval_gettext 'Select $LAUNCHERNAME file!')" "$TITLE"
  104. POL_Shortcut "cmd.exe" "$TITLE" "$TITLE" " /c \"$APP_ANSWER\""
  105. POL_SetupWindow_browse "$(eval_gettext 'Select $PATCHERNAME file!')" "$TITLE"
  106. POL_Shortcut "cmd.exe" "$TITLE1" "$TITLE1" " /c \"$APP_ANSWER\""
  107.  
  108. #automaticly download launcher
  109. elif [ "$INSTALL_METHOD" = "$(eval_gettext 'Automatic Download')" ]
  110. then
  111.     POL_System_TmpCreate "$PREFIX"
  112.     cd "$POL_System_TmpDir"
  113.     #Can someone upload the file to the POL site so i can do this??
  114.     #POL_Download "$SETUP_DOWNLOAD_URL" "$MD5SUM"
  115.     POL_Wine start /unix "$DEFAULT_SETUP_EXE"
  116.     POL_SetupWindow_message "$(eval_gettext 'Please wait while download and installation has finished!')" "$TITLE"
  117.     POL_System_TmpDelete
  118. fi
  119.  
  120. #end the installation
  121. POL_SetupWindow_message "$(eval_gettext 'Installation successfull!')"
  122. POL_SetupWindow_Close
  123. exit
Advertisement
Add Comment
Please, Sign In to add comment