Commit 383807a6 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'hardmode-2' of github.com:Htylol/PortWINE into Htylol-hardmode-2

parents 7fc4ea3a f29808f4
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
msgid "" msgid ""
msgstr "Project-Id-Version: PACKAGE VERSION\n" msgstr "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-24 12:43+0500\n" "POT-Creation-Date: 2024-10-26 06:41+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -59,10 +59,13 @@ msgstr "" ...@@ -59,10 +59,13 @@ msgstr ""
msgid "Create shortcut for select file..." msgid "Create shortcut for select file..."
msgstr "" msgstr ""
msgid "DELETE SHORTCUT" msgid "CHANGE SHORTCUT"
msgstr "" msgstr ""
msgid "Delete shortcut for select file..." msgid "Change shortcut for select file..."
msgstr ""
msgid "Launching"
msgstr "" msgstr ""
msgid "Base settings" msgid "Base settings"
...@@ -227,9 +230,6 @@ msgstr "" ...@@ -227,9 +230,6 @@ msgstr ""
msgid "Downloading" msgid "Downloading"
msgstr "" msgstr ""
msgid "Launching"
msgstr ""
msgid "day" msgid "day"
msgstr "" msgstr ""
...@@ -1426,6 +1426,9 @@ msgstr "" ...@@ -1426,6 +1426,9 @@ msgstr ""
msgid "The shortcut will be created in the PortProton directory." msgid "The shortcut will be created in the PortProton directory."
msgstr "" msgstr ""
msgid "Name"
msgstr ""
msgid "Add shortcut to MENU -> GAMES" msgid "Add shortcut to MENU -> GAMES"
msgstr "" msgstr ""
...@@ -1435,17 +1438,16 @@ msgstr "" ...@@ -1435,17 +1438,16 @@ msgstr ""
msgid "Add shortcut to STEAM library" msgid "Add shortcut to STEAM library"
msgstr "" msgstr ""
msgid "Name" msgid "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?"
msgstr "" msgstr ""
msgid "A higher number of duplicate desktop files were found for this file." msgid "Restarting STEAM... Please wait."
"\\nShould I delete the extra ones or not?"
msgstr "" msgstr ""
msgid "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?" msgid "The shortcut will be changed in the PortProton directory."
msgstr "" msgstr ""
msgid "Restarting STEAM... Please wait." msgid "REMOVE SHORTCUT"
msgstr "" msgstr ""
msgid "Could not find the file:" msgid "Could not find the file:"
...@@ -1455,6 +1457,9 @@ msgid "ATTENTION:\\nIf you forgot to mount the disk with the running " ...@@ -1455,6 +1457,9 @@ msgid "ATTENTION:\\nIf you forgot to mount the disk with the running "
"application, click CANCEL!" "application, click CANCEL!"
msgstr "" msgstr ""
msgid "DELETE SHORTCUT"
msgstr ""
msgid "Starting prefix manager:" msgid "Starting prefix manager:"
msgstr "" msgstr ""
......
...@@ -8,15 +8,15 @@ msgid "" ...@@ -8,15 +8,15 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-24 13:48+0500\n" "POT-Creation-Date: 2024-10-26 06:41+0500\n"
"PO-Revision-Date: 2024-10-24 13:51+0500\n" "PO-Revision-Date: 2024-10-26 13:58+0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: es_ES\n" "Language: es_ES\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.2\n" "X-Generator: Poedit 3.4.4\n"
msgid "" msgid ""
"A running PortProton session was detected.\\nDo you want to end the previous " "A running PortProton session was detected.\\nDo you want to end the previous "
...@@ -64,11 +64,14 @@ msgstr "CREAR ACCESO DIRECTO" ...@@ -64,11 +64,14 @@ msgstr "CREAR ACCESO DIRECTO"
msgid "Create shortcut for select file..." msgid "Create shortcut for select file..."
msgstr "Crear un acceso directo para el archivo seleccionado..." msgstr "Crear un acceso directo para el archivo seleccionado..."
msgid "DELETE SHORTCUT" msgid "CHANGE SHORTCUT"
msgstr "ELIMINAR ACCESO DIRECTO" msgstr "CAMBIAR ACCESO DIRECTO"
msgid "Delete shortcut for select file..." msgid "Change shortcut for select file..."
msgstr "Eliminar el acceso directo del archivo seleccionado..." msgstr "Cambiar un acceso directo para el archivo seleccionado..."
msgid "Launching"
msgstr "Lanzamiento"
msgid "Base settings" msgid "Base settings"
msgstr "Configuración básica" msgstr "Configuración básica"
...@@ -247,9 +250,6 @@ msgstr "" ...@@ -247,9 +250,6 @@ msgstr ""
msgid "Downloading" msgid "Downloading"
msgstr "Descargando" msgstr "Descargando"
msgid "Launching"
msgstr "Lanzamiento"
msgid "day" msgid "day"
msgstr "día" msgstr "día"
...@@ -1858,6 +1858,9 @@ msgstr "¿Realmente deseas restablecer la configuración de" ...@@ -1858,6 +1858,9 @@ msgstr "¿Realmente deseas restablecer la configuración de"
msgid "The shortcut will be created in the PortProton directory." msgid "The shortcut will be created in the PortProton directory."
msgstr "El acceso directo se creará en el directorio de PortProton." msgstr "El acceso directo se creará en el directorio de PortProton."
msgid "Name"
msgstr "Nombre"
msgid "Add shortcut to MENU -> GAMES" msgid "Add shortcut to MENU -> GAMES"
msgstr "Agregar acceso directo a MENU -> JUEGOS" msgstr "Agregar acceso directo a MENU -> JUEGOS"
...@@ -1867,16 +1870,6 @@ msgstr "Agregar acceso directo al escritorio" ...@@ -1867,16 +1870,6 @@ msgstr "Agregar acceso directo al escritorio"
msgid "Add shortcut to STEAM library" msgid "Add shortcut to STEAM library"
msgstr "Agregar acceso directo a la biblioteca de STEAM" msgstr "Agregar acceso directo a la biblioteca de STEAM"
msgid "Name"
msgstr "Nombre"
msgid ""
"A higher number of duplicate desktop files were found for this file."
"\\nShould I delete the extra ones or not?"
msgstr ""
"Se encontraron un mayor número de archivos de escritorio duplicados para "
"este archivo.\\n¿Debería eliminar los adicionales o no?"
msgid "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?" msgid "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?"
msgstr "" msgstr ""
"Para agregar el acceso directo a STEAM, es necesario reiniciar.\\n\\¿Quieres " "Para agregar el acceso directo a STEAM, es necesario reiniciar.\\n\\¿Quieres "
...@@ -1885,6 +1878,12 @@ msgstr "" ...@@ -1885,6 +1878,12 @@ msgstr ""
msgid "Restarting STEAM... Please wait." msgid "Restarting STEAM... Please wait."
msgstr "Restarting STEAM... Please wait." msgstr "Restarting STEAM... Please wait."
msgid "The shortcut will be changed in the PortProton directory."
msgstr "El acceso directo se cambiará en el directorio de PortProton."
msgid "REMOVE SHORTCUT"
msgstr "ELIMINAR ACCESO DIRECTO"
msgid "Could not find the file:" msgid "Could not find the file:"
msgstr "No se pudo encontrar el archivo:" msgstr "No se pudo encontrar el archivo:"
...@@ -1896,6 +1895,9 @@ msgstr "" ...@@ -1896,6 +1895,9 @@ msgstr ""
"Si olvidaste montar el disco con la aplicación en ejecución, ¡haz clic en " "Si olvidaste montar el disco con la aplicación en ejecución, ¡haz clic en "
"CANCELAR!" "CANCELAR!"
msgid "DELETE SHORTCUT"
msgstr "ELIMINAR ACCESO DIRECTO"
msgid "Starting prefix manager:" msgid "Starting prefix manager:"
msgstr "Iniciando el administrador de prefijos:" msgstr "Iniciando el administrador de prefijos:"
...@@ -2173,6 +2175,16 @@ msgstr "" ...@@ -2173,6 +2175,16 @@ msgstr ""
msgid "Please wait. downloading covers for" msgid "Please wait. downloading covers for"
msgstr "Por favor, espera. Descargando portadas para" msgstr "Por favor, espera. Descargando portadas para"
#~ msgid ""
#~ "A higher number of duplicate desktop files were found for this file."
#~ "\\nShould I delete the extra ones or not?"
#~ msgstr ""
#~ "Se encontraron un mayor número de archivos de escritorio duplicados para "
#~ "este archivo.\\n¿Debería eliminar los adicionales o no?"
#~ msgid "Delete shortcut for select file..."
#~ msgstr "Eliminar el acceso directo del archivo seleccionado..."
#~ msgid "Forced activation of vertical sync" #~ msgid "Forced activation of vertical sync"
#~ msgstr "Activación forzada de la sincronización vertical" #~ msgstr "Activación forzada de la sincronización vertical"
......
...@@ -7,8 +7,8 @@ msgid "" ...@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-24 12:43+0500\n" "POT-Creation-Date: 2024-10-26 06:41+0500\n"
"PO-Revision-Date: 2024-10-24 12:45+0500\n" "PO-Revision-Date: 2024-10-26 06:43+0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: ru_RU\n" "Language: ru_RU\n"
...@@ -17,7 +17,7 @@ msgstr "" ...@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" "n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Generator: Poedit 3.4.2\n" "X-Generator: Poedit 3.4.4\n"
msgid "" msgid ""
"A running PortProton session was detected.\\nDo you want to end the previous " "A running PortProton session was detected.\\nDo you want to end the previous "
...@@ -64,11 +64,14 @@ msgstr "СОЗДАТЬ ЯРЛЫК" ...@@ -64,11 +64,14 @@ msgstr "СОЗДАТЬ ЯРЛЫК"
msgid "Create shortcut for select file..." msgid "Create shortcut for select file..."
msgstr "Создать ярлык для выбранного файла..." msgstr "Создать ярлык для выбранного файла..."
msgid "DELETE SHORTCUT" msgid "CHANGE SHORTCUT"
msgstr "УДАЛИТЬ ЯРЛЫК" msgstr "ИЗМЕНИТЬ ЯРЛЫК"
msgid "Delete shortcut for select file..." msgid "Change shortcut for select file..."
msgstr "Удалить ярлык для выбранного файла..." msgstr "Изменить ярлык для выбранного файла..."
msgid "Launching"
msgstr "Запуск"
msgid "Base settings" msgid "Base settings"
msgstr "Основные настройки" msgstr "Основные настройки"
...@@ -249,9 +252,6 @@ msgstr "" ...@@ -249,9 +252,6 @@ msgstr ""
msgid "Downloading" msgid "Downloading"
msgstr "Загружается" msgstr "Загружается"
msgid "Launching"
msgstr "Запуск"
msgid "day" msgid "day"
msgstr "день" msgstr "день"
...@@ -1836,6 +1836,9 @@ msgstr "Вы действительно хотите сбросить настр ...@@ -1836,6 +1836,9 @@ msgstr "Вы действительно хотите сбросить настр
msgid "The shortcut will be created in the PortProton directory." msgid "The shortcut will be created in the PortProton directory."
msgstr "Ярлык будет создан в каталоге PortProton." msgstr "Ярлык будет создан в каталоге PortProton."
msgid "Name"
msgstr "Имя"
msgid "Add shortcut to MENU -> GAMES" msgid "Add shortcut to MENU -> GAMES"
msgstr "Добавить ярлык в МЕНЮ -> ИГРЫ" msgstr "Добавить ярлык в МЕНЮ -> ИГРЫ"
...@@ -1845,14 +1848,6 @@ msgstr "Добавить ярлык на рабочий стол" ...@@ -1845,14 +1848,6 @@ msgstr "Добавить ярлык на рабочий стол"
msgid "Add shortcut to STEAM library" msgid "Add shortcut to STEAM library"
msgstr "Добавить ярлык в библиотеку STEAM" msgstr "Добавить ярлык в библиотеку STEAM"
msgid "Name"
msgstr "Имя"
msgid ""
"A higher number of duplicate desktop files were found for this file."
"\\nShould I delete the extra ones or not?"
msgstr "Найдены дубликаты создаваемого ярлыка.\\nУдалить лишние ярлыки?"
msgid "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?" msgid "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?"
msgstr "" msgstr ""
"Для добавления ярлыка в STEAM требуется перезапуск.\\n\\nПерезапустить STEAM " "Для добавления ярлыка в STEAM требуется перезапуск.\\n\\nПерезапустить STEAM "
...@@ -1861,6 +1856,12 @@ msgstr "" ...@@ -1861,6 +1856,12 @@ msgstr ""
msgid "Restarting STEAM... Please wait." msgid "Restarting STEAM... Please wait."
msgstr "Перезапускаем STEAM... Пожалуйста, подождите." msgstr "Перезапускаем STEAM... Пожалуйста, подождите."
msgid "The shortcut will be changed in the PortProton directory."
msgstr "Ярлык будет изменён в каталоге PortProton."
msgid "REMOVE SHORTCUT"
msgstr "УДАЛИТЬ ЯРЛЫК"
msgid "Could not find the file:" msgid "Could not find the file:"
msgstr "Не удалось найти файл:" msgstr "Не удалось найти файл:"
...@@ -1871,6 +1872,9 @@ msgstr "" ...@@ -1871,6 +1872,9 @@ msgstr ""
"ВНИМАНИЕ:\\nЕсли вы забыли примонтировать диск с запускаемым приложением, " "ВНИМАНИЕ:\\nЕсли вы забыли примонтировать диск с запускаемым приложением, "
"нажмите ОТМЕНИТЬ!" "нажмите ОТМЕНИТЬ!"
msgid "DELETE SHORTCUT"
msgstr "УДАЛИТЬ ЯРЛЫК"
msgid "Starting prefix manager:" msgid "Starting prefix manager:"
msgstr "Запуск менеджера префиксов:" msgstr "Запуск менеджера префиксов:"
...@@ -2157,6 +2161,14 @@ msgstr "SteamGridDB не отвечает, принудительно отклю ...@@ -2157,6 +2161,14 @@ msgstr "SteamGridDB не отвечает, принудительно отклю
msgid "Please wait. downloading covers for" msgid "Please wait. downloading covers for"
msgstr "Пожалуйста, подождите. Загрузка обложек для" msgstr "Пожалуйста, подождите. Загрузка обложек для"
#~ msgid ""
#~ "A higher number of duplicate desktop files were found for this file."
#~ "\\nShould I delete the extra ones or not?"
#~ msgstr "Найдены дубликаты создаваемого ярлыка.\\nУдалить лишние ярлыки?"
#~ msgid "Delete shortcut for select file..."
#~ msgstr "Удалить ярлык для выбранного файла..."
#~ msgid "Forced activation of vertical sync" #~ msgid "Forced activation of vertical sync"
#~ msgstr "Принудительное включение вертикальной синхронизации" #~ msgstr "Принудительное включение вертикальной синхронизации"
......
...@@ -151,6 +151,7 @@ source "${PORT_SCRIPTS_PATH}/var" ...@@ -151,6 +151,7 @@ source "${PORT_SCRIPTS_PATH}/var"
export STEAM_SCRIPTS="${PORT_WINE_PATH}/steam_scripts" export STEAM_SCRIPTS="${PORT_WINE_PATH}/steam_scripts"
export PW_PLUGINS_PATH="${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}" export PW_PLUGINS_PATH="${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}"
export PW_CACHE_LANG_PATH="${PORT_WINE_TMP_PATH}/cache_lang/" export PW_CACHE_LANG_PATH="${PORT_WINE_TMP_PATH}/cache_lang/"
export PW_DATABASE_PATH="${PORT_WINE_TMP_PATH}/pw_database/"
export PW_GUI_ICON_PATH="${PORT_WINE_PATH}/data/img/gui" export PW_GUI_ICON_PATH="${PORT_WINE_PATH}/data/img/gui"
export PW_GUI_THEMES_PATH="${PORT_WINE_PATH}/data/themes" export PW_GUI_THEMES_PATH="${PORT_WINE_PATH}/data/themes"
export pw_yad="${PW_GUI_THEMES_PATH}/gui/yad_gui_pp" export pw_yad="${PW_GUI_THEMES_PATH}/gui/yad_gui_pp"
...@@ -178,9 +179,11 @@ try_remove_file "${PW_TMPFS_PATH}/update_pfx_log" ...@@ -178,9 +179,11 @@ try_remove_file "${PW_TMPFS_PATH}/update_pfx_log"
# shellcheck source=/dev/null # shellcheck source=/dev/null
source "${USER_CONF}" source "${USER_CONF}"
if [[ ! -f "${PW_CACHE_LANG_PATH}/$LANGUAGE" ]] ; then if [[ ! -f $PW_DATABASE_PATH/database ]] ; then
create_translations create_new_dir "$PW_DATABASE_PATH"
touch "$PW_DATABASE_PATH/database"
fi fi
[[ ! -f "${PW_CACHE_LANG_PATH}/$LANGUAGE" ]] && create_translations
unset translations unset translations
# shellcheck source=/dev/null # shellcheck source=/dev/null
...@@ -491,10 +494,10 @@ if [[ -f "${portwine_exe}" ]] ; then ...@@ -491,10 +494,10 @@ if [[ -f "${portwine_exe}" ]] ; then
fi fi
if [[ "${PW_GUI_DISABLED_CS}" != 1 ]] ; then if [[ "${PW_GUI_DISABLED_CS}" != 1 ]] ; then
pw_create_gui_png pw_create_gui_png
if ! grep -il "${portwine_exe}" "${HOME}/.local/share/applications"/*.desktop &>/dev/null ; then if ! grep -il "${portwine_exe}" "$PORT_WINE_PATH"/*.desktop &>/dev/null ; then
PW_SHORTCUT="${translations[CREATE SHORTCUT]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png!${translations[Create shortcut for select file...]}:100" PW_SHORTCUT="${translations[CREATE SHORTCUT]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png!${translations[Create shortcut for select file...]}:100"
else else
PW_SHORTCUT="${translations[DELETE SHORTCUT]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png!${translations[Delete shortcut for select file...]}:98" PW_SHORTCUT="${translations[CHANGE SHORTCUT]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png!${translations[Change shortcut for select file...]}:98"
fi fi
create_name_desktop create_name_desktop
...@@ -616,49 +619,43 @@ else ...@@ -616,49 +619,43 @@ else
desktop_file_new="${desktop_file//"$PORT_WINE_PATH/"/}" desktop_file_new="${desktop_file//"$PORT_WINE_PATH/"/}"
if [[ $desktop_file_new =~ .desktop$ ]] ; then if [[ $desktop_file_new =~ .desktop$ ]] ; then
if [[ ! $desktop_file_new =~ (PortProton|readme) ]] ; then if [[ ! $desktop_file_new =~ (PortProton|readme) ]] ; then
while IFS= read -r line ; do while IFS= read -r line1 ; do
if [[ $line =~ ^Exec= ]] ; then if [[ $line1 =~ ^Exec= ]] ; then
if check_flatpak ; then if check_flatpak ; then
PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${line//Exec=flatpak run ru.linux_gaming.PortProton /} PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${line1//Exec=flatpak run ru.linux_gaming.PortProton /}
else else
PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${line//Exec=env \"$PORT_SCRIPTS_PATH\/start.sh\" /} PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${line1//Exec=env \"$PORT_SCRIPTS_PATH\/start.sh\" /}
fi fi
fi fi
[[ $line =~ ^Icon= ]] && PW_ICON_PATH["$AMOUNT_GENERATE_BUTTONS"]="${line//Icon=/}" [[ $line1 =~ ^Icon= ]] && PW_ICON_PATH["$AMOUNT_GENERATE_BUTTONS"]=${line1//Icon=/}
[[ $line =~ ^#Time= ]] && PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]="${line//#Time=/}"
[[ $line =~ ^#NEW_DESKTOP ]] && NEW_DESKTOP=1
done < "$desktop_file" done < "$desktop_file"
PW_ALL_DF["$AMOUNT_GENERATE_BUTTONS"]="$desktop_file_new" PW_ALL_DF["$AMOUNT_GENERATE_BUTTONS"]="$desktop_file_new"
if [[ $SORT_WITH_TIME == enabled ]] && [[ $NEW_DESKTOP == 1 ]] ; then # Для конвертации существующих .desktop файлов flatpak в натив и наоборот
unset NEW_DESKTOP
sed -i '/^#NEW_DESKTOP/d' "$desktop_file"
PW_AMOUNT_NEW_DESKTOP+=($AMOUNT_GENERATE_BUTTONS)
else
PW_AMOUNT_OLD_DESKTOP+=($AMOUNT_GENERATE_BUTTONS)
fi
# Для конвертация .desktop файлов flatpak в натив и наоборот
if [[ ${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]} =~ ^"Exec=flatpak run ru.linux_gaming.PortProton " ]] ; then if [[ ${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]} =~ ^"Exec=flatpak run ru.linux_gaming.PortProton " ]] ; then
PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//Exec=flatpak run ru.linux_gaming.PortProton /} PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//Exec=flatpak run ru.linux_gaming.PortProton /}
NEED_FIXES_DESKTOP=1 sed -i "s|Exec=flatpak run ru.linux_gaming.PortProton|Exec=env \"$PORT_SCRIPTS_PATH/start.sh\"|" "$desktop_file"
elif [[ ${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]} =~ ^"Exec=env \"$PORT_SCRIPTS_PATH/start.sh\" " ]] ; then elif [[ ${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]} =~ ^"Exec=env \"$PORT_SCRIPTS_PATH/start.sh\" " ]] ; then
PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//Exec=env \"$PORT_SCRIPTS_PATH\/start.sh\" /} PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//Exec=env \"$PORT_SCRIPTS_PATH\/start.sh\" /}
NEED_FIXES_DESKTOP=1 sed -i "s|Exec=env \"$PORT_SCRIPTS_PATH/start.sh\"|Exec=flatpak run ru.linux_gaming.PortProton|" "$desktop_file"
fi fi
# Для фикса битых #Time= while IFS=" " read -r -a line2 ; do
if [[ ! ${PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]} =~ [0-9]+ ]] \ if [[ \"${line2[0]//#@_@#/ }\" == "${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]}" ]] ; then
|| (( ${PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]} >= 999999999 )) \ PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]=${line2[2]}
|| [[ $NEED_FIXES_DESKTOP == 1 ]] break
then else
portwine_exe=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//\"/} PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]=0
search_desktop_file fi
unset portwine_exe NEED_FIXES_DESKTOP done < "$PW_DATABASE_PATH/database"
PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]=$TIME_CURRENT if [[ $SORT_WITH_TIME == enabled ]] && [[ ${line2[3]} == NEW_DESKTOP ]] ; then
sed -i "s/${line2[1]} ${line2[2]} NEW_DESKTOP/${line2[1]} ${line2[2]} OLD_DESKTOP/" "$PW_DATABASE_PATH/database"
PW_AMOUNT_NEW_DESKTOP+=($AMOUNT_GENERATE_BUTTONS)
else
PW_AMOUNT_OLD_DESKTOP+=($AMOUNT_GENERATE_BUTTONS)
fi fi
(( AMOUNT_GENERATE_BUTTONS++ )) (( AMOUNT_GENERATE_BUTTONS++ ))
fi fi
fi fi
done done
# Переопределение элементов в массивах в зависимости от PW_GAME_TIME, от большего значения к меньшему. # Переопределение элементов в массивах в зависимости от PW_GAME_TIME, от большего значения к меньшему.
# 10 миллисекунд на 40 .desktop файлов, работает быстро # 10 миллисекунд на 40 .desktop файлов, работает быстро
if [[ $SORT_WITH_TIME == enabled ]] && [[ -n ${PW_GAME_TIME[1]} ]] ; then if [[ $SORT_WITH_TIME == enabled ]] && [[ -n ${PW_GAME_TIME[1]} ]] ; then
...@@ -683,7 +680,6 @@ else ...@@ -683,7 +680,6 @@ else
done done
done done
fi fi
# Генерация .desktop баттанов для главного меню # Генерация .desktop баттанов для главного меню
IFS=$'\n' IFS=$'\n'
PW_GENERATE_BUTTONS="--field= ${translations[Create shortcut...]}!${PW_GUI_ICON_PATH}/find_48.svg!:FBTNR%@bash -c \"button_click --normal pw_find_exe\"%" PW_GENERATE_BUTTONS="--field= ${translations[Create shortcut...]}!${PW_GUI_ICON_PATH}/find_48.svg!:FBTNR%@bash -c \"button_click --normal pw_find_exe\"%"
...@@ -903,7 +899,7 @@ case "$PW_YAD_SET" in ...@@ -903,7 +899,7 @@ case "$PW_YAD_SET" in
esac esac
case "$PW_YAD_SET" in case "$PW_YAD_SET" in
98) portwine_delete_shortcut ;; 98) portwine_change_shortcut ;;
100) portwine_create_shortcut ;; 100) portwine_create_shortcut ;;
DEBUG|102) portwine_start_debug ;; DEBUG|102) portwine_start_debug ;;
106) portwine_launch ;; 106) portwine_launch ;;
......
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