Compare commits

3 Commits

Author SHA1 Message Date
Mikhail Tergoev
10707bd010 fixed names for t-flex desktop files 2025-07-08 09:21:07 +03:00
Mikhail Tergoev
bd9d5b9561 unshare desktop directories 2025-07-08 09:20:05 +03:00
Mikhail Tergoev
9caea05eb5 create_desktop: override name with arg4" 2025-07-08 08:42:14 +03:00
4 changed files with 20 additions and 13 deletions

View File

@@ -34,5 +34,5 @@ if try_download "https://www.tflexcad.ru/download/t-flex-cad-free/files/TFCAD_ST
try_remove_dir "${WH_TMP_DIR}/Стандартные элементы 17"
WIN_FILE_EXEC="$DRIVE_C/Program Files/T-FLEX CAD Учебная Версия 17/Program/TFlexCad.exe"
create_desktop "$PROG_NAME" "$WIN_FILE_EXEC" "$PROG_ICON"
create_desktop "$PROG_NAME" "$WIN_FILE_EXEC" "$PROG_ICON" "TFlexCadEDU"
fi

View File

@@ -27,5 +27,5 @@ if try_download "https://www.tflex.ru/downloads/T-FLEX%20CAD%2017.zip" "${AUTOIN
try_remove_file "${AUTOINSTALL_EXE}"
WIN_FILE_EXEC="$DRIVE_C/Program Files/T-FLEX CAD 17/Program/TFlexCad.exe"
create_desktop "$PROG_NAME" "$WIN_FILE_EXEC" "$PROG_ICON"
create_desktop "$PROG_NAME" "$WIN_FILE_EXEC" "$PROG_ICON" "TFlexCad"
fi

View File

@@ -27,5 +27,5 @@ if try_download "https://www.tflex.ru/downloads/T-FLEX%20CAD%202D+%2017.zip" "${
try_remove_file "${AUTOINSTALL_EXE}"
WIN_FILE_EXEC="$DRIVE_C/Program Files/T-FLEX CAD 2D+ 17/Program/TFlexCad.exe"
create_desktop "$PROG_NAME" "$WIN_FILE_EXEC" "$PROG_ICON"
create_desktop "$PROG_NAME" "$WIN_FILE_EXEC" "$PROG_ICON" "TFlexCad2D"
fi

View File

@@ -433,10 +433,13 @@ var_ld_library_path_update () {
}
create_desktop () {
local name_desktop="$1"
local exe_file="$2"
local desktop_filename="$(basename "$exe_file" .exe | sed "s| |_|")"
local icon_file
local name_desktop exe_file desktop_filename icon_file
name_desktop="$1"
exe_file="$2"
if [[ -n $4 ]] ;
then desktop_filename="$4"
else desktop_filename="$(basename "$exe_file" .exe | sed "s| |_|")"
fi
if [[ "$RESTORE_FROM_BACKUP" == "1" ]] && [[ -f "$3" ]]
then icon_file="$3"
elif [[ -f "$WH_IMAGE_PATH/$3.png" ]]
@@ -942,6 +945,7 @@ init_wineprefix () {
fi
export DRIVE_C="$WINEPREFIX/drive_c"
export XUSER_PATH="$DRIVE_C/users/xuser"
if [[ ! -f "$WINEPREFIX/.firstboot" ]] ; then
create_new_dir "$WINEPREFIX"
@@ -971,10 +975,10 @@ init_wineprefix () {
print_info "Windows версия изменена на win${WH_WINDOWS_VER}"
fi
if [[ -d "$DRIVE_C/users/xuser" ]] && [[ ! -d "$DRIVE_C/users/$USER" ]]
then try_force_link_dir "$DRIVE_C/users/xuser" "$DRIVE_C/users/$USER"
elif [[ ! -d "$DRIVE_C/users/xuser" ]] && [[ -d "$DRIVE_C/users/$USER" ]]
then try_force_link_dir "$DRIVE_C/users/$USER" "$DRIVE_C/users/xuser"
if [[ -d "$XUSER_PATH" ]] && [[ ! -d "$DRIVE_C/users/$USER" ]]
then try_force_link_dir "$XUSER_PATH" "$DRIVE_C/users/$USER"
elif [[ ! -d "$XUSER_PATH" ]] && [[ -d "$DRIVE_C/users/$USER" ]]
then try_force_link_dir "$DRIVE_C/users/$USER" "$XUSER_PATH"
fi
if [[ ! -f "$WINEPREFIX/.update-timestamp" ]] ; then
@@ -983,12 +987,15 @@ init_wineprefix () {
wait_wineserver
fi
if [[ -L "$XUSER_PATH/Desktop" ]]
then rm -f "$XUSER_PATH/Desktop"
fi
create_new_dir "$XUSER_PATH/Desktop"
if [[ ! -L "$WINEPREFIX/dosdevices/h:" ]]
then try_force_link_dir "$HOME" "$WINEPREFIX/dosdevices/h:"
fi
try_remove_file "$DRIVE_C/windows/system32/winemenubuilder.exe"
if [[ $WH_USE_MESA_GL_OVERRIDE == "1" ]] \
&& ! lspci | grep -i nvidia > /dev/null ; then
export MESA_GL_VERSION_OVERRIDE="3.3"