forked from CastroFidel/PortWINE
fix realpath for .exe and generate ppdb file
This commit is contained in:
parent
eefcbb572e
commit
04aa974f28
@ -1240,7 +1240,32 @@ pw_init_db () {
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then
|
||||
if [[ ! -z "${PORTWINE_DB}" ]] \
|
||||
&& [[ -z "${PORTWINE_DB_FILE}" ]]
|
||||
then
|
||||
PORTWINE_DB_FILE=$(grep -il "\#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*)
|
||||
if [[ -z "${PORTWINE_DB_FILE}" ]] ; then
|
||||
{
|
||||
echo "#!/usr/bin/env bash"
|
||||
echo "#Author: ${USER}"
|
||||
echo "#${PORTWINE_DB}.exe"
|
||||
echo "#Rating=1-5"
|
||||
} > "${portwine_exe}".ppdb
|
||||
export PORTWINE_DB_FILE="${portwine_exe}".ppdb
|
||||
fi
|
||||
if [[ ! -z $(echo "${portwine_exe}" | grep "/data/prefixes/") ]] && \
|
||||
[[ -z $(echo "${portwine_exe}" | grep "/data/prefixes/DEFAULT/") ]]
|
||||
then
|
||||
PW_PREFIX_NAME=$(echo "${portwine_exe}" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}')
|
||||
fi
|
||||
# shellcheck source=/dev/null
|
||||
source "${PORTWINE_DB_FILE}"
|
||||
fi
|
||||
edit_db_from_gui PW_VULKAN_USE PW_WINE_USE PW_PREFIX_NAME
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ "${START_FROM_STEAM}" == 1 ]] && export PW_GUI_DISABLED_CS=1
|
||||
[[ "${START_FROM_PP_GUI}" == 1 ]] && export PW_GUI_DISABLED_CS=0 && unset START_FROM_PP_GUI
|
||||
|
||||
|
@ -28,11 +28,12 @@ export pw_full_command_line=("$0" $*)
|
||||
MISSING_DESKTOP_FILE=0
|
||||
|
||||
if [[ -f "$1" ]] ; then
|
||||
export portwine_exe="$1"
|
||||
portwine_exe="$(realpath "$1")"
|
||||
elif [[ "$1" == *.exe ]] ; then
|
||||
export portwine_exe="$1"
|
||||
portwine_exe="$1"
|
||||
MISSING_DESKTOP_FILE=1
|
||||
fi
|
||||
export portwine_exe
|
||||
|
||||
# HOTFIX - ModernWarships
|
||||
if echo "$portwine_exe" | grep ModernWarships &>/dev/null \
|
||||
@ -617,24 +618,6 @@ esac
|
||||
|
||||
init_wine_ver
|
||||
|
||||
if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then
|
||||
if [[ ! -z "${PORTWINE_DB}" ]] \
|
||||
&& [[ -z "${PORTWINE_DB_FILE}" ]]
|
||||
then
|
||||
PORTWINE_DB_FILE=$(grep -il "\#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*)
|
||||
if [[ -z "${PORTWINE_DB_FILE}" ]] ; then
|
||||
{
|
||||
echo "#!/usr/bin/env bash"
|
||||
echo "#Author: ${USER}"
|
||||
echo "#${PORTWINE_DB}.exe"
|
||||
echo "#Rating=1-5"
|
||||
} > "${portwine_exe}".ppdb
|
||||
export PORTWINE_DB_FILE="${portwine_exe}".ppdb
|
||||
fi
|
||||
fi
|
||||
edit_db_from_gui PW_VULKAN_USE PW_WINE_USE PW_PREFIX_NAME
|
||||
fi
|
||||
|
||||
[[ ! -z "$PW_YAD_SET" ]] && case "$PW_YAD_SET" in
|
||||
98) portwine_delete_shortcut ;;
|
||||
100) portwine_create_shortcut ;;
|
||||
|
@ -49,6 +49,7 @@ export PW_PROTON_LG_VER="PROTON_LG_9-4"
|
||||
export PW_WINE_LG_VER="WINE_LG_9-7"
|
||||
export PW_WINE_FULLSCREEN_FSR="1"
|
||||
###DXVK_AND_VKD3D###
|
||||
export PW_VULKAN_USE="2"
|
||||
export VKD3D_LIMIT_TESS_FACTORS="64"
|
||||
export D8VK_VER="1.7.1-2367"
|
||||
export DGV2_VER="2.81.3"
|
||||
|
Loading…
Reference in New Issue
Block a user