From 9c8c943a33ce6958cc29ef7ccdf7629c291c3350 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Thu, 6 Mar 2025 01:21:56 +0500 Subject: [PATCH] re-creating the script --- data_from_portwine/scripts/add_in_steam.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/data_from_portwine/scripts/add_in_steam.sh b/data_from_portwine/scripts/add_in_steam.sh index 5248cc83..3efa9008 100755 --- a/data_from_portwine/scripts/add_in_steam.sh +++ b/data_from_portwine/scripts/add_in_steam.sh @@ -475,15 +475,7 @@ addNonSteamGame() { [[ -z "${NOSTSHPATH}" ]] && NOSTSHPATH="${STEAM_SCRIPTS}/${name_desktop}.sh" NOSTAPPNAME="${name_desktop}" NOSTAPPID=$(getAppId "${NOSTSHPATH}") - if [[ -z "${NOSTAPPID}" ]]; then - NOSTEXEPATH="${NOSTSHPATH}" - if [[ -z "${NOSTSTDIR}" ]]; then - NOSTSTDIR="${STEAM_SCRIPTS}" - fi - NOSTICONPATH="${PORT_WINE_PATH}/data/img/${name_desktop_png}.png" - NOSTAIDVDF="$(generateShortcutVDFAppId "${NOSTAPPNAME}${NOSTEXEPATH}")" # signed integer AppID, stored in the VDF as hexidecimal - ex: -598031679 - NOSTAPPID="$(extractSteamId32 "${NOSTAIDVDF}")" # unsigned 32bit ingeger version of "$NOSTAIDVDF", which is used as the AppID for Steam artwork ("grids"), as well as for our shortcuts - + if [[ ! -f "${NOSTSHPATH}" ]]; then create_new_dir "${STEAM_SCRIPTS}" cat <<-EOF > "${NOSTSHPATH}" #!/usr/bin/env bash @@ -493,6 +485,13 @@ addNonSteamGame() { "${PORT_SCRIPTS_PATH}/start.sh" "${portwine_exe}" "\$@" EOF chmod u+x "${NOSTSHPATH}" + fi + if [[ -z "${NOSTAPPID}" ]]; then + [[ -z "${NOSTSTDIR}" ]] && NOSTSTDIR="${STEAM_SCRIPTS}" + NOSTEXEPATH="${NOSTSHPATH}" + NOSTICONPATH="${PORT_WINE_PATH}/data/img/${name_desktop_png}.png" + NOSTAIDVDF="$(generateShortcutVDFAppId "${NOSTAPPNAME}${NOSTEXEPATH}")" # signed integer AppID, stored in the VDF as hexidecimal - ex: -598031679 + NOSTAPPID="$(extractSteamId32 "${NOSTAIDVDF}")" # unsigned 32bit ingeger version of "$NOSTAIDVDF", which is used as the AppID for Steam artwork ("grids"), as well as for our shortcuts if [[ -f "${SCPATH}" ]] ; then cp "${SCPATH}" "${SCPATH//.vdf}_${PROGNAME}_backup.vdf" 2>/dev/null