forked from CastroFidel/PortWINE
added saving statistics
This commit is contained in:
parent
aa1e52602e
commit
109b27b3ba
@ -512,26 +512,37 @@ addNonSteamGame() {
|
|||||||
|
|
||||||
rungame() {
|
rungame() {
|
||||||
export START_FROM_STEAM=1
|
export START_FROM_STEAM=1
|
||||||
if [[ -n "${STEAM_COMPAT_DATA_PATH:-}" ]]; then
|
if [[ -n "${portwine_exe:-}" ]]; then
|
||||||
cd "$(dirname "${portwine_exe}")"
|
if [[ -n "${STEAM_COMPAT_DATA_PATH:-}" ]]; then
|
||||||
PORTWINE_DB_FILE="${portwine_exe}.ppdb"
|
cd "$(dirname "${portwine_exe}")"
|
||||||
if [[ -f "${PORTWINE_DB_FILE}" ]]; then
|
PORTWINE_DB_FILE="${portwine_exe}.ppdb"
|
||||||
source "${PORTWINE_DB_FILE}"
|
export PORT_WINE_TMP_PATH="${PORT_WINE_PATH}/data/tmp"
|
||||||
fi
|
source "${PORT_WINE_PATH}/data/user.conf"
|
||||||
for path in "ProgramData" "users/Public" "users/steamuser"; do
|
source "${PORT_SCRIPTS_PATH}/functions_helper"
|
||||||
if [[ ! -L "${WINEPREFIX}/drive_c/${path}" ]]; then
|
if [[ -f "${PORTWINE_DB_FILE}" ]]; then
|
||||||
mkdir -p "${WINEPREFIX}/drive_c/users/"
|
source "${PORTWINE_DB_FILE}"
|
||||||
rm -rf "${WINEPREFIX}/drive_c/${path}"
|
fi
|
||||||
ln -sr "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME:-DEFAULT}/drive_c/${path}" "${WINEPREFIX}/drive_c/${path}"
|
for path in "ProgramData" "users/Public" "users/steamuser"; do
|
||||||
|
if [[ ! -L "${WINEPREFIX}/drive_c/${path}" ]]; then
|
||||||
|
mkdir -p "${WINEPREFIX}/drive_c/users/"
|
||||||
|
rm -rf "${WINEPREFIX}/drive_c/${path}"
|
||||||
|
ln -sr "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME:-DEFAULT}/drive_c/${path}" "${WINEPREFIX}/drive_c/${path}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[[ $PW_LOG != 1 ]] && debug_timer --start -s "PW_TIME_IN_GAME"
|
||||||
|
"${STEAM_COMPAT_TOOL_PATHS%%:*}/proton" "run" "${portwine_exe}"
|
||||||
|
if [[ $PW_LOG != 1 ]] && [[ -n $START_PW_TIME_IN_GAME ]] ; then
|
||||||
|
debug_timer --end -s "PW_TIME_IN_GAME"
|
||||||
|
PW_TIME_IN_GAME=$(( PW_TIME_IN_GAME / 1000 )) # в секундах
|
||||||
|
search_desktop_file
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
"${STEAM_COMPAT_TOOL_PATHS%%:*}/proton" "run" "${portwine_exe}"
|
|
||||||
else
|
|
||||||
export LD_PRELOAD=
|
|
||||||
if [[ "${FLATPAK_IN_USE:-0}" == 1 ]]; then
|
|
||||||
flatpak run ru.linux_gaming.PortProton "${portwine_exe}"
|
|
||||||
else
|
else
|
||||||
"${PORT_SCRIPTS_PATH}/start.sh" "${portwine_exe}"
|
export LD_PRELOAD=
|
||||||
|
if [[ "${FLATPAK_IN_USE:-0}" == 1 ]]; then
|
||||||
|
flatpak run ru.linux_gaming.PortProton "${portwine_exe}"
|
||||||
|
else
|
||||||
|
"${PORT_SCRIPTS_PATH}/start.sh" "${portwine_exe}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -2886,10 +2886,12 @@ edit_db_from_gui () {
|
|||||||
then
|
then
|
||||||
for mod_db in "$@" ; do
|
for mod_db in "$@" ; do
|
||||||
proxy_mod_db="${!mod_db}"
|
proxy_mod_db="${!mod_db}"
|
||||||
if [[ $proxy_mod_db =~ (${translations[Disabled]}|${translations[Disable]}) ]] ; then
|
if (( ${#translations[@]} > 0 )); then
|
||||||
proxy_mod_db=disabled
|
if [[ $proxy_mod_db =~ (${translations[Disabled]}|${translations[Disable]}) ]] ; then
|
||||||
elif [[ $proxy_mod_db =~ (${translations[Enabled]}|${translations[Enable]}) ]] ; then
|
proxy_mod_db=disabled
|
||||||
proxy_mod_db=enabled
|
elif [[ $proxy_mod_db =~ (${translations[Enabled]}|${translations[Enable]}) ]] ; then
|
||||||
|
proxy_mod_db=enabled
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $(<"${PORTWINE_DB_FILE}") =~ export\ ${mod_db}= ]]
|
if [[ $(<"${PORTWINE_DB_FILE}") =~ export\ ${mod_db}= ]]
|
||||||
then sed -i "s|export ${mod_db}=.*|export ${mod_db}=\"$proxy_mod_db\"|g" "${PORTWINE_DB_FILE}"
|
then sed -i "s|export ${mod_db}=.*|export ${mod_db}=\"$proxy_mod_db\"|g" "${PORTWINE_DB_FILE}"
|
||||||
|
Loading…
Reference in New Issue
Block a user