Commit 293a3146 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Fix delete img and create_shortcut (env,sh)

parent 71c54060
......@@ -14,12 +14,15 @@ fi
PORTPROTON_IMG=$(zenity --file-selection --file-filter=""*.png" "*.ico"" \
--title="${sc_img}" --filename="${PORT_WINE_PATH}/data/img/")
if [ $? -eq 1 ];then exit 1; fi
PORTPROTON_CMD=""
PORTPROTON_CMD=$(zenity --entry --text "${sc_cmd}")
if [ $? -eq 1 ];then exit 1; fi
########################################################################
cp -f "${PORTPROTON_IMG}" "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png"
name_desktop="${PORTPROTON_NAME}"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${PORTPROTON_NAME}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec="env export PATH_TO_GAME=\""$PORTPROTON_PATH"\" \&\& \"${PORT_WINE_PATH}/data/scripts/start\" \"${PORTPROTON_EXE}\""" \
echo "Exec="env PATH_TO_GAME=\""$PORTPROTON_PATH"\" sh \"${PORT_WINE_PATH}/data/scripts/start\" \"${PORTPROTON_EXE}\" ${PORTPROTON_CMD}"" \
>> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Type=Application" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Categories=Game" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
......
......@@ -73,6 +73,7 @@ then
export sc_name="Введите название будущего ярлыка:"
export sc_path="Создаем ярлык. Выберите файл запуска..."
export sc_img="Создаем ярлык. Выберите иконку ICO, или PNG формата..."
export sc_cmd="Введите дополнительные параметры запуска, или оставьте полепустым."
elif [ "${update_loc}" = "ENG" ]
then
......@@ -143,6 +144,7 @@ then
export sc_name="Name shortcut:"
export sc_path="Select the .exe file..."
export sc_img="Select the .ICO or .PNG file..."
export sc_cmd="Add command line"
fi
......@@ -5,7 +5,7 @@
export portname=
export gamename=
export gamedir=
if [ ! -z ${gamedir} ]; then
if [ ! -z "${gamedir}" ]; then
export PATH_TO_GAME="${PORT_WINE_PATH}/data/pfx/drive_c/Program Files (x86)/${gamedir}"
fi
export gamestart="${PATH_TO_GAME}/.exe"
......@@ -18,7 +18,7 @@ export PW_LOG=0
export PW_ACO=1
export PW_NO_VR=1
export PW_FILELOCK=1
export PW_DXVK_ASYNC=1
export PW_DXVK_ASYNC=0
export PW_USE_SECCOMP=0
export PW_NO_WINEMFPLAY=0
export PW_NVAPI_DISABLE=1
......
......@@ -13,7 +13,7 @@ clear && echo '
export gamedir="DIRNAME"
export gamename="NAME"
export portname="PortNAME"
export port_ver="XX"
export port_ver=XX
########################################################################
export PROGS_INST=""
export vexit=0
......@@ -96,7 +96,7 @@ export PORT_WINE_PATH="${D_PATH}"
if [ ! -d "${PORT_WINE_PATH}" ];then
mkdir -p "$PORT_WINE_PATH"
else
for CLEAN_PORT in "dist" "libs" "tmp" "img" "scripts" "pfx/drive_c/windows"
for CLEAN_PORT in "dist" "libs" "tmp" "scripts" "pfx/drive_c/windows"
do
if [ -d "${PORT_WINE_PATH}/data/${CLEAN_PORT}" ];then
rm -fR "${PORT_WINE_PATH}/data/${CLEAN_PORT}"
......
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