The forum

[Script] Pokémon Uranium Version

Author Replies
fasmat Wednesday 23 November 2016 at 11:57
fasmatAnonymous

Hi folks,

time for my first contribution to POL :). Attached you will find the script to install Pokémon Uranium. I tested it on Ubuntu 16.04 with Wine 1.8.5 for Pokémon Uranium 1.04H and it seems to work without issues.

The setup will open a browser window to the current setup, the user then has to manually download the setup and provide it to the installer.

Any feedback or suggestions on how to improve it?

#!/usr/bin/env playonlinux-bash
# Date : 2016-11-22 23:08
# Last revision : 2016-11-22 23:08
# Wine version used : 1.8.5
# Distribution used to test : Ubuntu 16.04
# Author : fasmat

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
POL_SetupWindow_Init

TITLE="Pokémon Uranium"
PREFIX="PokeUranium"

POL_SetupWindow_message "$(eval_gettext 'Welcome to the installer for $TITLE. Follow the instructions to install this game on your computer.')" "$TITLE"
POL_SetupWindow_presentation "$TITLE" "Pokémon Uranium Team" "http://www.reddit.com/r/pokemonuranium" "fasmat" "$PREFIX"

POL_SetupWindow_question "$(eval_gettext 'Do you want to download the installer now?')" "$TITLE"

if [ "$APP_ANSWER" = "TRUE" ]
then
   POL_Browser "https://www.reddit.com/r/pokemonuranium/comments/54dodq/updated_installer_patch_installers/"
fi

POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"

INSTALLER="$APP_ANSWER"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "1.8.5"

POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
POL_Wine "$INSTALLER" "/quiet"
POL_Wine_OverrideDLL "" "dwrite"
POL_Install_d3dx9_36
POL_Install_directplay
POL_Install_directmusic
POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')" "$TITLE"

POL_Shortcut "Uranium.exe" "Pokémon Uranium"

POL_SetupWindow_Close

exit
LinuxScripter Monday 8 May 2017 at 13:42
LinuxScripterAnonymous

I've made the code clearer to the eye and tried to run it but ran int this error:

[SEH_AV_READ_NULLPTR] ACCESS_VIOLATION (0xc0000005) at address [0x00407ba9]

Advanced Installer Enhanced UI 13.5 build 74683
*** Stack Trace (x86) ***

[0x00407ba9]  -----
[0x004ad3e5]  -----
[0x004ad4ec]  -----
[0x001bbbd8]  -----
[0x00535248]  -----
[0x004b3ac8]  -----
[0x00400000]  MODULE_BASE_ADDRESS

Here is the new script:

#!/bin/bash
# Date : 2016-11-22 23:08
# Last revision : 2017-05-08 13:27
# Wine version used : 1.8.5
# Distribution used to test : Ubuntu 17.04
# Author : fasmat, LinuxScripter
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Pokémon Uranium"
PREFIX="PokeUranium"
AUTHOR="fasmat"
WORKINGWINEVERSION="1.8.5"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Pokémon Uranium Team" "http://www.reddit.com/r/pokemonuranium" "fasmat" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_Wine_OverrideDLL "" "dwrite"
POL_Install_d3dx9_36
POL_Install_directplay
POL_Install_directmusic
 
POL_SetupWindow_question "$(eval_gettext 'Do you want to download the installer now?')" "$TITLE"
 
if [ "$APP_ANSWER" = "TRUE" ]
then
   POL_Browser "https://www.reddit.com/r/pokemonuranium/comments/54dodq/updated_installer_patch_installers/"
fi
 
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
 
SETUP_EXE="$APP_ANSWER"
POL_Wine start /unix "$SETUP_EXE"
POL_Wine_WaitExit "$TITLE""
 
POL_Shortcut "Uranium.exe" "Pokémon Uranium"
 
POL_SetupWindow_Close
 
exit

Debugger pointed out that winbind was missing from my system so I installed it, relaunch PoL and tried again. Still crashes with the same error.

Debugger log:

PlayOnLinux debugging tool (v4.2.10)
-----------------------------------------------
Debugging: Pokémon Uranium

Warning: This is a PlayOnLinux script logfile. It does not contain everything that happened in your program\'s virtual drive (wineprefix)
Please do not use this logfile on winehq forum, this logfile is not interesting for wine debugging.

Date: 05/08/17 13:37:34

> uname -a
  Linux jonasz-MS-7721 4.10.0-20-generic #22-Ubuntu SMP Thu Apr 20 09:22:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> lsb_release -a
 
> wine --version (Be careful; this version might not be the version used
in the script. Read the content of this file for more information)
  wine-2.0.1
> glxinfo \| grep rendering
  direct rendering: Yes
    GL_NV_parameter_buffer_object2, GL_NV_path_rendering,
    GL_NV_parameter_buffer_object2, GL_NV_path_rendering,
    GL_NV_packed_float_linear, GL_NV_path_rendering,
> glxinfo \| grep renderer
  OpenGL renderer string: GeForce GTX 750 Ti/PCIe/SSE2
> OpenGL libs
  check_dd_x86 missing, test skipped
  check_dd_amd64 missing, test skipped
> export
  declare -x AMD64_COMPATIBLE="True"
declare -x APPLICATION_TITLE="PlayOnLinux"
declare -x CINNAMON_VERSION="3.2.8"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
declare -x DEBIAN_PACKAGE="TRUE"
declare -x DEFAULTS_PATH="/usr/share/gconf/cinnamon.default.path"
declare -x DESKTOP="/home/jonasz/Pulpit"
declare -x DESKTOP_SESSION="cinnamon"
declare -x DISPLAY=":0"
declare -x DONT_MONITOR="1"
declare -x DYLDPATH_ORIGIN=""
declare -x DYLD_LIBRARY_PATH=""
declare -x GDMSESSION="cinnamon"
declare -x GDM_LANG="pl"
declare -x GECKO_SITE="http://wine.playonlinux.com/gecko"
declare -x GIO_LAUNCHED_DESKTOP_FILE="/usr/share/applications/PlayOnLinux.desktop"
declare -x GIO_LAUNCHED_DESKTOP_FILE_PID="16296"
declare -x GJS_DEBUG_OUTPUT="stderr"
declare -x GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
declare -x GNOME_DESKTOP_SESSION_ID="this-is-deprecated"
declare -x GNUPGHOME="/home/jonasz/.PlayOnLinux//gpg"
declare -x GTK_MODULES="gail:atk-bridge"
declare -x GTK_OVERLAY_SCROLLING="1"
declare -x G_FILENAME_ENCODING="UTF-8"
declare -x HOME="/home/jonasz"
declare -x IGNORE_ICON_DIR="false"
declare -x LANG="pl_PL.UTF-8"
declare -x LANGUAGE="pl"
declare -x LD_32_PATH_ORIGIN=""
declare -x LD_LIBRARY_PATH=""
declare -x LD_PATH_ORIGIN=""
declare -x LOGNAME="jonasz"
declare -x MACHTYPE="x86_64-pc-linux-gnu"
declare -x MANDATORY_PATH="/usr/share/gconf/cinnamon.mandatory.path"
declare -x MD5_COMMAND="md5sum"
declare -x MONO_SITE="http://wine.playonlinux.com/mono"
declare -x NOBUGREPORT="YES"
declare -x OLDPWD="/home/jonasz/.PlayOnLinux/plugins"
declare -x OS_NAME="linux"
declare -x OpenGL32="1"
declare -x OpenGL64="1"
declare -x PATH="/home/jonasz/bin:/home/jonasz/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
declare -x PATH_ORIGIN="/home/jonasz/bin:/home/jonasz/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
declare -x PLAYONLINUX="/usr/share/playonlinux"
declare -x POL_ARCH="x86"
declare -x POL_BAD_SIGNATURE="TRUE"
declare -x POL_COOKIE="ltF7B2Tmz8FquPYzp5Hm"
declare -x POL_CURL="curl"
declare -x POL_DNS="playonlinux.com"
declare -x POL_HOST="127.0.0.1"
declare -x POL_ID="2937795"
declare -x POL_LANG="pl"
declare -x POL_OS="Linux"
declare -x POL_PORT="30000"
declare -x POL_PYTHON="python"
declare -x POL_SetupWindow_ID="16944"
declare -x POL_TERM="x-terminal-emulator"
declare -x POL_UPTODATE="TRUE"
declare -x POL_USER_ARCH="x86"
declare -x POL_USER_ROOT="/home/jonasz/.PlayOnLinux/"
declare -x POL_WGET="env LD_LIBRARY_PATH=\"\" wget --prefer-family=IPv4 -q"
declare -x PWD="/home/jonasz"
declare -x QT_ACCESSIBILITY="1"
declare -x QT_LINUX_ACCESSIBILITY_ALWAYS_ON="1"
declare -x QT_QPA_PLATFORMTHEME="qgnomeplatform"
declare -x QT_STYLE_OVERRIDE="gtk"
declare -x REPERTOIRE="/home/jonasz/.PlayOnLinux/"
declare -x SED="sed"
declare -x SESSION_MANAGER="local/jonasz-MS-7721:@/tmp/.ICE-unix/1477,unix/jonasz-MS-7721:/tmp/.ICE-unix/1477"
declare -x SETUPWINDOW_INIT="true"
declare -x SHELL="/bin/bash"
declare -x SHLVL="3"
declare -x SITE="http://repository.playonlinux.com"
declare -x SSH_AGENT_PID="1553"
declare -x SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"
declare -x TEXTDOMAIN="pol"
declare -x TITLE="Pokémon Uranium"
declare -x TITRE="PlayOnLinux"
declare -x UBUNTU_MENUPROXY="0"
declare -x USER="jonasz"
declare -x VERSION="4.2.10"
declare -x WGETRC="/home/jonasz/.PlayOnLinux//configurations/wgetrc"
declare -x WINEDLLOVERRIDES="winemenubuilder.exe=d"
declare -x WINEPREFIX="/home/jonasz/.PlayOnLinux//wineprefix/default"
declare -x WINE_SITE="http://wine.playonlinux.com/binaries"
declare -x WorkingDirectory="/home/jonasz"
declare -x XAUTHORITY="/home/jonasz/.Xauthority"
declare -x XDG_CONFIG_DIRS="/etc/xdg/xdg-cinnamon:/etc/xdg"
declare -x XDG_CURRENT_DESKTOP="X-Cinnamon"
declare -x XDG_DATA_DIRS="/usr/share/cinnamon:/usr/share/gnome:/home/jonasz/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop"
declare -x XDG_GREETER_DATA_DIR="/var/lib/lightdm-data/jonasz"
declare -x XDG_RUNTIME_DIR="/run/user/1000"
declare -x XDG_SEAT="seat0"
declare -x XDG_SEAT_PATH="/org/freedesktop/DisplayManager/Seat0"
declare -x XDG_SESSION_DESKTOP="cinnamon"
declare -x XDG_SESSION_ID="c2"
declare -x XDG_SESSION_PATH="/org/freedesktop/DisplayManager/Session0"
declare -x XDG_SESSION_TYPE="x11"
declare -x XDG_VTNR="7"

05/08/17 13:37:39 - [POL_Wine_SelectPrefix] Message: Selecting prefix: PokeUranium
05/08/17 13:37:39 - [POL_System_SetArch] Message: POL_ARCH set to x86
05/08/17 13:37:39 - [POL_Wine_PrefixCreate] Message: No version specified. Using system version (wine-2.0.1)
05/08/17 13:37:39 - [POL_Wine_PrefixCreate] Message: Creating prefix ()...
05/08/17 13:37:39 - [POL_Wine_PrefixCreate] Message: Prefix already exists
05/08/17 13:37:41 - [POL_SetupWindow_menu] Message: menu answer: Wyczyść (zawartość wirtualnego dysku twardego zostanie utracona)
05/08/17 13:37:41 - [POL_Wine_PrefixCreate] Message: Erase Prefix
05/08/17 13:37:42 - [POL_Wine_PrefixCreate] Message: Setting WINEARCH to win32
05/08/17 13:37:50 - [POL_Wine] Message: Running wine- --version (Working directory : /home/jonasz/.PlayOnLinux/shortcuts)
05/08/17 13:37:50 - [POL_Wine] Message: Notice: PlayOnLinux deliberately disables winemenubuilder. See http://www.playonmac.com/fr/page-26-Winemenubuilder.html
wine-2.0.1
05/08/17 13:37:50 - [POL_Wine] Message: Wine return: 0
05/08/17 13:37:51 - [POL_Config_PrefixWrite] Message: Prefix config write: ARCH x86
05/08/17 13:37:51 - [POL_Config_Write] Message: Config write: WINE_SYSTEM_ARCH x86
05/08/17 13:37:54 - [POL_LoadVar_PROGRAMFILES] Message: Getting Program Files name
05/08/17 13:37:54 - [POL_Wine] Message: Running wine- cmd /c echo %ProgramFiles% (Working directory : /home/jonasz/.PlayOnLinux/shortcuts)
05/08/17 13:37:54 - [POL_Wine] Message: Notice: PlayOnLinux deliberately disables winemenubuilder. See http://www.playonmac.com/fr/page-26-Winemenubuilder.html
C:\Program Files
05/08/17 13:37:55 - [POL_Wine] Message: Wine return: 0
05/08/17 13:37:58 - [POL_Wine_OverrideDLL] Message: Overriding DLLs
05/08/17 13:37:58 - [POL_Wine] Message: Running wine- regedit /home/jonasz/.PlayOnLinux//tmp/override-dll.reg (Working directory : /home/jonasz/.PlayOnLinux/shortcuts)
05/08/17 13:37:58 - [POL_Wine] Message: Notice: PlayOnLinux deliberately disables winemenubuilder. See http://www.playonmac.com/fr/page-26-Winemenubuilder.html
05/08/17 13:37:58 - [POL_Wine] Message: Wine return: 0
05/08/17 13:38:00 - [POL_SetupWindow_question] Message: question answer: FALSE
05/08/17 13:38:06 - [POL_SetupWindow_browse] Message: browser answer: /home/jonasz/Pobrane/Pokémon Uranium.exe
05/08/17 13:38:06 - [POL_System_CheckFS] Message: Checking filesystem for /home/jonasz/Pobrane/Pokémon Uranium.exe
05/08/17 13:38:06 - [POL_Wine] Message: Running wine- start /unix /home/jonasz/Pobrane/Pokémon Uranium.exe (Working directory : /home/jonasz/.PlayOnLinux/shortcuts)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
05/08/17 13:38:06 - [POL_Wine] Message: Wine return: 0
fixme:file:SetSearchPathMode (8001): stub
fixme:file:SetDefaultDllDirectories (800): stub
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:mpr:WNetGetUniversalNameW (L"C:\\Program Files\\Pokemon Uranium Team\\Pokemon Uranium 1.0", 0x00000001, 0xabd5d4, 0xabd59c): stub
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:file:SetSearchPathMode (8001): stub
fixme:file:SetDefaultDllDirectories (800): stub
fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:ver:GetCurrentPackageId (0x33fda4 (nil)): stub

So anyone know how to fix it?

 

EDIT: Just figured out how to make this game work. Just change wine version to 2.1

Tried 3.0 but it crashed right after title screen. Haven't tested anything between.

Edited by LinuxScripter


Dadu042 Monday 20 May 2019 at 21:52
Dadu042

I copy the script to the "Supported applications" area.