Commit 0013773a authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'Htylol-spellcheck_and_fixes' into devel

parents 7d983ae9 16e64e72
...@@ -689,7 +689,7 @@ debug_timer () { ...@@ -689,7 +689,7 @@ debug_timer () {
START=$(date +%s%N) START=$(date +%s%N)
elif [[ "$1" == "--end" ]] ; then elif [[ "$1" == "--end" ]] ; then
END=$(date +%s%N) END=$(date +%s%N)
DIFF=$((($END - $START)/1000000)) DIFF=$((( END - START )/1000000))
if [[ -n "$2" ]] ; then if [[ -n "$2" ]] ; then
if [[ "$2" != "-s" ]] ; then if [[ "$2" != "-s" ]] ; then
print_warning "It took $DIFF milliseconds for $2" print_warning "It took $DIFF milliseconds for $2"
...@@ -733,7 +733,7 @@ combobox_fix () { ...@@ -733,7 +733,7 @@ combobox_fix () {
name3="${name3//\!\!/\!}" name3="${name3//\!\!/\!}"
name4="${name3//*\!/}" name4="${name3//*\!/}"
if [[ ${name1} == "${name4}" ]] || [[ ${name1} == "\\${name4}" ]] if [[ ${name1} == "${name4}" ]] || [[ ${name1} == "\\${name4}" ]]
then name3="${name3%\!${name1}}" then name3="${name3%\!"${name1}"}"
fi fi
if [[ "$1" == "--disabled" ]] ; then if [[ "$1" == "--disabled" ]] ; then
if [[ ${name1} != "disabled" ]] if [[ ${name1} != "disabled" ]]
...@@ -850,9 +850,11 @@ init_wine_ver () { ...@@ -850,9 +850,11 @@ init_wine_ver () {
if [[ "${PW_WINE_USE}" == "USE_SYSTEM_WINE" ]] \ if [[ "${PW_WINE_USE}" == "USE_SYSTEM_WINE" ]] \
&& command -v wine &>/dev/null ; then && command -v wine &>/dev/null ; then
export WINEDIR="$RT_PREFIX/usr" export WINEDIR="$RT_PREFIX/usr"
export WINE="$RT_PREFIX$(command -v wine)" WINE="$RT_PREFIX$(command -v wine)"
export WINE
export WINELOADER="$WINE" export WINELOADER="$WINE"
export WINESERVER="$RT_PREFIX$(command -v wineserver)" WINESERVER="$RT_PREFIX$(command -v wineserver)"
export WINESERVER
export PW_NO_FSYNC=1 export PW_NO_FSYNC=1
unset WINEDLLPATH unset WINEDLLPATH
else else
...@@ -1531,7 +1533,7 @@ check_dirs_and_files_in_pfx () { ...@@ -1531,7 +1533,7 @@ check_dirs_and_files_in_pfx () {
if [[ ! -L "$drive_path" ]] ; then if [[ ! -L "$drive_path" ]] ; then
if [[ $(<"/sys/class/block/$mount_name/removable") != "1" ]] 2>/dev/null ; then if [[ $(<"/sys/class/block/$mount_name/removable") != "1" ]] 2>/dev/null ; then
if [[ ! $(echo "$mount_point" | grep "mmc") ]] 2>/dev/null ; then if [[ ! "$mount_point" =~ "mmc" ]] ; then
ln -sf "$drive_dir" "$drive_path" ln -sf "$drive_dir" "$drive_path"
print_info "Mounted ${drive_dir} to ${drive_path}" print_info "Mounted ${drive_dir} to ${drive_path}"
break break
...@@ -1634,7 +1636,8 @@ pw_init_db () { ...@@ -1634,7 +1636,8 @@ pw_init_db () {
else else
if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then
if [[ -n "${PORTWINE_DB}" ]] ; then if [[ -n "${PORTWINE_DB}" ]] ; then
export PORTWINE_DB_FILE=$(grep -il "#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*) PORTWINE_DB_FILE=$(grep -il "#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*)
export PORTWINE_DB_FILE
if [[ -z "${PORTWINE_DB_FILE}" ]] ; then if [[ -z "${PORTWINE_DB_FILE}" ]] ; then
{ {
echo "#!/usr/bin/env bash" echo "#!/usr/bin/env bash"
...@@ -1644,8 +1647,8 @@ pw_init_db () { ...@@ -1644,8 +1647,8 @@ pw_init_db () {
} > "${portwine_exe}".ppdb } > "${portwine_exe}".ppdb
export PORTWINE_DB_FILE="${portwine_exe}".ppdb export PORTWINE_DB_FILE="${portwine_exe}".ppdb
fi fi
if [[ -n $(echo "${portwine_exe}" | grep "/data/prefixes/") ]] && \ if [[ "${portwine_exe}" =~ "/data/prefixes/" ]] && \
[[ -z $(echo "${portwine_exe}" | grep "/data/prefixes/DEFAULT/") ]] [[ ! "${portwine_exe}" =~ "/data/prefixes/DEFAULT/" ]]
then then
PW_PREFIX_NAME=$(echo "${portwine_exe}" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}') PW_PREFIX_NAME=$(echo "${portwine_exe}" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}')
fi fi
...@@ -1759,10 +1762,10 @@ pw_port_update () { ...@@ -1759,10 +1762,10 @@ pw_port_update () {
if [[ ! -f "${PORT_WINE_TMP_PATH}/update_skip_mirror" ]] ; then if [[ ! -f "${PORT_WINE_TMP_PATH}/update_skip_mirror" ]] ; then
pw_check_update pw_check_update
else else
CHECK_UPDATE_MIRROR=$(<"${PORT_WINE_TMP_PATH}/update_skip_mirror") read -r -a CHECK_UPDATE_MIRROR <"${PORT_WINE_TMP_PATH}/update_skip_mirror"
UPDATE_SKIP_DAYS="$(echo "${CHECK_UPDATE_MIRROR}" | awk -F" " '{print $1}')" UPDATE_SKIP_DAYS="${CHECK_UPDATE_MIRROR[0]}"
UPDATE_DATE_MIRROR="$(echo "${CHECK_UPDATE_MIRROR}" | awk -F" " '{print $2}')" UPDATE_DATE_MIRROR="${CHECK_UPDATE_MIRROR[1]}"
UPDATE_SKIP_DATE="$(echo "${CHECK_UPDATE_MIRROR}" | awk -F" " '{print $4}')" UPDATE_SKIP_DATE="${CHECK_UPDATE_MIRROR[3]}"
UPDATE_DAYS=$(date +%-j) UPDATE_DAYS=$(date +%-j)
UPDATE_MINUTES=$(($(date +%-H) * 60 + $(date +%-M))) UPDATE_MINUTES=$(($(date +%-H) * 60 + $(date +%-M)))
if [[ "${scripts_update_not}" != "0" ]] ; then if [[ "${scripts_update_not}" != "0" ]] ; then
...@@ -1789,7 +1792,7 @@ pw_port_update () { ...@@ -1789,7 +1792,7 @@ pw_port_update () {
print_info "Check update..." print_info "Check update..."
echo "" echo ""
if [[ -z "$UPDATE_URL_MIRROR" ]] ; then if [[ -z "$UPDATE_URL_MIRROR" ]] ; then
UPDATE_URL_MIRROR="$(echo "${CHECK_UPDATE_MIRROR}" | awk -F" " '{print $3}')" UPDATE_URL_MIRROR="${CHECK_UPDATE_MIRROR[2]}"
sed -i 's/[0-9]*$/'"$UPDATE_MINUTES"'/' "${PORT_WINE_TMP_PATH}/update_skip_mirror" sed -i 's/[0-9]*$/'"$UPDATE_MINUTES"'/' "${PORT_WINE_TMP_PATH}/update_skip_mirror"
fi fi
case "$UPDATE_URL_MIRROR" in case "$UPDATE_URL_MIRROR" in
...@@ -1934,8 +1937,8 @@ edit_db_from_gui () { ...@@ -1934,8 +1937,8 @@ edit_db_from_gui () {
if [[ -n "$PORTWINE_DB_FILE" ]] \ if [[ -n "$PORTWINE_DB_FILE" ]] \
&& [[ -f "$PORTWINE_DB_FILE" ]] && [[ -f "$PORTWINE_DB_FILE" ]]
then then
for mod_db in "$@" ; do for mod_db in $@ ; do
if [[ "$(<"${PORTWINE_DB_FILE}")" =~ "export ${mod_db}=" ]] if [[ $(<"${PORTWINE_DB_FILE}") =~ export\ ${mod_db}= ]]
then sed -i "s|export ${mod_db}=.*|export ${mod_db}=\"${!mod_db}\"|g" "${PORTWINE_DB_FILE}" then sed -i "s|export ${mod_db}=.*|export ${mod_db}=\"${!mod_db}\"|g" "${PORTWINE_DB_FILE}"
else echo "export ${mod_db}=\"${!mod_db}\"" >> "${PORTWINE_DB_FILE}" else echo "export ${mod_db}=\"${!mod_db}\"" >> "${PORTWINE_DB_FILE}"
fi fi
...@@ -3141,7 +3144,7 @@ start_portwine () { ...@@ -3141,7 +3144,7 @@ start_portwine () {
if [[ -d /sys/bus/pci/drivers/amdgpu ]] ; then if [[ -d /sys/bus/pci/drivers/amdgpu ]] ; then
export RADV_DEBUG+="nodcc " export RADV_DEBUG+="nodcc "
export AMD_DEBUG="nodcc" export AMD_DEBUG="nodcc"
if ! grep -q VK_EXT_image_drm_format_modifier "${PW_TMPFS_PATH}/vulkaninfo.tmp" ; then if [[ ! $(<"${PW_TMPFS_PATH}/vulkaninfo.tmp") =~ VK_EXT_image_drm_format_modifier ]] ; then
export R600_DEBUG="nodcc" export R600_DEBUG="nodcc"
grep -e '--backend' "${PW_TMPFS_PATH}/gamescope.tmp" &>/dev/null && PW_GS_BACKEND_SDL="1" grep -e '--backend' "${PW_TMPFS_PATH}/gamescope.tmp" &>/dev/null && PW_GS_BACKEND_SDL="1"
fi fi
...@@ -3921,7 +3924,6 @@ gui_proton_downloader () { ...@@ -3921,7 +3924,6 @@ gui_proton_downloader () {
fi fi
fi fi
VERSION_WINE_GIT=$(echo ${VERSION_WINE_GIT})
if [[ "$1" != "silent" ]] ; then if [[ "$1" != "silent" ]] ; then
for GIVE_ALL_WINE in ${VERSION_WINE_GIT} ; do for GIVE_ALL_WINE in ${VERSION_WINE_GIT} ; do
for GIVE_WINE_URL in ${WINE_GE_CUSTOM[@]} ${PROTON_GE_GIT[@]} ${WINE_KRON4EK[@]} ${PROTON_PW_GIT[@]} ; do for GIVE_WINE_URL in ${WINE_GE_CUSTOM[@]} ${PROTON_GE_GIT[@]} ${WINE_KRON4EK[@]} ${PROTON_PW_GIT[@]} ; do
...@@ -4976,10 +4978,11 @@ gui_userconf () { ...@@ -4976,10 +4978,11 @@ gui_userconf () {
gui_open_user_conf gui_open_user_conf
;; ;;
166) 166)
PW_ADD_SETTINGS_UC=$(<"${PW_TMPFS_PATH}/tmp_yad_userconf_set_cb") IFS='%' read -r -a PW_ADD_SETTINGS_UC <"${PW_TMPFS_PATH}/tmp_yad_userconf_set_cb"
PW_GPU_USE="$(echo "${PW_ADD_SETTINGS_UC}" | awk -F"%" '{print $1}')" IFS="$orig_IFS"
PW_SOUND_DRIVER_USE="$(echo "${PW_ADD_SETTINGS_UC}" | awk -F"%" '{print $2}')" PW_GPU_USE="${PW_ADD_SETTINGS_UC[0]}"
GUI_THEME="$(echo "${PW_ADD_SETTINGS_UC}" | awk -F"%" '{print $3}')" PW_SOUND_DRIVER_USE="${PW_ADD_SETTINGS_UC[1]}"
GUI_THEME="${PW_ADD_SETTINGS_UC[2]}"
edit_user_conf_from_gui PW_GPU_USE PW_SOUND_DRIVER_USE GUI_THEME edit_user_conf_from_gui PW_GPU_USE PW_SOUND_DRIVER_USE GUI_THEME
restart_pp restart_pp
;; ;;
......
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