Commit 1a098955 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'Htylol-added_portwine_eg' into devel

parents 9696b33f 7514cd47
...@@ -200,7 +200,7 @@ export -f change_locale ...@@ -200,7 +200,7 @@ export -f change_locale
generate_pot () { generate_pot () {
local FILES_FOR_GETTEXT i local FILES_FOR_GETTEXT i
FILES_FOR_GETTEXT=(functions_helper start.sh setup.sh add_in_steam.sh help_info) FILES_FOR_GETTEXT=(functions_helper start.sh setup.sh add_in_steam.sh)
for i in "${FILES_FOR_GETTEXT[@]}" ; do for i in "${FILES_FOR_GETTEXT[@]}" ; do
sed -e 's/{translations\[/(gettext \"/g' -e 's/]}/")/g' -e 's/eval_translations/gettext/g' \ sed -e 's/{translations\[/(gettext \"/g' -e 's/]}/")/g' -e 's/eval_translations/gettext/g' \
"${PORT_SCRIPTS_PATH}/$i" > "${PORT_SCRIPTS_PATH}/${i}_tmp" "${PORT_SCRIPTS_PATH}/$i" > "${PORT_SCRIPTS_PATH}/${i}_tmp"
...@@ -220,7 +220,6 @@ generate_pot () { ...@@ -220,7 +220,6 @@ generate_pot () {
"data/scripts/setup.sh_tmp" \ "data/scripts/setup.sh_tmp" \
"data/scripts/functions_helper_tmp" \ "data/scripts/functions_helper_tmp" \
"data/scripts/add_in_steam.sh_tmp" \ "data/scripts/add_in_steam.sh_tmp" \
"data/scripts/help_info_tmp" \
-o "$TEMPLATE_POT" -o "$TEMPLATE_POT"
popd 1>/dev/null || fatal popd 1>/dev/null || fatal
if [[ -f "$LANG_PO" ]] ; then if [[ -f "$LANG_PO" ]] ; then
...@@ -236,7 +235,6 @@ generate_pot () { ...@@ -236,7 +235,6 @@ generate_pot () {
try_remove_file "${PORT_SCRIPTS_PATH}/setup.sh_tmp" try_remove_file "${PORT_SCRIPTS_PATH}/setup.sh_tmp"
try_remove_file "${PORT_SCRIPTS_PATH}/functions_helper_tmp" try_remove_file "${PORT_SCRIPTS_PATH}/functions_helper_tmp"
try_remove_file "${PORT_SCRIPTS_PATH}/add_in_steam.sh_tmp" try_remove_file "${PORT_SCRIPTS_PATH}/add_in_steam.sh_tmp"
try_remove_file "${PORT_SCRIPTS_PATH}/help_info_tmp"
try_remove_dir "${PW_CACHE_LANG_PATH}" try_remove_dir "${PW_CACHE_LANG_PATH}"
} }
export -f generate_pot export -f generate_pot
...@@ -3946,7 +3944,7 @@ start_portwine () { ...@@ -3946,7 +3944,7 @@ start_portwine () {
export WINE_CPU_TOPOLOGY="${PW_WINE_CPU_TOPOLOGY}" export WINE_CPU_TOPOLOGY="${PW_WINE_CPU_TOPOLOGY}"
fi fi
if [[ ! -z "${PW_VK_ICD_FILENAMES}" ]] ; then if [[ -n "${PW_VK_ICD_FILENAMES}" ]] ; then
export VK_ICD_FILENAMES="${PW_VK_ICD_FILENAMES}" export VK_ICD_FILENAMES="${PW_VK_ICD_FILENAMES}"
export VK_DRIVER_FILES="${PW_VK_ICD_FILENAMES}" export VK_DRIVER_FILES="${PW_VK_ICD_FILENAMES}"
fi fi
...@@ -4375,14 +4373,28 @@ portwine_launch () { ...@@ -4375,14 +4373,28 @@ portwine_launch () {
fi fi
[[ $PW_LOG != 1 ]] && debug_timer --start -s "PW_TIME_IN_GAME" [[ $PW_LOG != 1 ]] && debug_timer --start -s "PW_TIME_IN_GAME"
if [[ -n "${LAUNCH_URI}" ]]; then if [[ -n "${LAUNCH_URI}" ]] ; then
pw_run start /high /b "${LAUNCH_URI}" & pw_run start /high /b "${LAUNCH_URI}" &
unset portwine_eg
while true ; do while true ; do
sleep 5 if [[ -z $portwine_eg ]] ; then
GAMEPID="$(pgrep -fa "$(basename "$portwine_exe")" | grep -v "start.sh" | grep -i "epic" | awk '{print $1}')" if [[ $portwine_exe =~ .bat$ ]] ; then
[[ -n $GAMEPID ]] && break portwine_eg=$(grep .exe "$portwine_exe" | tail -n 1)
portwine_eg=${portwine_eg//.exe/}
portwine_eg=${portwine_eg//[[:blank:]]*/}
portwine_eg=${portwine_eg//*[[:punct:]]/}
portwine_eg=${portwine_eg}.exe
else
portwine_eg=$(basename "$portwine_exe")
fi
fi
sleep 1
if [[ -z $GAMEPID ]] ; then
GAMEPID="$(pgrep -fa "$portwine_eg" | grep -v "start.sh" | awk '{print $1}')"
else
waitpid "$GAMEPID" && break
fi
done done
while [[ -f "/proc/$GAMEPID/exe" ]] ; do sleep 5 ; done
else else
case "${portwine_exe,,}" in case "${portwine_exe,,}" in
*.exe) *.exe)
...@@ -5063,7 +5075,7 @@ gui_edit_db () { ...@@ -5063,7 +5075,7 @@ gui_edit_db () {
CPU_LIMIT_VAR="disabled" CPU_LIMIT_VAR="disabled"
fi fi
if [[ ! -z "${PW_AMD_VULKAN_USE}" ]] && \ if [[ -n "${PW_AMD_VULKAN_USE}" ]] && \
[[ "${PW_AMD_VULKAN_USE}" != "disabled" ]] ; then [[ "${PW_AMD_VULKAN_USE}" != "disabled" ]] ; then
AMD_VULKAN_VAR="${PW_AMD_VULKAN_USE}" AMD_VULKAN_VAR="${PW_AMD_VULKAN_USE}"
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1 export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment