update create shortcut for EGS
This commit is contained in:
parent
1a09895554
commit
f4ca43e4de
@ -4375,24 +4375,17 @@ portwine_launch () {
|
|||||||
[[ $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
|
unset GAMEPID
|
||||||
while true ; do
|
while true ; do
|
||||||
if [[ -z $portwine_eg ]] ; then
|
sleep 5
|
||||||
if [[ $portwine_exe =~ .bat$ ]] ; then
|
if [[ -z "$GAMEPID" ]] ; then
|
||||||
portwine_eg=$(grep .exe "$portwine_exe" | tail -n 1)
|
GAMEPID="$(pgrep -fa 'EpicPortal|epicusername|epiclocale|AUTH_LOGIN' | awk '{print $1}')"
|
||||||
portwine_eg=${portwine_eg//.exe/}
|
|
||||||
portwine_eg=${portwine_eg//[[:blank:]]*/}
|
|
||||||
portwine_eg=${portwine_eg//*[[:punct:]]/}
|
|
||||||
portwine_eg=${portwine_eg}.exe
|
|
||||||
else
|
else
|
||||||
portwine_eg=$(basename "$portwine_exe")
|
if waitpid "$GAMEPID" ; then
|
||||||
fi
|
|
||||||
fi
|
|
||||||
sleep 1
|
sleep 1
|
||||||
if [[ -z $GAMEPID ]] ; then
|
GAMEPID="$(pgrep -fa 'EpicPortal|epicusername|epiclocale|AUTH_LOGIN' | awk '{print $1}')"
|
||||||
GAMEPID="$(pgrep -fa "$portwine_eg" | grep -v "start.sh" | awk '{print $1}')"
|
[[ -z "$GAMEPID" ]] && break || continue
|
||||||
else
|
fi
|
||||||
waitpid "$GAMEPID" && break
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user