Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Date : (26-04-2014)
- # Last revision : (14-06-2014)
- # Wine version used : 1.7.20
- # Distribution used to test : Arch Linux x64
- # Author : Hyperfang8
- # Script licence : Public Domain
- # Program licence : Freeware/Shareware
- # Depend : playonlinux, 7z
- #"System" variables
- [ "$PLAYONLINUX" = "" ] && exit
- source "$PLAYONLINUX/lib/sources"
- TITLE="Jade Dynasty"
- PREFIX="JadeDynasty"
- WORKING_WINE_VERSION="1.7.20"
- DEFAULT_SETUP_EXE="download"
- MD5SUM="none"
- LAUNCHERTITLE="Arc Games-Jade Dynasty"
- LAUNCHERNAME="ArcLauncher.exe"
- WEBSITE="http://jd.perfectworld.com"
- DOWNLOADXML="http://arc01.perfectworld.com/clientapi/newallgameinfo?&lang=en"
- AUTHOR="Hyperfang8"
- ZIPFILE="none"
- VERSIONNUMBER=""
- CHECKSUM=""
- ARCLINK="http://www.perfectworld.com/arc/download"
- ARCSETUP="download"
- INSTALLDIR="Program Files/Perfect World Entertainment/Jade Dynasty"
- #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" "$TITLE" "$WEBSITE" "$AUTHOR" "$PREFIX"
- POL_Wine_SelectPrefix "$PREFIX"
- POL_System_SetArch "auto"
- #Download cache
- POL_SetupWindow_message "$(eval_gettext 'Did you already download $TITLE cache file. You can download it here: ${DOWNLOADXML}')" "$TITLE"
- POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
- POL_System_TmpCreate "$PREFIX"
- cd "$POL_System_TmpDir"
- #Manual zip registry hack
- if [ "$POL_ARCH" == "amd64" ]; then
- cat << EOF > "jdarc.reg"
- REGEDIT4
- [HKEY_CURRENT_USER\Software\PWRD]
- [HKEY_CURRENT_USER\Software\PWRD\zhuxian2]
- "DX9CInstalled"="1"
- "launcher"="C:\\\\Program Files (x86)\\\\Perfect World Entertainment\\\\Jade Dynasty\\\\patcher\\\\patcher.exe"
- "launcher_pid93"="C:\\\\Program Files (x86)\\\\Perfect World Entertainment\\\\Jade Dynasty\\\\patcher\\\\patcher.exe"
- EOF
- INSTALLDIR="Program Files (x86)/Perfect World Entertainment/Jade Dynasty"
- else
- cat << EOF > "jdarc.reg"
- REGEDIT4
- [HKEY_CURRENT_USER\Software\PWRD]
- [HKEY_CURRENT_USER\Software\PWRD\zhuxian2]
- "DX9CInstalled"="1"
- "launcher"="C:\\\\Program Files\\\\Perfect World Entertainment\\\\Jade Dynasty\\\\patcher\\\\patcher.exe"
- "launcher_pid93"="C:\\\\Program Files\\\\Perfect World Entertainment\\\\Jade Dynasty\\\\patcher\\\\patcher.exe"
- EOF
- INSTALLDIR="Program Files/Perfect World Entertainment/Jade Dynasty"
- fi
- #Select zip for offline install
- if [ "$INSTALL_METHOD" = "LOCAL" ]
- then
- POL_SetupWindow_message "$(eval_gettext 'You can get .zip download link from the following xml file. Just search for string conaining JD.') $DOWNLOADXML"
- POL_SetupWindow_browse "$(eval_gettext 'Select the zip file!')" "$TITLE"
- ZIPFILE="$APP_ANSWER"
- mkdir -p "$WINEPREFIX/drive_c/$INSTALLDIR"
- POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting...')" "$TITLE"
- POL_System_7z x -y -o"$WINEPREFIX/drive_c/$INSTALLDIR" "$ZIPFILE"
- POL_Wine --ignore-errors regedit "jdarc.reg"
- POL_SetupWindow_detect_exit
- POL_SetupWindow_message "$(eval_gettext 'If Arc fails to detect your game add it manualy. The file you should add is located at: ') '$WINEPREFIX/drive_c/$INSTALLDIR/patcher/patcher.exe' !"
- fi
- #POL_Call POL_Install_gdiplus
- POL_Download "$ARCLINK" ""
- POL_SetupWindow_wait_next_signal "Arc launcher is A MUST to play the game -.- .Arc setup window my freeze for minute or two (depending on your PC). This is to be expected." "$TITLE"
- mv "$ARCSETUP" "ArcSetup.exe"
- POL_Wine --ignore-errors "ArcSetup.exe"
- POL_SetupWindow_detect_exit
- POL_Shortcut "$LAUNCHERNAME" "$LAUNCHERTITLE"
- Set_Managed "Off"
- POL_SetupWindow_VMS "64"
- #end the installation
- POL_System_TmpDelete
- POL_SetupWindow_message "$(eval_gettext 'Installation successfull! When the game prompts you for DIRECTX install you should just politely DECLINE!')"
- POL_SetupWindow_Close
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement