Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Date : (17-11-2012)
- # Last revision : (25-11-2012)
- # Wine version used : 1.3.3
- # Distribution used to test : Lubuntu 12.10 32bit
- # Author : Hyperfang8
- # Script licence : Public Domain
- # Program licence : Freeware/Shareware
- # Depend : Play On Linux
- #Language variables
- #$(eval_gettext '')
- [ "$PLAYONLINUX" = "" ] && exit
- source "$PLAYONLINUX/lib/sources"
- #"System" variables
- TITLE="Forsaken World"
- TITLE1="Update Forsaken World"
- PREFIX="ForsakenWorld"
- WORKING_WINE_VERSION="1.3.3"
- VIRTUAL_WIDTH="800"
- VIRTUAL_HEIGHT="640"
- DEFAULT_SETUP_EXE="Installer.exe"
- SETUP_DOWNLOAD_URL="" # .tar.gz file with all the things from torrent version ??
- TORRENT_URL="http://fw.perfectworld.com/download/torrent"
- MD5SUM="none"
- LAUNCHERNAME="patcher.exe "
- #it seems to be the same file in FW :/
- PATCHERNAME="patcher.exe"
- #Setup wine
- POL_SetupWindow_Init
- POL_RequiredVersion "4.0.18" || POL_Debug_Fatal "$APPLICATION_TITLE >= 4.0.18 "
- POL_Debug_Init
- POL_SetupWindow_presentation "$TITLE" "Jade Dynasty" "http://jd.perfectworld.com" "Hyperfang8" "$PREFIX"
- POL_Wine_SelectPrefix "$PREFIX"
- POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
- #Installing mandatory dependencies
- POL_Call POL_Install_vcrun6
- POL_SetupWindow_VMS "64"
- #POL_SetupWindow_textbox "$(eval_gettext 'Enter your desktop width!')" "$TITLE" "800"
- #VIRTUAL_WIDTH="$APP_ANSWER"
- #POL_SetupWindow_textbox "$(eval_gettext 'Enter your desktop height!') " "$TITLE" "600"
- #VIRTUAL_HEIGHT="$APP_ANSWER"
- #Add some stuff to registry to make it work
- POL_SetupWindow_pulsebar "$(eval_gettext 'Please wait while installer is updating registry!')" "$TITLE" #To make it more user friendly
- POL_Wine_DirectSound "DefaultSampleRate" "48000"
- POL_SetupWindow_pulse "10"
- POL_Wine_Direct3D "DirectDrawRenderer" "opengl"
- POL_SetupWindow_pulse "20"
- POL_Wine_Direct3D "Nonpower2Mode" "repack"
- POL_SetupWindow_pulse "30"
- #the original script sugest to use "fbo" but "backbuffer" seems to work best!!
- POL_Wine_Direct3D "OffscreenRenderingMode" "backbuffer"
- POL_SetupWindow_pulse "40"
- POL_Wine_Direct3D "PixelShaderMode" "enabled"
- POL_SetupWindow_pulse "50"
- POL_Wine_Direct3D "RenderTargetLockMode" "auto"
- POL_SetupWindow_pulse "60"
- POL_Wine_Direct3D "UseGLSL" "disabled"
- POL_SetupWindow_pulse "70"
- POL_Wine_Direct3D "Multisampling" "disabled"
- POL_SetupWindow_pulse "80"
- Set_Desktop "Off"
- POL_SetupWindow_pulse "90"
- Set_SoundDriver "alsa"
- POL_SetupWindow_pulse "100"
- #Get installation mode: install,preinstalled or download
- POL_SetupWindow_menu_list "$SELECTMODE" "$TITLE" "$(eval_gettext 'Manual Download')-$(eval_gettext 'PreInstalled')" "-" "$(eval_gettext 'Manual Download')"
- INSTALL_METHOD="$APP_ANSWER"
- #Advice user to be sure to use best setup file
- if [ "$INSTALL_METHOD" = "$(eval_gettext 'Manual Download')" ]
- then
- POL_SetupWindow_question "$(eval_gettext 'Did you already downloaded setup file from (official) torrent?? You can download it here: $TORRENT_URL')" "$TITLE"
- fi
- if [ "$APP_ANSWER" = "FALSE" ] && [ "$INSTALL_METHOD" = "$(eval_gettext 'Manual Download')" ]
- then
- 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"
- POL_Browser "$TORRENT_URL"
- fi
- #Manual Download
- if [ "$INSTALL_METHOD" = "$(eval_gettext 'Manual Download')" ]
- then
- POL_SetupWindow_browse "$(eval_gettext 'Select the setup file!')" "$TITLE"
- SETUP_EXE="$APP_ANSWER"
- POL_Wine start /unix "$SETUP_EXE"
- POL_Wine_WaitExit "$TITLE"
- POL_SetupWindow_message "$(eval_gettext 'Finish the game installation and press Next!')" "$TITLE"
- POL_Shortcut "$LAUNCHERNAME" "$TITLE"
- POL_Shortcut "$PATCHERNAME" "$TITLE1"
- #user already has file downloaded and just wants to add them
- elif [ "$INSTALL_METHOD" = "$(eval_gettext 'PreInstalled')" ]
- then
- POL_SetupWindow_browse "$(eval_gettext 'Select $LAUNCHERNAME file!')" "$TITLE"
- POL_Shortcut "cmd.exe" "$TITLE" "$TITLE" " /c \"$APP_ANSWER\""
- POL_SetupWindow_browse "$(eval_gettext 'Select $PATCHERNAME file!')" "$TITLE"
- POL_Shortcut "cmd.exe" "$TITLE1" "$TITLE1" " /c \"$APP_ANSWER\""
- #automaticly download launcher
- elif [ "$INSTALL_METHOD" = "$(eval_gettext 'Automatic Download')" ]
- then
- POL_System_TmpCreate "$PREFIX"
- cd "$POL_System_TmpDir"
- #Can someone upload the file to the POL site so i can do this??
- #POL_Download "$SETUP_DOWNLOAD_URL" "$MD5SUM"
- POL_Wine start /unix "$DEFAULT_SETUP_EXE"
- POL_SetupWindow_message "$(eval_gettext 'Please wait while download and installation has finished!')" "$TITLE"
- POL_System_TmpDelete
- fi
- #end the installation
- POL_SetupWindow_message "$(eval_gettext 'Installation successfull!')"
- POL_SetupWindow_Close
- exit
Advertisement
Add Comment
Please, Sign In to add comment