hyperfang8

PlayOnLinux Perfect World Internationl

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