Genshin Impact

Informations

Créateur Messages
Dadu042

Attention

This installer is a beta script. It means that it might not work as expected

Informations

Plate-formes :
Téléchargements : 34087
Wine: 6.0.1

Retours d'expérience

Description

Free to play MMORPG, 2020. Wikipedia, website.  Size to download: 12 GB.

Warning: this is only a stub.

Known issues (2020-10):

1. Anti cheat feature: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Fix: do install the specific patch we made.

2. Bad 3D rendering (example: our blue screenshot): installing the component DXVK (after the game) can help.

3. Crashes as soon as the game tries to launch. Upgrading Wine version can help (ie: 5.19-staging).

4. 'Error code: 31-4302': end of compatibility ? temporary server error ? (2020-11-04). Coders and hackers are welcome at this website.

PCGamingWiki, Appdb.winehq.org 

Captures d'écran

MiniatureMiniatureMiniatureMiniature

Code source

#!/bin/bash
# Date : (2020-09-29)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits (Linux kernel v5.4.0). GPU: AMD Vega 11.
# Author : Dadu042
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions: Launcher v2.3.3.0 (GenshinImpact_install_20200911204035.exe)
#                           v2.3.4.0 (GenshinImpact_install_20201014173947.exe). Game (login screen): OSRELWin1.0.1_R1135452_S1135452_D1135370.
#
# Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5, DirectX 11.
#
#
# CHANGELOG
# [Dadu042] (2020-09-29 10-00). 
#   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
# [Dadu042] (2020-10-25 10-00).
#   Update the file installer URL.
# [Dadu042] (2020-10-25 20-00).
#   Wine 5.0.2 -> 5.19-staging (because I have got some crashes some seconds afeer the game did start).
# [Dadu042] (2022-06-21 20-00).
#   Wine 5.19-staging -> 6.0.1 (not tested, just to avoid users to download 5.19-staging).
#
# KNOWN ISSUES :

#  Anti-cheat issue:
#  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
#    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/theuser/Temp/   and into the game folder, copied also in uppercase.
#
#    Tried: copying wdfldr.sys (set as Native) and WDFLDR.SYS into '/drive_c/windows/system32/'.
#
#    Immediate Wine 5.0.2 debug log is:
#    0198:fixme:heap:RtlSetHeapInformation 0x570000 0 0x22db80 4 stub
#    0198:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0198:fixme:heap:RtlSetHeapInformation 0x790000 0 0x22f1b0 4 stub
#    019c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    01a2:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    01a2:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0199:fixme:ver:GetCurrentPackageId (0x99fb00 (nil)): stub
#
#    Wine 5.16:
#    0790:fixme:heap:RtlSetHeapInformation 0000000000890000 0 000000000021DFC0 4 stub
#    0790:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0790:fixme:heap:RtlSetHeapInformation 0000000000AB0000 0 000000000021F080 4 stub
#    079c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    07b8:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    07b8:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0794:fixme:ver:GetCurrentPackageId (0000000000CBFBA0 0000000000000000): stub
#
# KNOWN ISSUES (FIXED):
#  - Wine amd64 5.0.2, 5.19: on the account creation screen (if you want to use Facebook nor Twitter), display is bad and the characters typed are not displayed. Fix: Wine 5.19-staging
#  - Wine amd64 5.19-staging: missing textures (displayed as blue areas). Fix: DXVK.

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

TITLE="Genshin Impact"
PREFIX="Genshin_Impact"
EDITOR="miHoYo"
GAME_URL="https://en.wikipedia.org/wiki/Genshin_Impact"
AUTHOR="Dadu042"
STEAM_ID=""
GAME_VMS="512"
SHORTCUT_FILENAME="launcher.exe"
SOFTWARE_CATEGORIES="Game;RolePlaying;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE=""


# Starting the script
POL_SetupWindow_Init
                         
# Starting debugging API
POL_Debug_Init
        
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"

############################################
#  Choose architecture: 32 bits or 64 bits #
############################################

# POL_SetupWindow_menu "$(eval_gettext 'What architecture do you want to use ?')" "$TITLE" "$(eval_gettext '64 bits (recommended)')~$(eval_gettext '32 bits')" "~"
 
# if [ "$APP_ANSWER" == "32 bits" ]; then
#        POL_System_SetArch "x86"
# elif [ "$APP_ANSWER" == "$(eval_gettext '64 bits (recommended)')" ]; then
#        POL_System_SetArch "amd64"
# fi

POL_System_SetArch "amd64"

# Download Wine if necessary then create prefix
POL_Wine_PrefixCreate "6.0.1"
# POL_Wine_PrefixCreate

# POL_System_TmpCreate "$PREFIX"
             
Set_OS "win7"

#######################################
#  Hacks                              #
#######################################



#######################################
#  Installing mandatory dependencies  #
#######################################

# Avoid game freeze when doing ALT+TAB
POL_Wine_DirectInput "MouseWarpOverride" "force"


# POL_Call POL_Install_vcrun2013
# POL_Call POL_Install_d3dx11

# Disable DirectX 11
# POL_Wine_OverrideDLL "" "d3d11"


################
#      GPU     #
################

# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver

# Minimum memory size requiered for the graphic card.
POL_SetupWindow_VMS $GAME_VMS

# Asking about memory size of graphic card
# POL_SetupWindow_menu_list "How much memory does your graphics board have?" "$TITLE" "64-128-256-320-384-512-640-768-896-1024-1536-1792-2048-3072-4096" "-" "256"
# VRAM="$APP_ANSWER"
# POL_Wine_Direct3D "VideoMemorySize" "$VRAM"

# Useful for Nvidia GPUs
# POL_Call POL_Install_physx



#######################################
# Create a 'virtual desktop' (window) #
#######################################
  
POL_SetupWindow_menu_list "$(eval_gettext "Choose the game resolution")" "$TITLE" "800x600-1152x864-1024x768-1280x720-1280x800-1280x900-1280x1024-1360x768-1368x768-1440x900-1400x1050-1600x900-1600x1024-1680x1050-1920x1080" "-" "800x600"
    
resolution="$APP_ANSWER"
WIDTH="$(echo $resolution | cut -d"x" -f1)"
HEIGHT="$(echo $resolution | cut -d"x" -f2)"
  
Set_Desktop "On" "$WIDTH" "$HEIGHT"
  
Set_WineWindowTitle "$TITLE"


#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix


#######################################
#  Main part of this script           #
#######################################
                 
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

# POL_SetupWindow_message "Warning: do not install Punk Buster nor DirectX." "$TITLE"
# POL_SetupWindow_message "Warning: do not install DirectX (nor the icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
# POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'Note: at the end of the first installer (it does installs the downloader program), do not click RUN, instead close the window, then you will run the game from POL/POM.')" "$TITLE"


# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                      
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        POL_SetupWindow_cdrom
                      
        # POL_Call POL_Function_NoCDWarning
               
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
                     
        POL_Wine_WaitExit "$TITLE"
                  
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                     
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo .')" "$TITLE"
        # POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20200911204035.exe"
        POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20201014173947.exe"
           
        mv GenshinImpact_install_20201014173947.exe GameInstaller.exe
        # mv X.rar gameinstaller.rar
        # mv X.zip gameinstaller.zip
           
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
             
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
             
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
         
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "GameInstaller.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
     
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: do NOT install DirectX.')" "$TITLE"
  
        # cd "$WINEPREFIX/drive_c"
        # rm GameInstaller.exe
             
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
             
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
           
        APP_ANSWER=".EXE"
     
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the installation file (.EXE)')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
   
        # POL_SetupWindow_message "Note: please answer NO to all the questions that will appear." "$TITLE"
   
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                 
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"


elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                   
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
      
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
           
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
           
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
            
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
fi
fi

################
# Patch update #
################
 
# POL_SetupWindow_menu "$(eval_gettext 'Do you have a official patch-update to install ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"      
             
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi

#######################################
#  Hacks                              #
#  Editing configuration files        #
#######################################




POL_SetupWindow_message "$(eval_gettext 'Installation is finished.')" "$TITLE"

POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags: fixme-all')" "$TITLE"
             
# POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Contributions

Filters:

Contribuer
Membre Messages
ngutanhlamnha Jeudi 16 Juin 2022 à 10:26
ngutanhlamnha Anonymous

Messages

i'm clicking yellow button and nothing happen
My version: 2.7.0
My wine: 6.0.1

 

 

Réponses

Anonymous
Samedi 13 Aoüt 2022 à 15:42
I use PlayOnLinux 4.3.4-2 and Wine 6.0.1.
Anonymous
Samedi 13 Aoüt 2022 à 15:43
I use PlayOnLinux 4.3.4-2 and Wine 6.0.1.
Nothing happened even if I installed the fixing patch.
Dadu042 Lundi 13 Juin 2022 à 21:55
Dadu042

Information

Cette mise à jour a été acceptée par l'équipe

Differences

@@ -20,6 +20,8 @@
 #   Update the file installer URL.
 # [Dadu042] (2020-10-25 20-00).
 #   Wine 5.0.2 -> 5.19-staging (because I have got some crashes some seconds afeer the game did start).
+# [Dadu042] (2022-06-21 20-00).
+#   Wine 5.19-staging -> 6.0.1 (not tested, just to avoid users to download 5.19-staging).
 #
 # KNOWN ISSUES :
 
@@ -96,7 +98,7 @@
 POL_System_SetArch "amd64"
 
 # Download Wine if necessary then create prefix
-POL_Wine_PrefixCreate "5.19-staging"
+POL_Wine_PrefixCreate "6.0.1"
 # POL_Wine_PrefixCreate
 
 # POL_System_TmpCreate "$PREFIX"

Nouveau code source

#!/bin/bash
# Date : (2020-09-29)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits (Linux kernel v5.4.0). GPU: AMD Vega 11.
# Author : Dadu042
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions: Launcher v2.3.3.0 (GenshinImpact_install_20200911204035.exe)
#                           v2.3.4.0 (GenshinImpact_install_20201014173947.exe). Game (login screen): OSRELWin1.0.1_R1135452_S1135452_D1135370.
#
# Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5, DirectX 11.
#
#
# CHANGELOG
# [Dadu042] (2020-09-29 10-00). 
#   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
# [Dadu042] (2020-10-25 10-00).
#   Update the file installer URL.
# [Dadu042] (2020-10-25 20-00).
#   Wine 5.0.2 -> 5.19-staging (because I have got some crashes some seconds afeer the game did start).
# [Dadu042] (2022-06-21 20-00).
#   Wine 5.19-staging -> 6.0.1 (not tested, just to avoid users to download 5.19-staging).
#
# KNOWN ISSUES :

#  Anti-cheat issue:
#  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
#    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/theuser/Temp/   and into the game folder, copied also in uppercase.
#
#    Tried: copying wdfldr.sys (set as Native) and WDFLDR.SYS into '/drive_c/windows/system32/'.
#
#    Immediate Wine 5.0.2 debug log is:
#    0198:fixme:heap:RtlSetHeapInformation 0x570000 0 0x22db80 4 stub
#    0198:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0198:fixme:heap:RtlSetHeapInformation 0x790000 0 0x22f1b0 4 stub
#    019c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    01a2:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    01a2:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0199:fixme:ver:GetCurrentPackageId (0x99fb00 (nil)): stub
#
#    Wine 5.16:
#    0790:fixme:heap:RtlSetHeapInformation 0000000000890000 0 000000000021DFC0 4 stub
#    0790:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0790:fixme:heap:RtlSetHeapInformation 0000000000AB0000 0 000000000021F080 4 stub
#    079c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    07b8:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    07b8:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0794:fixme:ver:GetCurrentPackageId (0000000000CBFBA0 0000000000000000): stub
#
# KNOWN ISSUES (FIXED):
#  - Wine amd64 5.0.2, 5.19: on the account creation screen (if you want to use Facebook nor Twitter), display is bad and the characters typed are not displayed. Fix: Wine 5.19-staging
#  - Wine amd64 5.19-staging: missing textures (displayed as blue areas). Fix: DXVK.

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

TITLE="Genshin Impact"
PREFIX="Genshin_Impact"
EDITOR="miHoYo"
GAME_URL="https://en.wikipedia.org/wiki/Genshin_Impact"
AUTHOR="Dadu042"
STEAM_ID=""
GAME_VMS="512"
SHORTCUT_FILENAME="launcher.exe"
SOFTWARE_CATEGORIES="Game;RolePlaying;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE=""


# Starting the script
POL_SetupWindow_Init
                         
# Starting debugging API
POL_Debug_Init
        
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"

############################################
#  Choose architecture: 32 bits or 64 bits #
############################################

# POL_SetupWindow_menu "$(eval_gettext 'What architecture do you want to use ?')" "$TITLE" "$(eval_gettext '64 bits (recommended)')~$(eval_gettext '32 bits')" "~"
 
# if [ "$APP_ANSWER" == "32 bits" ]; then
#        POL_System_SetArch "x86"
# elif [ "$APP_ANSWER" == "$(eval_gettext '64 bits (recommended)')" ]; then
#        POL_System_SetArch "amd64"
# fi

POL_System_SetArch "amd64"

# Download Wine if necessary then create prefix
POL_Wine_PrefixCreate "6.0.1"
# POL_Wine_PrefixCreate

# POL_System_TmpCreate "$PREFIX"
             
Set_OS "win7"

#######################################
#  Hacks                              #
#######################################



#######################################
#  Installing mandatory dependencies  #
#######################################

# Avoid game freeze when doing ALT+TAB
POL_Wine_DirectInput "MouseWarpOverride" "force"


# POL_Call POL_Install_vcrun2013
# POL_Call POL_Install_d3dx11

# Disable DirectX 11
# POL_Wine_OverrideDLL "" "d3d11"


################
#      GPU     #
################

# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver

# Minimum memory size requiered for the graphic card.
POL_SetupWindow_VMS $GAME_VMS

# Asking about memory size of graphic card
# POL_SetupWindow_menu_list "How much memory does your graphics board have?" "$TITLE" "64-128-256-320-384-512-640-768-896-1024-1536-1792-2048-3072-4096" "-" "256"
# VRAM="$APP_ANSWER"
# POL_Wine_Direct3D "VideoMemorySize" "$VRAM"

# Useful for Nvidia GPUs
# POL_Call POL_Install_physx



#######################################
# Create a 'virtual desktop' (window) #
#######################################
  
POL_SetupWindow_menu_list "$(eval_gettext "Choose the game resolution")" "$TITLE" "800x600-1152x864-1024x768-1280x720-1280x800-1280x900-1280x1024-1360x768-1368x768-1440x900-1400x1050-1600x900-1600x1024-1680x1050-1920x1080" "-" "800x600"
    
resolution="$APP_ANSWER"
WIDTH="$(echo $resolution | cut -d"x" -f1)"
HEIGHT="$(echo $resolution | cut -d"x" -f2)"
  
Set_Desktop "On" "$WIDTH" "$HEIGHT"
  
Set_WineWindowTitle "$TITLE"


#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix


#######################################
#  Main part of this script           #
#######################################
                 
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

# POL_SetupWindow_message "Warning: do not install Punk Buster nor DirectX." "$TITLE"
# POL_SetupWindow_message "Warning: do not install DirectX (nor the icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
# POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'Note: at the end of the first installer (it does installs the downloader program), do not click RUN, instead close the window, then you will run the game from POL/POM.')" "$TITLE"


# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                      
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        POL_SetupWindow_cdrom
                      
        # POL_Call POL_Function_NoCDWarning
               
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
                     
        POL_Wine_WaitExit "$TITLE"
                  
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                     
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo .')" "$TITLE"
        # POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20200911204035.exe"
        POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20201014173947.exe"
           
        mv GenshinImpact_install_20201014173947.exe GameInstaller.exe
        # mv X.rar gameinstaller.rar
        # mv X.zip gameinstaller.zip
           
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
             
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
             
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
         
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "GameInstaller.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
     
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: do NOT install DirectX.')" "$TITLE"
  
        # cd "$WINEPREFIX/drive_c"
        # rm GameInstaller.exe
             
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
             
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
           
        APP_ANSWER=".EXE"
     
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the installation file (.EXE)')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
   
        # POL_SetupWindow_message "Note: please answer NO to all the questions that will appear." "$TITLE"
   
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                 
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"


elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                   
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
      
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
           
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
           
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
            
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
fi
fi

################
# Patch update #
################
 
# POL_SetupWindow_menu "$(eval_gettext 'Do you have a official patch-update to install ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"      
             
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi

#######################################
#  Hacks                              #
#  Editing configuration files        #
#######################################




POL_SetupWindow_message "$(eval_gettext 'Installation is finished.')" "$TITLE"

POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags: fixme-all')" "$TITLE"
             
# POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

ngutanhlamnha Lundi 13 Juin 2022 à 8:44
ngutanhlamnha Anonymous

Messages

i can't update new version, it doesn't work, what should i do?

 

Réponses

Anonymous
Lundi 13 Juin 2022 à 8:47
it shows: Request timed out. Try again later.
Anonymous
Lundi 13 Juin 2022 à 10:26
i am using ubuntu 16.04 lts
shalva97 Samedi 6 Mars 2021 à 21:29
shalva97 Anonymous

Messages

I have been messing with this for a week but ca

nnot get it to work. Also used the patch for yellow button but didnot help.

wdfldr.sys was missing so i tried putting it in system32 and the error was gone.but game still doesnot open.
but now everytime I press yellow button this error shows up:

wine: Unhandled page fault on read access to 0000000000000018 at address 0000000000333A05 (thread 043c), starting debugger...



logs:

[03/07/21 00:27:21] - Running wine- launcher.exe (Working directory : /home/shalva/.PlayOnLinux/wineprefix/Genshin_Impact/drive_c/Program Files/Genshin Impact)
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

03c4:err:winediag:wined3d_get_user_override_gpu_description Invalid GPU override 8086:3e98 specified, ignoring.
03c4:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
03c4:fixme:wgl:X11DRV_wglGetPixelFormatAttribivARB unsupported 2008 WGL Attribute
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

wine: Unhandled page fault on read access to 0000000000000018 at address 0000000000333A05 (thread 043c), starting debugger...
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

wine: Unhandled page fault on read access to 0000000000000018 at address 0000000000333A05 (thread 046c), starting debugger...
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

wine: Unhandled page fault on read access to 0000000000000018 at address 0000000000333A05 (thread 0508), starting debugger...
wine: Unhandled page fault on read access to 0000000000000018 at address 0000000000333A05 (thread 0534), starting debugger...
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

wine: Unhandled page fault on read access to 0000000000000018 at address 0000000000333A05 (thread 05b4), starting debugger...
wine: Unhandled page fault on read access to 0000000000000018 at address 0000000000333A05 (thread 05e0), starting debugger...

 

My system: 

Operating System: Arch Linux

KDE Plasma Version: 5.21.1
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.11.2-arch1-1
OS Type: 64-bit
Graphics Platform: X11
Processors: 6 × Intel® Core™ i5-9400 CPU @ 2.90GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

Wine: 5.9 , 5.19, 6.3 - same errors on all versions

 

Réponses

Anonymous
Dimanche 7 Mars 2021 à 10:47
Would you mind checking my review below (web view) from October last year? There you can find a link to the most recent patch.

Edité par shalva97

Billsboard Jeudi 25 Février 2021 à 6:19
Billsboard Anonymous

Messages

Cannot install the launcher on MacOS 10.15.4 Catalina

Hello, every time I try to install this program it asks me for a resolution, then tells me that 32 bit wine cannot be used on Catalina, and the system version will be used instead. Following this, I get a crash saying Wine_POL has crashed. Clicking next tells me the installer has crashed, and cannot find launcher.exe. I'm a clean installation of MacOS. The only thing I have installed is the PlayOnMac application (version 4.4.2)

 

Os: 10.15.4 Catalina

 

Réponses

Anonymous
Jeudi 25 Février 2021 à 6:43
Here is the code where it tries to run the installer:

 

[02/24/21 21:39:00] - Running wine-5.19-staging GameInstaller.exe (Working directory : /Users/bill/Library/PlayOnMac/wine/darwin-x86on64)
000b:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
000d:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0010:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0017:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
001d:err:plugplay:process_IOService_Device object 0x8d03
001d:err:plugplay:process_IOService_Device object 0x6c07
001d:err:plugplay:process_IOService_Device object 0x8c07
001d:err:plugplay:process_IOService_Device object 0x8b07
001d:err:plugplay:process_IOService_Device object 0x8907
001d:err:plugplay:process_IOService_Device object 0x7207
001d:err:plugplay:process_IOService_Device object 0x7407
001d:err:plugplay:process_IOService_Device object 0x8407
001d:err:plugplay:process_IOService_Device object 0x8107
001d:err:plugplay:process_IOService_Device object 0x7f07
001d:err:plugplay:process_IOService_Device object 0x7c07
001d:err:plugplay:process_IOService_Device object 0x7803
001f:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
wine: cannot find L"C:\\windows\\system32\\GameInstaller.exe"

 

It seems like a file is missing?
Anonymous
Jeudi 25 Février 2021 à 18:44
Please read the comments below. First there's something within Wine which makes GI think that it's a VM, thus refuses to start at all (no fix). Second issue seems to be within PlayOnMac that attempts to get 32-bit Wine running which is not supported. Third issue *seems to be* that Wine has no access to where your file was downloaded (check winecfg).
Anonymous
Vendredi 26 Février 2021 à 0:58
So is there just no way to get the game to run at the moment?
Anonymous
Vendredi 26 Février 2021 à 22:08
(Same as below and on your newly opened issue) The game will stay broken until someone can debug it on MacOS or in a virtual machine to either fix Wine or to patch the game.
Yulinox Dimanche 31 Janvier 2021 à 10:19
Yulinox Anonymous

Messages

Hello, I am a playonmac user and I am trying to play genshin impact, but when I launch the game, an error appears and says "Sorry, this game cannot run on a virtual machine". I see that people can play it on this virtual machine, so does someone have a solution ?
I am using MacOs Mojave (10.14.5). 
 

 

 

Réponses

Anonymous
Dimanche 31 Janvier 2021 à 13:12
Sorry, even after months this is still not solved because I don't have access to a MacOS system to troubleshoot this. It is likely due to small differences within Wine.

The issue was first reported last December (right after the 1.1.0 Linux patch), and yet no news in this regard.
Anonymous
Dimanche 31 Janvier 2021 à 13:19
I see. Thanks for your response ! I just have a question: does the same thing happens to linux systems ?
Anonymous
Dimanche 31 Janvier 2021 à 13:44
Rest in peace Ken Thomases, you could've surely solved this issue. It's really a difference within Wine. The newest patch (not the PoL script) works fine on Linux.
Anonymous
Dimanche 31 Janvier 2021 à 14:12
Okay. Thanks for your help, I'll wait for the solution, even if it takes a lot of time
dstldvngr Jeudi 28 Janvier 2021 à 19:53
dstldvngr Anonymous

Messages

Hello. As soon as I launch it, it says it needs an update, which it makes 0% on downloading, and then says it timed out. Is this fixable? Thank you

Réponses

Anonymous
Jeudi 28 Janvier 2021 à 23:02
It takes a very long time to download, and then fails at 0%? You're using a launcher from October 2020, which has a QT5 bug in the networking code. Install the newest launcher from their website, download the update, and check the project page (linked below) for setup instructions. PoL is outdated.
semnosao Mardi 12 Janvier 2021 à 18:08
semnosao Anonymous

Messages

everytime I try to open I get an update request but when I try to update irt fails :(

Réponses

Anonymous
Mercredi 13 Janvier 2021 à 11:17
<invalid>
Ducote Vendredi 6 Novembre 2020 à 20:24
Ducote

Messages

I want to help, is there a place where people regroup to use their brain together ?

Réponses

Anonymous
Samedi 7 Novembre 2020 à 23:26
its working apparently: https://appdb.winehq.org/objectManager.php?sClass=application&iId=20040
Dimanche 8 Novembre 2020 à 9:42
Ducote, currently hackers are talking here, but forums would be more relevant. A hacker created this page: https://notabug.org/Krock/GI-on-Linux


Ukmxd, no this is a 'old' report using the method reported here. Nowadays It might fail with 'Error code: 31-4302'.
anlorsp Samedi 31 Octobre 2020 à 4:39
anlorsp Anonymous

Messages

Game version:1.0.1

Wine version:5.19-staging

OS:deepin20(1003)

I have installed the patch for yellow start button,but the game doesn't run when my click the yello button. Here's the log:

 

002c:fixme:winediag:LdrInitializeThunk wine-staging 5.19 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
0084:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\wineusb": c0000142
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"wineusb" failed to start: 1114
00f4:fixme:nls:get_dummy_preferred_ui_language (0x8 000000000021F550 000000000021F4A0 000000000021F558) returning a dummy value (current locale)
info:  Game: launcher.exe
info:  DXVK: v1.7.2
info:  Built-in extension providers:
info:    Win32 WSI
info:    OpenVR
warn:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_get_surface_capabilities2
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
warn:  D3D9: VK_FORMAT_D16_UNORM_S8_UINT -> VK_FORMAT_D24_UNORM_S8_UINT
warn:  D3D9: VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT -> VK_FORMAT_B4G4R4A4_UNORM_PACK16
info:  GeForce GTX 1050 Ti:
info:    Driver: 440.100.0
info:    Vulkan: 1.1.119
info:    Memory Heap[0]:
info:      Size: 4096 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:      Memory Type[8]: Property Flags = 0x1
info:    Memory Heap[1]:
info:      Size: 5886 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[9]: Property Flags = 0x6
info:      Memory Type[10]: Property Flags = 0xe
info:  Process set as DPI aware
00f4:fixme:ntdll:EtwEventRegister ({5eec90ab-c022-44b2-a5dd-fd716a222a15}, 0000000003401124, 0000000004727E40, 0000000004727E60) stub.
00f4:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 0000000004617370, 43) stub
011c:fixme:ver:GetCurrentPackageId (0000000004D9FE10 0000000000000000): stub
012c:fixme:ver:GetCurrentPackageId (00000000051DFE10 0000000000000000): stub
0120:fixme:ver:GetCurrentPackageId (0000000004EAFE10 0000000000000000): stub
0124:fixme:ver:GetCurrentPackageId (0000000004FBFE10 0000000000000000): stub
0128:fixme:ver:GetCurrentPackageId (00000000050CFE10 0000000000000000): stub
0130:fixme:ver:GetCurrentPackageId (00000000052EFE10 0000000000000000): stub
0134:fixme:ver:GetCurrentPackageId (00000000053FFE10 0000000000000000): stub
0138:fixme:ver:GetCurrentPackageId (000000000550FE10 0000000000000000): stub
00f4:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
00f4:fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
00f4:fixme:toolhelp:Heap32ListFirst : stub
00f4:fixme:nls:get_dummy_preferred_ui_language (0x8 000000000021F4D0 000000000021F420 000000000021F4D8) returning a dummy value (current locale)
00f4:fixme:nls:get_dummy_preferred_ui_language (0x8 000000000021F2B0 000000000021F200 000000000021F2B8) returning a dummy value (current locale)
00f4:fixme:ntdll:EtwEventRegister ({d2d578d9-2936-45b6-a09f-30e32715f42d}, 000000000B638F00, 000000000F4B6A10, 000000000F606FC8) stub.
00f4:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000021DD90, 0000000000000000 000000000021DD98
00f4:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000021DD90 0000000000000000 000000000021DD98) returning a dummy value (current locale)
00f4:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000021DD90, 00000000074E89B0 000000000021DD98
00f4:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000021DD90 00000000074E89B0 000000000021DD98) returning a dummy value (current locale)
00f4:fixme:winsock:WSALookupServiceBeginW (0x21dad0 0x00000ff0 0x21dac8) Stub!
00f4:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (000000000021D810 1 C) semi-stub
00f4:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (000000000021D460 1 C) semi-stub
00f4:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (000000000021D3E0 1 C) semi-stub
[240:244:1031/113638.900:ERROR:network_change_notifier_win.cc(157)] WSALookupServiceBegin failed with: 8
00f4:fixme:iphlpapi:NotifyAddrChange (Handle 0x21dd70, overlapped 0x74e98b0): stub
00f4:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
00f4:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
00f4:fixme:systray:Shell_NotifyIconGetRect stub (0x21f280) (0x21f270)
00f4:fixme:msg:ChangeWindowMessageFilterEx 00000000000100EA c05a 1 0000000000000000
00f4:fixme:systray:Shell_NotifyIconGetRect stub (0x21f280) (0x21f270)
016c:fixme:file:ReplaceFileW Ignoring flags 2
0180:fixme:wlanapi:WlanEnumInterfaces (0000000000000001, 0000000000000000, 0000000012A2EE68) semi-stub
01d0:fixme:heap:RtlSetHeapInformation 0000000000000000 1 0000000000000000 0 stub
01d0:fixme:ntdll:EtwEventRegister ({d2d578d9-2936-45b6-a09f-30e32715f42d}, 0000000000D78F00, 0000000004BF6A10, 0000000004D46FC8) stub.
01d0:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (000000000021F310 1 C) semi-stub
01d0:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (000000000021EF60 1 C) semi-stub
01d0:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
01d0:fixme:thread:QueryThreadCycleTime (FFFFFFFFFFFFFFFE,000000000021EA30): stub!
0168:fixme:file:NtLockFile I/O completion on lock not implemented yet
0178:fixme:file:ReplaceFileW Ignoring flags 2
033c:fixme:heap:RtlSetHeapInformation 0000000000900000 0 000000000021DF80 4 stub
033c:err:virtual:virtual_setup_exception stack overflow 240 bytes in thread 033c addr 0x7bc57c32 stack 0x120f10 (0x120000-0x121000-0x220000)
0238:fixme:file:ReplaceFileW Ignoring flags 2
0238:fixme:file:ReplaceFileW Ignoring flags 2


Réponses

Zapstars Vendredi 30 Octobre 2020 à 16:57
Zapstars Anonymous

Messages

I get an error code after selecting my region and clicking on the portal to start the game. "Genshin Impact encountered a problem loading game data, please log in again Error code: 31-4302"

 

I think this is a side effect of messing with the anti-cheat. This is my first time playing Genshin on Linux, and this error started occurring on Oct 29.

Réponses

Vendredi 30 Octobre 2020 à 17:33
After some research, 31-4302 is also pretty common on Windows. So it's not because we mess with the anti-cheat. I also have the same error.
Anonymous
Vendredi 30 Octobre 2020 à 17:38
Same here. I played the game for several hours last weekend, but this recent update broke it again. It's a pity.

EDIT: All those error messages are sent to miHoYo's central logging server. The sent data mentions the Wine project and the error code (4302), hence they probably know about us having this problem. The game ran very well for 6 days. Sucks.
Anonymous
Vendredi 30 Octobre 2020 à 17:38
No, it's due to the patch used to make the game work. The error code means that the game won't work if you modify a file or the folder. Windows users that get this message is because they added files like X360ce to play with a controller or things like this. So for now we're stuck.
Vendredi 30 Octobre 2020 à 18:25
Did we modified the game at some point ?
Anonymous
Vendredi 30 Octobre 2020 à 18:33
Same here, no logs relating to this.
I've tried every suggested fixes, none of them work on linux.
Vendredi 30 Octobre 2020 à 18:39
That sounds obvious.
Fixes on Windows are basically "Make your game as it were after installation".
here, we have this issue even after installation.
Anonymous
Vendredi 30 Octobre 2020 à 19:06
Yeah we modified the game with the patch made to be able to run the game
Vendredi 30 Octobre 2020 à 19:30
... crap... so we can't modify the game... but we have to.
Anonymous
Vendredi 30 Octobre 2020 à 19:36
@ducote I may be wrong but think people were using this method to bypass the anti-cheat on windows to do actually cheating and so they needed to put a stop to that
Vendredi 30 Octobre 2020 à 20:02
Sounds legit this way but now we are having a bad time fixing our games....
Anonymous
Dimanche 1 Novembre 2020 à 19:35
Yeah, I'm against cheating but I'd really like to continue playing this game…
Anonymous
Mardi 3 Novembre 2020 à 6:25
@Ducote it's not common on Windows, 4302 happened because the offset patch you were applying to the game actually disabling mhyprot2 service, if mhyprot2 service does not run, the game will return error 4302 when you try to login
tacobarz Vendredi 30 Octobre 2020 à 5:31
tacobarz Anonymous

Messages

How can I use the Script in the Phoenics PlayonLinux app? Seems that is similar. I am following the script manually to see what happens

Réponses

davidcowboy Mardi 27 Octobre 2020 à 1:54
davidcowboy Anonymous

Messages

Installed with the recommended Wine 5.19-staging version. After following the fixes for the known issues, installing the DXVK component and the patch available for the game after installing, everything is fine. I've had a problem with the hold left-alt to show cursor in-game, after the cursor appeared the game no longer acknowledged my keyboard. After I turned off virtual desktop emulation and disabled window decoration by the window manager in the wine prefix configuration, the problem ceased. Also had some problems with performance, couldn't find a solution for that other than setting the render scale from 1.1 to 0.8 which drastically improved the framerates. Amazing work guys, thank you!
heart

The system I tested the game on for 2+ hours:

OS: Linux Mint 20 x86_64 
Kernel: 5.4.0-52-generic 
Resolution: 1920x1080 
DE: Cinnamon 
WM: Mutter (Muffin) 
CPU: Intel i5-7300HQ (4) @ 3.500GHz 
GPU: NVIDIA GeForce GTX 1050 Mobile 3815MiB
Memory: 7826MiB 

 

Réponses

Edité par davidcowboy

FichteFoll Mardi 27 Octobre 2020 à 0:49
FichteFoll Anonymous

Messages

I am able to get the game to start with DXVK (also without) and the patch from the other page applied, but after showing the "Please read this" screen where it loads my character or something, I don't get any refreshes for graphics anymore. DXVK's HUD isn't updated anymore either, but the music starts playing regardless and I have CPU consumption. The only errors I can see on the console are:

00c0:err:seh:RtlCaptureStackBackTrace invalid frame 220178 (0000000000122000-0000000000220000)

which happen a few seconds before the visual freeze. Without DXVK, I get:

0184:err:d3d:wined3d_debug_callback 0x13a29f30: "GL_INVALID_OPERATION in glGetUniformLocation(program not linked)".
0184:err:d3d:wined3d_debug_callback 0x13a29f30: "GL_INVALID_OPERATION in glGetUniformLocation(program not linked)".
0184:err:d3d:wined3d_debug_callback 0x13a29f30: "GL_INVALID_OPERATION in glGetUniformLocation(program not linked)".
0184:err:d3d:wined3d_debug_callback 0x13a29f30: "GL_INVALID_OPERATION in glUseProgram(program 264 not linked)".

I'm on Arch and tried 5.9 and 5.8.5 kernel, with and without DXVK and with wine 5.19 and 5.19-staging, all with the same symptoms. I also tried capturing the mouse and configuring a virtual desktop.

Interestingly, it used to work *once*, where I managed to login, after which it crashed while inactive and I never got that far again.

Réponses

Anonymous
Mardi 27 Octobre 2020 à 0:55
Since it says wined3d I think it doesn't use dxvk, do you have the vulkan drivers installed on your system? https://wiki.archlinux.org/index.php/Vulkan
EDIT: Missed the "Without DXVK", sorry. Then I sadly don't know why that is.
Anonymous
Mercredi 28 Octobre 2020 à 23:56
Interestingly, installing into a new prefix worked.

However, I'm now getting a Error code: 31-4302 in wine-staging 5.19, 5.20 and in Proton 5.13 (which uses wine 5.12)

 
Anonymous
Jeudi 29 Octobre 2020 à 11:34
We all getting the same 31-4302 now.
Jeudi 29 Octobre 2020 à 23:34
Same here, 31-4302 after connecting.

Any idea where to look for to find a solution ?
Dadu042 Lundi 26 Octobre 2020 à 10:22
Dadu042

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Messages

Back because I had issues with virtualdesktop (no keyboard).

Differences

@@ -20,12 +20,9 @@
 #   Update the file installer URL.
 # [Dadu042] (2020-10-25 20-00).
 #   Wine 5.0.2 -> 5.19-staging (because I have got some crashes some seconds afeer the game did start).
-# [Dadu042] (2020-10-26 20-00).
-#   Add virtual desktop and mouse override.
 #
 # KNOWN ISSUES :
-#  - Wine amd64 5.19-staging: missing textures (displayed as blue areas).
-#
+
 #  Anti-cheat issue:
 #  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
 #    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/theuser/Temp/   and into the game folder, copied also in uppercase.
@@ -52,6 +49,7 @@
 #
 # KNOWN ISSUES (FIXED):
 #  - Wine amd64 5.0.2, 5.19: on the account creation screen (if you want to use Facebook nor Twitter), display is bad and the characters typed are not displayed. Fix: Wine 5.19-staging
+#  - Wine amd64 5.19-staging: missing textures (displayed as blue areas). Fix: DXVK.
 
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"

Nouveau code source

#!/bin/bash
# Date : (2020-09-29)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits (Linux kernel v5.4.0). GPU: AMD Vega 11.
# Author : Dadu042
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions: Launcher v2.3.3.0 (GenshinImpact_install_20200911204035.exe)
#                           v2.3.4.0 (GenshinImpact_install_20201014173947.exe). Game (login screen): OSRELWin1.0.1_R1135452_S1135452_D1135370.
#
# Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5, DirectX 11.
#
#
# CHANGELOG
# [Dadu042] (2020-09-29 10-00). 
#   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
# [Dadu042] (2020-10-25 10-00).
#   Update the file installer URL.
# [Dadu042] (2020-10-25 20-00).
#   Wine 5.0.2 -> 5.19-staging (because I have got some crashes some seconds afeer the game did start).
#
# KNOWN ISSUES :

#  Anti-cheat issue:
#  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
#    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/theuser/Temp/   and into the game folder, copied also in uppercase.
#
#    Tried: copying wdfldr.sys (set as Native) and WDFLDR.SYS into '/drive_c/windows/system32/'.
#
#    Immediate Wine 5.0.2 debug log is:
#    0198:fixme:heap:RtlSetHeapInformation 0x570000 0 0x22db80 4 stub
#    0198:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0198:fixme:heap:RtlSetHeapInformation 0x790000 0 0x22f1b0 4 stub
#    019c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    01a2:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    01a2:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0199:fixme:ver:GetCurrentPackageId (0x99fb00 (nil)): stub
#
#    Wine 5.16:
#    0790:fixme:heap:RtlSetHeapInformation 0000000000890000 0 000000000021DFC0 4 stub
#    0790:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0790:fixme:heap:RtlSetHeapInformation 0000000000AB0000 0 000000000021F080 4 stub
#    079c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    07b8:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    07b8:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0794:fixme:ver:GetCurrentPackageId (0000000000CBFBA0 0000000000000000): stub
#
# KNOWN ISSUES (FIXED):
#  - Wine amd64 5.0.2, 5.19: on the account creation screen (if you want to use Facebook nor Twitter), display is bad and the characters typed are not displayed. Fix: Wine 5.19-staging
#  - Wine amd64 5.19-staging: missing textures (displayed as blue areas). Fix: DXVK.

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

TITLE="Genshin Impact"
PREFIX="Genshin_Impact"
EDITOR="miHoYo"
GAME_URL="https://en.wikipedia.org/wiki/Genshin_Impact"
AUTHOR="Dadu042"
STEAM_ID=""
GAME_VMS="512"
SHORTCUT_FILENAME="launcher.exe"
SOFTWARE_CATEGORIES="Game;RolePlaying;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE=""


# Starting the script
POL_SetupWindow_Init
                         
# Starting debugging API
POL_Debug_Init
        
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"

############################################
#  Choose architecture: 32 bits or 64 bits #
############################################

# POL_SetupWindow_menu "$(eval_gettext 'What architecture do you want to use ?')" "$TITLE" "$(eval_gettext '64 bits (recommended)')~$(eval_gettext '32 bits')" "~"
 
# if [ "$APP_ANSWER" == "32 bits" ]; then
#        POL_System_SetArch "x86"
# elif [ "$APP_ANSWER" == "$(eval_gettext '64 bits (recommended)')" ]; then
#        POL_System_SetArch "amd64"
# fi

POL_System_SetArch "amd64"

# Download Wine if necessary then create prefix
POL_Wine_PrefixCreate "5.19-staging"
# POL_Wine_PrefixCreate

# POL_System_TmpCreate "$PREFIX"
             
Set_OS "win7"

#######################################
#  Hacks                              #
#######################################



#######################################
#  Installing mandatory dependencies  #
#######################################

# Avoid game freeze when doing ALT+TAB
POL_Wine_DirectInput "MouseWarpOverride" "force"


# POL_Call POL_Install_vcrun2013
# POL_Call POL_Install_d3dx11

# Disable DirectX 11
# POL_Wine_OverrideDLL "" "d3d11"


################
#      GPU     #
################

# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver

# Minimum memory size requiered for the graphic card.
POL_SetupWindow_VMS $GAME_VMS

# Asking about memory size of graphic card
# POL_SetupWindow_menu_list "How much memory does your graphics board have?" "$TITLE" "64-128-256-320-384-512-640-768-896-1024-1536-1792-2048-3072-4096" "-" "256"
# VRAM="$APP_ANSWER"
# POL_Wine_Direct3D "VideoMemorySize" "$VRAM"

# Useful for Nvidia GPUs
# POL_Call POL_Install_physx



#######################################
# Create a 'virtual desktop' (window) #
#######################################
  
POL_SetupWindow_menu_list "$(eval_gettext "Choose the game resolution")" "$TITLE" "800x600-1152x864-1024x768-1280x720-1280x800-1280x900-1280x1024-1360x768-1368x768-1440x900-1400x1050-1600x900-1600x1024-1680x1050-1920x1080" "-" "800x600"
    
resolution="$APP_ANSWER"
WIDTH="$(echo $resolution | cut -d"x" -f1)"
HEIGHT="$(echo $resolution | cut -d"x" -f2)"
  
Set_Desktop "On" "$WIDTH" "$HEIGHT"
  
Set_WineWindowTitle "$TITLE"


#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix


#######################################
#  Main part of this script           #
#######################################
                 
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

# POL_SetupWindow_message "Warning: do not install Punk Buster nor DirectX." "$TITLE"
# POL_SetupWindow_message "Warning: do not install DirectX (nor the icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
# POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'Note: at the end of the first installer (it does installs the downloader program), do not click RUN, instead close the window, then you will run the game from POL/POM.')" "$TITLE"


# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                      
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        POL_SetupWindow_cdrom
                      
        # POL_Call POL_Function_NoCDWarning
               
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
                     
        POL_Wine_WaitExit "$TITLE"
                  
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                     
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo .')" "$TITLE"
        # POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20200911204035.exe"
        POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20201014173947.exe"
           
        mv GenshinImpact_install_20201014173947.exe GameInstaller.exe
        # mv X.rar gameinstaller.rar
        # mv X.zip gameinstaller.zip
           
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
             
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
             
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
         
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "GameInstaller.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
     
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: do NOT install DirectX.')" "$TITLE"
  
        # cd "$WINEPREFIX/drive_c"
        # rm GameInstaller.exe
             
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
             
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
           
        APP_ANSWER=".EXE"
     
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the installation file (.EXE)')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
   
        # POL_SetupWindow_message "Note: please answer NO to all the questions that will appear." "$TITLE"
   
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                 
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"


elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                   
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
      
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
           
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
           
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
            
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
fi
fi

################
# Patch update #
################
 
# POL_SetupWindow_menu "$(eval_gettext 'Do you have a official patch-update to install ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"      
             
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi

#######################################
#  Hacks                              #
#  Editing configuration files        #
#######################################




POL_SetupWindow_message "$(eval_gettext 'Installation is finished.')" "$TITLE"

POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags: fixme-all')" "$TITLE"
             
# POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

Anonymous
Mercredi 28 Octobre 2020 à 18:07
Just open wine registry and put in HKEY_CURRENT_USER\Software\Wine\X11 Driver 'UseTakeFocus' REG_SZ with value N. After that no virtual desktop is needed.

Edité par Dadu042

Dadu042 Lundi 26 Octobre 2020 à 9:42
Dadu042

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Differences

@@ -16,8 +16,12 @@
 # CHANGELOG
 # [Dadu042] (2020-09-29 10-00). 
 #   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
-# [Dadu042] (2020-10-25 10-00). 
+# [Dadu042] (2020-10-25 10-00).
 #   Update the file installer URL.
+# [Dadu042] (2020-10-25 20-00).
+#   Wine 5.0.2 -> 5.19-staging (because I have got some crashes some seconds afeer the game did start).
+# [Dadu042] (2020-10-26 20-00).
+#   Add virtual desktop and mouse override.
 #
 # KNOWN ISSUES :
 #  - Wine amd64 5.19-staging: missing textures (displayed as blue areas).
@@ -58,7 +62,7 @@
 GAME_URL="https://en.wikipedia.org/wiki/Genshin_Impact"
 AUTHOR="Dadu042"
 STEAM_ID=""
-GAME_VMS="1024"
+GAME_VMS="512"
 SHORTCUT_FILENAME="launcher.exe"
 SOFTWARE_CATEGORIES="Game;RolePlaying;"
 # http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
@@ -94,7 +98,7 @@
 POL_System_SetArch "amd64"
 
 # Download Wine if necessary then create prefix
-POL_Wine_PrefixCreate "5.0.2"
+POL_Wine_PrefixCreate "5.19-staging"
 # POL_Wine_PrefixCreate
 
 # POL_System_TmpCreate "$PREFIX"
@@ -107,11 +111,13 @@
 
 
 
-
 #######################################
 #  Installing mandatory dependencies  #
 #######################################
 
+# Avoid game freeze when doing ALT+TAB
+POL_Wine_DirectInput "MouseWarpOverride" "force"
+
 
 # POL_Call POL_Install_vcrun2013
 # POL_Call POL_Install_d3dx11
@@ -139,6 +145,22 @@
 # POL_Call POL_Install_physx
 
 
+
+#######################################
+# Create a 'virtual desktop' (window) #
+#######################################
+  
+POL_SetupWindow_menu_list "$(eval_gettext "Choose the game resolution")" "$TITLE" "800x600-1152x864-1024x768-1280x720-1280x800-1280x900-1280x1024-1360x768-1368x768-1440x900-1400x1050-1600x900-1600x1024-1680x1050-1920x1080" "-" "800x600"
+    
+resolution="$APP_ANSWER"
+WIDTH="$(echo $resolution | cut -d"x" -f1)"
+HEIGHT="$(echo $resolution | cut -d"x" -f2)"
+  
+Set_Desktop "On" "$WIDTH" "$HEIGHT"
+  
+Set_WineWindowTitle "$TITLE"
+
+
 #############################################
 #  Sound problem fix - pulseaudio related   #
 #############################################

Nouveau code source

#!/bin/bash
# Date : (2020-09-29)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits (Linux kernel v5.4.0). GPU: AMD Vega 11.
# Author : Dadu042
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions: Launcher v2.3.3.0 (GenshinImpact_install_20200911204035.exe)
#                           v2.3.4.0 (GenshinImpact_install_20201014173947.exe). Game (login screen): OSRELWin1.0.1_R1135452_S1135452_D1135370.
#
# Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5, DirectX 11.
#
#
# CHANGELOG
# [Dadu042] (2020-09-29 10-00). 
#   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
# [Dadu042] (2020-10-25 10-00).
#   Update the file installer URL.
# [Dadu042] (2020-10-25 20-00).
#   Wine 5.0.2 -> 5.19-staging (because I have got some crashes some seconds afeer the game did start).
# [Dadu042] (2020-10-26 20-00).
#   Add virtual desktop and mouse override.
#
# KNOWN ISSUES :
#  - Wine amd64 5.19-staging: missing textures (displayed as blue areas).
#
#  Anti-cheat issue:
#  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
#    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/theuser/Temp/   and into the game folder, copied also in uppercase.
#
#    Tried: copying wdfldr.sys (set as Native) and WDFLDR.SYS into '/drive_c/windows/system32/'.
#
#    Immediate Wine 5.0.2 debug log is:
#    0198:fixme:heap:RtlSetHeapInformation 0x570000 0 0x22db80 4 stub
#    0198:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0198:fixme:heap:RtlSetHeapInformation 0x790000 0 0x22f1b0 4 stub
#    019c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    01a2:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    01a2:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0199:fixme:ver:GetCurrentPackageId (0x99fb00 (nil)): stub
#
#    Wine 5.16:
#    0790:fixme:heap:RtlSetHeapInformation 0000000000890000 0 000000000021DFC0 4 stub
#    0790:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0790:fixme:heap:RtlSetHeapInformation 0000000000AB0000 0 000000000021F080 4 stub
#    079c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    07b8:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    07b8:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0794:fixme:ver:GetCurrentPackageId (0000000000CBFBA0 0000000000000000): stub
#
# KNOWN ISSUES (FIXED):
#  - Wine amd64 5.0.2, 5.19: on the account creation screen (if you want to use Facebook nor Twitter), display is bad and the characters typed are not displayed. Fix: Wine 5.19-staging

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

TITLE="Genshin Impact"
PREFIX="Genshin_Impact"
EDITOR="miHoYo"
GAME_URL="https://en.wikipedia.org/wiki/Genshin_Impact"
AUTHOR="Dadu042"
STEAM_ID=""
GAME_VMS="512"
SHORTCUT_FILENAME="launcher.exe"
SOFTWARE_CATEGORIES="Game;RolePlaying;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE=""


# Starting the script
POL_SetupWindow_Init
                         
# Starting debugging API
POL_Debug_Init
        
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"

############################################
#  Choose architecture: 32 bits or 64 bits #
############################################

# POL_SetupWindow_menu "$(eval_gettext 'What architecture do you want to use ?')" "$TITLE" "$(eval_gettext '64 bits (recommended)')~$(eval_gettext '32 bits')" "~"
 
# if [ "$APP_ANSWER" == "32 bits" ]; then
#        POL_System_SetArch "x86"
# elif [ "$APP_ANSWER" == "$(eval_gettext '64 bits (recommended)')" ]; then
#        POL_System_SetArch "amd64"
# fi

POL_System_SetArch "amd64"

# Download Wine if necessary then create prefix
POL_Wine_PrefixCreate "5.19-staging"
# POL_Wine_PrefixCreate

# POL_System_TmpCreate "$PREFIX"
             
Set_OS "win7"

#######################################
#  Hacks                              #
#######################################



#######################################
#  Installing mandatory dependencies  #
#######################################

# Avoid game freeze when doing ALT+TAB
POL_Wine_DirectInput "MouseWarpOverride" "force"


# POL_Call POL_Install_vcrun2013
# POL_Call POL_Install_d3dx11

# Disable DirectX 11
# POL_Wine_OverrideDLL "" "d3d11"


################
#      GPU     #
################

# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver

# Minimum memory size requiered for the graphic card.
POL_SetupWindow_VMS $GAME_VMS

# Asking about memory size of graphic card
# POL_SetupWindow_menu_list "How much memory does your graphics board have?" "$TITLE" "64-128-256-320-384-512-640-768-896-1024-1536-1792-2048-3072-4096" "-" "256"
# VRAM="$APP_ANSWER"
# POL_Wine_Direct3D "VideoMemorySize" "$VRAM"

# Useful for Nvidia GPUs
# POL_Call POL_Install_physx



#######################################
# Create a 'virtual desktop' (window) #
#######################################
  
POL_SetupWindow_menu_list "$(eval_gettext "Choose the game resolution")" "$TITLE" "800x600-1152x864-1024x768-1280x720-1280x800-1280x900-1280x1024-1360x768-1368x768-1440x900-1400x1050-1600x900-1600x1024-1680x1050-1920x1080" "-" "800x600"
    
resolution="$APP_ANSWER"
WIDTH="$(echo $resolution | cut -d"x" -f1)"
HEIGHT="$(echo $resolution | cut -d"x" -f2)"
  
Set_Desktop "On" "$WIDTH" "$HEIGHT"
  
Set_WineWindowTitle "$TITLE"


#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix


#######################################
#  Main part of this script           #
#######################################
                 
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

# POL_SetupWindow_message "Warning: do not install Punk Buster nor DirectX." "$TITLE"
# POL_SetupWindow_message "Warning: do not install DirectX (nor the icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
# POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'Note: at the end of the first installer (it does installs the downloader program), do not click RUN, instead close the window, then you will run the game from POL/POM.')" "$TITLE"


# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                      
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        POL_SetupWindow_cdrom
                      
        # POL_Call POL_Function_NoCDWarning
               
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
                     
        POL_Wine_WaitExit "$TITLE"
                  
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                     
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo .')" "$TITLE"
        # POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20200911204035.exe"
        POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20201014173947.exe"
           
        mv GenshinImpact_install_20201014173947.exe GameInstaller.exe
        # mv X.rar gameinstaller.rar
        # mv X.zip gameinstaller.zip
           
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
             
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
             
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
         
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "GameInstaller.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
     
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: do NOT install DirectX.')" "$TITLE"
  
        # cd "$WINEPREFIX/drive_c"
        # rm GameInstaller.exe
             
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
             
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
           
        APP_ANSWER=".EXE"
     
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the installation file (.EXE)')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
   
        # POL_SetupWindow_message "Note: please answer NO to all the questions that will appear." "$TITLE"
   
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                 
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"


elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                   
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
      
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
           
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
           
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
            
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
fi
fi

################
# Patch update #
################
 
# POL_SetupWindow_menu "$(eval_gettext 'Do you have a official patch-update to install ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"      
             
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi

#######################################
#  Hacks                              #
#  Editing configuration files        #
#######################################




POL_SetupWindow_message "$(eval_gettext 'Installation is finished.')" "$TITLE"

POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags: fixme-all')" "$TITLE"
             
# POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

sentientyeet Lundi 26 Octobre 2020 à 9:15
sentientyeet Anonymous

Messages

Using Wine 5.19-staging (ZFGameBrowser.exe crash if not using this version) with the DXVK_172 component installed.

To fix the issue where the game doesn't respond to inputs after an ALT-TAB, turn on Automatically capture mouse in full-screen windows and Emulate virtual desktop (set to your native or preferred res)

Running smoothly, no issues so far.

Réponses

Dadu042 Dimanche 25 Octobre 2020 à 20:24
Dadu042

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Differences

@@ -8,9 +8,9 @@
 # Only For : http://www.playonlinux.com
 #
 # TESTED Editions: Launcher v2.3.3.0 (GenshinImpact_install_20200911204035.exe)
-#                           v2.3.4.0 (GenshinImpact_install_20201014173947.exe)
+#                           v2.3.4.0 (GenshinImpact_install_20201014173947.exe). Game (login screen): OSRELWin1.0.1_R1135452_S1135452_D1135370.
 #
-# Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5.
+# Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5, DirectX 11.
 #
 #
 # CHANGELOG
@@ -20,6 +20,7 @@
 #   Update the file installer URL.
 #
 # KNOWN ISSUES :
+#  - Wine amd64 5.19-staging: missing textures (displayed as blue areas).
 #
 #  Anti-cheat issue:
 #  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
@@ -36,7 +37,6 @@
 #    01a2:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
 #    0199:fixme:ver:GetCurrentPackageId (0x99fb00 (nil)): stub
 #
-#
 #    Wine 5.16:
 #    0790:fixme:heap:RtlSetHeapInformation 0000000000890000 0 000000000021DFC0 4 stub
 #    0790:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
@@ -47,7 +47,7 @@
 #    0794:fixme:ver:GetCurrentPackageId (0000000000CBFBA0 0000000000000000): stub
 #
 # KNOWN ISSUES (FIXED):
-#  - Wine amd64 5.0.2: X
+#  - Wine amd64 5.0.2, 5.19: on the account creation screen (if you want to use Facebook nor Twitter), display is bad and the characters typed are not displayed. Fix: Wine 5.19-staging
 
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
@@ -58,7 +58,7 @@
 GAME_URL="https://en.wikipedia.org/wiki/Genshin_Impact"
 AUTHOR="Dadu042"
 STEAM_ID=""
-GAME_VMS="512"
+GAME_VMS="1024"
 SHORTCUT_FILENAME="launcher.exe"
 SOFTWARE_CATEGORIES="Game;RolePlaying;"
 # http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
@@ -322,7 +322,7 @@
 
 POL_SetupWindow_message "$(eval_gettext 'Installation is finished.')" "$TITLE"
 
-# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
+POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags: fixme-all')" "$TITLE"
              
 # POL_System_TmpDelete
 POL_SetupWindow_Close

Nouveau code source

#!/bin/bash
# Date : (2020-09-29)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits (Linux kernel v5.4.0). GPU: AMD Vega 11.
# Author : Dadu042
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions: Launcher v2.3.3.0 (GenshinImpact_install_20200911204035.exe)
#                           v2.3.4.0 (GenshinImpact_install_20201014173947.exe). Game (login screen): OSRELWin1.0.1_R1135452_S1135452_D1135370.
#
# Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5, DirectX 11.
#
#
# CHANGELOG
# [Dadu042] (2020-09-29 10-00). 
#   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
# [Dadu042] (2020-10-25 10-00). 
#   Update the file installer URL.
#
# KNOWN ISSUES :
#  - Wine amd64 5.19-staging: missing textures (displayed as blue areas).
#
#  Anti-cheat issue:
#  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
#    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/theuser/Temp/   and into the game folder, copied also in uppercase.
#
#    Tried: copying wdfldr.sys (set as Native) and WDFLDR.SYS into '/drive_c/windows/system32/'.
#
#    Immediate Wine 5.0.2 debug log is:
#    0198:fixme:heap:RtlSetHeapInformation 0x570000 0 0x22db80 4 stub
#    0198:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0198:fixme:heap:RtlSetHeapInformation 0x790000 0 0x22f1b0 4 stub
#    019c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    01a2:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    01a2:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0199:fixme:ver:GetCurrentPackageId (0x99fb00 (nil)): stub
#
#    Wine 5.16:
#    0790:fixme:heap:RtlSetHeapInformation 0000000000890000 0 000000000021DFC0 4 stub
#    0790:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0790:fixme:heap:RtlSetHeapInformation 0000000000AB0000 0 000000000021F080 4 stub
#    079c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    07b8:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    07b8:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0794:fixme:ver:GetCurrentPackageId (0000000000CBFBA0 0000000000000000): stub
#
# KNOWN ISSUES (FIXED):
#  - Wine amd64 5.0.2, 5.19: on the account creation screen (if you want to use Facebook nor Twitter), display is bad and the characters typed are not displayed. Fix: Wine 5.19-staging

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

TITLE="Genshin Impact"
PREFIX="Genshin_Impact"
EDITOR="miHoYo"
GAME_URL="https://en.wikipedia.org/wiki/Genshin_Impact"
AUTHOR="Dadu042"
STEAM_ID=""
GAME_VMS="1024"
SHORTCUT_FILENAME="launcher.exe"
SOFTWARE_CATEGORIES="Game;RolePlaying;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE=""


# Starting the script
POL_SetupWindow_Init
                         
# Starting debugging API
POL_Debug_Init
        
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"

############################################
#  Choose architecture: 32 bits or 64 bits #
############################################

# POL_SetupWindow_menu "$(eval_gettext 'What architecture do you want to use ?')" "$TITLE" "$(eval_gettext '64 bits (recommended)')~$(eval_gettext '32 bits')" "~"
 
# if [ "$APP_ANSWER" == "32 bits" ]; then
#        POL_System_SetArch "x86"
# elif [ "$APP_ANSWER" == "$(eval_gettext '64 bits (recommended)')" ]; then
#        POL_System_SetArch "amd64"
# fi

POL_System_SetArch "amd64"

# Download Wine if necessary then create prefix
POL_Wine_PrefixCreate "5.0.2"
# POL_Wine_PrefixCreate

# POL_System_TmpCreate "$PREFIX"
             
Set_OS "win7"

#######################################
#  Hacks                              #
#######################################




#######################################
#  Installing mandatory dependencies  #
#######################################


# POL_Call POL_Install_vcrun2013
# POL_Call POL_Install_d3dx11

# Disable DirectX 11
# POL_Wine_OverrideDLL "" "d3d11"


################
#      GPU     #
################

# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver

# Minimum memory size requiered for the graphic card.
POL_SetupWindow_VMS $GAME_VMS

# Asking about memory size of graphic card
# POL_SetupWindow_menu_list "How much memory does your graphics board have?" "$TITLE" "64-128-256-320-384-512-640-768-896-1024-1536-1792-2048-3072-4096" "-" "256"
# VRAM="$APP_ANSWER"
# POL_Wine_Direct3D "VideoMemorySize" "$VRAM"

# Useful for Nvidia GPUs
# POL_Call POL_Install_physx


#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix


#######################################
#  Main part of this script           #
#######################################
                 
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

# POL_SetupWindow_message "Warning: do not install Punk Buster nor DirectX." "$TITLE"
# POL_SetupWindow_message "Warning: do not install DirectX (nor the icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
# POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'Note: at the end of the first installer (it does installs the downloader program), do not click RUN, instead close the window, then you will run the game from POL/POM.')" "$TITLE"


# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                      
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        POL_SetupWindow_cdrom
                      
        # POL_Call POL_Function_NoCDWarning
               
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
                     
        POL_Wine_WaitExit "$TITLE"
                  
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                     
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo .')" "$TITLE"
        # POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20200911204035.exe"
        POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20201014173947.exe"
           
        mv GenshinImpact_install_20201014173947.exe GameInstaller.exe
        # mv X.rar gameinstaller.rar
        # mv X.zip gameinstaller.zip
           
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
             
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
             
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
         
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "GameInstaller.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
     
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: do NOT install DirectX.')" "$TITLE"
  
        # cd "$WINEPREFIX/drive_c"
        # rm GameInstaller.exe
             
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
             
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
           
        APP_ANSWER=".EXE"
     
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the installation file (.EXE)')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
   
        # POL_SetupWindow_message "Note: please answer NO to all the questions that will appear." "$TITLE"
   
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                 
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"


elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                   
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
      
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
           
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
           
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
            
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
fi
fi

################
# Patch update #
################
 
# POL_SetupWindow_menu "$(eval_gettext 'Do you have a official patch-update to install ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"      
             
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi

#######################################
#  Hacks                              #
#  Editing configuration files        #
#######################################




POL_SetupWindow_message "$(eval_gettext 'Installation is finished.')" "$TITLE"

POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags: fixme-all')" "$TITLE"
             
# POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

Dadu042 Dimanche 25 Octobre 2020 à 11:48
Dadu042

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Differences

@@ -7,7 +7,8 @@
 # Licence : Retail
 # Only For : http://www.playonlinux.com
 #
-# TESTED Editions: Launcher v2.3.3.0
+# TESTED Editions: Launcher v2.3.3.0 (GenshinImpact_install_20200911204035.exe)
+#                           v2.3.4.0 (GenshinImpact_install_20201014173947.exe)
 #
 # Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5.
 #
@@ -15,6 +16,8 @@
 # CHANGELOG
 # [Dadu042] (2020-09-29 10-00). 
 #   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
+# [Dadu042] (2020-10-25 10-00). 
+#   Update the file installer URL.
 #
 # KNOWN ISSUES :
 #
@@ -194,9 +197,10 @@
         cd "$WINEPREFIX/drive_c"
              
         # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo .')" "$TITLE"
-        POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20200911204035.exe"
+        # POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20200911204035.exe"
+        POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20201014173947.exe"
            
-        mv GenshinImpact_install_20200911204035.exe GameInstaller.exe
+        mv GenshinImpact_install_20201014173947.exe GameInstaller.exe
         # mv X.rar gameinstaller.rar
         # mv X.zip gameinstaller.zip
            

Nouveau code source

#!/bin/bash
# Date : (2020-09-29)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits (Linux kernel v5.4.0). GPU: AMD Vega 11.
# Author : Dadu042
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions: Launcher v2.3.3.0 (GenshinImpact_install_20200911204035.exe)
#                           v2.3.4.0 (GenshinImpact_install_20201014173947.exe)
#
# Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5.
#
#
# CHANGELOG
# [Dadu042] (2020-09-29 10-00). 
#   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
# [Dadu042] (2020-10-25 10-00). 
#   Update the file installer URL.
#
# KNOWN ISSUES :
#
#  Anti-cheat issue:
#  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
#    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/theuser/Temp/   and into the game folder, copied also in uppercase.
#
#    Tried: copying wdfldr.sys (set as Native) and WDFLDR.SYS into '/drive_c/windows/system32/'.
#
#    Immediate Wine 5.0.2 debug log is:
#    0198:fixme:heap:RtlSetHeapInformation 0x570000 0 0x22db80 4 stub
#    0198:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0198:fixme:heap:RtlSetHeapInformation 0x790000 0 0x22f1b0 4 stub
#    019c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    01a2:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    01a2:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0199:fixme:ver:GetCurrentPackageId (0x99fb00 (nil)): stub
#
#
#    Wine 5.16:
#    0790:fixme:heap:RtlSetHeapInformation 0000000000890000 0 000000000021DFC0 4 stub
#    0790:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0790:fixme:heap:RtlSetHeapInformation 0000000000AB0000 0 000000000021F080 4 stub
#    079c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    07b8:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    07b8:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0794:fixme:ver:GetCurrentPackageId (0000000000CBFBA0 0000000000000000): stub
#
# KNOWN ISSUES (FIXED):
#  - Wine amd64 5.0.2: X

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

TITLE="Genshin Impact"
PREFIX="Genshin_Impact"
EDITOR="miHoYo"
GAME_URL="https://en.wikipedia.org/wiki/Genshin_Impact"
AUTHOR="Dadu042"
STEAM_ID=""
GAME_VMS="512"
SHORTCUT_FILENAME="launcher.exe"
SOFTWARE_CATEGORIES="Game;RolePlaying;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE=""


# Starting the script
POL_SetupWindow_Init
                         
# Starting debugging API
POL_Debug_Init
        
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"

############################################
#  Choose architecture: 32 bits or 64 bits #
############################################

# POL_SetupWindow_menu "$(eval_gettext 'What architecture do you want to use ?')" "$TITLE" "$(eval_gettext '64 bits (recommended)')~$(eval_gettext '32 bits')" "~"
 
# if [ "$APP_ANSWER" == "32 bits" ]; then
#        POL_System_SetArch "x86"
# elif [ "$APP_ANSWER" == "$(eval_gettext '64 bits (recommended)')" ]; then
#        POL_System_SetArch "amd64"
# fi

POL_System_SetArch "amd64"

# Download Wine if necessary then create prefix
POL_Wine_PrefixCreate "5.0.2"
# POL_Wine_PrefixCreate

# POL_System_TmpCreate "$PREFIX"
             
Set_OS "win7"

#######################################
#  Hacks                              #
#######################################




#######################################
#  Installing mandatory dependencies  #
#######################################


# POL_Call POL_Install_vcrun2013
# POL_Call POL_Install_d3dx11

# Disable DirectX 11
# POL_Wine_OverrideDLL "" "d3d11"


################
#      GPU     #
################

# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver

# Minimum memory size requiered for the graphic card.
POL_SetupWindow_VMS $GAME_VMS

# Asking about memory size of graphic card
# POL_SetupWindow_menu_list "How much memory does your graphics board have?" "$TITLE" "64-128-256-320-384-512-640-768-896-1024-1536-1792-2048-3072-4096" "-" "256"
# VRAM="$APP_ANSWER"
# POL_Wine_Direct3D "VideoMemorySize" "$VRAM"

# Useful for Nvidia GPUs
# POL_Call POL_Install_physx


#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix


#######################################
#  Main part of this script           #
#######################################
                 
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

# POL_SetupWindow_message "Warning: do not install Punk Buster nor DirectX." "$TITLE"
# POL_SetupWindow_message "Warning: do not install DirectX (nor the icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
# POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'Note: at the end of the first installer (it does installs the downloader program), do not click RUN, instead close the window, then you will run the game from POL/POM.')" "$TITLE"


# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                      
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        POL_SetupWindow_cdrom
                      
        # POL_Call POL_Function_NoCDWarning
               
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
                     
        POL_Wine_WaitExit "$TITLE"
                  
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                     
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo .')" "$TITLE"
        # POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20200911204035.exe"
        POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20201014173947.exe"
           
        mv GenshinImpact_install_20201014173947.exe GameInstaller.exe
        # mv X.rar gameinstaller.rar
        # mv X.zip gameinstaller.zip
           
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
             
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
             
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
         
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "GameInstaller.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
     
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: do NOT install DirectX.')" "$TITLE"
  
        # cd "$WINEPREFIX/drive_c"
        # rm GameInstaller.exe
             
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
             
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
           
        APP_ANSWER=".EXE"
     
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the installation file (.EXE)')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
   
        # POL_SetupWindow_message "Note: please answer NO to all the questions that will appear." "$TITLE"
   
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                 
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"


elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                   
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
      
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
           
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
           
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
            
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
fi
fi

################
# Patch update #
################
 
# POL_SetupWindow_menu "$(eval_gettext 'Do you have a official patch-update to install ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"      
             
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi

#######################################
#  Hacks                              #
#  Editing configuration files        #
#######################################




POL_SetupWindow_message "$(eval_gettext 'Installation is finished.')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
             
# POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

Krock Samedi 10 Octobre 2020 à 19:37
Krock Anonymous

Messages

GAME PATCH FOR 1.1.0 AND NEWER: https://notabug.org/Krock/dawn
 
This is a guide to patch *.sys service/driver registrations which are not and will not be supported by Wine.
 
Used components:
  • Ghidra decompiler
  • Game version 1.0.0
  • UnityPlayer.dll, date: 2020-08-28, sha1: f63edd1b76ca6c9a4f409fcb7c62b58561ee7fae
(outdated patch)
 
This results in the game running smoothly for 15 to 20 seconds until:
wine: Unhandled page fault on read access to 000000000000003C at address 0000000181CA196A (thread 00e0), starting debugger...

Réponses

Dimanche 11 Octobre 2020 à 11:00
This is the right place, thanks for your hack.
Anonymous
Dimanche 11 Octobre 2020 à 19:33
Step 2 (OUTDATED)

wine: Unhandled page fault on read access to 000000000000003C at address 0000000181CA196A (thread 00e0), starting debugger...

I do neither know what this function does nor where it is used (no references found), but this crash is caused by dereferencing an invalid pointer.

Replace MOV with XOR and NOP (last 3 bytes)

@ modification (0x31) at offset 0x1BD5D6A, address 181ca196a (unknown function)
< e9 6c 2f f2 ff 4c 8b 1f 66 41 0b c1 41 8B 1B
> e9 6c 2f f2 ff 4c 8b 1f 66 41 0b c1 31 db 90

You now can register and download the "Presistent" content. After that, it will freeze the game at 19.74% while loading the game data. Remove the "Persistent" directory from the game to unfreeze.
Anonymous
Mardi 20 Octobre 2020 à 21:17
Small update:
You might not experience any freeze on your system or when using an older Wine version. Howeverif you do - try the command line argument "-nolog" which seems to avoid some sort of race condition.

On success you will end up with the error code 31-4302 which seems to be caused by a failing server-client verification. I'll dig into this using Wireshark when I have some more free time.
Mercredi 21 Octobre 2020 à 14:51
I tested it on Windows an it shows the same error code 31-4302. I also tested it on Linux Mint, same result.
Anonymous
Vendredi 23 Octobre 2020 à 11:38
I seem to have gotten it to work with game version 1.0.1, wine-tkg 5.19.r1.gb49e8743-300 (https://github.com/Frogging-Family/wine-tkg-git), and the following patches to the UnityPlayer.dll:
Offset               Old                    New
0148BDD0       40                     C3
0148C420        40 55                C3 F5
01B30933        8B 28                31 ED
I only played for about 15 minutes so far, but during that time it ran without any problems.
Update: Played for about 2 hours and still no problems, looks good!
Anonymous
Vendredi 23 Octobre 2020 à 21:39
@timbuntu You absolute mad lad We did it!

Version 1.0.1 is working here on plain Wine 5.19. Let's hope it'll stay like that.

By the way, what's near 01B30934? How did you get to this address? I'm very curious.
Samedi 24 Octobre 2020 à 0:56
Can someone make a 'sed' command line in order to automate the changes ?, so I will add it in the script.
Anonymous
Samedi 24 Octobre 2020 à 1:38
Archlinux - linux-zen-vfio - nvidia-dkms - Wine 5.19

I was able to make the first set of changes from @Krock and the last set from @timbuntu, the game launches and plays, but ZFGameBrowser.exe encounters an error once the game loads, the mouse and keyboard stop working after the window loses focus, and the ground is invisible, I was unable to find the second set of changes, it's not quite clear which are still needed for v1.0.1.
Anonymous
Samedi 24 Octobre 2020 à 3:17
I did the Changes from timbuntu, the game launches, with wine 5.19 got the error ZFGameBrowser.exe fixed switing to wine 5.19-stagging, in order the mouse and keyboard font loses focus in winecfg -> graphics -> capture mouse on full screen fixed, but the gound is invislbe, its like not loading the resources of the ground? hhahaha i dont know :D i want to play so bad this game :), any news or how to fix this?
Anonymous
Samedi 24 Octobre 2020 à 3:33
Thank you for those fixes, that fixed ZFGameBrowser and enabling virtual windows fixed the mouse/keyboard.

It seems the ground issue I was talking about might be shaders not texture https://i.imgur.com/QOd7mmG.png
Anonymous
Samedi 24 Octobre 2020 à 3:51
i can provide how is looking in my pc https://www.darkzaion.com/genshin.jpg and the https://www.darkzaion.com/UnityPlayer.dll im using following @timbuntu changes, hope some one can figure it out how to solve this :D, thank you <3
Anonymous
Samedi 24 Octobre 2020 à 4:01
@Krock Yeess, we did! And that offset was where I was getting the Unhandled page fault with game version 1.0.1, iirc there was a "MOV EBP,dword ptr [RAX]" that I replaced with an "XOR EBP,EBP". What did you XOR when replacing the MOV in game version 1.0.0?
Anonymous
Samedi 24 Octobre 2020 à 4:08
@Dadu042 I fear it probably can't be done with sed, I could provide a bsdiff patch file, but then the systems need to have bspatch installed to apply it. I sadly don't really know a more portable way right now. An ugly way I could imagine would maybe be with dd, but if someone has a better idea that would be great.
Anonymous
Samedi 24 Octobre 2020 à 4:14
@ShayBox Don't apply both sets of changes, only apply the changes from my comment. The changes from Krock were for version 1.0.0
Anonymous
Samedi 24 Octobre 2020 à 4:19
@timbuntu I reapplied your changes from a fresh file, the world is still missing textures
Anonymous
Samedi 24 Octobre 2020 à 4:20
@ShayBox @DarkZaioN Sadly I don't really know how to fix that since the problem didn't occur for me. I'm using dxvk, are you using a clean wine prefix, did you install anything directx related, are you also using dxvk? Maybe it has something to do with that.
Anonymous
Samedi 24 Octobre 2020 à 4:21
I'm using the playonlinux beta script as the base.

I switched to the lutris script and enabled dxvk, esync, and fsync, and it fixed the problem!
Anonymous
Samedi 24 Octobre 2020 à 4:44
Nice! That's great to hear!
Anonymous
Samedi 24 Octobre 2020 à 10:56
@timbuntu So we did exactly the same, just on different versions. Interesting that the Access Violation error occurred in another location after the 1.0.1 update. I replaced "MOV EBX,dword ptr [R11]" with "XOR EBX,EBX", plus a NOP to fill the 1 byte gap.
Anonymous
Samedi 24 Octobre 2020 à 12:10
Then we really did exactly the same! With the only difference being the game version, I really hope that it will still work with the next versions then.
Anonymous
Samedi 24 Octobre 2020 à 13:38
Ok, so! I redid everything starting from the current playonlinux script:

 

1. Install the game with the current playonlinux script.

2. Change the wine version to 5.19-staging. (Plain 5.19 didn't work for me)

3. Install dxvk

4. Start the game/launcher and let it download the game files.

5. Go to the downloaded game files at "~/PlayOnLinux\'s\ virtual\ drives/Genshin_Impact/drive_c/Program Files/Genshin Impact/Genshin Impact Game"  and execute the following script to patch the UnityPlayer.dll:

#! /bin/bash

dd if=<(echo -ne "\xc3") of=UnityPlayer.dll bs=1 seek=$((0x0148BDD0)) conv=notrunc
dd if=<(echo -ne "\xc3\xf5") of=UnityPlayer.dll bs=1 seek=$((0x0148C420)) conv=notrunc
dd if=<(echo -ne "\x31\xed") of=UnityPlayer.dll bs=1 seek=$((0x01B30933)) conv=notrunc

6. Run the game/launcher again, hit Launch, and it should work!
Anonymous
Samedi 24 Octobre 2020 à 22:24
I played for 8 hours yesterday, no issues, still working today, thanks for getting the game to work guys.
Anonymous
Dimanche 25 Octobre 2020 à 0:37
well, i have trouble to install dxkv on opensuse, after hours trying the game dont start after dxkv instalation fuckkk.... need som help :(
Anonymous
Dimanche 25 Octobre 2020 à 1:39
Do you have the vulkan drivers installed on your system? For dxvk to work you have to have them installed, so if it doesn't start anymore after dxvk installation but did so before, then maybe that might be the problem?
Anonymous
Dimanche 25 Octobre 2020 à 10:45
I have installed the game with lutris, it's working as a charm. Many thanks guys, you have done an amazing job!
Dimanche 25 Octobre 2020 à 12:22
I made a patch (to use after the game) that does automate the job. https://www.playonlinux.com/en/app-4251.html
Anonymous
Dimanche 25 Octobre 2020 à 15:00
Nice, thank you!
Anonymous
Dimanche 25 Octobre 2020 à 18:22
keyboard is not working
Anonymous
Dimanche 25 Octobre 2020 à 19:11
Maybe try what DarkZaioN wrote above: In playonlinux click on Genshin Impact, click configure, go to the "Wine" tab, click "Configure Wine", go to the "Graphics" tab, and check "Automatically capture the mouse in full-screen windows"
Dimanche 25 Octobre 2020 à 20:25
Keyboard is OK on Linux, until doing a ALT+TAB (this freeze the game screen).
Anonymous
Dimanche 25 Octobre 2020 à 22:24
it is not working but i'm using wine lutris 5.7-11 and looks like it's working now, but still poor performance. i will try playonlinux
Anonymous
Mercredi 28 Octobre 2020 à 14:37
After playing for days with no issues, I have stated getting error 31-4302 when trying to launch the game.
Anonymous
Mercredi 28 Octobre 2020 à 15:13
offset code that is already here, seems to be spread quickly to various forums. so that the unityplayer.dll offset of @timbuntu is already patched now
Anonymous
Mercredi 28 Octobre 2020 à 16:01
I don't think a patch has been released though. And the game does start. Maybe I have just been banned or a check has been put in place?
Anonymous
Mercredi 28 Octobre 2020 à 16:28
Yeah, there was no patch, the UnityPlayer.dll is still unchanged, the only thing that I think changed is the "Persistent Content" that gets downloaded when the game starts.
Didn't really look into it yet though, so I'm not sure. The only thing I can say is that the UnityPlayer.dll didn't get patched.
Anonymous
Mercredi 28 Octobre 2020 à 16:40
after re-installing/re-patching game changing wine version doesn't help too
Anonymous
Mercredi 28 Octobre 2020 à 17:55
Seems like even some windows users are getting the issue since today. That gives me some hope
Anonymous
Mercredi 28 Octobre 2020 à 17:55
To fix ALT+TAB: open wine registry and put in HKEY_CURRENT_USER\Software\Wine\X11 Driver

UseTakeFocus REG_SZ with value N

After that even Virtual Desktop mode is not needed. But you can't run it until 31-4302 error.
Anonymous
Mercredi 28 Octobre 2020 à 18:17
So that's the files that changed since it was working as far as I can see:
https://pastebin.com/b702AHyr
Anonymous
Samedi 31 Octobre 2020 à 23:08
@timbuntu Do you still have the old Persistent contents? It would be interesting to see what happens when the old "AssetBundles" and "VideoAssets" contents are kept, together with the new timestamp files.
Anonymous
Dimanche 1 Novembre 2020 à 8:22
@Krock if it helps I have old copy of game
Anonymous
Dimanche 1 Novembre 2020 à 22:20
There's yet again not a single word from MiHoYo about Linux support or the recent workaround, even though they patched the gap real quick. But I'd like to play the game, so let's continue this hunt.
Anonymous
Mardi 3 Novembre 2020 à 6:21
@Krock in this case 31-4302 happened because mhyprot2 service is not running when you applied the offset patch

I can confirm because i'm using windows
Anonymous
Mardi 3 Novembre 2020 à 18:11
@tortellio There's only one mention of mhyprot2, and that's in UnityPlayer.dll. My guess was that 4302 is arised by some sort of file checksum that is verified on server-side, hence the Wireshark request.

The data flow of this verification is yet not clear. I'll try digging further into the ASM code, but neither winedbg nor gdb work due to the anti-debug mechanisms...

UPDATE about the Wireshark logs. No idea how to obtain the private keys for this temporary connection, so I'm checking for package differences. Both clients begin loading game data from UDP after clicking the gate.
Anonymous
Mercredi 4 Novembre 2020 à 4:00
Sorry im new so you guy look another bypass? Am i right?
Anonymous
Mercredi 4 Novembre 2020 à 6:12
@Krock I don't think it's about file hash checks, because i applied the patches directly in-memory (in the running process) and even got around the checks directly in x64dbg with the help of breakpoints and scripts.

So either it's a memory hash, or has directly something to do with the mhyprot2 service not running. I'm currently going through a log of my WinAPI monitor of GI from loading until in-game but that's millions of log entries... already found some interesting AC related stuff, tho.

Oh and btw: If you want to debug GI, it uses the somewhat usual VMProtect Anti-Debug tricks. I only needed to apply the following anti-anti-debug methods to get it running in x64dbg:

Standard PEB check (IsDebuggerPresent() etc)
gs:[60]+2 = 0
gs:[60]+bc = 0

Other stuff like checkremotedebugger etc: just set the parameters (rdx/rcx) to zero when it breaks and it returns the "correct" result:
NtQueryInformationProcess  (rdx==0x7 || rdx == 0x1e)
NtClose ( rcx == 0xDEADCODE)
NtSetInformationThread (rdx==0x11)

You still need to patch out the AC driver of course, or it will immediately close the game and debugger when it's loaded. 

good luck!
Anonymous
Jeudi 5 Novembre 2020 à 17:12
Thank you 0x90. I'll try that on a fresh Windows installation.
Anonymous
Dimanche 8 Novembre 2020 à 10:54
<outdated>
Anonymous
Vendredi 20 Novembre 2020 à 1:15
For those that needs the new patches:

0x014CDDB0 -> C3 90
0x01CA75C3 -> 31 D2
 

It only has changed to edx register instead of ebx.
Anonymous
Jeudi 17 Décembre 2020 à 23:40
PATCH STATUS UPDATES (see first post for project link)
2020-12-17: v1.1.0 is playable
2020-12-23: v1.2.0 is playable
2020-12-25: v1.2.0 fixed newly introducted crash
2021-02-05: v1.3.0 is playable and tested
2021-02-10: v1.3.2 is playable
(... see git history ...)

Edité par Krock

littlelycan Lundi 5 Octobre 2020 à 17:13
littlelycan Anonymous

Messages

can anyone please comment on this to confirm if this script works. Please specify which distro your using. Mint user here and wanted to make sure first if it works rather than wasting my time. Thank you in advance.

Réponses

Mardi 6 Octobre 2020 à 15:32
The script does no work because of the anti-cheat, this is in the description of the script at the top of the page.
Dadu042 Jeudi 1 Octobre 2020 à 17:27
Dadu042

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Differences

@@ -14,18 +14,22 @@
 #
 # CHANGELOG
 # [Dadu042] (2020-09-29 10-00). 
-#   Initial script.
+#   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
 #
 # KNOWN ISSUES :
-#  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update.
-#    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/walter/Temp/   and into the game folder, copied also in uppercase.
+#
+#  Anti-cheat issue:
+#  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
+#    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/theuser/Temp/   and into the game folder, copied also in uppercase.
+#
+#    Tried: copying wdfldr.sys (set as Native) and WDFLDR.SYS into '/drive_c/windows/system32/'.
 #
 #    Immediate Wine 5.0.2 debug log is:
 #    0198:fixme:heap:RtlSetHeapInformation 0x570000 0 0x22db80 4 stub
 #    0198:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
 #    0198:fixme:heap:RtlSetHeapInformation 0x790000 0 0x22f1b0 4 stub
 #    019c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
-#    01a2:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\walter\\Temp\\mhyprot2.sys") not found
+#    01a2:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
 #    01a2:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
 #    0199:fixme:ver:GetCurrentPackageId (0x99fb00 (nil)): stub
 #
@@ -35,7 +39,7 @@
 #    0790:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
 #    0790:fixme:heap:RtlSetHeapInformation 0000000000AB0000 0 000000000021F080 4 stub
 #    079c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
-#    07b8:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\walter\\Temp\\mhyprot2.sys") not found
+#    07b8:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
 #    07b8:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
 #    0794:fixme:ver:GetCurrentPackageId (0000000000CBFBA0 0000000000000000): stub
 #

Nouveau code source

#!/bin/bash
# Date : (2020-09-29)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits (Linux kernel v5.4.0). GPU: AMD Vega 11.
# Author : Dadu042
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions: Launcher v2.3.3.0
#
# Middlewares used by this software : Unity 2017, vcrun2013, vcrun2015, QT5.
#
#
# CHANGELOG
# [Dadu042] (2020-09-29 10-00). 
#   Initial script. Game fail to run because of the anti cheat software (mhyprot2.sys), that want admin rights.
#
# KNOWN ISSUES :
#
#  Anti-cheat issue:
#  - Wine amd64 4.21, 5.0.2, 5.11-staging, 5.16, 5.18-staging: when clicking 'Play' (yellow button) the window just does reduce in the task bar. Tried: set OS to Win7/8/10. Enable game auto update, wininet.
#    Download file from: http://www.dll-found.com/wdfldr.sys_download.html  copy to  /home/YourUserName/PlayOnLinux's virtual drives/Genshin_Impact/drive_c/users/theuser/Temp/   and into the game folder, copied also in uppercase.
#
#    Tried: copying wdfldr.sys (set as Native) and WDFLDR.SYS into '/drive_c/windows/system32/'.
#
#    Immediate Wine 5.0.2 debug log is:
#    0198:fixme:heap:RtlSetHeapInformation 0x570000 0 0x22db80 4 stub
#    0198:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0198:fixme:heap:RtlSetHeapInformation 0x790000 0 0x22f1b0 4 stub
#    019c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    01a2:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    01a2:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0199:fixme:ver:GetCurrentPackageId (0x99fb00 (nil)): stub
#
#
#    Wine 5.16:
#    0790:fixme:heap:RtlSetHeapInformation 0000000000890000 0 000000000021DFC0 4 stub
#    0790:fixme:heap:EnumSystemFirmwareTables (0x4649524d, 0000000000000000, 0)
#    0790:fixme:heap:RtlSetHeapInformation 0000000000AB0000 0 000000000021F080 4 stub
#    079c:err:service:validate_context_handle Access denied - handle created with access 34, needed 10000
#    07b8:err:module:import_dll Library WDFLDR.SYS (which is needed by L"C:\\users\\theuser\\Temp\\mhyprot2.sys") not found
#    07b8:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\mhyprot2": c0000142
#    0794:fixme:ver:GetCurrentPackageId (0000000000CBFBA0 0000000000000000): stub
#
# KNOWN ISSUES (FIXED):
#  - Wine amd64 5.0.2: X

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

TITLE="Genshin Impact"
PREFIX="Genshin_Impact"
EDITOR="miHoYo"
GAME_URL="https://en.wikipedia.org/wiki/Genshin_Impact"
AUTHOR="Dadu042"
STEAM_ID=""
GAME_VMS="512"
SHORTCUT_FILENAME="launcher.exe"
SOFTWARE_CATEGORIES="Game;RolePlaying;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE=""


# Starting the script
POL_SetupWindow_Init
                         
# Starting debugging API
POL_Debug_Init
        
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.3.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"

############################################
#  Choose architecture: 32 bits or 64 bits #
############################################

# POL_SetupWindow_menu "$(eval_gettext 'What architecture do you want to use ?')" "$TITLE" "$(eval_gettext '64 bits (recommended)')~$(eval_gettext '32 bits')" "~"
 
# if [ "$APP_ANSWER" == "32 bits" ]; then
#        POL_System_SetArch "x86"
# elif [ "$APP_ANSWER" == "$(eval_gettext '64 bits (recommended)')" ]; then
#        POL_System_SetArch "amd64"
# fi

POL_System_SetArch "amd64"

# Download Wine if necessary then create prefix
POL_Wine_PrefixCreate "5.0.2"
# POL_Wine_PrefixCreate

# POL_System_TmpCreate "$PREFIX"
             
Set_OS "win7"

#######################################
#  Hacks                              #
#######################################




#######################################
#  Installing mandatory dependencies  #
#######################################


# POL_Call POL_Install_vcrun2013
# POL_Call POL_Install_d3dx11

# Disable DirectX 11
# POL_Wine_OverrideDLL "" "d3d11"


################
#      GPU     #
################

# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver

# Minimum memory size requiered for the graphic card.
POL_SetupWindow_VMS $GAME_VMS

# Asking about memory size of graphic card
# POL_SetupWindow_menu_list "How much memory does your graphics board have?" "$TITLE" "64-128-256-320-384-512-640-768-896-1024-1536-1792-2048-3072-4096" "-" "256"
# VRAM="$APP_ANSWER"
# POL_Wine_Direct3D "VideoMemorySize" "$VRAM"

# Useful for Nvidia GPUs
# POL_Call POL_Install_physx


#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix


#######################################
#  Main part of this script           #
#######################################
                 
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

# POL_SetupWindow_message "Warning: do not install Punk Buster nor DirectX." "$TITLE"
# POL_SetupWindow_message "Warning: do not install DirectX (nor the icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
# POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'Note: at the end of the first installer (it does installs the downloader program), do not click RUN, instead close the window, then you will run the game from POL/POM.')" "$TITLE"


# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        # Mandatory pre-install fix for steam
        POL_Call POL_Install_steam_flags "$STEAM_ID"
        # Shortcut done before install for steam version
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                      
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        POL_SetupWindow_cdrom
                      
        # POL_Call POL_Function_NoCDWarning
               
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
                     
        POL_Wine_WaitExit "$TITLE"
                  
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                     
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the demo .')" "$TITLE"
        POL_Download "https://genshinimpact.mihoyo.com/client_app/launcher/GenshinImpact_install_20200911204035.exe"
           
        mv GenshinImpact_install_20200911204035.exe GameInstaller.exe
        # mv X.rar gameinstaller.rar
        # mv X.zip gameinstaller.zip
           
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        # POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
             
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
             
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
         
        cd  "$WINEPREFIX/drive_c/game/"
        POL_Wine "GameInstaller.exe" # "/SILENT"
        POL_Wine_WaitBefore "$TITLE"
     
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: do NOT install DirectX.')" "$TITLE"
  
        # cd "$WINEPREFIX/drive_c"
        # rm GameInstaller.exe
             
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
             
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
           
        APP_ANSWER=".EXE"
     
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the installation file (.EXE)')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
   
        # POL_SetupWindow_message "Note: please answer NO to all the questions that will appear." "$TITLE"
   
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                 
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
  
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"


elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
                   
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                   
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
      
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
             
        # POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
           
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
             
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
           
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
            
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
fi
fi

################
# Patch update #
################
 
# POL_SetupWindow_menu "$(eval_gettext 'Do you have a official patch-update to install ?')" "$TITLE" "$(eval_gettext 'No')~$(eval_gettext 'Yes')" "~"      
             
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi

#######################################
#  Hacks                              #
#  Editing configuration files        #
#######################################




POL_SetupWindow_message "$(eval_gettext 'Installation is finished.')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
             
# POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

Anonymous
Samedi 3 Octobre 2020 à 23:05
Hello, i'm new in this platform. How do you use the button "Try this update" in PlayOnLinux. I use this in Ubuntu version.
Anonymous
Lundi 12 Octobre 2020 à 10:44
Can anyone explain to me how can I use this new script? I already have the game installed via PoL.
Anonymous
Lundi 12 Octobre 2020 à 22:10
<outdated>

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com