added skip check i586 dependencies if wine-wow64
This commit is contained in:
@@ -7,23 +7,29 @@ if [[ $(id -u) -ne 0 ]] ; then
|
||||
fi
|
||||
|
||||
##### MESSAGES FUNCTIONS #####
|
||||
print_error () { printf "\E[31m%s ВНИМАНИЕ: $@ %s\e[0m\n" ;}
|
||||
fatal () { print_error "$@" ; exit 1 ;}
|
||||
if [[ -t 0 ]] ; then
|
||||
print_error () { printf "\E[31m%s Ошибка: $* %s\e[0m\n" ;}
|
||||
else
|
||||
print_error () { echo -e "Ошибка: $*" ;}
|
||||
fi
|
||||
|
||||
##### UPDATE SYSTEM #####
|
||||
apt-get update || fatal "Не удалось обновить список доступных пакетов,"
|
||||
fatal () {
|
||||
print_error "$@ Аварийное завершение работы WineHelper!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
##### CHECK AREPO (x86_64-i586) #####
|
||||
apt-repo | grep -q "x86_64-i586" || fatal "Репозиторий x86_64-i586 не подключен. \
|
||||
32-битные зависимости не будут установлены, а значит не будут работать и 32-битные \
|
||||
windows приложения. Подробнее по ссылке: https://www.altlinux.org/Biarch"
|
||||
|
||||
##### UPDATE SYSTEM #####
|
||||
apt-get update || fatal "Не удалось обновить список доступных пакетов,"
|
||||
|
||||
##### INSTALL DEPENDENCIES #####
|
||||
# fonts-ttf-ms
|
||||
|
||||
apt-get install {i586-,}{glibc-core,libstdc++6,glibc-pthread,glibc-nss,\
|
||||
apt-get install i586-{wine,glibc-core,libstdc++6,glibc-pthread,glibc-nss,\
|
||||
libnm,libnss,libnss-mdns,libnsl1,libunwind,libunixODBC2,ocl-icd,libfreetype,\
|
||||
libcups,libfontconfig1,libgnutls30,libGL,libEGL,libvulkan1,xorg-dri-swrast,\
|
||||
xorg-dri-intel,xorg-dri-radeon} || fatal "Не удалось установить зависимости."
|
||||
|
||||
apt-get install {i586-,}wine
|
||||
|
||||
38
winehelper
38
winehelper
@@ -208,15 +208,23 @@ su_run () {
|
||||
}
|
||||
|
||||
##### CHECK DEPENDENCIES #####
|
||||
# fonts-ttf-ms
|
||||
|
||||
check_deps_i586 () {
|
||||
if [[ $WH_USE_GUI != "1" ]] && [[ -t 0 ]] \
|
||||
&& ! rpm -q {i586-,}{wine,glibc-core,libstdc++6,glibc-pthread,glibc-nss,\
|
||||
libnm,libnss,libnss-mdns,libnsl1,libunwind,libunixODBC2,ocl-icd,libfreetype,\
|
||||
libcups,libfontconfig1,libgnutls30,libGL,libEGL,libvulkan1,xorg-dri-swrast,\
|
||||
xorg-dri-intel,xorg-dri-radeon} 1>/dev/null
|
||||
if [[ $WH_USE_GUI != "1" ]] && [[ ! -t 0 ]] ; then
|
||||
print_warning "Скрипт запущен из desktop файла."
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ $WH_SKIP_DEPS == "1" ]] ; then
|
||||
unset WH_SKIP_DEPS
|
||||
return 0
|
||||
fi
|
||||
|
||||
if ! rpm -q i586-{wine,glibc-core,libstdc++6,glibc-pthread,glibc-nss,\
|
||||
libnm,libnss,libnss-mdns,libnsl1,libunwind,libunixODBC2,ocl-icd,libfreetype,\
|
||||
libcups,libfontconfig1,libgnutls30,libGL,libEGL,libvulkan1,xorg-dri-swrast,\
|
||||
xorg-dri-intel,xorg-dri-radeon} 1>/dev/null
|
||||
then
|
||||
print_warning "Необходимо установить 32-битные зависимости!"
|
||||
if su_run "$DATA_PATH/dependencies.sh"
|
||||
then print_info "Зависимости успешно установлены. Продолжаем работу $SCRIPT_NAME"
|
||||
else fatal "Не удалось установить зависимости. Работа $SCRIPT_NAME прервана."
|
||||
@@ -785,13 +793,6 @@ check_installed_programs () {
|
||||
[[ -n $2 ]] && fatal "Не найден файл запуска для $2"
|
||||
}
|
||||
|
||||
run_installed_programs () {
|
||||
if check_installed_programs check_only "$1" ; then
|
||||
/usr/bin/env bash -c "\"$RUN_SCRIPT\" \"$EXE_PATH\"" &
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
copy_wined3d () {
|
||||
for wined3dfiles in $1 ; do
|
||||
try_copy_wine_dll_to_pfx_64 "$wined3dfiles.dll"
|
||||
@@ -2622,7 +2623,6 @@ case "$arg1" in
|
||||
install-vkd3d) run_install_vkd3d "$@" ;;
|
||||
change-wine) run_change_wine_version "$@" ;;
|
||||
installed) check_installed_programs "$1" ;;
|
||||
run|-r) run_installed_programs "$1" ;;
|
||||
backup-prefix) backup_prefix "$@" ;;
|
||||
restore-prefix) restore_prefix "$@" ;;
|
||||
remove-all) remove_winehelper "$@" ;;
|
||||
@@ -2631,6 +2631,14 @@ case "$arg1" in
|
||||
create-base-pfx) create_base_pfx "$@" ;;
|
||||
init-prefix) prepair_wine ; wait_wineserver ;;
|
||||
clear-winetricks-cache) clear_winetricks_cache "$@" ;;
|
||||
run|-r)
|
||||
if check_installed_programs check_only "$1" ; then
|
||||
WIN_FILE_EXEC="$(readlink -f "$EXE_PATH")"
|
||||
shift
|
||||
prepair_wine
|
||||
wine_run "$WIN_FILE_EXEC" "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if [[ -f "$arg1" ]] ; then
|
||||
WIN_FILE_EXEC="$(readlink -f "$arg1")"
|
||||
|
||||
@@ -3948,6 +3948,8 @@ class WineHelperGUI(QMainWindow):
|
||||
QMessageBox.critical(self, "Ошибка", f"Не удалось модифицировать команду для отладки: {e}")
|
||||
return
|
||||
|
||||
os.environ["WH_SKIP_DEPS"] = "1"
|
||||
|
||||
process = QProcess()
|
||||
env = QProcessEnvironment.systemEnvironment()
|
||||
|
||||
@@ -3980,6 +3982,7 @@ class WineHelperGUI(QMainWindow):
|
||||
self.running_apps[desktop_path] = process
|
||||
self._set_run_button_state(True)
|
||||
print(f"Запущено: {program} {' '.join(arguments)}")
|
||||
os.environ["WH_SKIP_DEPS"] = "0"
|
||||
except Exception as e:
|
||||
QMessageBox.critical(self, "Ошибка запуска",
|
||||
f"Не удалось запустить команду:\n{command_str}\n\nОшибка: {str(e)}")
|
||||
|
||||
Reference in New Issue
Block a user