Commit 7514cd47 authored by Vladislav's avatar Vladislav

Added the ability to track the launch of .exe files from .bat files of Epic Games

parent 9696b33f
......@@ -200,7 +200,7 @@ export -f change_locale
generate_pot () {
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
sed -e 's/{translations\[/(gettext \"/g' -e 's/]}/")/g' -e 's/eval_translations/gettext/g' \
"${PORT_SCRIPTS_PATH}/$i" > "${PORT_SCRIPTS_PATH}/${i}_tmp"
......@@ -220,7 +220,6 @@ generate_pot () {
"data/scripts/setup.sh_tmp" \
"data/scripts/functions_helper_tmp" \
"data/scripts/add_in_steam.sh_tmp" \
"data/scripts/help_info_tmp" \
-o "$TEMPLATE_POT"
popd 1>/dev/null || fatal
if [[ -f "$LANG_PO" ]] ; then
......@@ -236,7 +235,6 @@ generate_pot () {
try_remove_file "${PORT_SCRIPTS_PATH}/setup.sh_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}/help_info_tmp"
try_remove_dir "${PW_CACHE_LANG_PATH}"
}
export -f generate_pot
......@@ -3946,7 +3944,7 @@ start_portwine () {
export WINE_CPU_TOPOLOGY="${PW_WINE_CPU_TOPOLOGY}"
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_DRIVER_FILES="${PW_VK_ICD_FILENAMES}"
fi
......@@ -4375,14 +4373,28 @@ portwine_launch () {
fi
[[ $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}" &
unset portwine_eg
while true ; do
sleep 5
GAMEPID="$(pgrep -fa "$(basename "$portwine_exe")" | grep -v "start.sh" | grep -i "epic" | awk '{print $1}')"
[[ -n $GAMEPID ]] && break
if [[ -z $portwine_eg ]] ; then
if [[ $portwine_exe =~ .bat$ ]] ; then
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
while [[ -f "/proc/$GAMEPID/exe" ]] ; do sleep 5 ; done
else
case "${portwine_exe,,}" in
*.exe)
......@@ -5063,7 +5075,7 @@ gui_edit_db () {
CPU_LIMIT_VAR="disabled"
fi
if [[ ! -z "${PW_AMD_VULKAN_USE}" ]] && \
if [[ -n "${PW_AMD_VULKAN_USE}" ]] && \
[[ "${PW_AMD_VULKAN_USE}" != "disabled" ]] ; then
AMD_VULKAN_VAR="${PW_AMD_VULKAN_USE}"
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