20-08-2019, 20:42
0
Mam sobie prefix wine dla jednej gry ( Aven Colony ). Nie jest to mój prefix, tylko dostałem go od kogoś, bo mi coś za bardzo nie szło uruchomienie tej gry.
Jest on całkiem ciekawie zrobiony, więc postanowiłem go rozszerzyć na inne gry które nie do końca mi działają. I mam jakiś dziwny problem. Skrypt który uruchamia grę przebudowałem tak aby uruchamiał grę Foundation, ale po uruchomieniu skryptu zupełnie nic się nie dzieje, nawet nie ma komunikatu błędu. Siedzę już chwilę przy tym skrypcie i pomysłów mi zabrakło.
To jest kawałek odpowiedzialny za "ostateczne" uruchomienie gry przez wine:
Po uruchomieniu skryptu pojawia się tylko:
Jeśli zamienię linijkę:
na
to jak najbardziej prawidłowo wyświetla wersję wine.
Gdzie jest problem?
Jak co, to tu jest pełny skrypt:
Jest on całkiem ciekawie zrobiony, więc postanowiłem go rozszerzyć na inne gry które nie do końca mi działają. I mam jakiś dziwny problem. Skrypt który uruchamia grę przebudowałem tak aby uruchamiał grę Foundation, ale po uruchomieniu skryptu zupełnie nic się nie dzieje, nawet nie ma komunikatu błędu. Siedzę już chwilę przy tym skrypcie i pomysłów mi zabrakło.
To jest kawałek odpowiedzialny za "ostateczne" uruchomienie gry przez wine:
Kod:
# Start the game
#################
#cd "$GAME_FOLDER"
cd /home/feran/grywine/foundationdx11/game/prefix/drive_c/game
"$REGEDIT" dxvk-on
cd /home/feran/grywine/foundationdx11/game/prefix/drive_c/game/Foundation/
echo "19"
#if [ "$WINDOWED" == "yes" ] || [ "$1" == "-sw" ]
#then "$WINE" explorer /desktop=Game,$RESOLUTION "$EXE"
#else "$WINE" "$EXE"
#echo $WINE
#echo $EXE
/home/feran/grywine/foundationdx11/game/wine/bin/wine /home/feran/grywine/foundationdx11/game/prefix/drive_c/game/Foundation/foundation.exe
echo "20"
Po uruchomieniu skryptu pojawia się tylko:
Kod:
wine-4.1 (Staging Esync)
##################
game: Aven Colony
version: 1.0.23669
##################
home: /home/feran/grywine/foundationdx11/game/home
18
19
20
Jeśli zamienię linijkę:
Kod:
/home/feran/grywine/foundationdx11/game/wine/bin/wine /home/feran/grywine/foundationdx11/game/prefix/drive_c/game/Foundation/foundation.exe
na
Kod:
/home/feran/grywine/foundationdx11/game/wine/bin/wine --version
to jak najbardziej prawidłowo wyświetla wersję wine.
Gdzie jest problem?
Jak co, to tu jest pełny skrypt:
Kod:
#!/bin/bash
### Wine standalone script
### Created by Kron
### Latest version - https://yadi.sk/d/IrofgqFSqHsPu
# Forbid root rights
if [ ! "$ROOT" ] && [ "$EUID" == "0" ]
then
echo -e "\e[91m"
echo "#####################################################################"
echo "Don't use the sudo command or the root user to execute these scripts!"
echo "Не стартирайте този скрипт с командата sudo или от потребителя root!"
echo "#####################################################################"
exit
fi
chmod -R 0700 ./{game,desktop,winetools,fps,desktop-fps}
echo "1"
## Variables
ulimit -n 1048576
export PBA_DISABLE=1
export WINEESYNC=1
echo "2"
# User
export USER="$(id -u -n)"
echo "3"
# Directory
export SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
export DIR="$(dirname "$SCRIPT")"
export RHOME="$HOME"
export HOME="$DIR/game/home"
echo "4"
# Wine binaries
export USESYSWINE="no"
export WINETRICKS="$DIR/game/wine/winetricks"
echo "5"
if [ "$USESYSWINE" == "yes" ]
then if [ -f "$DIR/syswine" ]
then source "$DIR/syswine"
fi
if [ ! -f "$WINE" ]
then if [ -f "/usr/bin/wine" ]
then export WINE="/usr/bin/wine"
export REGEDIT="/usr/bin/regedit"
elif [ -f "/usr/bin/wine-development" ]
then export WINE="/usr/bin/wine-development"
export REGEDIT="/usr/bin/regedit-development"
elif [ -f "/usr/local/bin/wine" ]
then export WINE="/usr/local/bin/wine"
export REGEDIT="/usr/local/bin/regedit"
fi
if [ "$WINE" ]
then rm -f "$DIR/syswine"
echo "export WINE='$WINE'" >> "$DIR/syswine"
echo "export REGEDIT='$REGEDIT'" >> "$DIR/syswine"
fi
fi
elif [ -f "$DIR/syswine" ]
then rm "$DIR/syswine"
fi
echo "6"
if [ ! "$WINE" ]
then export WINE="$DIR/game/wine/bin/wine"
export REGEDIT="$DIR/game/wine/bin/regedit"
fi
echo "7"
# Wine
export WINEPREFIX="$DIR/game/prefix"
#######################
export WINEDEBUG="-all"
#######################
export WINE_VERSION="$("$WINE" --version)"
export WINEDLLOVERRIDES="mscoree,mshtml="
export UPDATEPREFIX="yes"
echo "8"
# Game
############################
export GAME_NAME="Aven Colony"
export GAME_VERSION="1.0.23669"
export EXE="foundation.exe"
export GAME_FOLDER="$WINEPREFIX/drive_c/game/"
#############################################
# Screen
####################
export WINDOWED="no"
export RESOLUTION="1366x768"
export FIXRES="no"
##################
# Sound
####################
export USEALSA="yes"
####################
# Cores
export CORES="$(getconf _NPROCESSORS_ONLN)"
echo "9"
## Actions
# Exit if the files do not exist
if [ ! -f "$WINE" ] || [ ! -f "$WINETRICKS" ] || [ ! -d "$GAME_FOLDER" ]
then clear
echo "Липсват файлове:"
echo
if [ ! -f "$WINE" ]
then echo "$WINE"
fi
if [ ! -f "$WINETRICKS" ]
then echo "$WINETRICKS"
fi
if [ ! -d "$GAME_FOLDER" ]
then echo "$GAME_FOLDER"
fi
exit
fi
echo "10"
# Create a home directory
if [ "$HOME" == "$DIR/game/home" ] && [ ! -d "$HOME" ]
then mkdir "$HOME"
fi
echo "11"
# Copy pulse config
if [ "$HOME" == "$DIR/game/home" ]
then if [ ! -d "$HOME/.config" ]
then mkdir -p "$HOME/.config"
fi
if [ ! -d "$HOME/.config/pulse" ]
then cp -R "$RHOME/.config/pulse" "$HOME/.config"
fi
fi
echo "12"
# Update prefix
if [ "$UPDATEPREFIX" == "yes" ]
then if [ ! -d "$WINEPREFIX/drive_c/users/$USER" ]
then "$DIR/game/wine/bin/wineboot" -u
# Disable Components
"$WINETRICKS" winegstreamer=disabled
"$WINETRICKS" nvapi64=disabled
"$WINETRICKS" nvapi=disabled
#"$WINETRICKS" d3d10=disabled d3d10_1=disabled d3d10core=disabled d3d11=disabled
fi
fi
echo "13"
# Turn sound
if [ "$USEALSA" == "yes" ] && [ ! -f "$DIR/game/alsa" ]
then "$WINETRICKS" sound=alsa
echo > "$DIR/game/alsa"
rm -f "$DIR/game/pulse"
elif [ "$USEALSA" == "no" ] && [ ! -f "$DIR/game/pulse" ]
then "$WINETRICKS" sound=pulse
echo > "$DIR/game/pulse"
rm -f "$DIR/game/alsa"
fi
echo "14"
cp -R "$DIR/game/prefix/drive_c/game/AvenColony/Binaries/dxvk/x64/." "$DIR/game/prefix/drive_c/windows/system32/"
echo "15"
cp -R "$DIR/game/prefix/drive_c/game/AvenColony/Binaries/dxvk/x86/." "$DIR/game/prefix/drive_c/windows/syswow64/"
echo "16"
# Get native screen resolution
if [ "$FIXRES" == "yes" ]
then if [ "$WINDOWED" == "no" ] && [ ! "$1" == "-sw" ] && [ -f "/usr/bin/xrandr" ]
then export RESOLUTION="$(xrandr -q | awk -F'current' -F',' 'NR==1 {gsub("( |current)","");print $2}')"
else export FIXRES="no"
fi
fi
echo "17"
# Info output
clear
echo "$WINE_VERSION"
echo "##################"
echo "game: $GAME_NAME"
echo "version: $GAME_VERSION"
echo "##################"
echo "home: $HOME"
echo
echo "18"
# Start the game
#################
#cd "$GAME_FOLDER"
cd /home/feran/grywine/foundationdx11/game/prefix/drive_c/game
"$REGEDIT" dxvk-on
cd /home/feran/grywine/foundationdx11/game/prefix/drive_c/game/Foundation/
echo "19"
#if [ "$WINDOWED" == "yes" ] || [ "$1" == "-sw" ]
#then "$WINE" explorer /desktop=Game,$RESOLUTION "$EXE"
#else "$WINE" "$EXE"
/home/feran/grywine/foundationdx11/game/wine/bin/wine /home/feran/grywine/foundationdx11/game/prefix/drive_c/game/Foundation/foundation.exe
#echo $WINE
#echo $EXE
## Performance Threaded Dispatch
# NVIDIA
#else __GL_THREADED_OPTIMIZATIONS=1 "$WINE" "$EXE"
# Intel
#else mesa_glthread=true "$WINE" "$EXE"
#fi
#######################################
echo "20"
# Restore screen resolution
if [ "$FIXRES" == "yes" ]
then "/usr/bin/xrandr" -s "$RESOLUTION"
fi
### Wine standalone script
### Created by Kron
### Latest version - https://yadi.sk/d/IrofgqFSqHsPu
# Forbid root rights
if [ ! "$ROOT" ] && [ "$EUID" == "0" ]
then
echo -e "\e[91m"
echo "#####################################################################"
echo "Don't use the sudo command or the root user to execute these scripts!"
echo "Не стартирайте този скрипт с командата sudo или от потребителя root!"
echo "#####################################################################"
exit
fi
chmod -R 0700 ./{game,desktop,winetools,fps,desktop-fps}
echo "1"
## Variables
ulimit -n 1048576
export PBA_DISABLE=1
export WINEESYNC=1
echo "2"
# User
export USER="$(id -u -n)"
echo "3"
# Directory
export SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
export DIR="$(dirname "$SCRIPT")"
export RHOME="$HOME"
export HOME="$DIR/game/home"
echo "4"
# Wine binaries
export USESYSWINE="no"
export WINETRICKS="$DIR/game/wine/winetricks"
echo "5"
if [ "$USESYSWINE" == "yes" ]
then if [ -f "$DIR/syswine" ]
then source "$DIR/syswine"
fi
if [ ! -f "$WINE" ]
then if [ -f "/usr/bin/wine" ]
then export WINE="/usr/bin/wine"
export REGEDIT="/usr/bin/regedit"
elif [ -f "/usr/bin/wine-development" ]
then export WINE="/usr/bin/wine-development"
export REGEDIT="/usr/bin/regedit-development"
elif [ -f "/usr/local/bin/wine" ]
then export WINE="/usr/local/bin/wine"
export REGEDIT="/usr/local/bin/regedit"
fi
if [ "$WINE" ]
then rm -f "$DIR/syswine"
echo "export WINE='$WINE'" >> "$DIR/syswine"
echo "export REGEDIT='$REGEDIT'" >> "$DIR/syswine"
fi
fi
elif [ -f "$DIR/syswine" ]
then rm "$DIR/syswine"
fi
echo "6"
if [ ! "$WINE" ]
then export WINE="$DIR/game/wine/bin/wine"
export REGEDIT="$DIR/game/wine/bin/regedit"
fi
echo "7"
# Wine
export WINEPREFIX="$DIR/game/prefix"
#######################
export WINEDEBUG="-all"
#######################
export WINE_VERSION="$("$WINE" --version)"
export WINEDLLOVERRIDES="mscoree,mshtml="
export UPDATEPREFIX="yes"
echo "8"
# Game
############################
export GAME_NAME="Aven Colony"
export GAME_VERSION="1.0.23669"
export EXE="foundation.exe"
export GAME_FOLDER="$WINEPREFIX/drive_c/game/"
#############################################
# Screen
####################
export WINDOWED="no"
export RESOLUTION="1366x768"
export FIXRES="no"
##################
# Sound
####################
export USEALSA="yes"
####################
# Cores
export CORES="$(getconf _NPROCESSORS_ONLN)"
echo "9"
## Actions
# Exit if the files do not exist
if [ ! -f "$WINE" ] || [ ! -f "$WINETRICKS" ] || [ ! -d "$GAME_FOLDER" ]
then clear
echo "Липсват файлове:"
echo
if [ ! -f "$WINE" ]
then echo "$WINE"
fi
if [ ! -f "$WINETRICKS" ]
then echo "$WINETRICKS"
fi
if [ ! -d "$GAME_FOLDER" ]
then echo "$GAME_FOLDER"
fi
exit
fi
echo "10"
# Create a home directory
if [ "$HOME" == "$DIR/game/home" ] && [ ! -d "$HOME" ]
then mkdir "$HOME"
fi
echo "11"
# Copy pulse config
if [ "$HOME" == "$DIR/game/home" ]
then if [ ! -d "$HOME/.config" ]
then mkdir -p "$HOME/.config"
fi
if [ ! -d "$HOME/.config/pulse" ]
then cp -R "$RHOME/.config/pulse" "$HOME/.config"
fi
fi
echo "12"
# Update prefix
if [ "$UPDATEPREFIX" == "yes" ]
then if [ ! -d "$WINEPREFIX/drive_c/users/$USER" ]
then "$DIR/game/wine/bin/wineboot" -u
# Disable Components
"$WINETRICKS" winegstreamer=disabled
"$WINETRICKS" nvapi64=disabled
"$WINETRICKS" nvapi=disabled
#"$WINETRICKS" d3d10=disabled d3d10_1=disabled d3d10core=disabled d3d11=disabled
fi
fi
echo "13"
# Turn sound
if [ "$USEALSA" == "yes" ] && [ ! -f "$DIR/game/alsa" ]
then "$WINETRICKS" sound=alsa
echo > "$DIR/game/alsa"
rm -f "$DIR/game/pulse"
elif [ "$USEALSA" == "no" ] && [ ! -f "$DIR/game/pulse" ]
then "$WINETRICKS" sound=pulse
echo > "$DIR/game/pulse"
rm -f "$DIR/game/alsa"
fi
echo "14"
cp -R "$DIR/game/prefix/drive_c/game/AvenColony/Binaries/dxvk/x64/." "$DIR/game/prefix/drive_c/windows/system32/"
echo "15"
cp -R "$DIR/game/prefix/drive_c/game/AvenColony/Binaries/dxvk/x86/." "$DIR/game/prefix/drive_c/windows/syswow64/"
echo "16"
# Get native screen resolution
if [ "$FIXRES" == "yes" ]
then if [ "$WINDOWED" == "no" ] && [ ! "$1" == "-sw" ] && [ -f "/usr/bin/xrandr" ]
then export RESOLUTION="$(xrandr -q | awk -F'current' -F',' 'NR==1 {gsub("( |current)","");print $2}')"
else export FIXRES="no"
fi
fi
echo "17"
# Info output
clear
echo "$WINE_VERSION"
echo "##################"
echo "game: $GAME_NAME"
echo "version: $GAME_VERSION"
echo "##################"
echo "home: $HOME"
echo
echo "18"
# Start the game
#################
#cd "$GAME_FOLDER"
cd /home/feran/grywine/foundationdx11/game/prefix/drive_c/game
"$REGEDIT" dxvk-on
cd /home/feran/grywine/foundationdx11/game/prefix/drive_c/game/Foundation/
echo "19"
#if [ "$WINDOWED" == "yes" ] || [ "$1" == "-sw" ]
#then "$WINE" explorer /desktop=Game,$RESOLUTION "$EXE"
#else "$WINE" "$EXE"
/home/feran/grywine/foundationdx11/game/wine/bin/wine /home/feran/grywine/foundationdx11/game/prefix/drive_c/game/Foundation/foundation.exe
#echo $WINE
#echo $EXE
## Performance Threaded Dispatch
# NVIDIA
#else __GL_THREADED_OPTIMIZATIONS=1 "$WINE" "$EXE"
# Intel
#else mesa_glthread=true "$WINE" "$EXE"
#fi
#######################################
echo "20"
# Restore screen resolution
if [ "$FIXRES" == "yes" ]
then "/usr/bin/xrandr" -s "$RESOLUTION"
fi