commit d7febc408a0f1937f5cf6eddd89659318c4b894e Author: Kevin Kim Date: Sun Oct 4 15:28:42 2020 +0900 release systemback for hamonikr 3.0 diff --git a/README.md b/README.md new file mode 100644 index 0000000..30982bb --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +![hamonikr-me](https://img.shields.io/badge/hamonikr-me-orange) +![hamonikr-sun](https://img.shields.io/badge/hamonikr-sun-green) + +## systemback + +Upstream : https://code.launchpad.net/~nemh/systemback/stable + +systemback 프로그램을 하모니카에서 사용할 수 있도록 새롭게 빌드한 프로젝트. + +- 초보자도 쉽게 자신만의 ISO 이미지를 만들어서 배포할 수 있는 프로그램 +- 사용중인 자신의 PC 환경을 라이브 이미지로 제작할 수 있는 기능 제공 +- 자신이 수정한 자신만의 환경으로 다른 PC에 설치할수 있는 ISO 이미지를 쉽게 + 제작가능 +- 한글 인터페이스를 지원하도록 기능 추가 +- 하모니카 3.0 에서 빌드하고 검증완료 (Ubuntu 18.04, LinuxMint 19.01 지원) + + +![screen1](doc/systemback-1.png) +![screen2](doc/systemback-2.png) + +## 설치 +``` +# 하모니카 SUN 저장소 추가 +curl -sL https://apt.hamonikr.org/setup_hamonikr.sun | sudo -E bash - + +sudo apt install systemback +``` + +## 이슈 또는 버그 + 사용 중 문제를 발견하시면 root@hamonikr.org 또는 https://hamonikr.org 에서 알려주세요. \ No newline at end of file diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..2fe5f59 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,60 @@ +systemback (1.8.402hamonikr1) release; urgency=low + + * Rebuild for HamoniKR OS + * Added Korean translation + + -- Kevin Kim Sun, 04 Oct 2020 15:10:11 +0900 + +systemback (1.8.402) release; urgency=low + + * 1.8.402 + * Fix Live creation when the '/snap' directory is missing + + * 1.8.400 + * Add support to installed Snap packages + * Remove support to old (version 1.5 and below) restore points + * Fix possible segmentation fault when checking directory mount status + * Fix translation files detection in DBGLEV=3 mode + * Fix source code compilation under Ubuntu 14.04 + * Import new Romanian translations + + * 1.8.300 + * Fix the possible conflict with the APT when updating the package index files + * Import new EFI boot files from the Ubuntu 16.04 LTS + * Import new Czech, English (United Kingdom), Hungarian, Romanian and Spanish + translations + + * 1.8.202 + * Improve compatibility with apt 1.2 + * Update EFI boot files + * Import new Spanish, Danish and Chinese (Simplified) translations + + * 1.8.201 + * Fix restore point creation when the storage dir path contains symbolic link + * Fix some directory date and time settings when creating restore points + + * 1.8.200 + * Fix line breaking when printing the mounted filesystems in DBGLEV=3 mode + * Fix error messages printing when upgrading the system + * Fix the GRUB menu height on the Live when the system contains xorg.conf + file(s) + * Detect and takes into account the configuration file(s) in the + /etc/X11/xorg.conf.d directory + * Update EFI boot files + * Import new Czech translations + + * 1.8.102 + * Fix possible segmentation fault when try to minimize the window with the + button + + * 1.8.101 + * Fix partition information reading on Ubuntu 16.04 + + * 1.8.100 + * Fix incorrect symlink following when creating a new incremental restore + point (TeamViewer global.conf bug) + * Add a new debug level (DBGLEV=3) for more debug information + * Some minor fixes and improvements + * Import new Hungarian translations + + -- Kende Krisztián Mon, 16 May 2016 13:04:46 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..292fd94 --- /dev/null +++ b/debian/control @@ -0,0 +1,177 @@ +Source: systemback +Section: admin +Priority: optional +Maintainer: Kende Krisztián +Build-Depends: debhelper (>= 9), + libblkid-dev, + libmount-dev, + libncursesw5-dev, + libparted0-dev, + qtbase5-dev, + qttools5-dev-tools +Standards-Version: 3.9.7 + +Package: systemback +Architecture: amd64 i386 +Depends: ${misc:Depends}, + ${shlibs:Depends}, + casper | live-boot, + dosfstools, + fonts-freefont-ttf | ttf-freefont, + genisoimage, + squashfs-tools, + syslinux, + syslinux (<< 3:5) | isolinux (>> 3:6), + syslinux (<< 3:5) | syslinux-common (>> 3:6), + syslinux (<< 3:5) | syslinux-utils (>> 3:6), + systemback-efiboot-amd64 (= ${source:Version}) [amd64], + systemback-scheduler (= ${binary:Version}), + upstart | sysvinit (>= 2.88) | systemd, + xterm, + zenity | kde-baseapps-bin | kdebase-bin +Recommends: grub2-common, + grub-efi-amd64-bin, + grub-pc-bin, + lupin-casper [amd64], + systemback-cli (= ${binary:Version}), + systemback-locales (= ${source:Version}), + ttf-ubuntu-font-family +Suggests: btrfs-tools, + jfsutils, + reiserfsprogs, + xfsprogs, + unionfs-fuse +Conflicts: live-config, + live-config-systemd +Breaks: systemback-gui-common (<< 1.0.0) +Replaces: systemback-gui-common (<< 1.0.0) +Description: Simple system backup and restore application with extra features + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contain a Qt5 graphical user interface for Systemback. + +Package: systemback-dbg +Architecture: amd64 i386 +Section: debug +Priority: extra +Depends: ${misc:Depends}, + systemback (= ${binary:Version}) +Description: Debug symbols for systemback + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contains the debug symbols for systemback. + +Package: systemback-cli +Architecture: amd64 i386 +Depends: ${misc:Depends}, + ${shlibs:Depends}, + upstart | sysvinit (>= 2.88) | systemd +Recommends: grub2-common, + grub-efi-amd64-bin | grub-pc-bin +Description: Systemback command line interface + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contain a command line interface for Systemback. + +Package: systemback-cli-dbg +Architecture: amd64 i386 +Section: debug +Priority: extra +Depends: ${misc:Depends}, + systemback-cli (= ${binary:Version}) +Description: Debug symbols for systemback-cli + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contains the debug symbols for systemback-cli. + +Package: systemback-scheduler +Architecture: amd64 i386 +Depends: ${misc:Depends}, + ${shlibs:Depends} +Breaks: systemback (<< 1.0.0) +Replaces: systemback (<< 1.0.0) +Description: Systemback scheduler daemon + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contain a scheduler daemon for Systemback. + +Package: systemback-scheduler-dbg +Architecture: amd64 i386 +Section: debug +Priority: extra +Depends: ${misc:Depends}, + systemback-scheduler (= ${binary:Version}) +Description: Debug symbols for systemback-scheduler + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contains the debug symbols for systemback-scheduler. + +Package: libsystemback +Architecture: amd64 i386 +Section: libs +Depends: ${misc:Depends}, + ${shlibs:Depends}, + apt, + procps +Description: Systemback shared library + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contain a shared library for Systemback binaries. + +Package: libsystemback-dbg +Architecture: amd64 i386 +Section: debug +Priority: extra +Depends: ${misc:Depends}, + libsystemback (= ${binary:Version}) +Description: Debug symbols for libsystemback + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contains the debug symbols for libsystemback. + +Package: systemback-efiboot-amd64 +Architecture: all +Depends: ${misc:Depends}, + xz-utils +Description: Systemback boot files + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contais 64-bit boot files for UEFI-based machines. + +Package: systemback-locales +Architecture: all +Depends: ${misc:Depends} +Description: Systemback localizations files + Systemback makes it easy to create backups of the system and the users + configuration files. In case of problems you can easily restore the previous + state of the system. There are extra features like system copying, system + installation and Live system creation. + . + This package contains localizations files for Systemback. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7606a57 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,22 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 +Upstream-Name: Systemback +Source: https://sourceforge.net/projects/systemback/files + +Files: * +Copyright: 2010-2016 Krisztián Kende +License: GPL-3+ + This package is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 3 of the License, or (at your option) any later + version. + . + This package is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public License version 3 + can be found in the file '/usr/share/common-licenses/GPL'. diff --git a/debian/libsystemback.install b/debian/libsystemback.install new file mode 100644 index 0000000..dc3d4b1 --- /dev/null +++ b/debian/libsystemback.install @@ -0,0 +1 @@ +libsystemback/libsystemback.so* usr/lib/systemback diff --git a/debian/libsystemback.postrm b/debian/libsystemback.postrm new file mode 100755 index 0000000..fe331b0 --- /dev/null +++ b/debian/libsystemback.postrm @@ -0,0 +1,21 @@ +#!/bin/sh -e + +if [ "$1" = purge ] && [ -d /etc/systemback ] +then + echo "Deleting Systemback configuration files ..." + + if [ -f /etc/systemback/systemback.conf ] + then + sdir="$(grep ^storage_directory= /etc/systemback/systemback.conf | tail -c +19)" + rm /etc/systemback/systemback.conf + + if [ "$sdir" ] && [ -d "$sdir"/Systemback ] && [ ! -d "$sdir"/Systemback/S01_* ] && [ ! -d "$sdir"/Systemback/H01_* ] + then + [ ! -e "$sdir"/Systemback/.sbschedule ] || rm "$sdir"/Systemback/.sbschedule + ! rm -d "$sdir"/Systemback 2>/dev/null || echo "Deleting empty Systemback storage directory ..." + fi + fi + + rm -r /etc/systemback +fi +#DEBHELPER# \ No newline at end of file diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..ef449a4 --- /dev/null +++ b/debian/rules @@ -0,0 +1,62 @@ +#!/usr/bin/make -f + +configure: configure-stamp + +configure-stamp: + qmake -qt5 + touch configure-stamp + +build: build-arch build-indep + +build-arch: build-arch-stamp + +build-indep: build-indep-stamp + +build-arch-stamp: configure-stamp + $(MAKE) -j $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1) + touch build-arch-stamp + +build-indep-stamp: + lrelease -qt5 systemback.pro + touch build-indep-stamp + +clean: + rm -f configure-stamp build-*-stamp lang/*.qm libsystemback/libmount.hpp + [ ! -f Makefile ] || $(MAKE) distclean + dh_clean + +binary-arch: build-arch + dh_installdirs -a + dh_install -a + dh_installman debian/systemback.1 -p systemback + dh_installman debian/systemback-cli.1 -p systemback-cli + dh_strip --dbg-package=systemback-dbg -p systemback + dh_strip --dbg-package=systemback-cli-dbg -p systemback-cli + dh_strip --dbg-package=systemback-scheduler-dbg -p systemback-scheduler + dh_strip --dbg-package=libsystemback-dbg -p libsystemback + dh_link -a + dh_fixperms -a + chmod 4755 debian/systemback-scheduler/usr/lib/systemback/sbsustart + dh_makeshlibs -nV "libsystemback (= $(shell dpkg-parsechangelog | sed -n 's/^Version: //p'))" -a + dh_shlibdeps -a + dh_installdeb -a + dh_gencontrol -a + dh_installdocs -a + dh_installchangelogs -a + dh_lintian -a + dh_compress -a + dh_builddeb -a + +binary-indep: build-indep + dh_install -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_installdocs -i + dh_installchangelogs -i + dh_compress -i + dh_builddeb -i + +binary: binary-arch binary-indep + +.PHONY: configure build-arch build-indep clean binary-arch binary-indep binary diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides new file mode 100644 index 0000000..2f2cfd6 --- /dev/null +++ b/debian/source.lintian-overrides @@ -0,0 +1 @@ +systemback source: newer-standards-version * diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/systemback-cli.1 b/debian/systemback-cli.1 new file mode 100644 index 0000000..2247a58 --- /dev/null +++ b/debian/systemback-cli.1 @@ -0,0 +1,70 @@ +.TH Systemback 1 "02.02.2016." + +.SH NAME +Systemback - Simple system backup and restore application with extra +.br + features + +.SH SYNOPSIS +\fBsystemback-cli\fR [\fIOPTION\fR] + +.SH DESCRIPTION + +\fBSystemback\fR makes it easy to create backups of the system and the users +configuration files. In case of problems you can easily restore the previous +state of the system. There are extra features like system copying, system +installation and Live system creation. + +.SH OPTIONS +.TP +.B -n, --newbackup +create a new restore point +.TP +.B -s, --storagedir +get or set restore points storage directory path +.TP +.B -u, --upgrade +upgrade current system +.br +remove unnecessary files and packages +.TP +.B -v, --version +output Systemback version number +.TP +.B -h, --help +show help + +.SH ENVIRONMENT +.TP +.B DBGLEV +set the debug level for the stdout printed error messages +.br +these will be redirected to the /tmp/systemback-cli_stderr +.br +0 - no error messages +.br +1 - print the error messages when a process has stopped because +.br + an error occurred (default) +.br +2 - this is the same as level 1 +.br +3 - print the error messages with extra informations + +.SH FILES +.SS /etc/systemback/systemback.conf +configuration of GUI and CLI +.br +the possible variables and values are indicated in the file, all other changes +are lost + +.SS /etc/systemback/systemback.excludes +exclude hidden user files and directories from restore points +.br +exclude user data files and directories from Live system + +.SS /etc/systemback/systemback.includes +include user data files and directories into the restore points + +.SH AUTHOR +Krisztián Kende (nemh@freemail.hu) diff --git a/debian/systemback-cli.install b/debian/systemback-cli.install new file mode 100644 index 0000000..be073d4 --- /dev/null +++ b/debian/systemback-cli.install @@ -0,0 +1 @@ +systemback-cli/systemback-cli usr/bin diff --git a/debian/systemback-efiboot-amd64.install b/debian/systemback-efiboot-amd64.install new file mode 100644 index 0000000..d910623 --- /dev/null +++ b/debian/systemback-efiboot-amd64.install @@ -0,0 +1 @@ +efi-amd64.bootfiles usr/share/systemback diff --git a/debian/systemback-locales.install b/debian/systemback-locales.install new file mode 100644 index 0000000..8a8bd7e --- /dev/null +++ b/debian/systemback-locales.install @@ -0,0 +1 @@ +lang/*.qm usr/share/systemback/lang diff --git a/debian/systemback-scheduler.install b/debian/systemback-scheduler.install new file mode 100644 index 0000000..1507bb3 --- /dev/null +++ b/debian/systemback-scheduler.install @@ -0,0 +1,3 @@ +sbscheduler/sbscheduler usr/lib/systemback +sbsustart/sbsustart usr/lib/systemback +sbschedule*.desktop etc/xdg/autostart diff --git a/debian/systemback-scheduler.lintian-overrides b/debian/systemback-scheduler.lintian-overrides new file mode 100644 index 0000000..6832c6f --- /dev/null +++ b/debian/systemback-scheduler.lintian-overrides @@ -0,0 +1 @@ +systemback-scheduler: setuid-binary diff --git a/debian/systemback-scheduler.postrm b/debian/systemback-scheduler.postrm new file mode 100755 index 0000000..7b0aac7 --- /dev/null +++ b/debian/systemback-scheduler.postrm @@ -0,0 +1,11 @@ +#!/bin/sh -e + +if [ -d /run ] +then pfile=/run/sbscheduler.pid +else pfile=/var/run/sbscheduler.pid +fi + +if [ "$1" = upgrade ] && [ -s $pfile ] +then printf restart > $pfile +fi +#DEBHELPER# \ No newline at end of file diff --git a/debian/systemback-scheduler.preinst b/debian/systemback-scheduler.preinst new file mode 100755 index 0000000..7c1119e --- /dev/null +++ b/debian/systemback-scheduler.preinst @@ -0,0 +1,8 @@ +#!/bin/sh -e + +if [ "$1" = install ] && grep ^enabled=true /etc/systemback/systemback.conf >/dev/null 2>&1 +then + echo "Disabling Systemback scheduler ..." + sed -i s/^enabled=true/enabled=false/g /etc/systemback/systemback.conf +fi +#DEBHELPER# \ No newline at end of file diff --git a/debian/systemback-scheduler.prerm b/debian/systemback-scheduler.prerm new file mode 100755 index 0000000..451139c --- /dev/null +++ b/debian/systemback-scheduler.prerm @@ -0,0 +1,16 @@ +#!/bin/sh -e + +if [ -d /run ] +then dir=/run +else dir=/var/run +fi + +if [ "$1" = remove ] && [ -e $dir/sbscheduler.lock ] && [ -s $dir/sbscheduler.pid ] +then + echo "Stopping Systemback scheduler daemon ..." + + if kill $(cat $dir/sbscheduler.pid) >/dev/null 2>&1 + then rm $dir/sbscheduler.lock $dir/sbscheduler.pid + fi +fi +#DEBHELPER# \ No newline at end of file diff --git a/debian/systemback.1 b/debian/systemback.1 new file mode 100644 index 0000000..490db28 --- /dev/null +++ b/debian/systemback.1 @@ -0,0 +1,49 @@ +.TH Systemback 1 "02.02.2016." + +.SH NAME +Systemback - Simple system backup and restore application with extra +.br + features + +.SH SYNOPSIS +\fBsystemback + +.SH DESCRIPTION + +\fBSystemback\fR makes it easy to create backups of the system and the users +configuration files. In case of problems you can easily restore the previous +state of the system. There are extra features like system copying, system +installation and Live system creation. + +.SH ENVIRONMENT +.TP +.B DBGLEV +set the debug level for the stdout printed error messages +.br +0 - no error messages +.br +1 - print the error messages when a process has stopped because +.br + an error occurred (default) +.br +2 - print all error messages +.br +3 - print all error messages with extra informations + +.SH FILES +.SS /etc/systemback/systemback.conf +configuration of GUI and CLI +.br +the possible variables and values are indicated in the file, all other changes +are lost + +.SS /etc/systemback/systemback.excludes +exclude hidden user files and directories from restore points +.br +exclude user data files and directories from Live system + +.SS /etc/systemback/systemback.includes +include user data files and directories into the restore points + +.SH AUTHOR +Krisztián Kende (nemh@freemail.hu) diff --git a/debian/systemback.install b/debian/systemback.install new file mode 100644 index 0000000..bbdc11d --- /dev/null +++ b/debian/systemback.install @@ -0,0 +1,9 @@ +systemback/systemback usr/bin +sbsysupgrade/sbsysupgrade usr/lib/systemback +splash.png usr/share/systemback +logo.png usr/share/systemback +systemback*.desktop /usr/share/applications +icons/128x128/systemback.png usr/share/icons/hicolor/128x128/apps +icons/256x256/systemback.png usr/share/icons/hicolor/256x256/apps +icons/48x48/systemback.png usr/share/icons/hicolor/48x48/apps +icons/64x64/systemback.png usr/share/icons/hicolor/64x64/apps diff --git a/debian/systemback.links b/debian/systemback.links new file mode 100644 index 0000000..10cb211 --- /dev/null +++ b/debian/systemback.links @@ -0,0 +1 @@ +/usr/lib/systemback/sbsustart /usr/bin/systemback-sustart diff --git a/debian/systemback.lintian-overrides b/debian/systemback.lintian-overrides new file mode 100644 index 0000000..0b06cca --- /dev/null +++ b/debian/systemback.lintian-overrides @@ -0,0 +1,2 @@ +systemback: desktop-command-not-in-package +systemback: binary-without-manpage diff --git a/doc/systemback-1.png b/doc/systemback-1.png new file mode 100644 index 0000000..8b84f22 Binary files /dev/null and b/doc/systemback-1.png differ diff --git a/doc/systemback-2.png b/doc/systemback-2.png new file mode 100644 index 0000000..c86f608 Binary files /dev/null and b/doc/systemback-2.png differ diff --git a/efi-amd64.bootfiles b/efi-amd64.bootfiles new file mode 100644 index 0000000..2fe623d Binary files /dev/null and b/efi-amd64.bootfiles differ diff --git a/icons/128x128/systemback.png b/icons/128x128/systemback.png new file mode 100644 index 0000000..3264074 Binary files /dev/null and b/icons/128x128/systemback.png differ diff --git a/icons/256x256/systemback.png b/icons/256x256/systemback.png new file mode 100644 index 0000000..13e0613 Binary files /dev/null and b/icons/256x256/systemback.png differ diff --git a/icons/48x48/systemback.png b/icons/48x48/systemback.png new file mode 100644 index 0000000..f8ea960 Binary files /dev/null and b/icons/48x48/systemback.png differ diff --git a/icons/64x64/systemback.png b/icons/64x64/systemback.png new file mode 100644 index 0000000..92ba992 Binary files /dev/null and b/icons/64x64/systemback.png differ diff --git a/lang/systemback_ar_EG.ts b/lang/systemback_ar_EG.ts new file mode 100644 index 0000000..4ebe703 --- /dev/null +++ b/lang/systemback_ar_EG.ts @@ -0,0 +1,1884 @@ + + + + + systemback + + + Full name of the new user: + اسم المستخدم الجديد الكامل: + + + + New username to login: + اسم المستخدم الجديد للولوج: + + + + New user account password: + كلمة مرور حساب المستخدم الجديد: + + + + New root password (optional, not recommended for Ubuntu): + كلمة الجذر الجديدة (اختيارية، غير مستحسنة لأبونتو): + + + + New hostname: + اسم المضيف الجديد: + + + + + + + + + + + + + + + + Back + السابق + + + + + + + + Next + التالي + + + + + Working directory + دليل العمل + + + + Created Live images + الصور الحيّة المُنشأة + + + + Name of the Live system + اسم النظام الحيّ + + + + + + + + Options + خيارات + + + + Write target + هدف الكتابة + + + + Live operations + + + + + Include the user data files + ضمّن ملفات بيانات المستخدم + + + + Redetect devices + أعد اكتشاف الأجهزة + + + + + + Delete + احذف + + + + Convert to ISO + حوّل إلى ISO + + + + + + Create new + أنشئ جديد + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + ضُمّ أقسام النظام ذات الأخطاء إلى الدليل '‎/mnt' حسب البنية الأصلية.<br>('/'‏ -> '‎/mnt'، ‏'‎/home'‏ -> '‎/mnt/home'، إلخ.) + + + + + Mount + ضُمّ + + + + Reset mounts + + + + + Repair type + نوع الإصلاح + + + + GRUB 2 repair + إصلاح GRUB 2 + + + + System files repair + إصلاح ملفات النظام + + + + + Reinstall GRUB 2 bootloader: + أعد تثبيت محمّل الإقلاع GRUB 2: + + + + + Auto detection + اكتشف آليًّا + + + + Full repair + إصلاح شامل + + + + Do not repair the fstab file + + + + + Exclude hidden user files and directories from restore points + استثنِ ملفات المستخدم المخفية والأدلة من نقاط الاستعادة + + + + Exclude user data files and directories from Live system + استثنِ ملفات المستخدم والأدلة من النظام الحيّ + + + + Excluded items + العناصر المُستثناة + + + + + Remove item from the exclusion list + أزل العنصر من قائمة الاستثناء + + + + + Add item to the exclusion list + أضف العنصر إلى قائمة الاستثناء + + + + Scheduler state: + حالة المجدول: + + + + + + + + + + + + + + Disabled + معطّل + + + + Timer settings + إعدادات المؤقت + + + + Waiting time before creating a new restore point: + وقت الانتظار قبل إنشاء نقطة استعادة: + + + + Visible countdown time: + + + + + Pop-up window position on screen: + موقع النافذة المنبثقة على الشاشة: + + + + Use silent mode + استخدم الوضع الصامت + + + + + + + More + أكثر + + + + + + + Less + أقل + + + + Simple system backup and restore application with extra features + تطبيق بسيط لنسخ النظام احتياطيًّا واستعادته مع بعض الميزات الإضافية + + + + Project homepage: + صفحة المشروع الرئيسية: + + + + Contact: + راسلني: + + + + Donate: + تبرّع: + + + + Systemback version: + + + + + + License + الرخصة + + + + Re-read directories + أعد قراءة الأدلة + + + + Writable Linux filesystem! + نظام ملفات لينكس قابل للكتابة! + + + + + + + Cancel + ألغِ + + + + + + + + + + + Maximum number of temporary restore points + أقصى عدد لنقاطة الاستعادة المؤقّتة + + + + + Include + + + + + + + + + + + + + + + + + + + empty + فارغ + + + + + + + + + + + not used + غير مُستخدم + + + + Includable items + + + + + Included items + + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + + + Restore points + نقاط الاستعادة + + + + Highlighted restore points + نقاط الاستعادة المُبرزة + + + + Point operations + عمليات النقطة + + + + Highlight + أبرز + + + + Rename + أعد التسمية + + + + + + + + + + + + + + + + + + Select restore point + اختر نقطة استعادة + + + + + + + + + Storage directory + دليل الوسيط + + + + Function menu + قائمة الوظائف + + + + + + System restore + استعد النظام + + + + + + + System copy + انسخ النظام + + + + + System install + ثبّت النظام + + + + + + + Live system create + انشئ نظام حيّ + + + + + System repair + أصلح النظام + + + + System upgrade + رقِّ النظام + + + + + Exclude + استثنِ + + + + + Schedule + الجدولة + + + + Excludable items + + + + + + + About + حول + + + + + Settings + + + + + Change path + غيّر المسار + + + + Restore type + نوع الاستعادة + + + + + + + + + Full restore + استعادة كاملة + + + + + + + + + System files restore + استعادة ملفات النظام + + + + User(s) configuration files restore + استعادة ملفات إعداد المستخدمين + + + + + Keep newly installed configuration files + أبقِ ملفات الإعداد المثبّتة حديثًا + + + + Include user(s): + ضمّن المستخدمين: + + + + Do not restore the fstab file + + + + + Partition settings + إعدادات القسم + + + + Need to set the mount point as '/boot/efi'! + + + + + Window DPI scaling + + + + + Multiplier factor for scaling the window contents + + + + + User interface + + + + + Window always on top + + + + + System + + + + + Disable scheduler daemon starting for the following users: + + + + + Use XZ compressor for squashfs filesystems + + + + + Override auto-detected language: + + + + + Override the used style: + + + + + Disable incremental restore points (do not use hard links between backups) + + + + + Create Live ISO images automatically (faster than the conversion) + + + + + Do not empty memory cache at the end of some processes + + + + + + + + + + + Unmount + افصِل + + + + Write to target + + + + + Mount point: + نقطة الضم: + + + + + + + + + ! Delete ! + + + + + Add new partition + + + + + Create new: + + + + + Filesystem: + نظام الملفات: + + + + + + Format + الهيئة + + + + + + Reset partitions settings + أعد تعيين إعدادات الأقسام + + + + Change partition settings + غيّر إعدادات القسم + + + + + + + + Transfer user configuration files + + + + + Copy user data files + انسخ ملفات بيانات المستخدم + + + + Install GRUB 2 bootloader: + ثبّت محمّل الإقلاع GRUB 2: + + + + + + + + + Transfer user configuration and data files + + + + + ! Interrupt ! + ! اقطع ! + + + + Creates a scheduled restore point within few seconds. + يُنشأ نقطة استعادة مجدولة في غضون ثوانٍ قليلة. + + + + + + Start + ابدأ + + + + Later + لاحقًا + + + + Systemback user authentication + + + + + Administrator: + + + + + Password: + + + + + + Partition + + + + + + Size + + + + + Current mount point + نقطة الضمّ الحالية + + + + New mount point + نقطة ضمّ جديدة + + + + Filesystem + نظام الملفات + + + + Device + الجهاز + + + + + + scheduler + المجدول + + + + + Top left + أعلى اليسار + + + + + + Top right + أعلى اليمين + + + + + + Center + الوسط + + + + + + Bottom left + أدنى اليسار + + + + + Bottom right + أدنى اليمين + + + + + + day(s) + + + + + + + hour(s) + + + + + + + + + minute(s) + + + + + + + seconds + + + + + + + Live image + الصورة الحيّة + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + + + Boot system installer + + + + + + + Currently running system + النظام العامل حاليًّا + + + + Label + + + + + + Creating restore point + ينشأ نقطة استعادة + + + + + Restoring the full system + + + + + + Restoring the system files + يستعيد ملفات النظام + + + + Restoring the user(s) configuration files + + + + + Repairing the system files + يُصلح ملفات النظام + + + + Repairing the full system + + + + + Copying the system + ينسخ النظام + + + + Installing the system + يثبّت النظام + + + + Creating Live system + ينشأ النظام الحيّ + + + + + Deleting restore point + يحذف نقطة الاستعادة + + + + Deleting old restore point + يحذف نقطة الاستعادة القديمة + + + + + Deleting incomplete restore point + يحذف نقطة الاستعادة غير المكتملة + + + + + Flushing filesystem buffers + + + + + + + + + + Reboot + أعد الإقلاع + + + + + + + X restart + إعادة تشغيل X + + + + Repairing the GRUB 2 + يُصلح GRUB 2 + + + + + Emptying cache + يمحو الخبيئة + + + + + An another Systemback process is currently running, please wait until it finishes. + + + + + Please enter a new name. + ضلًا أدخِل اسمًا جديدًا. + + + + The specified name contain(s) unsupported character(s)! + الاسم المحدّد يحوي محارف غير صالحة! + + + + Restore the system files to the following restore point: + استعد ملفات النظام إلى نقطة الاستعادة التالية: + + + + Repair the system files with the following restore point: + أصلح ملفات النظام بنقطة الاستعادة التالية: + + + + Repair the complete system with the following restore point: + أصلح كل النظام بنقطة الاستعادة التالية: + + + + Restore the complete user(s) configuration files to the following restore point: + استعد ملفات إعداد مستخدمي الحاسوب الكاملة إلى نقطة الاستعادة التالية: + + + + Restore the user(s) configuration files to the following restore point: + استعد ملفات إعداد مستخدمي الحاسوب إلى نقطة الاستعادة التالية: + + + + The user(s) configuration files full restoration are completed. + + + + + + The X server will restart automatically within 30 seconds. + + + + + The user(s) configuration files restoration are completed. + + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + + + + + The full system repair is completed. + اكتمل إصلاح كامل النظام. + + + + The system repair is completed. + اكتمل إصلاح النظام. + + + + Copy the system, using the following restore point: + انسخ النظام، باستخدام نقطة الاستعادة التالية: + + + + Install the system, using the following restore point: + ثبّت النظام، باستخدام نقطة الاستعادة التالية: + + + + + + + The restore point creation is aborted! + + + + + + + Not enough free disk space to complete the process. + + + + + + Root privileges are required for running the Systemback! + + + + + Restore the complete system to the following restore point: + استعد كامل النظام إلى أحد نقاط الاستعادة التالية: + + + + + The system files restoration are completed. + + + + + + + The computer will restart automatically within 30 seconds. + + + + + + The full system restoration is completed. + + + + + + + + + The system copy is aborted! + + + + + An error occurred while reinstalling the GRUB. + + + + + Format the %1, and write the following Live system image: + هيّئ %1، واكتب صورة النظام الحيّ التالية: + + + + The selected device does not have enough space to write the Live system. + + + + + + There is not enough free space. + + + + + Interrupting the current process + + + + + The system copy is completed, but an error occurred while installing the GRUB! + + + + + + You need to manually install a bootloader. + + + + + + The system restoration is aborted! + + + + + An error occurred while creating the file system image. + + + + + An error occurred while creating the container file. + حدث خطأ أثناء إنشاء الملف الحاوي. + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + + + + + + + The specified partition could not be formatted (in use or unavailable). + + + + + An error occurred while reinstalling the GRUB! + حدث خطأ أثناء إعادة تثبيت GRUB! + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + + + + + The system copy is completed. + اكتمل نسخ النظام. + + + + + + + + The Live system creation is aborted! + + + + + + + The specified partition could not be mounted. + تعذّر ضمّ القسم المحدّد. + + + + An error occurred while unpacking the Live system files. + حدث خطأ أثناء فكّ تحزيم ملفات النظام الحيّ. + + + + An error occurred while renaming the essential Live files. + + + + + An error occurred while creating the .iso image. + حدث خطأ أثناء إنشاء صورة ‎.iso. + + + + An error occurred while reading the .sblive image. + حدث خطأ أثناء قراءة صورة ‎.sblive. + + + + An error occurred while creating the new initramfs image. + + + + + + + The Live image could not be mounted. + + + + + The GRUB 2 repair is completed. + اكتمل إصلاح GRUB 2. + + + + Writing Live image to the target device + + + + + The Live system creation is completed. + + + + + The created .sblive file can be written to pendrive. + + + + + The system install is completed. + اكتمل تثبيت النظام. + + + + The system install is completed, but an error occurred while installing the GRUB! + + + + + + + + + The system installation is aborted! + + + + + + + + + + + There has been critical changes in the file system during this operation. + + + + + Repair the GRUB 2 bootloader. + أصلِح محمّل الإقلاع GRUB 2. + + + + + + + + The Live write is aborted! + + + + + The Live system image write is completed. + اكتمل كتابة صورة النظام الحيّ. + + + + + + + The Live conversion is aborted! + + + + + + The restore point deletion is aborted! + + + + + + An error occurred while during the process. + + + + + + The system repair is aborted! + + + + + + + + Everyone + + + + + Upgrading the system + يرقّي النظام + + + + + + + + Multiple mount points + + + + + Enabled + مُمكّن + + + + Systemback worker thread is interrupted by the user. + + + + + + process + + + + + Boot Live without xorg.conf file + + + + + + + Boot Live system + أقلِع النظام الحيّ + + + + + + Boot Live in safe graphics mode + + + + + + + Boot Live in debug mode + + + + + Press 'E' key to edit + اضغط زر 'E' للتحرير + + + + Press TAB key to edit + اضغط زر TAB للتحرير + + + + Converting Live system image + يحوّل صورة النظام الحيّ + + + + + Unable to get exclusive lock! + تعذّر الحصول على استثناء قفل! + + + + + First, close all package manager. + أولًا، أغلق كل مدراء الحزم. + + + + The specified storage directory path has not been set! + + + + + The restoration is aborted! + + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + + + + + The restore points storage directory is not available or not writable! + + + + + This stupid terminal does not support color! + + + + + This terminal is too small! + + + + + basic restore UI + + + + + Available restore point(s): + + + + + Quit + + + + + Selected restore point: + + + + + The specified storage directory path is set. + + + + + Deleting old restore point(s) + + + + + Restore with the following restore point: + + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + + + + + The Systemback command line interface cannot be used on a Live system! + + + + + Restore with the following restore method: + + + + + Users configuration files restore + + + + + + Complete configuration files restore + + + + + Configuration files restore + + + + + + + You want to keep the current fstab file? + + + + + + + + + + + + (Y/N) + + + + + + + + Reinstall the GRUB 2 bootloader? + + + + + Start the restore? + + + + + Restoring the users configuration files + + + + + The users configuration files full restoration are completed. + + + + + The users configuration files restoration are completed. + + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + + + + + Press 'ENTER' key to quit. + + + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + + + + + An error occurred while opening the following file: + + + + + An error occurred while creating the following directory: + + + + + An error occurred while removing the following file: + + + + + An error occurred while creating the following hard link: + + + + + Reference file: + + + + + An error occurred while creating the following file: + + + + + An error occurred while renaming the following item: + + + + + New path: + + + + + An error occurred while executing the following command: + + + + + Exit code: + + + + + Failed to detect the device for installing the GRUB! + + + + + An error occurred while upgrading the system! + + + + + Restart upgrade ... + + + + + This file could not be copied because it does not exist: + + + + + The following partition has no UUID: + + + + + An error occurred while creating a new partition on the following device: + + + + + An error occurred while mounting the following partition/image: + + + + + An error occurred while setting one or more flags on the following partition: + + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + + + + + An error occurred while unmounting the following partition/image/mount point: + + + + + An error occurred while cloning the properties of the following item: + + + + + Target item: + + + + + An error occurred while cloning the following symbolic link: + + + + + Target symlink: + + + + + An error occurred while cloning the following file: + + + + + Target file: + + + + + An error occurred while cloning the following directory: + + + + + Target directory: + + + + + An error occurred while deleting the following directory: + + + + + An error occurred while changing the access permissions of the following file: + + + + + + Cannot start the Systemback scheduler daemon! + + + + + + Missing, wrong or too much argument(s). + + + + + The process is disabled for this user. + + + + + Root privileges are required. + + + + + This system is a Live. + + + + + Already running. + + + + + Unable to daemonize. + + + + + Cannot start the Systemback graphical user interface! + + + + + Unable to get root permissions. + + + + + Unable to connect to the X server. + + + + + Unsafe X Window authorization! + + + + + Please do not use 'sudo' command. + + + + diff --git a/lang/systemback_ca_ES.ts b/lang/systemback_ca_ES.ts new file mode 100644 index 0000000..c114555 --- /dev/null +++ b/lang/systemback_ca_ES.ts @@ -0,0 +1,1884 @@ + + + + + systemback + + + Full name of the new user: + Nom complet del nou usuari: + + + + New username to login: + Nom d'usuari per a iniciar sessió: + + + + New user account password: + Contrasenya del compte del nou usuari: + + + + New root password (optional, not recommended for Ubuntu): + Nova contrasenya root (opcional, no recomanable per Ubuntu): + + + + New hostname: + Nou nom per a l'equip: + + + + + + + + + + + + + + + + Back + Enrere + + + + + + + + Next + Següent + + + + + Working directory + Directori de treball + + + + Created Live images + Live imatges disponibles + + + + Name of the Live system + Nom de sistema Live + + + + + + + + Options + Opcions + + + + Write target + Dispositius disponibles + + + + Live operations + Opcions Live + + + + Include the user data files + Incloure arxius de dades de l'usuari + + + + Redetect devices + + + + + + + Delete + Esborrar + + + + Convert to ISO + Convertir a ISO + + + + + + Create new + Crear nou + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Muntar la partició del sistema defectuós en el directori '/mnt' segons l'estructura original.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + + + Mount + Muntar + + + + Reset mounts + + + + + Repair type + Tipus de reparació + + + + GRUB 2 repair + Reparar el GRUB 2 + + + + System files repair + Reparació del sistema d'arxius + + + + + Reinstall GRUB 2 bootloader: + Reinstal·lació del gestor d'arrencada GRUB 2: + + + + + Auto detection + Auto detectar + + + + Full repair + Reparació completa + + + + Do not repair the fstab file + No reparar l'arxiu fstab + + + + Exclude hidden user files and directories from restore points + Excloure arxius ocults d'usuari i directoris de punts de restauració + + + + Exclude user data files and directories from Live system + Excloure arxius de dades de l'usuari i els directoris de sistema Live + + + + Excluded items + Excloure elements + + + + + Remove item from the exclusion list + + + + + + Add item to the exclusion list + + + + + Scheduler state: + Estat de tasques programades: + + + + + + + + + + + + + + Disabled + Desactivat + + + + Timer settings + Ajustaments del temporitzador + + + + Waiting time before creating a new restore point: + Temps d'espera abans de crear un nou punt de restauració: + + + + Visible countdown time: + Mostrar compte enrere del Temporitzador: + + + + Pop-up window position on screen: + Posició de la finestra emergent en la pantalla: + + + + Use silent mode + Usar manera silenciosa + + + + + + + More + + + + + + + + Less + + + + + Simple system backup and restore application with extra features + Programa fàcil per a realitzar còpies de seguretat i punts de restauració del sistema + + + + Project homepage: + Pàgina web del projecte: + + + + Contact: + Contacte: + + + + Donate: + Donar: + + + + Systemback version: + Versió de Systemback: + + + + + License + Llicència + + + + Re-read directories + + + + + Writable Linux filesystem! + Sistema d'arxius Linux (Writable)! + + + + + + + Cancel + Cancel·lar + + + + + + + + + + + Maximum number of temporary restore points + + + + + + Include + + + + + + + + + + + + + + + + + + + empty + buit + + + + + + + + + + + not used + no utilitzar + + + + Includable items + + + + + Included items + + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + + + Restore points + Punts de restauració + + + + Highlighted restore points + Punts destacats + + + + Point operations + Accions + + + + Highlight + Posar en destacats + + + + Rename + Reanomenar + + + + + + + + + + + + + + + + + + Select restore point + + + + + + + + + + Storage directory + Ruta d'emmagatzematge + + + + Function menu + Menú de funcions + + + + + + System restore + Restaurar sistema + + + + + + + System copy + Copiar sistema + + + + + System install + Instal·lar sistema + + + + + + + Live system create + Crear sistema Live + + + + + System repair + Reparar sistema + + + + System upgrade + Actualitzar el sistema + + + + + Exclude + Excloure arxius + + + + + Schedule + Tasca programada + + + + Excludable items + + + + + + + About + Sobre + + + + + Settings + + + + + Change path + + + + + Restore type + Seleccioni un tipus de restauració + + + + + + + + + Full restore + Restauració completa + + + + + + + + + System files restore + Restaurar arxius del sistema + + + + User(s) configuration files restore + Restaurar arxius de configuració d'usuari(s) + + + + + Keep newly installed configuration files + Mantenir els arxius de configuració recentment instal·lats + + + + Include user(s): + + + + + Do not restore the fstab file + No restaurar l'arxiu fstab + + + + Partition settings + Configuració de discos i particions + + + + Need to set the mount point as '/boot/efi'! + + + + + Window DPI scaling + + + + + Multiplier factor for scaling the window contents + + + + + User interface + + + + + Window always on top + + + + + System + + + + + Disable scheduler daemon starting for the following users: + + + + + Use XZ compressor for squashfs filesystems + + + + + Override auto-detected language: + + + + + Override the used style: + + + + + Disable incremental restore points (do not use hard links between backups) + + + + + Create Live ISO images automatically (faster than the conversion) + + + + + Do not empty memory cache at the end of some processes + + + + + + + + + + + Unmount + Desmuntar + + + + Write to target + + + + + Mount point: + Punt de muntatge: + + + + + + + + + ! Delete ! + + + + + Add new partition + + + + + Create new: + Crear nou: + + + + Filesystem: + Sistema d'arxius: + + + + + + Format + Formatar + + + + + + Reset partitions settings + + + + + Change partition settings + + + + + + + + + Transfer user configuration files + + + + + Copy user data files + Copiar arxius de dades d'usuari + + + + Install GRUB 2 bootloader: + Instal·lar el gestor d'arrencada GRUB 2: + + + + + + + + + Transfer user configuration and data files + + + + + ! Interrupt ! + ! Aturar el procés ! + + + + Creates a scheduled restore point within few seconds. + Crea un punt de restauració programada en uns pocs segons. + + + + + + Start + Inicia + + + + Later + Més endavant + + + + Systemback user authentication + + + + + Administrator: + + + + + Password: + + + + + + Partition + Partició + + + + + Size + + + + + Current mount point + Punto de montaje actual + + + + New mount point + Nou punt de muntatge + + + + Filesystem + Sistema d'arxius + + + + Device + Dispositiu + + + + + + scheduler + tasca programada + + + + + Top left + Superior esquerra + + + + + + Top right + Superior dreta + + + + + + Center + Centre + + + + + + Bottom left + Inferior esquerra + + + + + Bottom right + Inferior dreta + + + + + + day(s) + dia(es) + + + + + + hour(s) + hora(es) + + + + + + + + minute(s) + minut(s) + + + + + + seconds + segons + + + + + + Live image + Imatge Live + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + + + Boot system installer + + + + + + + Currently running system + Sistema actual en execució + + + + Label + + + + + + Creating restore point + Creant punt de restauració + + + + + Restoring the full system + Restauració completa del sistema + + + + + Restoring the system files + Restaurant el sistema d'arxius + + + + Restoring the user(s) configuration files + Restaurant la configuració d'arxius d'usuari(s) + + + + Repairing the system files + Reparant sistema d'arxius + + + + Repairing the full system + Reparant per complet el sistema + + + + Copying the system + Copiant sistema + + + + Installing the system + Instal·lant el sistema + + + + Creating Live system + Creant un sistema Live + + + + + Deleting restore point + Eliminant punt de restauració + + + + Deleting old restore point + Eliminant punt de restauració obsolet + + + + + Deleting incomplete restore point + Eliminant punt de restauració incomplet + + + + + Flushing filesystem buffers + + + + + + + + + + Reboot + Reinicia + + + + + + + X restart + Reprendre X + + + + Repairing the GRUB 2 + Reparant GRUB 2 + + + + + Emptying cache + Buidant caché + + + + + An another Systemback process is currently running, please wait until it finishes. + Altre procés Systemback està funcionant, si us plau, esperar fins que acabi. + + + + Please enter a new name. + Si us plau, introduïu un altre nom. + + + + The specified name contain(s) unsupported character(s)! + El nom especificat conté caràcters no vàlids! + + + + Restore the system files to the following restore point: + Restaurar els arxius de sistema amb el següent punt de restauració: + + + + Repair the system files with the following restore point: + Reparar els arxius de sistema amb el següent punt de restauració: + + + + Repair the complete system with the following restore point: + Reparació completa del sistema amb el següent punt de restauració: + + + + Restore the complete user(s) configuration files to the following restore point: + Restauració completa d'arxius de configuració d'usuari(s) amb el següent punt de restauració: + + + + Restore the user(s) configuration files to the following restore point: + Restaurar els arxius de configuració d'usuari(s) amb el següent punt de restauració: + + + + The user(s) configuration files full restoration are completed. + Completada la restauració total d'arxius de configuració d'usuari(s). + + + + + The X server will restart automatically within 30 seconds. + El servidor X es reiniciarà automàticament en 30 segons. + + + + The user(s) configuration files restoration are completed. + Completada la restauració d'arxius de configuració d'usuari(s). + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Reparació del sistema d'arxius completada, però es va produir un error al reinstal·lar GRUB! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + El sistema no podrà arrencar! (Una arquitectura diferent pot estar causant aquest problema.) + + + + The full system repair is completed. + Reparació total del sistema completada. + + + + The system repair is completed. + Reparació del sistema completada. + + + + Copy the system, using the following restore point: + Copiar sistema usant el següent punt de restauració: + + + + Install the system, using the following restore point: + Instal·lar sistema usant el següent punt de restauració: + + + + + + + The restore point creation is aborted! + Creació del punt de restauració avortat! + + + + + + Not enough free disk space to complete the process. + No hi ha suficient espai lliure en el disc per a completar el procés. + + + + + Root privileges are required for running the Systemback! + Es necessiten privilegis root per a executar Systemback! + + + + Restore the complete system to the following restore point: + Restaurar completament el sistema al següent punt de restauració: + + + + + The system files restoration are completed. + Restauració del sistema d'arxius completada. + + + + + + The computer will restart automatically within 30 seconds. + The computer will restart automatically within 30 seconds. + + + + + The full system restoration is completed. + Restauració completa del sistema realitzada. + + + + + + + + The system copy is aborted! + + + + + An error occurred while reinstalling the GRUB. + + + + + Format the %1, and write the following Live system image: + Formatar %1, i escriure la següent imatge del sistema Live: + + + + The selected device does not have enough space to write the Live system. + + + + + + There is not enough free space. + + + + + Interrupting the current process + + + + + The system copy is completed, but an error occurred while installing the GRUB! + Còpia del sistema completada, però es va produir un error durant la instal·lació del GRUB! + + + + + You need to manually install a bootloader. + Serà necessari instal·lar manualment un gestor d'arrencada. + + + + + The system restoration is aborted! + + + + + An error occurred while creating the file system image. + Es va produir un error al crear la imatge del sistema d'arxius. + + + + An error occurred while creating the container file. + Es va produir un error al crear l'arxiu contenidor. + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + La partició especificada no té suficient espai lliure. El sistema instal·lat no funcionarà correctament. + + + + + + The specified partition could not be formatted (in use or unavailable). + No es va poder donar format a la partició especificada (aquesta es troba en ús o no està disponible). + + + + An error occurred while reinstalling the GRUB! + Es va produir un error al reinstal·lar el GRUB! + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Reparació del sistema completada, però es va produir un error al reinstal·lar el GRUB! El sistema no podrà arrencar! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + La partició especificada no té suficient espai lliure. La còpia del sistema no funcionaran correctament. + + + + The system copy is completed. + Còpia del sistema completada. + + + + + + + + The Live system creation is aborted! + + + + + + + The specified partition could not be mounted. + La partició especificada no es va poder muntar. + + + + An error occurred while unpacking the Live system files. + Va ocórrer un error al descomprimir els arxius del sistema Live. + + + + An error occurred while renaming the essential Live files. + Va ocórrer un error al canviar el nom d'arxius essencials del sistema Live. + + + + An error occurred while creating the .iso image. + Es va produir un error durant la creació de la imatge .iso. + + + + An error occurred while reading the .sblive image. + Es va produir un error durant la lectura de la imatge .sblive. + + + + An error occurred while creating the new initramfs image. + + + + + + + The Live image could not be mounted. + + + + + The GRUB 2 repair is completed. + Reparació del GRUB 2 completada. + + + + Writing Live image to the target device + + + + + The Live system creation is completed. + La creació del sistema Live s'ha completat. + + + + The created .sblive file can be written to pendrive. + L'arxiu creat .sblive pot ser escrit a un pendrive. + + + + The system install is completed. + Instal·lació del sistema completat. + + + + The system install is completed, but an error occurred while installing the GRUB! + Instal·lació completada, però es va produir un error durant la instal·lació del GRUB! + + + + + + + + The system installation is aborted! + + + + + + + + + + + There has been critical changes in the file system during this operation. + No han hagut canvis significatius en el sistema d'arxius durant aquesta operació. + + + + Repair the GRUB 2 bootloader. + Reparar el carregador d'arrencada GRUB 2. + + + + + + + + The Live write is aborted! + + + + + The Live system image write is completed. + L'escriptura de la imatge del sistema Live s'ha completat. + + + + + + + The Live conversion is aborted! + + + + + + The restore point deletion is aborted! + + + + + + An error occurred while during the process. + + + + + + The system repair is aborted! + + + + + + + + Everyone + + + + + Upgrading the system + Actualitzat el sistema + + + + + + + + Multiple mount points + + + + + Enabled + Activat + + + + Systemback worker thread is interrupted by the user. + + + + + + process + + + + + Boot Live without xorg.conf file + Arrencar sistema Live sense l'arxiu xorg.conf + + + + + + Boot Live system + Arrencar sistema Live + + + + + + Boot Live in safe graphics mode + Arrencar sistema Live en manera grafica segur + + + + + + Boot Live in debug mode + Arrencar en manera de depuracio + + + + Press 'E' key to edit + Premi la tecla 'E' per a editar + + + + Press TAB key to edit + Premi la tecla TAB per a editar + + + + Converting Live system image + Convertint imatge del sistema Live + + + + + Unable to get exclusive lock! + No s'ha pogut obtenir el bloqueig exclusiu! + + + + + First, close all package manager. + Tanqui qualsevol gestor de paquets que tingui obert. + + + + The specified storage directory path has not been set! + No es va establir un directori per a la ruta d'emmagatzematge! + + + + The restoration is aborted! + Restauració avortada! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Restauració completada, però es va produir un error al reinstal·lar el GRUB! + + + + The restore points storage directory is not available or not writable! + + + + + This stupid terminal does not support color! + + + + + This terminal is too small! + + + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + + + + + An error occurred while opening the following file: + + + + + An error occurred while creating the following directory: + + + + + An error occurred while removing the following file: + + + + + An error occurred while creating the following hard link: + + + + + Reference file: + + + + + An error occurred while creating the following file: + + + + + An error occurred while renaming the following item: + + + + + New path: + + + + + An error occurred while executing the following command: + + + + + Exit code: + + + + + Failed to detect the device for installing the GRUB! + + + + + An error occurred while upgrading the system! + Es va produir un error a l'actualitzar el sistema! + + + + Restart upgrade ... + Reiniciant l'actualització ... + + + + This file could not be copied because it does not exist: + + + + + The following partition has no UUID: + + + + + An error occurred while creating a new partition on the following device: + + + + + An error occurred while mounting the following partition/image: + + + + + An error occurred while setting one or more flags on the following partition: + + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + + + + + An error occurred while unmounting the following partition/image/mount point: + + + + + An error occurred while cloning the properties of the following item: + + + + + Target item: + + + + + An error occurred while cloning the following symbolic link: + + + + + Target symlink: + + + + + An error occurred while cloning the following file: + + + + + Target file: + + + + + An error occurred while cloning the following directory: + + + + + Target directory: + + + + + An error occurred while deleting the following directory: + + + + + basic restore UI + + + + + Available restore point(s): + + + + + Quit + Sortir + + + + Selected restore point: + + + + + The specified storage directory path is set. + Es va establir un directori per a la ruta d'emmagatzematge. + + + + Deleting old restore point(s) + + + + + Restore with the following restore point: + Restaurar al següent punt de restauració: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + + + + + The Systemback command line interface cannot be used on a Live system! + + + + + Restore with the following restore method: + Realitzar la restauració amb el següent criteri: + + + + Users configuration files restore + Restaurar arxius de configuració d'usuaris + + + + + Complete configuration files restore + Restauració completa de configuració d'arxius + + + + Configuration files restore + Restaurar arxius de configuració + + + + + + You want to keep the current fstab file? + Desitja mantenir l'arxiu actual fstab? + + + + + + + + + + + (Y/N) + (Y/N) + + + + + + + Reinstall the GRUB 2 bootloader? + Reinstal·lar el gestor d'arrencada GRUB 2? + + + + Start the restore? + Start the restore? + + + + Restoring the users configuration files + Restaurant la configuració d'arxius d'usuari + + + + The users configuration files full restoration are completed. + Completada la restauració total d'arxius de configuració d'usuaris. + + + + The users configuration files restoration are completed. + Completada la restauració d'arxius de configuració d'usuaris. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Pressioni 'ENTER' per a reiniciar ordinador, o 'Q' per a sortir. + + + + Press 'ENTER' key to quit. + + + + + An error occurred while changing the access permissions of the following file: + + + + + + Cannot start the Systemback scheduler daemon! + + + + + + Missing, wrong or too much argument(s). + + + + + The process is disabled for this user. + + + + + Root privileges are required. + + + + + This system is a Live. + + + + + Already running. + + + + + Unable to daemonize. + + + + + Cannot start the Systemback graphical user interface! + + + + + Unable to get root permissions. + + + + + Unable to connect to the X server. + + + + + Unsafe X Window authorization! + + + + + Please do not use 'sudo' command. + + + + diff --git a/lang/systemback_cs.ts b/lang/systemback_cs.ts new file mode 100644 index 0000000..75c291c --- /dev/null +++ b/lang/systemback_cs.ts @@ -0,0 +1,1899 @@ + + + + + systemback + + + The specified debug level is invalid! + Zadaná úroveň ladících podrobností není platná! + + + + The default level (1) will be used. + Bude použita výchozí úroveň (1). + + + + Version: + Verze: + + + + Compilation date and time: + Datum a čas sestavení: + + + + + Installed files: + Nainstalované soubory: + + + + Operating system: + Operační systém: + + + + + Mounted filesystems: + Připojené souborové systémy: + + + + System language: + Systémový jazyk: + + + + Translation: + Překlad do dalších jazyků: + + + + An error occurred while opening the following file: + Došlo k chybě při otevírání tohoto souboru: + + + + An error occurred while creating the following directory: + Došlo k chybě při vytváření této složky: + + + + An error occurred while removing the following file: + Došlo k chybě při odebírání tohoto souboru: + + + + An error occurred while creating the following hard link: + Došlo k chybě při vytváření tohoto pevného odkazu: + + + + Reference file: + Soubor, na který je odkazováno: + + + + An error occurred while creating the following file: + Došlo k chybě při vytváření tohoto souboru: + + + + An error occurred while renaming the following item: + Došlo k chybě při přejmenovávání této položky: + + + + New path: + Nové umístění: + + + + An error occurred while executing the following command: + Došlo k chybě při spouštění tohoto příkazu: + + + + Exit code: + Návratový kód: + + + + Failed to detect the device for installing the GRUB! + Nezdařilo se zjistit zařízení pro instalaci zavaděče GRUB! + + + + An error occurred while upgrading the system! + V průběhu přechodu na novější verzi systému došlo k chybě! + + + + Restart upgrade ... + Opakovat pokus o přechod na novější verzi ... + + + + This file could not be copied because it does not exist: + Tento soubor nemůže být zkopírován protože neexistuje: + + + + The following partition has no UUID: + Tento oddíl nemá univerzálně jedinečný identifikátor (UUID): + + + + An error occurred while creating a new partition on the following device: + Došlo k chybě při vytváření nového oddílu na tomto zařízení: + + + + An error occurred while mounting the following partition/image: + Došlo k chybě při připojování tohoto oddílu/obrazu: + + + + An error occurred while setting one or more flags on the following partition: + Došlo k chybě při nastavování jednoho či více příznaků (flag) na tomto oddílu: + + + + Flag(s): + Příznaky (flag): + + + + An error occurred while creating the partition table on the following device: + Došlo k chybě při vytváření tabulky oddílů na tomto zařízení: + + + + An error occurred while unmounting the following partition/image/mount point: + Došlo k chybě při odpojování tohoto oddílu/obrazu / přípojného bodu: + + + + An error occurred while cloning the properties of the following item: + Došlo k chybě při klonování vlastností této položky: + + + + Target item: + Cílová položka: + + + + An error occurred while cloning the following symbolic link: + Došlo k chybě při klonování tohoto symbolického odkazu: + + + + Target symlink: + Cílový symbolický odkaz: + + + + An error occurred while cloning the following file: + Došlo k chybě při klonování tohoto souboru: + + + + Target file: + Cílový soubor: + + + + An error occurred while cloning the following directory: + Došlo k chybě při klonování této složky: + + + + Target directory: + Cílová složka: + + + + An error occurred while deleting the following directory: + Došlo k chybě při mazání této složky: + + + + + Cannot start the Systemback scheduler daemon! + Nedaří se spustit službu plánovače aplikace Systemback! + + + + + Missing, wrong or too much argument(s). + Chybějící, chybné či příliš mnoho argumentů. + + + + The process is disabled for this user. + Plánovač je pro tohoto uživatele vypnutý. + + + + Root privileges are required. + Jsou zapotřebí oprávnění správce systému. + + + + This system is a Live. + Nacházíte se v systému, spuštěném z vyjímatelného média. + + + + Already running. + Je už spuštěno. + + + + Unable to daemonize. + Nedaří se spustit jako službu. + + + + Cannot start the Systemback graphical user interface! + Nedaří se spustit grafické uživatelské rozhraní aplikace Systemback! + + + + Unable to get root permissions. + Nedaří se získat oprávnění správce systému. + + + + Unable to connect to the X server. + Nedaří se připojit ke grafickému serveru X. + + + + Full name of the new user: + Jméno a příjmení nového uživatele: + + + + New username to login: + Nové uživatelské jméno pro přihlašování: + + + + New user account password: + Heslo k novému uživatelskému účtu: + + + + New root password (optional, not recommended for Ubuntu): + Heslo správce nového systému (volitelné, pro distribuci Ubuntu nedoporučeno): + + + + New hostname: + Název nového stroje: + + + + + + + + + + + + + + + + Back + Zpět + + + + + + + + Next + Další + + + + + Working directory + Pracovní složka + + + + Created Live images + Vytvořené obrazy spouštěcích médií + + + + Name of the Live system + Název Live systému + + + + + + + + Options + Možnosti + + + + Write target + Cíl zápisu + + + + Live operations + Spuštěno z vyjímatelného média + + + + Include the user data files + Zahrnout uživatelská data + + + + Redetect devices + Znovu zjistit zařízení + + + + + + Delete + Smazat + + + + Write to target + Zapsat na cíl + + + + Convert to ISO + Převést na ISO + + + + + + Create new + Vytvořit nový + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Připojte oddíly rozbitého systému do složky „/mnt“ dle původní struktury.<br>(„/“ → „/mnt“, „/home“ → „/mnt/home“, atd.) + + + + + Mount + Připojit + + + + Reset mounts + Resetovat připojení (mount) + + + + Repair type + Typ opravy + + + + GRUB 2 repair + Oprava zavaděče GRUB 2 + + + + System files repair + Oprava systémových souborů + + + + + Reinstall GRUB 2 bootloader: + Znovu nainstalovat zavaděč GRUB 2: + + + + + Auto detection + Automatické zjištění + + + + Full repair + Celková oprava + + + + Do not repair the fstab file + Neopravovat soubor fstab + + + + Exclude hidden user files and directories from restore points + Z bodů obnovení vynechat skryté soubory a složky uživatelů + + + + Exclude user data files and directories from Live system + Ze systému pro spouštění z vyjímatelného média vynechat soubory a složky uživatelů + + + + Excludable items + Položky, které je možné vynechat + + + + Excluded items + Vynechané položky + + + + + Remove item from the exclusion list + Odebrat položku ze seznamu vynechaných + + + + + Add item to the exclusion list + Přidat položku na seznam vynechaných + + + + Scheduler state: + Stav plánovače: + + + + + + + + + + + + + + Disabled + Vypnuto + + + + Timer settings + Nastavení časovače + + + + Waiting time before creating a new restore point: + V jakém intervalu vytvářet body obnovení: + + + + Visible countdown time: + Viditelný odpočet: + + + + Pop-up window position on screen: + Pozice vyskakovacího okna na obrazovce: + + + + Use silent mode + Nedávat vědět o průběhu + + + + + + + More + Více + + + + + + + Less + Méně + + + + Simple system backup and restore application with extra features + Jednoduchá aplikace pro zálohování a obnovu systému s dalšími funkcemi + + + + Project homepage: + Domovské stránky projektu: + + + + Contact: + Kontakt: + + + + Donate: + Podpořit vývoj darem: + + + + Systemback version: + Verze aplikace: + + + + + License + Licence + + + + Re-read directories + Znovunačíst složky + + + + Writable Linux filesystem! + Zapisovatelný linuxový souborový systém! + + + + + + + Cancel + Storno + + + + + + + + + + + Maximum number of temporary restore points + Kolik dočasných bodů obnovení uchovávat + + + + Restore points + Body obnovení + + + + Highlighted restore points + Zvýrazněné body obnovení + + + + Point operations + Operace s bodem + + + + Highlight + Zvýraznit + + + + Rename + Přejmenovat + + + + + + + + + + + + + + + + + + Select restore point + Vyberte bod obnovení + + + + + + + + + Storage directory + Kam ukládat + + + + Function menu + Nabídka funkcí + + + + + Schedule + Plán zálohování + + + + + + About + O aplikaci + + + + + Settings + Nastavení + + + + System upgrade + Přejít na novější verzi systému + + + + + System install + Odvodit instalaci + + + + + + + Live system create + Vytvořit spouštěcí médium + + + + + System repair + Opravit systém + + + + + + System restore + Obnovit systém ze zálohy + + + + + + + System copy + Zkopírovat systém + + + + + Exclude + Vynechat ze zálohy + + + + + Include + Zahrnout do zálohy + + + + Change path + Změnit umístění + + + + + + + + + + + + + + + + + + empty + prázdný + + + + + + + + + + + not used + nepoužitý + + + + Restore type + Typ obnovy + + + + + + + + + Full restore + Celková obnova + + + + + + + + + System files restore + Obnovení systémových souborů + + + + User(s) configuration files restore + Obnova souborů s uživatelskými nastaveními + + + + + Keep newly installed configuration files + Ponechat nově nainstalované soubory s nastaveními + + + + Include user(s): + Zahrnout uživatele: + + + + Do not restore the fstab file + Neobnovovat soubor fstab + + + + Partition settings + Nastavení diskového oddílu + + + + + + + + Transfer user configuration files + Přenést soubory s uživatelskými nastaveními + + + + Copy user data files + Kopírovat soubory s uživatelskými daty + + + + Install GRUB 2 bootloader: + Nainstalovat zavaděč GRUB 2: + + + + + + Format + Formátovat + + + + + + Reset partitions settings + Resetovat nastavení diskových oddílů + + + + + + + + + + Unmount + Odpojit + + + + Change partition settings + Změnit nastavení oddílu + + + + Filesystem: + Souborový systém: + + + + Mount point: + Přípojný bod: + + + + + + + + + ! Delete ! + ! Smazat ! + + + + Add new partition + Přidat nový oddíl + + + + Create new: + Vytvořit nový: + + + + Need to set the mount point as '/boot/efi'! + Přípojný bod je třeba nastavit jako „/boot/efi“! + + + + Window DPI scaling + Změna měřítka velikosti okna (vzhledem k rozlišení zobrazení) + + + + Multiplier factor for scaling the window contents + Koeficient změny velikosti obsahu okna + + + + User interface + Uživatelské rozhraní + + + + Window always on top + Okno vždy navrchu + + + + System + Systém + + + + Disable scheduler daemon starting for the following users: + Nespouštět službu plánovače pro tyto uživatele: + + + + Use XZ compressor for squashfs filesystems + Používat XZ kompresi souborového systému squashfs + + + + Override auto-detected language: + Použít jiný než automaticky zjištěný jazyk: + + + + Override the used style: + Použít jiný styl vzhledu: + + + + Disable incremental restore points (do not use hard links between backups) + Vždy vytvářet nezávislé body obnovení (bez pevných odkazů) + + + + Create Live ISO images automatically (faster than the conversion) + Vždy rovnou vytvářet i obrazy spouštěcích médií (rychlejší než převádět dodatečně) + + + + Do not empty memory cache at the end of some processes + Nevyprazdňovat mezipaměť na konci některých procesů + + + + Includable items + Zahrnutelné položky + + + + Included items + Zahrnuté položky + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + Zahrnout do bodu obnovení soubory a složky s daty uživatele +Tyto budou určeny jako obnovitelné soubory s nastaveními! + + + + ! Interrupt ! + ! Přerušit ! + + + + Creates a scheduled restore point within few seconds. + V okamžiku vytvoří naplánovaný bod obnovení. + + + + + + Start + Spustit + + + + Later + Později + + + + Systemback user authentication + Ověření uživatele aplikace Systemback + + + + Administrator: + Správce: + + + + Password: + Heslo: + + + + Unsafe X Window authorization! + Nezabezpečené ověřování okna grafického serveru X! + + + + Please do not use 'sudo' command. + Nepoužívejte v tomto případě příkaz „sudo“. + + + + + + + + + Transfer user configuration and data files + Přenést soubory s uživatelskými nastaveními a daty + + + + + + scheduler + plánovač + + + + + Partition + Diskový oddíl + + + + + Size + Velikost + + + + Label + Popisek + + + + Current mount point + Stávající přípojný bod + + + + New mount point + Nový přípojný bod + + + + Filesystem + Souborový systém + + + + Device + Zařízení + + + + + Top left + Vlevo nahoře + + + + + + Top right + Vpravo nahoře + + + + + + Center + Uprostřed + + + + + + Bottom left + Vlevo dole + + + + + Bottom right + Vpravo dole + + + + + + day(s) + dnů + + + + + + hour(s) + hodin + + + + + + + + minute(s) + minut + + + + + + seconds + sekund + + + + + + + Everyone + Kdokoli + + + + + + Currently running system + Nyní spuštěný systém + + + + + Emptying cache + Vyprazdňování mezipaměti + + + + + Flushing filesystem buffers + Vyprazdňování vyrovnávacích pamětí souborového systému + + + + + Restoring the full system + Obnovování celého systému + + + + + Restoring the system files + Obnovování systémových souborů + + + + Restoring the user(s) configuration files + Obnovování souborů s uživatelskými nastaveními + + + + Repairing the system files + Opravování systémových souborů + + + + Repairing the full system + Opravování celého systému + + + + Repairing the GRUB 2 + Opravování zavaděče GRUB 2 + + + + Copying the system + Kopírování systému + + + + Installing the system + Instalace systému + + + + Writing Live image to the target device + Probíhá zápis obrazu systému na cílové médium + + + + Upgrading the system + Probíhá přechod na novější verzi systému + + + + + Deleting incomplete restore point + Mazání neúplného bodu obnovení + + + + Interrupting the current process + Přerušování nynějšího procesu + + + + Deleting old restore point + Mazání starého bodu obnovení + + + + + Creating restore point + Vytváření bodu obnovení + + + + + Deleting restore point + Mazání bodu obnovení + + + + Converting Live system image + Probíhá převod na obraz spouštěcího média + + + + + process + proces + + + + Creating Live system + Vytváření systému pro spouštění z vyjímatelného média + + + + + + + + + Reboot + Restartovat + + + + + + + X restart + Restart X + + + + + + Live image + Obraz média, ze kterého lze spustit systém + + + + Restore the system files to the following restore point: + Obnovit systémové soubory do stavu, zachyceném v tomto bodu obnovení: + + + + Repair the system files with the following restore point: + Opravit systémové soubory pomocí následujícího bodu obnovení: + + + + Repair the complete system with the following restore point: + Opravit celý systém pomocí následujícího bodu obnovení: + + + + Restore the complete user(s) configuration files to the following restore point: + Obnovit veškeré soubory s uživatelskými nastaveními do stavu, zachyceném v následujícím bodu obnovení: + + + + Restore the user(s) configuration files to the following restore point: + Obnovit soubory s uživatelskými nastaveními do stavu, zachyceném v následujícím bodu obnovení: + + + + Copy the system, using the following restore point: + Zkopírovat systém s použitím tohoto bodu obnovení: + + + + Install the system, using the following restore point: + Nainstalovat systém, odvozený z tohoto bodu obnovení: + + + + Restore the complete system to the following restore point: + Obnovit celý systém do stavu, zachyceném v následujícím bodu: + + + + Format the %1, and write the following Live system image: + Naformátovat %1 a zapsat tam tento obraz systému pro spouštění z vyjímatelného média: + + + + Repair the GRUB 2 bootloader. + Opravit zavaděč GRUB 2. + + + + The user(s) configuration files full restoration are completed. + Celková obnova souborů s uživatelskými nastaveními je dokončena. + + + + + The X server will restart automatically within 30 seconds. + Za 30 sekund bude grafický server X automaticky zrestartován. + + + + The user(s) configuration files restoration are completed. + Obnova souborů s uživatelskými nastaveními je dokončena. + + + + The full system repair is completed. + Celková oprava systému je dokončena. + + + + The system repair is completed. + Oprava systému je dokončena. + + + + + The system files restoration are completed. + Obnova systémových souborů je dokončena. + + + + + + The computer will restart automatically within 30 seconds. + Za 30 sekund bude počítač automaticky zrestartován. + + + + + The full system restoration is completed. + Celková obnova systému je dokončena. + + + + The system copy is completed. + Kopírování systému je dokončeno. + + + + The Live system creation is completed. + Vytváření systému pro spouštění z vyjímatelného média je dokončeno. + + + + The created .sblive file can be written to pendrive. + Vytvořený .sblive soubor je možné zapsat např. na USB flash disk. + + + + The GRUB 2 repair is completed. + Oprava zavaděče GRUB 2 je dokončena. + + + + The system install is completed. + Instalace systému je dokončena. + + + + The Live system image write is completed. + Zápis obrazu systému na spustitelné vyjímatelné médium je dokončen. + + + + + An another Systemback process is currently running, please wait until it finishes. + V tuto chvíli je spuštěný ještě jiný proces aplikace Systemback. Počkejte až skončí. + + + + + Unable to get exclusive lock! + Nedaří se získat výhradní zámek! + + + + + First, close all package manager. + Nejprve ukončete všechny správce balíčků. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + Probíhá aktualizace souborů indexu balíčků – vyčkejte na dokončení. + + + + The specified name contain(s) unsupported character(s)! + Zadaný název obsahuje nepodporované znaky! + + + + Please enter a new name. + Zadejte nový název. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Oprava systémových souborů je dokončena, ale vyskytla se chyba při reinstalaci zavaděče GRUB 2! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + Je možné, že systém nepůjde spustit! (Obecně, problém spočívá v procesoru s jinou, neslučitelnou architekturou.) + + + + + + + The restore point creation is aborted! + Vytváření bodu obnovení bylo přerušeno! + + + + + + Not enough free disk space to complete the process. + Pro dokončení procesu není na disku dostatek volného prostoru. + + + + + Root privileges are required for running the Systemback! + Pro spuštění aplikace Systemback jsou třeba oprávnění na úrovni správce systému! + + + + + + + + The system copy is aborted! + Kopírování systému bylo přerušeno! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + Na zadaných diskových oddílech není k dispozici dostatek volného prostoru pro zkopírování systému. Zkopírovaný systém nebude fungovat správně. + + + + The system copy is completed, but an error occurred while installing the GRUB! + Zkopírování systému je dokončeno, ale došlo k chybě při instalaci zavaděče GRUB 2! + + + + + You need to manually install a bootloader. + Zavaděč bude třeba nainstalovat ručně. + + + + + The system restoration is aborted! + Obnovení systému je přerušeno! + + + + An error occurred while reinstalling the GRUB. + Při reinstalaci zavaděče GRUB 2 došlo k chybě. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Celková oprava systému je dokončena, ale při opětovné instalaci zavaděče GRUB 2 se vyskytla chyba! + + + + + + + + The Live system creation is aborted! + Vytváření systému pro spouštění z vyjímatelného média bylo přerušeno! + + + + An error occurred while creating the file system image. + Při vytváření obrazu souborového systému došlo k chybě. + + + + An error occurred while creating the container file. + Při vytváření souboru kontejneru se vyskytla chyba. + + + + + + The specified partition could not be mounted. + Zadaný diskový oddíl se nezdařilo připojit. + + + + The system install is completed, but an error occurred while installing the GRUB! + Instalace systému je dokončena, ale vyskytla se chyba při instalaci zavaděče GRUB 2! + + + + + + + + The system installation is aborted! + Instalace systému byla přerušena! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + Na zadaných diskových oddílech není k dispozici dostatek volného prostoru pro instalaci systému. Nainstalovaný systém nebude fungovat správně. + + + + + + The specified partition could not be formatted (in use or unavailable). + Na zadaném diskovém oddílu nelze vytvořit souborový systém (je používán nebo není dostupný). + + + + An error occurred while reinstalling the GRUB! + Při opětovné instalaci zavaděče GRUB 2 se vyskytla chyba! + + + + + + + + + + There has been critical changes in the file system during this operation. + Průběh této operace byl narušen něčím, co souběžně s ní provedlo zásadní změny na souborovém systému. + + + + + + + + The Live write is aborted! + Zápis obrazu systému na spustitelné vyjímatelné médium byl zrušen! + + + + The selected device does not have enough space to write the Live system. + Zvolené zařízení nemá dostatečnou kapacitu, aby na něj bylo možné zapsat systém pro spouštění z vyjímatelného média. + + + + An error occurred while unpacking the Live system files. + Při rozbalování souborů systému, určeného pro spouštění z vyjímatelného média, se vyskytla chyba. + + + + + + + The Live conversion is aborted! + Převedení na obraz spustitelného vyjímatelného média bylo zrušeno! + + + + An error occurred while renaming the essential Live files. + Vyskytla se chyba při přejmenovávání zásadních souborů systému pro spouštění z vyjímatelného média. + + + + An error occurred while creating the .iso image. + Při vytváření .iso obrazu došlo k chybě. + + + + An error occurred while reading the .sblive image. + Při načítání .sblive souboru došlo k chybě. + + + + An error occurred while creating the new initramfs image. + Při vytváření nového initramfs obrazu se vyskytla chyba. + + + + + The restore point deletion is aborted! + Mazání bodu obnovení bylo zrušeno! + + + + + An error occurred while during the process. + V průběhu procesu se vyskytla chyba. + + + + + + The Live image could not be mounted. + Obraz spouštěcího média systému se nedaří připojit. + + + + + The system repair is aborted! + Oprava systému je přerušena! + + + + + There is not enough free space. + Není zde dostatek volného místa. + + + + + + + + Multiple mount points + Vícero přípojných bodů + + + + Enabled + Zapnuto + + + + Systemback worker thread is interrupted by the user. + Pracovní vlákno aplikace Systemback bylo přerušeno uživatelem. + + + + Boot Live without xorg.conf file + Zavest system spousteny z vyjimatelneho media bez nastaveni ze souboru xorg.conf + + + + + + Boot Live system + Spustit system z vyjimatelneho media + + + + + + Boot system installer + Instalator zavadeciho systemu + + + + + + Boot Live in safe graphics mode + Spustit system z vyjimatelneho media, v rezimu pro pripad problemu s grafikou + + + + + + Boot Live in debug mode + Zavest system z vyjimatelneho media, v ladicim rezimu + + + + Press 'E' key to edit + Úpravu zahájíte stiskem klávesy „E“ + + + + Press TAB key to edit + Úpravu zahájíte stiskem klávesy TAB + + + + An error occurred while changing the access permissions of the following file: + Došlo k chybě při změně přístupových práv tohoto souboru: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Použití: systemback-cli [předvolba] + + Předvolby: + + -n, --newbackup vytvořit nový bod obnovení + + -s, --storagedir <umisteni> načíst nebo nastavit umístění složky s body + obnovení + + -u, --upgrade přejít ze stávajícího systému na jeho novější verzi + a odebrat zbytečné soubory a balíčky + + -v, --version vypsat číslo verze aplikace Systemback + + -h, --help zobrazit tuto nápovědu + + + + basic restore UI + základní uživatelské rozhraní pro obnovu + + + + The Systemback command line interface cannot be used on a Live system! + Textové rozhraní aplikace Systemback nelze použít v systému, spuštěného z vyjímatelného média (Live)! + + + + This stupid terminal does not support color! + Tento hloupý terminál nepodporuje barvy! + + + + This terminal is too small! + Tento terminál je příliš malý! + + + + The specified storage directory path has not been set! + Zadané umístění úložné složky nebylo nastaveno! + + + + The restoration is aborted! + Proces obnovení byl přerušen! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Obnova je dokončena, ale vyskytla se chyba při opětovné instalaci zavaděče GRUB 2! + + + + The restore points storage directory is not available or not writable! + Složka s body obnovení není dostupná nebo do ní nelze zapisovat! + + + + Available restore point(s): + Body obnovení k dispozici: + + + + Quit + Ukončit + + + + Selected restore point: + Zvolený bod obnovení: + + + + The specified storage directory path is set. + Zadané umístění úložné složky je nastaveno. + + + + Restore with the following restore point: + Obnovit s použitím následujícího bodu obnovení: + + + + Restore with the following restore method: + Obnovit s použitím následující metody obnovení: + + + + Users configuration files restore + Obnovení souborů s uživatelskými nastaveními + + + + + Complete configuration files restore + Úplné obnovení souborů s nastaveními + + + + Configuration files restore + Obnovení souborů s nastaveními + + + + + + You want to keep the current fstab file? + Přejete si ponechat stávající soubor fstab? + + + + + + + + + + + (Y/N) + (A/N) + + + + + + + Reinstall the GRUB 2 bootloader? + Reinstalovat zavaděč GRUB 2? + + + + Start the restore? + Zahájit proces obnovy? + + + + The users configuration files full restoration are completed. + Celková obnova souborů s uživatelskými nastaveními je dokončena. + + + + The users configuration files restoration are completed. + Obnova souborů s uživatelskými nastaveními je dokončena. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Restartujte počítač stiskem klávesy „ENTER“ nebo klávesou „Q“ ukončete tuto aplikaci. + + + + Press 'ENTER' key to quit. + Ukončete stiskem klávesy „ENTER“. + + + + Deleting old restore point(s) + Mazání starých bodů obnovení + + + + Restoring the users configuration files + Obnovování souborů s uživatelskými nastaveními + + + diff --git a/lang/systemback_da_DK.ts b/lang/systemback_da_DK.ts new file mode 100644 index 0000000..8bb1b3f --- /dev/null +++ b/lang/systemback_da_DK.ts @@ -0,0 +1,1900 @@ + + + + + systemback + + + The specified debug level is invalid! + Det angivne undersøgelses niveau er ugyldig! + + + + The default level (1) will be used. + Standardværdien (1) vil blive anvendt. + + + + Version: + Version: + + + + Compilation date and time: + Kompilation, dato og tid: + + + + + Installed files: + Installerede filer: + + + + Operating system: + Styresystem: + + + + + Mounted filesystems: + Monterede filsystemer: + + + + System language: + Systemsprog: + + + + Translation: + Oversættelse: + + + + An error occurred while opening the following file: + Der opstod en fejl under åbning af følgende fil: + + + + An error occurred while creating the following directory: + Der opstod en fejl under oprettelse af følgende mappe: + + + + An error occurred while removing the following file: + Der opstod en fejl under sletning af følgende fil: + + + + An error occurred while creating the following hard link: + Der opstod en fejl under oprettelse af følgende hårde link: + + + + Reference file: + Henvisnings-fil: + + + + An error occurred while creating the following file: + Der opstod en fejl under oprettelse af følgende fil: + + + + An error occurred while renaming the following item: + En fejl opstod under omdøbning af følgende element: + + + + New path: + Ny sti: + + + + An error occurred while executing the following command: + Der opstod en fejl under udførelse af følgende kommando: + + + + Exit code: + Exit-kode: + + + + Failed to detect the device for installing the GRUB! + Det lykkedes ikke at registrere enheden til installation af GRUB! + + + + An error occurred while upgrading the system! + Der opstod en fejl under opgradering af systemet! + + + + Restart upgrade ... + Genstart opgradering … + + + + This file could not be copied because it does not exist: + Denne fil kunne ikke kopieres, da den ikke findes: + + + + The following partition has no UUID: + Den følgende partition har ingen UUID: + + + + An error occurred while creating a new partition on the following device: + Der opstod en fejl under oprettelse af en ny partition på følgende enhed: + + + + An error occurred while mounting the following partition/image: + Der opstod en fejl under montering af følgende partition/aftryk: + + + + An error occurred while setting one or more flags on the following partition: + Der opstod en fejl, da der blev sat en eller flere markeringer, for den + følgende partition: + + + + Flag(s): + Markering: + + + + An error occurred while creating the partition table on the following device: + Der opstod en fejl under oprettelse af partitionstabellen på følgende enhed: + + + + An error occurred while unmounting the following partition/image/mount point: + Der opstod en fejl under afmontering af følgende partition/aftryk/monteringspunkt: + + + + An error occurred while cloning the properties of the following item: + Der opstod en fejl under kloning af egenskaberne for følgende element: + + + + Target item: + Enheds element: + + + + An error occurred while cloning the following symbolic link: + Der opstod en fejl under kloning af følgende symbolsk link: + + + + Target symlink: + Enheds symlink: + + + + An error occurred while cloning the following file: + Der opstod en fejl under kloning af følgende fil: + + + + Target file: + Slut fil: + + + + An error occurred while cloning the following directory: + Der opstod en fejl under kloning af følgende mappe: + + + + Target directory: + Målmappe: + + + + An error occurred while deleting the following directory: + Der opstod en fejl under sletning af følgende mappe: + + + + + Cannot start the Systemback scheduler daemon! + Kan ikke starte Systemback planlægningsservice! + + + + + Missing, wrong or too much argument(s). + Mangler, forkert eller for mange argumenter. + + + + The process is disabled for this user. + Processen er deaktiveret for denne bruger. + + + + Root privileges are required. + Der kræves admin-rettigheder. + + + + This system is a Live. + Dette er et Live system. + + + + Already running. + Kører allerede. + + + + Unable to daemonize. + Kan ikke afvikles som service. + + + + Cannot start the Systemback graphical user interface! + Kan ikke starte Systemback grafiske brugergrænseflade! + + + + Unable to get root permissions. + Kan ikke opnå admin-rettigheder. + + + + Unable to connect to the X server. + Kan ikke forbinde til X serveren. + + + + Full name of the new user: + Fulde navn på den nye bruger: + + + + New username to login: + Nyt Brugernavn til login: + + + + New user account password: + Ny adgangskode til brugerkonto: + + + + New root password (optional, not recommended for Ubuntu): + Ny root password (valgfrit, anbefales ikke til Ubuntu): + + + + New hostname: + Nyt værtsnavn: + + + + + + + + + + + + + + + + Back + Tilbage + + + + + + + + Next + Næste + + + + + Working directory + Arbejdsmappe + + + + Created Live images + Fremstillede Live diskaftryk + + + + Name of the Live system + Navn på Live-systemet + + + + + + + + Options + Indstillinger + + + + Write target + Skriv til + + + + Live operations + Live indstillinger + + + + Include the user data files + Medtag brugerens datafiler + + + + Redetect devices + Genopdag enheder + + + + + + Delete + Slet + + + + Write to target + Skriv til enhed + + + + Convert to ISO + Konverter til ISO + + + + + + Create new + Opret ny + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Monter den/de defekte systempartition(er) i '/mnt' mappe i henhold til den oprindelige struktur.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + + + Mount + Montér + + + + Reset mounts + Nulstil montéringer + + + + Repair type + Reparations type + + + + GRUB 2 repair + GRUB 2 reparation + + + + System files repair + Reparation af systemfiler + + + + + Reinstall GRUB 2 bootloader: + Geninstallere GRUB 2 bootloader: + + + + + Auto detection + Automatisk detektion + + + + Full repair + Fuld reparation + + + + Do not repair the fstab file + Reparere ikke fstab filen + + + + Exclude hidden user files and directories from restore points + Udeluk skjulte brugers filer og mapper fra gendannelsespunkter + + + + Exclude user data files and directories from Live system + Udeluk brugerdatafiler og mapper fra Live-systemet + + + + Excludable items + Ekskluderede emner + + + + Excluded items + Ekskluderede emner + + + + + Remove item from the exclusion list + Fjern element fra Eksklusionslisten + + + + + Add item to the exclusion list + Tilføj element til Eksklusionslisten + + + + Scheduler state: + Planlægnings status: + + + + + + + + + + + + + + Disabled + Deaktiveret + + + + Timer settings + Timer indstillinger + + + + Waiting time before creating a new restore point: + Ventetid før du opretter et nyt gendannelsespunkt: + + + + Visible countdown time: + Synlig nedtællings tid: + + + + Pop-up window position on screen: + Pop-up vindues position på skærmen: + + + + Use silent mode + Brug stille tilstand + + + + + + + More + Mere + + + + + + + Less + Mindre + + + + Simple system backup and restore application with extra features + Simpel system backup og gendannelses program med ekstra funktioner + + + + Project homepage: + Projektets hjemmeside: + + + + Contact: + Kontakt: + + + + Donate: + Donation: + + + + Systemback version: + Systemback version: + + + + + License + Licens + + + + Re-read directories + Genindlæse mapper + + + + Writable Linux filesystem! + Skrivbart Linux filsystem! + + + + + + + Cancel + Annuller + + + + + + + + + + + Maximum number of temporary restore points + Maksimalt antal midlertidige gendannelsespunkter + + + + Restore points + Gendannelsespunkter + + + + Highlighted restore points + Fremhævede punkter + + + + Point operations + Punkt operationer + + + + Highlight + Fremhævet + + + + Rename + Omdøb + + + + + + + + + + + + + + + + + + Select restore point + Vælg gendannelsespunkt + + + + + + + + + Storage directory + Opbevaring mappe + + + + Function menu + Funktionsmenu + + + + + Schedule + Planlægning + + + + + + About + Om + + + + + Settings + Indstillinger + + + + System upgrade + System opgradering + + + + + System install + System installation + + + + + + + Live system create + Fremstil Live system + + + + + System repair + Systemreparation + + + + + + System restore + Systemgendannelse + + + + + + + System copy + System kopi + + + + + Exclude + Ekskluder + + + + + Include + Inkluder + + + + Change path + Ændr sti + + + + + + + + + + + + + + + + + + empty + tom + + + + + + + + + + + not used + anvendes ikke + + + + Restore type + Gendannelses type + + + + + + + + + Full restore + Fuld gendannelse + + + + + + + + + System files restore + Systemgendannelses filer + + + + User(s) configuration files restore + Bruger(e) gendannelses konfigurationer + + + + + Keep newly installed configuration files + Behold nylige installerede konfigurationsfiler + + + + Include user(s): + Inkluder bruger(e): + + + + Do not restore the fstab file + Gendan ikke fstab filen + + + + Partition settings + Partitions indstillinger + + + + + + + + Transfer user configuration files + Overfør bruger konfigurationsfiler + + + + Copy user data files + Kopiér bruger datafiler + + + + Install GRUB 2 bootloader: + Installere GRUB 2 bootloader: + + + + + + Format + Format + + + + + + Reset partitions settings + Nulstil partitions indstillinger + + + + + + + + + + Unmount + Demonter + + + + Change partition settings + Rediger partitions indstillinger + + + + Filesystem: + Filsystem: + + + + Mount point: + Monteringspunkt: + + + + + + + + + ! Delete ! + ! Slet ! + + + + Add new partition + Tilføj ny partition + + + + Create new: + Opret ny: + + + + Need to set the mount point as '/boot/efi'! + Monteringspunktet skal være '/boot/efi'! + + + + Window DPI scaling + Vinduets DPI skalering + + + + Multiplier factor for scaling the window contents + Multiplikationsfaktor for skalering af vinduets indhold + + + + User interface + Bruger interface + + + + Window always on top + Vindue altid øverst + + + + System + System + + + + Disable scheduler daemon starting for the following users: + Deaktiver planlægningsservicen der starter for følgende brugere: + + + + Use XZ compressor for squashfs filesystems + Brug XZ kompression til squashfs filsystemer + + + + Override auto-detected language: + Tilsidesæt automatisk-registreret sprog: + + + + Override the used style: + Tilsidesæt den anvendte stil: + + + + Disable incremental restore points (do not use hard links between backups) + Deaktiver fortløbende gendannelsespunkter (brug ikke hårde links mellem backup) + + + + Create Live ISO images automatically (faster than the conversion) + Opret Live ISO diskaftryk automatisk (hurtigere end konvertering) + + + + Do not empty memory cache at the end of some processes + Tøm ikke cache-hukommelsen til slut for nogen processer + + + + Includable items + Emner der kan tilføjes + + + + Included items + Tilføjede emner + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + Medtag brugerdatafiler og mapper i gendannelsespunktet +Disse vil blive defineret som gendannelesbare konfigurationsfiler! + + + + ! Interrupt ! + ! Afbryd ! + + + + Creates a scheduled restore point within few seconds. + Opretter et planlagt gendannelsespunkt inden for få sekunder. + + + + + + Start + Start + + + + Later + Senere + + + + Systemback user authentication + Systemback brugergodkendelse + + + + Administrator: + Administrator: + + + + Password: + Adgangskode: + + + + Unsafe X Window authorization! + Usikker X Window tilladelse! + + + + Please do not use 'sudo' command. + Undlad venligst at bruge 'sudo' kommando. + + + + + + + + + Transfer user configuration and data files + Overfør bruger konfiguration og datafiler + + + + + + scheduler + opgavestyring + + + + + Partition + Partition + + + + + Size + Størrelse + + + + Label + Etiket + + + + Current mount point + Nuværende monteringspunkt + + + + New mount point + Nyt monterings punkt + + + + Filesystem + Filsystem + + + + Device + Enhed + + + + + Top left + Øverste-venstre + + + + + + Top right + Øverste-højre + + + + + + Center + Centreret + + + + + + Bottom left + Nederste-venstre + + + + + Bottom right + Nederste-højre + + + + + + day(s) + dag(e) + + + + + + hour(s) + time(r) + + + + + + + + minute(s) + minut(ter) + + + + + + seconds + sekunder + + + + + + + Everyone + Alle + + + + + + Currently running system + Aktuelle kørende system + + + + + Emptying cache + Tømmer mellemlageret + + + + + Flushing filesystem buffers + Rydder fil-systemets hukommelse + + + + + Restoring the full system + Gendanner hele systemet + + + + + Restoring the system files + Gendanner systemfilerne + + + + Restoring the user(s) configuration files + Gendanner bruger(e) konfigurationsfiler + + + + Repairing the system files + Reparerer systemets filer + + + + Repairing the full system + Reparerer hele systemet + + + + Repairing the GRUB 2 + Reparation af GRUB 2 + + + + Copying the system + Kopierer systemet + + + + Installing the system + Installerer systemet + + + + Writing Live image to the target device + Skriver Live aftryk til enhed + + + + Upgrading the system + Opgradering af systemet + + + + + Deleting incomplete restore point + Sletter ufuldstændigt gendannelsespunkt + + + + Interrupting the current process + Afbryder den igangværende proces + + + + Deleting old restore point + Sletter gammelt gendannelsespunkt + + + + + Creating restore point + Opretter gendannelsespunkt + + + + + Deleting restore point + Sletter gendannelsespunkt + + + + Converting Live system image + Konverterer Live systemets diskaftryk + + + + + process + behandles + + + + Creating Live system + Fremstiller Live system + + + + + + + + + Reboot + Genstart + + + + + + + X restart + X genstart + + + + + + Live image + Live diskaftryk + + + + Restore the system files to the following restore point: + Gendan systemfilerne til følgende gendannelsespunkt: + + + + Repair the system files with the following restore point: + Reparere systemets filer med følgende gendannelsespunkt: + + + + Repair the complete system with the following restore point: + Reparer hele systemet med følgende gendannelsespunkt: + + + + Restore the complete user(s) configuration files to the following restore point: + Gendan alle bruger(s) konfigurationsfiler til det følgende gendannelsespunkt: + + + + Restore the user(s) configuration files to the following restore point: + Gendan bruger(nes) konfigurationsfiler til det følgende gendannelsespunkt: + + + + Copy the system, using the following restore point: + Kopier systemet, ved hjælp af følgende gendannelsespunkt: + + + + Install the system, using the following restore point: + Installerer systemet, ved hjælp af følgende gendannelsespunk: + + + + Restore the complete system to the following restore point: + Gendan det komplette system, til følgende gendannelsespunkt: + + + + Format the %1, and write the following Live system image: + Formater %1, og skriv det følgende Live system diskaftryk: + + + + Repair the GRUB 2 bootloader. + Reparer GRUB 2 bootloaderen. + + + + The user(s) configuration files full restoration are completed. + Bruger(nes) komplette gendannelse af konfigurationsfiler er udført. + + + + + The X server will restart automatically within 30 seconds. + X-serveren genstarter automatisk indenfor 30 sekunder. + + + + The user(s) configuration files restoration are completed. + Bruger(nes) gendannelse af konfigurationsfiler er udført. + + + + The full system repair is completed. + Komplet system reparation er udført. + + + + The system repair is completed. + System reparationen er udført. + + + + + The system files restoration are completed. + Gendannelse at systemfilerne er udført. + + + + + + The computer will restart automatically within 30 seconds. + Computeren genstarter automatisk indenfor 30 sekunder. + + + + + The full system restoration is completed. + Komplet system gendannelse er udført. + + + + The system copy is completed. + Kopiering af systemet er udført. + + + + The Live system creation is completed. + Oprettelsen af Live systemet er udført. + + + + The created .sblive file can be written to pendrive. + Den oprettede .sblive fil kan skrives til en usb-pen. + + + + The GRUB 2 repair is completed. + GRUB 2 reparationen er udført. + + + + The system install is completed. + Systeminstallationen er udført. + + + + The Live system image write is completed. + Skrivning af Live system aftryk er udført. + + + + + An another Systemback process is currently running, please wait until it finishes. + En anden Systemback proces kører i øjeblikket, vent venligst til denne er færdig. + + + + + Unable to get exclusive lock! + Kan ikke få eksklusiv lås! + + + + + First, close all package manager. + Ført, lukke alle pakke managere. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + The specified name contain(s) unsupported character(s)! + Det angivne navn indeholder ikke understøttede karakter(er)! + + + + Please enter a new name. + Skriv venligst et nyt navn. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Reparationen af systemfilerne er afsluttet, men der opstod en fejl ved geninstallation af GRUB! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + Systemet kan muligvis ikke starte op! (generelt er det den anderledes arkitektur der forårsager problemet.) + + + + + + + The restore point creation is aborted! + Oprettelse af gendannelsespunktet er afbrudt! + + + + + + Not enough free disk space to complete the process. + Ikke nok ledig diskplads, til at kunne gennemføre processen. + + + + + Root privileges are required for running the Systemback! + Der kræves admin-rettigheder for at afvikle Systemback! + + + + + + + + The system copy is aborted! + Kopiering af systemet er afbrudt! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + Den/de angivne partition(er) har ikke nok ledig plads til at kunne kopiere systemet. Det kopierede system vil ikke fungere korrekt. + + + + The system copy is completed, but an error occurred while installing the GRUB! + System kopieringen er udført, men der opstod en fejl under installationen af ​​GRUB! + + + + + You need to manually install a bootloader. + Du er nødt til manuelt at installere en bootloader. + + + + + The system restoration is aborted! + Systemgendannelsen blev afbrudt! + + + + An error occurred while reinstalling the GRUB. + Der opstod en fejl ved geninstallering af GRUB. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Den komplette systemreparation er udført, men der opstod en fejl, ved geninstallation af GRUB! + + + + + + + + The Live system creation is aborted! + Oprettelsen at Live systemet blev afbrudt! + + + + An error occurred while creating the file system image. + Der opstod en fejl under oprettelse af fil-systemets diskaftryk. + + + + An error occurred while creating the container file. + Der opstod en fejl under oprettelse af container filen. + + + + + + The specified partition could not be mounted. + Den angivne partition kunne ikke monteres. + + + + The system install is completed, but an error occurred while installing the GRUB! + Systeminstallation er udført, men der opstod en fejl under installationen af ​​GRUB! + + + + + + + + The system installation is aborted! + Systeminstallationen er afbrudt! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + Den/de angivne partition(er) har ikke nok ledig plads til at installere systemet. Det installerede system vil ikke fungere korrekt. + + + + + + The specified partition could not be formatted (in use or unavailable). + Den angivne partition kunne ikke formateres (enten er den i brug eller utilgængelig). + + + + An error occurred while reinstalling the GRUB! + Der opstod en fejl ved geninstallering af GRUB! + + + + + + + + + + There has been critical changes in the file system during this operation. + Der har været kritiske ændringer i fil systemet under denne operation. + + + + + + + + The Live write is aborted! + Skrivning af Live er afbrudt! + + + + The selected device does not have enough space to write the Live system. + Den valgte enhed har ikke plads nok til Live systemet. + + + + An error occurred while unpacking the Live system files. + Der opstod en fejl ved udpakning af Live systemets filer. + + + + + + + The Live conversion is aborted! + Live konverteringen er afbrudt! + + + + An error occurred while renaming the essential Live files. + Der opstod en fejl ved omdøbning af de essentielle Live filer. + + + + An error occurred while creating the .iso image. + Der opstod en fejl under oprettelsen af .iso diskaftrykket. + + + + An error occurred while reading the .sblive image. + Der opstod en fejl under læsning af .sblive aftrykket. + + + + An error occurred while creating the new initramfs image. + Der opstod en fejl under oprettelse af det nye initramfs aftryk. + + + + + The restore point deletion is aborted! + Sletning af gendannelsespunktet er afbrudt! + + + + + An error occurred while during the process. + Der opstod en fejl under processen. + + + + + + The Live image could not be mounted. + Live aftrykket kunne ikke monteres. + + + + + The system repair is aborted! + System reparationen er afbrudt! + + + + + There is not enough free space. + Der er ikke tilstrækkelig ledig plads. + + + + + + + + Multiple mount points + Mange monteringspunkter + + + + Enabled + Aktiveret + + + + Systemback worker thread is interrupted by the user. + Systemback afvikler tråd er afbrudt af brugeren. + + + + Boot Live without xorg.conf file + Opstart Live uden xorg.conf filen + + + + + + Boot Live system + Opstart Live systemet + + + + + + Boot system installer + Opstart system installer + + + + + + Boot Live in safe graphics mode + Opstart live i fejlsikret grafisk tilstand + + + + + + Boot Live in debug mode + Opstart Live i undersøgelses tilstand + + + + Press 'E' key to edit + Tryk på 'E' for at redigere + + + + Press TAB key to edit + Tryk TAB tasten for at redigere + + + + An error occurred while changing the access permissions of the following file: + Der opstod en fejl ved ændring af rettigheder for følgende fil: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Brug: systemback-cli [valg] + + Valg: + + -n, --newbackup opret nyt gendannelsespunkt + + -s, --storagedir <sti> få eller sæt opbevaringssted for gendannelsespunkt + mappe sti + + -u, --upgrade opgrader aktuelle system + fjern unødvendige filer og pakker + + -v, --version vis Systemback versionsnummer + + -h, --help vis denne hjælp + + + + basic restore UI + grundlæggende gendannelses UI + + + + The Systemback command line interface cannot be used on a Live system! + Systemback kommando linje grænseflade, kan ikke bruges på et Live system! + + + + This stupid terminal does not support color! + Denne dumme terminal understøtter ikke farve! + + + + This terminal is too small! + Denne terminal er for lille! + + + + The specified storage directory path has not been set! + Den angivne opbevaring mappe sti er ikke indstillet! + + + + The restoration is aborted! + Gendannelsen er afbrudt! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Gendannelsen er udført, men der opstod en fejl, ved gen-installationen af GRUB! + + + + The restore points storage directory is not available or not writable! + Opbevaring mappe for gendannelsespunkter er ikke tilgængelig eller er ikke skrivebart! + + + + Available restore point(s): + Tilgængelige gendannelsespunkter: + + + + Quit + Afslut + + + + Selected restore point: + Valgte gendannelsespunkt: + + + + The specified storage directory path is set. + Den angivne mappe sti til opbevaring er indstillet. + + + + Restore with the following restore point: + Gendan med den følgende gendannelsespunkt: + + + + Restore with the following restore method: + Gendan med følgende gendannelsesmetode: + + + + Users configuration files restore + Brugernes opbevaringssted for konfigurationsfiler + + + + + Complete configuration files restore + Opbevaringssted for komplette konfigurationsfiler + + + + Configuration files restore + Opbevaringssted for konfigurationsfiler + + + + + + You want to keep the current fstab file? + Vil du beholde den aktuelle fstab fil? + + + + + + + + + + + (Y/N) + (J/N) + + + + + + + Reinstall the GRUB 2 bootloader? + Geninstallere GRUB 2 bootloader? + + + + Start the restore? + Start gendannelsen? + + + + The users configuration files full restoration are completed. + Den komplette gendannelse af brugernes konfigurationsfiler er udført. + + + + The users configuration files restoration are completed. + Gendannelse af brugernes konfigurationsfiler er udført. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Tryk på 'ENTER' for at genstarte computeren, eller 'Q' for at afslutte. + + + + Press 'ENTER' key to quit. + Tryk på 'ENTER' for at afslutte. + + + + Deleting old restore point(s) + Sletter gl. gendannelsespunkt(er) + + + + Restoring the users configuration files + Gendanner brugerens konfigurationsfiler + + + diff --git a/lang/systemback_de.ts b/lang/systemback_de.ts new file mode 100644 index 0000000..4ad1d41 --- /dev/null +++ b/lang/systemback_de.ts @@ -0,0 +1,1898 @@ + + + + + systemback + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + Die angegebene Debug-Stufe ist ungültig! + + + + The default level (1) will be used. + Die Standardebene (1) wird verwendet werden. + + + + An error occurred while opening the following file: + Beim Öffnen der folgenden Datei ist ein Fehler aufgetreten: + + + + An error occurred while creating the following directory: + Beim Erstellen des folgenden Verzeichnisses ist ein Fehler aufgetreten: + + + + An error occurred while removing the following file: + Beim Entfernen der folgenden Datei ist ein Fehler aufgetreten: + + + + An error occurred while creating the following hard link: + Beim Erstellen des folgenden "Hardlink" ist ein Fehler aufgetreten: + + + + Reference file: + Referenzdatei: + + + + An error occurred while creating the following file: + Beim Erstellen der folgenden Datei ist ein Fehler aufgetreten: + + + + An error occurred while renaming the following item: + Beim Umbennen des folgenden Objektes ist ein Fehler aufgetreten: + + + + New path: + Neuer Verzeichnispfad: + + + + An error occurred while executing the following command: + Bei der Ausführung des folgenden Befehls ist ein Fehler aufgetreten: + + + + Exit code: + Exit-Code: + + + + Failed to detect the device for installing the GRUB! + Das Gerät zur Installation von GRUB konnte nicht gefunden werden! + + + + An error occurred while upgrading the system! + Während der Systemaktualisierung ist ein Fehler aufgetreten! + + + + Restart upgrade ... + Aktualisierung erneut starten … + + + + This file could not be copied because it does not exist: + Diese Datei konnte nicht kopiert werden, da sie nicht existiert: + + + + The following partition has no UUID: + Die nachfolgende Partition besitzt keine UUID: + + + + An error occurred while creating a new partition on the following device: + Während der Erstellung einer neuen Partition auf dem folgenden Gerät ist ein Fehler aufgetreten: + + + + An error occurred while mounting the following partition/image: + Während des Mountvorgangs der(s) folgenden Partition/Abbildes ist ein Fehler aufgetreten: + + + + An error occurred while setting one or more flags on the following partition: + Bei Setzen einer oder mehrer Flags auf der folgenden Partition ist ein Fehler aufgetreten: + + + + Flag(s): + Flag(s): + + + + An error occurred while creating the partition table on the following device: + Beim Erstellen einer Partitionstabelle auf dem folgenden Gerät ist ein Fehler aufgetreten: + + + + An error occurred while unmounting the following partition/image/mount point: + Beim Aushängen der(s) folgenden Partition/Abbildes/Einhängepunktes ist ein Fehler aufgetreten: + + + + An error occurred while cloning the properties of the following item: + Beim Klonen der Eigenschaften des folgenden Punktes ist ein Fehler aufgetreten: + + + + Target item: + Zielpunkt: + + + + An error occurred while cloning the following symbolic link: + Beim Klonen der folgenden symbolischen Verknüpfung ist ein Fehler aufgetreten: + + + + Target symlink: + Zielsymlink: + + + + An error occurred while cloning the following file: + Beim Klonen der folgenden Datei ist ein Fehler aufgetreten: + + + + Target file: + Zieldatei: + + + + An error occurred while cloning the following directory: + Beim Klonen des folgenden Verzeichnisses ist ein Fehler aufgetreten: + + + + Target directory: + Zielverzeichnis: + + + + An error occurred while deleting the following directory: + Beim Entfernen des folgenden Verzeichnisses ist ein Fehler aufgetreten: + + + + + Cannot start the Systemback scheduler daemon! + Systembacks Planungsdienst kann nicht gestartet werden! + + + + + Missing, wrong or too much argument(s). + Fehlende(s), falsche(s) oder zu viele Argument(e). + + + + The process is disabled for this user. + Der Prozess ist für diesen Benutzer dekativiert. + + + + Root privileges are required. + Root-Benutzerrechte erforderlich. + + + + This system is a Live. + Dieses ist ein Live-System. + + + + Already running. + Bereits ausgeführt. + + + + Unable to daemonize. + Kann nicht als Dienst laufen. + + + + Cannot start the Systemback graphical user interface! + Systembacks grafische Benutzeroberfläche kann nicht gestartet werden! + + + + Unable to get root permissions. + Keine Root-Rechte verfügbar. + + + + Unable to connect to the X server. + Verbindung zum X-Server fehlgeschlagen. + + + + Full name of the new user: + Vollständiger Name des neuen Benutzers: + + + + New username to login: + Neuer Nutzername zum Anmelden: + + + + New user account password: + Neues Benutzerpasswort: + + + + New root password (optional, not recommended for Ubuntu): + Neues Rootpasswort (optional, für Ubuntu nicht empfohlen): + + + + New hostname: + Neuer Rechnername: + + + + + + + + + + + + + + + + Back + Zurück + + + + + + + + Next + Weiter + + + + + Working directory + Arbeitsverzeichnis + + + + Created Live images + Erstellte Live-Abbilder + + + + Name of the Live system + Name des Live-Systems + + + + + + + + Options + Einstellungen + + + + Write target + Ziel schreiben + + + + Live operations + Live-Vorgänge + + + + Include the user data files + Nutzerdateien einschliessen + + + + Redetect devices + Geräteneuerkennung + + + + + + Delete + Löschen + + + + Write to target + In den Zielort schreiben + + + + Convert to ISO + In eine ISO umwandeln + + + + + + Create new + Neu erstellen + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Die fehlerhafte(n) Systempartition(en) in das Verzeichnis »/mnt« in Übereinstimmung mit der ursprünglichen Struktur einhängen. (»/« → »/mnt«, »/home« → »/mnt/home«, usw.) + + + + + Mount + Einhängen + + + + Reset mounts + Einhängepunkte zurücksetzen + + + + Repair type + Repariertyp + + + + GRUB 2 repair + GRUB-2-Reparatur + + + + System files repair + Systemdateienreparatur + + + + + Reinstall GRUB 2 bootloader: + Neuinstallation des GRUB 2 Bootloaders: + + + + + Auto detection + Automatische Erkennung + + + + Full repair + Vollständige Reparatur + + + + Do not repair the fstab file + FSTAB Datei nicht reparieren + + + + Exclude hidden user files and directories from restore points + Ausschluss von versteckten Dateien und Verzeichnissen von den Wiederherstellungspunkten + + + + Exclude user data files and directories from Live system + Ausschluss von Benutzerdateien und -verzeichnisse vom Live System + + + + Excludable items + Ausschliessbare Elemente + + + + Excluded items + Ausgeschlossene Elemente + + + + + Remove item from the exclusion list + Entfernen Sie das Element aus der Ausschlussliste + + + + + Add item to the exclusion list + Fügen Sie das Element der Ausschlussliste hinzu + + + + Scheduler state: + Zustand des Zeitplanungsmoduls: + + + + + + + + + + + + + + Disabled + Deaktiviert + + + + Timer settings + Timer Einstellungen + + + + Waiting time before creating a new restore point: + Wartezeit vor der Erstellung eine neuen Wiederherstellungspunktes: + + + + Visible countdown time: + Sichtbare Countdown Zeit: + + + + Pop-up window position on screen: + Position des Pop-Up-Fensters auf dem Bildschirm: + + + + Use silent mode + Stumm-Modus nutzen + + + + + + + More + Mehr + + + + + + + Less + Weniger + + + + Simple system backup and restore application with extra features + Einfaches System- und Wiederherstellungsprogramm mit Zusatzfunktionen + + + + Project homepage: + Projekt-Homepage: + + + + Contact: + Kontakt: + + + + Donate: + Spenden: + + + + Systemback version: + Systemback Version: + + + + + License + Lizenz + + + + Re-read directories + Verzeichnisse neu einlesen + + + + Writable Linux filesystem! + Beschreibbares Linux Dateisystem! + + + + + + + Cancel + Abbrechen + + + + + + + + + + + Maximum number of temporary restore points + Maximale Anzahl temporärer Wiederherstellungspunkte + + + + Restore points + Wiederherstellungspunkte + + + + Highlighted restore points + Hervorgehobene Punkte + + + + Point operations + Punktfunktionen + + + + Highlight + Hervorheben + + + + Rename + Umbennenen + + + + + + + + + + + + + + + + + + Select restore point + Wiederherstellungspunkt auswählen + + + + + + + + + Storage directory + Speicherverzeichnis + + + + Function menu + Funktionsmenü + + + + + Schedule + Zeitplan + + + + + + About + Über + + + + + Settings + Einstellungen + + + + System upgrade + Systemaktualisierung + + + + + System install + Systeminstallation + + + + + + + Live system create + Erstelle Live System + + + + + System repair + Reparatur Live System + + + + + + System restore + Systemwiederherstellung + + + + + + + System copy + Systemduplizierung + + + + + Exclude + Ausschliessen + + + + + Include + Einschliessen + + + + Change path + Verändere Pfad + + + + + + + + + + + + + + + + + + empty + leer + + + + + + + + + + + not used + nicht genutzt + + + + Restore type + Typ der Wiederherstellung + + + + + + + + + Full restore + Vollständige Wiederherstellung + + + + + + + + + System files restore + Wiederherstellung der Systemdateien + + + + User(s) configuration files restore + Benutzereinstellung(en) Dateiwiederherstellung + + + + + Keep newly installed configuration files + Kürzlich installierte Konfigurationsdateien behalten + + + + Include user(s): + Benutzer einschliessen: + + + + Do not restore the fstab file + FSTAB Datei nicht wiederherstellen + + + + Partition settings + Partitionseinstellungen + + + + + + + + Transfer user configuration files + Übertrage Nutzerkonfiguration + + + + Copy user data files + Dateien des Benutzers kopieren + + + + Install GRUB 2 bootloader: + GRUB 2 Bootloader installieren: + + + + + + Format + Format + + + + + + Reset partitions settings + Partitionseinstellungen zurücksetzen + + + + + + + + + + Unmount + Aushängen + + + + Change partition settings + Partitionseinstellungen ändern + + + + Filesystem: + Dateisystem: + + + + Mount point: + Einhängepunkt: + + + + + + + + + ! Delete ! + ! Löschen ! + + + + Add new partition + Neue Partition hinzufügen + + + + Create new: + Neu anlegen: + + + + Need to set the mount point as '/boot/efi'! + Einhängepunkt muss als '/boot/efi' gesetzt werden! + + + + Window DPI scaling + Window DPI Skalierung + + + + Multiplier factor for scaling the window contents + Vervielfältigungsfaktor für die Skalierung von Fensterinhalten + + + + User interface + Benuzteroberfläche + + + + Window always on top + Fenster immer im Vordergrund + + + + System + System + + + + Disable scheduler daemon starting for the following users: + Deaktivierung des Zeitplaners für die folgenden Benutzer: + + + + Use XZ compressor for squashfs filesystems + Benutze XZ Kompressor für squashfs Dateisysteme + + + + Override auto-detected language: + Automatisch erkannte Sprache außer Kraft setzen: + + + + Override the used style: + Benutzten Stil außer Kraft setzen: + + + + Disable incremental restore points (do not use hard links between backups) + Deaktiviere inkrementelle Wiederherstellungspunkte (nichts 'hard links') + + + + Create Live ISO images automatically (faster than the conversion) + Automatische Erstellung von Live ISO images (schneller als Konvertierung) + + + + Do not empty memory cache at the end of some processes + Speicher Cache am Ende einiger Prozesse nicht leeren + + + + Includable items + Einbeziehbare Elemente + + + + Included items + Einbezogene Elemtente + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + Ordnen Sie Dateien und Verzeichnisse den Wiederherstellungspunkten zu, +um sie als wiederherstellbare Konfigurationsdateien zu definieren! + + + + ! Interrupt ! + ! Abbruch ! + + + + Creates a scheduled restore point within few seconds. + Erstelle einen zeitplanabhängigen Wiederherstellungspunkt in wenigen Sekunden. + + + + + + Start + Start + + + + Later + Später + + + + Systemback user authentication + Systemback Nutzerauthentifizierung + + + + Administrator: + Administrator: + + + + Password: + Passwort: + + + + Unsafe X Window authorization! + Unsichere X-Window-Legitimierung! + + + + Please do not use 'sudo' command. + Bitte sudo-Befehl nicht benutzen. + + + + + + + + + Transfer user configuration and data files + Übertrage Nutzerkonfiguration und Dateien + + + + + + scheduler + Zeitplaner + + + + + Partition + Partition + + + + + Size + Größe + + + + Label + Bezeichnung + + + + Current mount point + Derzeitiger Einhängepunkt + + + + New mount point + Neuer Einhängepunkt + + + + Filesystem + Dateisystem + + + + Device + Gerät + + + + + Top left + Oben links + + + + + + Top right + Oben rechts + + + + + + Center + Mitte + + + + + + Bottom left + Unten links + + + + + Bottom right + Unten rechts + + + + + + day(s) + Tag(e) + + + + + + hour(s) + Stunde(n) + + + + + + + + minute(s) + Minute(n) + + + + + + seconds + Sekunden + + + + + + + Everyone + Alle Benutzer + + + + + + Currently running system + Zurzeit laufendes System + + + + + Emptying cache + Cache wird geleert + + + + + Flushing filesystem buffers + Dateisystempuffer werden geleert + + + + + Restoring the full system + Wiederherstellung des kompletten Systems + + + + + Restoring the system files + Wiederherstellung der Systemdateien + + + + Restoring the user(s) configuration files + Wiederherstellung der Nutzerkonfigurationsdateien + + + + Repairing the system files + Reparatur der Systemdateien + + + + Repairing the full system + Reparatur des kompletten Systems + + + + Repairing the GRUB 2 + GRUB 2 wird repariert + + + + Copying the system + System wird kopiert + + + + Installing the system + System wird installiert + + + + Writing Live image to the target device + Live Image wird auf das Ziellaufwerk geschrieben + + + + Upgrading the system + System Upgrade + + + + + Deleting incomplete restore point + Unvollständiger Wiederherstellungspunkt wird gelöscht + + + + Interrupting the current process + Der laufende Prozess wird unterbrochen + + + + Deleting old restore point + Alter Wiederherstellungspunktes wird gelöscht + + + + + Creating restore point + Erstelle Wiederherstellungspunkt + + + + + Deleting restore point + Löschen des Wiederherstellungspunktes + + + + Converting Live system image + Konvertierung des Live System Image + + + + + process + Prozess + + + + Creating Live system + Erstellung eines Live System + + + + + + + + + Reboot + Neustart + + + + + + + X restart + X Neustart + + + + Restore the system files to the following restore point: + Wiederherstellung der Systemdateien in den nachfolgenden Wiederherstellungspunkt: + + + + Repair the system files with the following restore point: + Wiederherstellung der Systemdateien mit dem folgenden Wiederherstellungspunkt: + + + + Repair the complete system with the following restore point: + Reparatur des Gesamtsystems mit dem folgenden Wiederherstellungspunkt: + + + + Restore the complete user(s) configuration files to the following restore point: + Wiederherstellung aller Konfigurationsdateien des Nutzers mit dem folgenden Wiederherstellungspunkt: + + + + Restore the user(s) configuration files to the following restore point: + Wiederherstellung der Konfigurationsdateien des Nutzers mit dem folgenden Wiederherstellungspunkt: + + + + Copy the system, using the following restore point: + Systemkopie erstellen unter Verwendung des folgenden Wiederherstellungspunktes: + + + + Install the system, using the following restore point: + Systeminstallation unter Verwendung des folgenden Wiederherstellungspunktes: + + + + Restore the complete system to the following restore point: + Wiederherstellung des Gesamtsystems unter Verwendung des folgenden Wiederherstellungspunktes: + + + + Format the %1, and write the following Live system image: + Formatiere die %1 und erstelle das folgende Live Image: + + + + Repair the GRUB 2 bootloader. + Reparatur des GRUB 2 Bootloaders. + + + + The user(s) configuration files full restoration are completed. + Die vollständige Wiederherstellung der Nutzerkonfigurationsdateien ist abgeschlossen. + + + + + The X server will restart automatically within 30 seconds. + Der X Server wird innerhalb der nächsten 30 Sekunden automatisch neu starten. + + + + The user(s) configuration files restoration are completed. + Die Wiederherstellung der Nutzerkonfigurationsdateien ist abgeschlossen. + + + + The full system repair is completed. + Die vollständige Systemreparatur ist abgeschlossen. + + + + The system repair is completed. + Systemreparatur ist abgeschlossen. + + + + + The system files restoration are completed. + Wiederherstellung der Systemdateien ist abgeschlossen. + + + + + + The computer will restart automatically within 30 seconds. + Der Computer wird innerhalb der nächsten 30 Sekunden neu starten. + + + + + The full system restoration is completed. + Vollständige Systemwiederherstellung abgeschlossen. + + + + The system copy is completed. + Die Erstellung einer Systemkopie ist abgeschlossen. + + + + The Live system creation is completed. + Erstellung des Live Systems wird abgeschlossen. + + + + The created .sblive file can be written to pendrive. + Die erzeugte .sblive Datei kann auf einen USB Stick geschrieben werden. + + + + The GRUB 2 repair is completed. + Die GRUB 2 Reparatur ist abgeschlossen. + + + + The system install is completed. + Die Installation des Systems ist abgeschlossen. + + + + The Live system image write is completed. + Das Schreiben des Live System Images ist abgeschlossen. + + + + + Unable to get exclusive lock! + Exklusive Sperre nicht erhältlich! + + + + + First, close all package manager. + Bitte schliessen Sie zunächst alle Package Manager. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + The specified name contain(s) unsupported character(s)! + Der angegebene Name enthält nicht unterstützte Zeichen! + + + + Please enter a new name. + Bitte geben Sie einen neuen Namen ein. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Die Reparatur der Systemdateien ist abgeschlossen, bei der Neuinstallation von GRUB ist jedoch ein Fehler aufgetreten! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + Das System ist möglicherweise nicht mehr bootfähig! (Möglicherweise ist eine unterschiedliche Architektur dafür verantwortlich.) + + + + + + + The restore point creation is aborted! + Die Erstellung des Wiederherstellungspunktes wurde abgebrochen! + + + + + + Not enough free disk space to complete the process. + Nicht genügend freier Speicherplatz für die Fertigstellung des Prozesses vorhanden. + + + + + Root privileges are required for running the Systemback! + Für die Nutzung von Systemback sind Rootrechte erforderlich! + + + + + + + + The system copy is aborted! + Systemkopiervorgang abgebrochen! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + Die gewählte(n) Partion(en) hat/haben nicht genügend freien Speicherplatz um das Sytem zu kopieren. Die erstellte Kopie wird nicht richtig funktionieren. + + + + The system copy is completed, but an error occurred while installing the GRUB! + Das Kopieren des Systems ist abgeschlossen, aber ein Fehler ist während der GRUB Installation aufgetreten! + + + + + You need to manually install a bootloader. + Bootloader muss manuell installiert werden. + + + + + The system restoration is aborted! + Abbruch der Systemwiederherstellung! + + + + An error occurred while reinstalling the GRUB. + Bei der erneuten Installation von GRUB ist ein Fehler aufgetreten. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Die Reparatur des Gesamtsystems ist abgeschlossen, während der erneuten Installation von GRUB ist jedoch ein Fehler aufgetreten! + + + + + + + + The Live system creation is aborted! + Die Erstellung des Live Systems wurde abgebrochen! + + + + An error occurred while creating the file system image. + Während der Erstellung eines Dateisystemimages ist ein Fehler aufgetreten. + + + + An error occurred while creating the container file. + Bei der Erstellung einer Container Datei ist ein Fehler aufgetreten. + + + + + + The specified partition could not be mounted. + Die gewählte Partition konnte nicht eingehängt werden. + + + + The system install is completed, but an error occurred while installing the GRUB! + Die Installation des Systems ist abgeschlossen, bei der Installation von GRUB ist jedoch ein Fehler aufgetreten! + + + + + + + + The system installation is aborted! + Die Installation des Systems wurde abgebrochen! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + Die gewählte(n) Partion(en) hat/haben nicht genügend freien Speicherplatz um das Sytem zu kopieren. Die erstellte Kopie wird nicht richtig funktionieren. + + + + + + The specified partition could not be formatted (in use or unavailable). + Die gewählte Partion konnte nicht formatiert werden (in Benutzung oder nicht verfügbar). + + + + An error occurred while reinstalling the GRUB! + Bei der erneuten Installation von GRUB ist ein Fehler aufgetreten! + + + + + + + + + + There has been critical changes in the file system during this operation. + Während dieser Operation ist es zu kritischen Veränderungen am Dateisystem gekommen. + + + + + + + + The Live write is aborted! + Das Schreiben des Live Systems wurde abgebrochen! + + + + The selected device does not have enough space to write the Live system. + Das Zielgerät verfügt nicht über ausreichend Speicherplatz um das Live Sytem darauf zu erstellen. + + + + An error occurred while unpacking the Live system files. + Beim Entpacken der Dateien des Live Systems ist ein Fehler aufgetreten. + + + + + + + The Live conversion is aborted! + Die Umwandlung des Live System wurde abgebrochen! + + + + An error occurred while renaming the essential Live files. + Bei der Umbennung wichtiger Dateien des Live Systems ist ein Fehler aufgetreten. + + + + An error occurred while creating the .iso image. + Bei der Erstellung des ISO Images ist ein Fehler aufgetreten. + + + + An error occurred while reading the .sblive image. + Bei dem Versuch, das .sblive Image zu lesen ist ein Fehler aufgetreten. + + + + An error occurred while creating the new initramfs image. + Bei der Erstellung eine neuen initramfs Image ist ein Fehler aufgetreten. + + + + + The restore point deletion is aborted! + Die Löschung des Wiederherstellungspunktes wurde abgebrochen! + + + + + An error occurred while during the process. + Während es Prozesses ist ein Fehler aufgetreten. + + + + + + The Live image could not be mounted. + Das Live Image konnte nicht eingehängt werden. + + + + + The system repair is aborted! + Die Reparatur des Systems wurde abgebrochen! + + + + + There is not enough free space. + Es ist nicht genügend Platz vorhanden. + + + + + + Live image + Live Image + + + + + An another Systemback process is currently running, please wait until it finishes. + Ein anderer Systemback Prozess läuft momentan, bitte warten Sie auf seine Beendigung. + + + + + + + + Multiple mount points + Mehrere Einhängepunkte + + + + Enabled + Aktiviert + + + + Systemback worker thread is interrupted by the user. + Der Systemback Prozess wurde durch den Benutzer unterbrochen. + + + + Boot Live without xorg.conf file + Start des Live Systems ohne die xorg.conf Datei + + + + + + Boot Live system + Start des Live Systems + + + + + + Boot system installer + Start des System-Installationsprogrammes + + + + + + Boot Live in safe graphics mode + Start des Live Systems in sicherem Grafikmodus + + + + + + Boot Live in debug mode + Start des Live Systems im Debug Modus + + + + Press 'E' key to edit + 'E' Taste zum Editieren drücken + + + + Press TAB key to edit + TAB Taste zum Editieren drücken + + + + An error occurred while changing the access permissions of the following file: + Während der Änderung der Zugriffsrechte der folgenden Datei ist ein Fehler aufgetreten: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Verwendung: systemback-cli [option] + + Optionen: + + -n, --newbackup Erstellung eines neuen Wiederherstellungspunktes + + -s, --storagedir <path> Abruf oder Festlegung des Speicherverzeichnispfades + der Wiederherstellungspunkte + + -u, --upgrade Upgrade des derzeitigen Systems + + -v, --version Ausgabe der Systemback Versionsnummer + + -h, --help Hilfe anzeigen + + + + basic restore UI + grundlegendes Wiederherstellungsbenutzerinterface + + + + The Systemback command line interface cannot be used on a Live system! + Die Systemback Befehlszeile kann nicht auf einem Live-System verwendet werden! + + + + This stupid terminal does not support color! + Dieses dumme Terminal unterstützt keine Farben! + + + + This terminal is too small! + Dieses Terminal ist zu klein! + + + + The specified storage directory path has not been set! + Der ausgewählte Speicherverzeichnispfad wurde nicht gesetzt! + + + + The restoration is aborted! + Wiederherstellung wurde abgebrochen! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Wiederherstellung ist vollständig, aber bei der erneuten Installation von GRUB ist ein Fehler aufgetreten! + + + + The restore points storage directory is not available or not writable! + Das Speicherverzeichnis der Wiederherstellungspunkte ist nicht verfügbar oder nicht beschreibbar! + + + + Available restore point(s): + Verfügbare(r) Wiederherstellungspunkt(e): + + + + Quit + Beenden + + + + Selected restore point: + Ausgewählter Wiederherstellungspunkt: + + + + The specified storage directory path is set. + Das ausgewählte Speicherverzeichnis ist eingestellt. + + + + Restore with the following restore point: + Wiederherstellung mit dem folgenden Wiederherstellungspunkt: + + + + Restore with the following restore method: + Wiederherstellung mit der folgenden Wiederherstellungsmethode: + + + + Users configuration files restore + Wiederherstellung der Nutzerkonfigurationdateien + + + + + Complete configuration files restore + Vollständige Wiederherstellung der Konfigurationsdateien + + + + Configuration files restore + Wiederherstellung der Konfigurationsdateien + + + + + + You want to keep the current fstab file? + Wollen Sie die gegenwärtigen fstab-Datei behalten? + + + + + + + + + + + (Y/N) + (J/N) + + + + + + + Reinstall the GRUB 2 bootloader? + GRUB 2 Bootloader erneut installieren? + + + + Start the restore? + Wiederherstellung starten? + + + + The users configuration files full restoration are completed. + Vollständige Wiederherstellung der Nutzerkonfigurationsdateien ist abgeschlossen. + + + + The users configuration files restoration are completed. + Wiederherstellung der Nutzerkonfigurationsdateien ist abgeschlossen. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Betätigen Sie die 'ENTER'-Taste um den Computer neu zu starten oder 'Q' um zu beenden. + + + + Press 'ENTER' key to quit. + Betätigen Sie die 'ENTER'-Taste um zu beenden. + + + + Deleting old restore point(s) + Löschen des/der alten Wiederherstellungspunkte(s) + + + + Restoring the users configuration files + Wiederherstellung der Nutzerkonfigurationsdateien + + + diff --git a/lang/systemback_en_GB.ts b/lang/systemback_en_GB.ts new file mode 100644 index 0000000..6e248c8 --- /dev/null +++ b/lang/systemback_en_GB.ts @@ -0,0 +1,1289 @@ + + + + + systemback + + Full name of the new user: + + + + New username to login: + + + + New user account password: + + + + New root password (optional, not recommended for Ubuntu): + + + + New hostname: + + + + Back + + + + Next + + + + Working directory + + + + Created Live images + + + + Name of the Live system + + + + Options + + + + Write target + + + + Live operations + + + + Include the user data files + + + + Redetect devices + + + + Delete + + + + Write to target + + + + Convert to ISO + + + + Create new + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + + Mount + + + + Reset mounts + + + + Repair type + + + + GRUB 2 repair + + + + System files repair + + + + Reinstall GRUB 2 bootloader: + + + + Auto detection + + + + Full repair + + + + Do not repair the fstab file + + + + Exclude hidden user files and directories from restore points + + + + Exclude user data files and directories from Live system + + + + Excluded items + + + + Remove item from the exclusion list + + + + Add item to the exclusion list + + + + Scheduler state: + + + + Disabled + + + + Timer settings + + + + Waiting time before creating a new restore point: + + + + Visible countdown time: + + + + Pop-up window position on screen: + + + + Use silent mode + + + + More + + + + Less + + + + Simple system backup and restore application with extra features + + + + Project homepage: + + + + Contact: + + + + Donate: + + + + Systemback version: + + + + License + Licence + + + Re-read directories + + + + Writable Linux filesystem! + + + + Cancel + + + + Maximum number of temporary restore points + + + + empty + + + + not used + + + + Restore points + + + + Highlighted restore points + + + + Point operations + + + + Highlight + + + + Rename + + + + Select restore point + + + + Storage directory + + + + Function menu + + + + System restore + + + + System copy + + + + System install + + + + Live system create + + + + System repair + + + + System upgrade + + + + Exclude + + + + Schedule + + + + About + + + + Settings + + + + Change path + + + + Restore type + + + + Full restore + + + + System files restore + + + + User(s) configuration files restore + + + + Keep newly installed configuration files + + + + Include user(s): + + + + Do not restore the fstab file + + + + Partition settings + + + + Transfer user configuration files + + + + Copy user data files + + + + Install GRUB 2 bootloader: + + + + Format + + + + Reset partitions settings + + + + Unmount + + + + Change partition settings + + + + Filesystem: + + + + Mount point: + + + + ! Delete ! + + + + Add new partition + + + + Create new: + + + + Need to set the mount point as '/boot/efi'! + + + + Window DPI scaling + + + + Multiplier factor for scaling the window contents + + + + User interface + + + + Window always on top + + + + System + + + + Disable scheduler daemon starting for the following users: + + + + Use XZ compressor for squashfs filesystems + + + + Override auto-detected language: + + + + Override the used style: + + + + Disable incremental restore points (do not use hard links between backups) + + + + Create Live ISO images automatically (faster than the conversion) + + + + Do not empty memory cache at the end of some processes + + + + ! Interrupt ! + + + + Creates a scheduled restore point within few seconds. + + + + Start + + + + Later + + + + Systemback user authentication + + + + Administrator: + + + + Password: + + + + scheduler + + + + Upgrading the system + + + + Partition + + + + Size + + + + Label + + + + Current mount point + + + + New mount point + + + + Filesystem + + + + Device + + + + Top left + + + + Top right + + + + Center + Centre + + + Bottom left + + + + Bottom right + + + + day(s) + + + + hour(s) + + + + minute(s) + + + + seconds + + + + Everyone + + + + Transfer user configuration and data files + + + + Currently running system + + + + Creating restore point + + + + Restoring the full system + + + + Restoring the system files + + + + Restoring the user(s) configuration files + + + + Repairing the system files + + + + Repairing the full system + + + + Copying the system + + + + Installing the system + + + + Creating Live system + + + + process + + + + Writing Live image to the target device + + + + Converting Live system image + + + + Deleting restore point + + + + Deleting old restore point + + + + Deleting incomplete restore point + + + + Emptying cache + + + + Flushing filesystem buffers + + + + Reboot + + + + X restart + + + + Repairing the GRUB 2 + + + + Restore the system files to the following restore point: + + + + Repair the system files with the following restore point: + + + + Repair the complete system with the following restore point: + + + + Restore the complete user(s) configuration files to the following restore point: + + + + Restore the user(s) configuration files to the following restore point: + + + + Copy the system, using the following restore point: + + + + Install the system, using the following restore point: + + + + Restore the complete system to the following restore point: + + + + Format the %1, and write the following Live system image: + + + + Repair the GRUB 2 bootloader. + + + + The user(s) configuration files full restoration are completed. + + + + The X server will restart automatically within 30 seconds. + + + + The user(s) configuration files restoration are completed. + + + + The full system repair is completed. + + + + The system repair is completed. + + + + The system files restoration are completed. + + + + The computer will restart automatically within 30 seconds. + + + + The full system restoration is completed. + + + + The system copy is completed. + + + + The Live system creation is completed. + + + + The created .sblive file can be written to pendrive. + + + + The GRUB 2 repair is completed. + + + + The system install is completed. + + + + The Live system image write is completed. + + + + An another Systemback process is currently running, please wait until it finishes. + + + + Unable to get exclusive lock! + + + + First, close all package manager. + + + + The specified name contain(s) unsupported character(s)! + + + + Please enter a new name. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + + + + The restore point creation is aborted! + + + + Not enough free disk space to complete the process. + + + + Root privileges are required for running the Systemback! + + + + The system copy is aborted! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + + + + The system copy is completed, but an error occurred while installing the GRUB! + + + + You need to manually install a bootloader. + + + + The system restoration is aborted! + + + + An error occurred while reinstalling the GRUB. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + + + + The Live system creation is aborted! + + + + An error occurred while creating the file system image. + + + + An error occurred while creating the container file. + + + + The specified partition could not be mounted. + + + + The system install is completed, but an error occurred while installing the GRUB! + + + + The system installation is aborted! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + + + + The specified partition could not be formatted (in use or unavailable). + + + + An error occurred while reinstalling the GRUB! + + + + There has been critical changes in the file system during this operation. + + + + The Live write is aborted! + + + + The selected device does not have enough space to write the Live system. + + + + An error occurred while unpacking the Live system files. + + + + The Live conversion is aborted! + + + + An error occurred while renaming the essential Live files. + + + + An error occurred while creating the .iso image. + + + + An error occurred while reading the .sblive image. + + + + An error occurred while creating the new initramfs image. + + + + The restore point deletion is aborted! + + + + An error occurred while during the process. + + + + The Live image could not be mounted. + + + + The system repair is aborted! + + + + There is not enough free space. + + + + Live image + + + + Multiple mount points + + + + Enabled + + + + Interrupting the current process + + + + Systemback worker thread is interrupted by the user. + + + + Boot Live without xorg.conf file + + + + Boot Live system + + + + Boot Live in safe graphics mode + + + + Boot Live in debug mode + + + + Press 'E' key to edit + + + + Press TAB key to edit + + + + (Y/N) + + + + The specified storage directory path has not been set! + + + + The restoration is aborted! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + + + + The restore points storage directory is not available or not writable! + + + + This stupid terminal does not support color! + This stupid terminal does not support colour! + + + This terminal is too small! + + + + An error occurred while upgrading the system! + + + + Restart upgrade ... + + + + basic restore UI + + + + Available restore point(s): + + + + Quit + + + + Selected restore point: + + + + The specified storage directory path is set. + + + + Deleting old restore point(s) + + + + Restore with the following restore point: + + + + Restore with the following restore method: + + + + Users configuration files restore + + + + Complete configuration files restore + + + + Configuration files restore + + + + You want to keep the current fstab file? + + + + Reinstall the GRUB 2 bootloader? + + + + Start the restore? + + + + Restoring the users configuration files + + + + The users configuration files full restoration are completed. + + + + The users configuration files restoration are completed. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + + + + Press 'ENTER' key to quit. + + + + An error occurred while changing the access permissions of the following file: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + + + + An error occurred while opening the following file: + + + + An error occurred while creating the following directory: + + + + An error occurred while removing the following file: + + + + An error occurred while creating the following hard link: + + + + Reference file: + + + + An error occurred while creating the following file: + + + + An error occurred while renaming the following item: + + + + New path: + + + + An error occurred while executing the following command: + + + + Exit code: + + + + Failed to detect the device for installing the GRUB! + + + + This file could not be copied because it does not exist: + + + + The following partition has no UUID: + + + + An error occurred while creating a new partition on the following device: + + + + An error occurred while mounting the following partition/image: + + + + An error occurred while creating the partition table on the following device: + + + + An error occurred while unmounting the following partition/image/mount point: + + + + An error occurred while cloning the properties of the following item: + + + + Target item: + + + + An error occurred while cloning the following symbolic link: + + + + Target symlink: + + + + An error occurred while cloning the following file: + + + + Target file: + + + + An error occurred while cloning the following directory: + + + + Target directory: + + + + An error occurred while deleting the following directory: + + + + Cannot start the Systemback scheduler daemon! + + + + Missing, wrong or too much argument(s). + + + + The process is disabled for this user. + + + + Root privileges are required. + + + + This system is a Live. + + + + Already running. + + + + Unable to daemonize. + Unable to daemonise. + + + Cannot start the Systemback graphical user interface! + + + + Unable to get root permissions. + + + + Unable to connect to the X server. + + + + Unsafe X Window authorization! + Unsafe X Window authorisation! + + + Please do not use 'sudo' command. + + + + An error occurred while setting one or more flags on the following partition: + + + + Flag(s): + + + + Boot system installer + + + + Include + + + + The Systemback command line interface cannot be used on a Live system! + + + + Included items + + + + Excludable items + + + + Includable items + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + + The specified debug level is invalid! + + + + The default level (1) will be used. + + + + Version: + + + + Compilation date and time: + + + + Installed files: + + + + Operating system: + + + + Mounted filesystems: + + + + System language: + + + + Translation: + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + The re-synchronisation of package index files currently in progress, please wait until it finishes. + + + diff --git a/lang/systemback_es.ts b/lang/systemback_es.ts new file mode 100644 index 0000000..93ca13f --- /dev/null +++ b/lang/systemback_es.ts @@ -0,0 +1,1885 @@ + + + + + systemback + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + Se usará el nivel por defecto (1). + + + + Version: + Versión: + + + + Compilation date and time: + Fecha y hora de compilación: + + + + + Installed files: + Archivos instalados: + + + + Operating system: + Sistema Operativo: + + + + + Mounted filesystems: + Sistemas de archivos montados: + + + + System language: + Lenguaje del sistema: + + + + Translation: + Traducción: + + + + An error occurred while opening the following file: + Un error ocurrió mientras se abría el siguiente archivo: + + + + An error occurred while creating the following directory: + Un error ocurrió mientras se creaba el siguiente directorio: + + + + An error occurred while removing the following file: + Un error ocurrió cuando se eliminaba el siguiente archivo: + + + + An error occurred while creating the following hard link: + + + + + Reference file: + Archivo de referencia: + + + + An error occurred while creating the following file: + Un error ocurrió mientras se creaba el siguiente archivo: + + + + An error occurred while renaming the following item: + Un error ocurrió mientras se renombraba el siguiente elemento: + + + + New path: + Nueva ruta: + + + + An error occurred while executing the following command: + Un error ocurrió mientras se ejecutaba el siguiente comando: + + + + Exit code: + + + + + Failed to detect the device for installing the GRUB! + ¡Falló la detección del dispositivo para instalar GRUB! + + + + An error occurred while upgrading the system! + ¡Se produjo un error al actualizar el sistema! + + + + Restart upgrade ... + Reiniciando la actualización ... + + + + This file could not be copied because it does not exist: + Este archivo no puede ser copiado porque no existe: + + + + The following partition has no UUID: + La siguiente partición no tiene UUID: + + + + An error occurred while creating a new partition on the following device: + Un error ocurrió mientras se creaba una nueva partición en el siguiente dispositivo: + + + + An error occurred while mounting the following partition/image: + Un error ocurrió durante el montaje de la siguiente partición/imagen: + + + + An error occurred while setting one or more flags on the following partition: + + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + Un error ocurrió cuando se creaba la tabla de partición en el siguiente dispositivo: + + + + An error occurred while unmounting the following partition/image/mount point: + Un error ocurrió durante el desmontaje de la siguiente partición/imagen/punto de montaje: + + + + An error occurred while cloning the properties of the following item: + Un error ocurrió cuando se clonaban las propiedades del siguiente elemento: + + + + Target item: + Elemento de destino: + + + + An error occurred while cloning the following symbolic link: + + + + + Target symlink: + + + + + An error occurred while cloning the following file: + Un error ocurrió cuando se clonaba el siguiente archivo: + + + + Target file: + Archivo de destino: + + + + An error occurred while cloning the following directory: + Un error ocurrió cuando se clonaba el siguiente directorio: + + + + Target directory: + Directorio destino: + + + + An error occurred while deleting the following directory: + Un error ocurrió cuando se borraba el siguiente directorio: + + + + + Cannot start the Systemback scheduler daemon! + ¡No se puede iniciar el servicio de programación de eventos de Systemback! + + + + + Missing, wrong or too much argument(s). + + + + + The process is disabled for this user. + + + + + Root privileges are required. + Se necesitan permisos administrativos. + + + + This system is a Live. + + + + + Already running. + Ya está en ejecución. + + + + Unable to daemonize. + No se puede convertir en servicio. + + + + Cannot start the Systemback graphical user interface! + + + + + Unable to get root permissions. + + + + + Unable to connect to the X server. + No se puede conectar al servidor X. + + + + Full name of the new user: + Nombre completo del usuario nuevo: + + + + New username to login: + Nombre de usuario para iniciar sesión: + + + + New user account password: + Contraseña de la cuenta de usuario nueva: + + + + New root password (optional, not recommended for Ubuntu): + Nueva contraseña root (opcional, no recomendable para Ubuntu): + + + + New hostname: + Nombre nuevo del equipo: + + + + + + + + + + + + + + + + Back + Atrás + + + + + + + + Next + Siguiente + + + + + Working directory + Directorio de trabajo + + + + Created Live images + Live imágenes disponibles + + + + Name of the Live system + Nombre del sistema Live + + + + + + + + Options + Opciones + + + + Write target + Dispositivos disponibles + + + + Live operations + Opciones Live + + + + Include the user data files + Incluir archivos de datos de usuario + + + + Redetect devices + Volver a detectar dispositivos + + + + + + Delete + Eliminar + + + + Write to target + Escribir en el destino + + + + Convert to ISO + Convertir a ISO + + + + + + Create new + Crear nuevo + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Monte la partición del sistema defectuoso en el directorio '/mnt' según la estructura original.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + + + Mount + Montar + + + + Reset mounts + Restablecer montajes + + + + Repair type + Tipo de reparación + + + + GRUB 2 repair + Reparar el GRUB 2 + + + + System files repair + Reparación del sistema de archivos + + + + + Reinstall GRUB 2 bootloader: + Reinstalación del gestor de arranque GRUB 2: + + + + + Auto detection + Detección automática + + + + Full repair + Reparación completa + + + + Do not repair the fstab file + No reparar el archivo fstab + + + + Exclude hidden user files and directories from restore points + Excluir archivos ocultos de usuario y directorios de puntos de restauración + + + + Exclude user data files and directories from Live system + Excluir archivos de datos del usuario y directorios del sistema Live + + + + Excludable items + Elementos excluibles + + + + Excluded items + Excluir elementos + + + + + Remove item from the exclusion list + Quitar elementos de la lista de exclusión + + + + + Add item to the exclusion list + Agregar elementos a la lista de esclusión + + + + Scheduler state: + Estado de tareas programadas: + + + + + + + + + + + + + + Disabled + Desactivado + + + + Timer settings + Ajustes del temporizador + + + + Waiting time before creating a new restore point: + El tiempo de espera antes de crear un nuevo punto de restauración: + + + + Visible countdown time: + Temporizador de cuenta atrás visible: + + + + Pop-up window position on screen: + Posición de la ventana emergente en la pantalla: + + + + Use silent mode + Utilizar modo silencioso + + + + + + + More + Más + + + + + + + Less + Menos + + + + Simple system backup and restore application with extra features + Programa sencillo para crear copias de seguridad y restaurar el sistema + + + + Project homepage: + Página web del proyecto: + + + + Contact: + Contacto: + + + + Donate: + Donar: + + + + Systemback version: + Versión de Systemback: + + + + + License + Licencia + + + + Re-read directories + Recargar directorios + + + + Writable Linux filesystem! + ¡Sistema de archivos Linux (writable)! + + + + + + + Cancel + Cancelar + + + + + + + + + + + Maximum number of temporary restore points + Número máximo de puntos temporales de restauración + + + + Restore points + Puntos de restauración + + + + Highlighted restore points + Puntos destacados + + + + Point operations + Acciones + + + + Highlight + Poner en destacados + + + + Rename + Renombrar + + + + + + + + + + + + + + + + + + Select restore point + Selecciona punto de restauración + + + + + + + + + Storage directory + Ruta de almacenamiento + + + + Function menu + Menú de funciones + + + + + Schedule + Tareas programadas + + + + + + About + Acerca de + + + + + Settings + Preferencias + + + + System upgrade + Actualizar sistema + + + + + System install + Instalar sistema + + + + + + + Live system create + Crear sistema Live + + + + + System repair + Reparar sistema + + + + + + System restore + Restaurar sistema + + + + + + + System copy + Copiar sistema + + + + + Exclude + Excluir + + + + + Include + Incluir + + + + Change path + Cambiar ruta + + + + + + + + + + + + + + + + + + empty + vacío + + + + + + + + + + + not used + no utilizar + + + + Restore type + Seleccione un tipo de restauración + + + + + + + + + Full restore + Restauración completa + + + + + + + + + System files restore + Restaurar archivos del sistema + + + + User(s) configuration files restore + Restaurar archivos de configuración de usuario(s) + + + + + Keep newly installed configuration files + Mantener los archivos de configuración recientemente instalados + + + + Include user(s): + Incluir usuario(s): + + + + Do not restore the fstab file + No restaurar el archivo fstab + + + + Partition settings + Configuración de discos y particiones + + + + + + + + Transfer user configuration files + Transferir archivos de configuración de usuario + + + + Copy user data files + Copiar archivos de datos de usuario + + + + Install GRUB 2 bootloader: + Instalar el gestor de arranque GRUB 2: + + + + + + Format + Formatear + + + + + + Reset partitions settings + Reiniciar la configuración de particiones + + + + + + + + + + Unmount + Desmontar + + + + Change partition settings + Cambiar la configuración de particiones + + + + Filesystem: + Sistema de archivos: + + + + Mount point: + Punto de montaje: + + + + + + + + + ! Delete ! + ¡ Eliminar ! + + + + Add new partition + Agregar nueva partición + + + + Create new: + Crear nuevo: + + + + Need to set the mount point as '/boot/efi'! + ¡Se necesita establecer el punto de montaje como '/boot/efi'! + + + + Window DPI scaling + Escala de la ventana en DPI + + + + Multiplier factor for scaling the window contents + Factor de multiplicación de escala para el contenido de la ventana + + + + User interface + Interfaz de usuario + + + + Window always on top + Ventana siempre encima + + + + System + Sistema + + + + Disable scheduler daemon starting for the following users: + Desactivar demonio del planificador comenzando por los siguientes usuarios: + + + + Use XZ compressor for squashfs filesystems + Use el compresor XZ para sistema de archivos squashfs + + + + Override auto-detected language: + Sobreescribir lenguaje auto-detectado: + + + + Override the used style: + Sobreescribir el estilo usado: + + + + Disable incremental restore points (do not use hard links between backups) + + + + + Create Live ISO images automatically (faster than the conversion) + Crear imágenes Live ISO automáticamente (más rápido que convertir) + + + + Do not empty memory cache at the end of some processes + No vacíe la caché de memoria al finalizar algún proceso + + + + Includable items + Elementos incluibles + + + + Included items + Elementos incluidos + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + Incluir archivos y directorios del usuario en los puntos de restauración +¡Estos serán definidos como archivos de configuración para restauración! + + + + ! Interrupt ! + ¡ Interrumpir ! + + + + Creates a scheduled restore point within few seconds. + Crea un punto de restauración programado en pocos segundos. + + + + + + Start + Iniciar + + + + Later + Más adelante + + + + Systemback user authentication + Autentificación de usuario de Systemback + + + + Administrator: + Administrador: + + + + Password: + Contraseña: + + + + Unsafe X Window authorization! + + + + + Please do not use 'sudo' command. + Por favor no use el comando 'sudo'. + + + + + + + + + Transfer user configuration and data files + Transferir archivos y datos de configuración de usuario + + + + + + scheduler + tareas programadas + + + + + Partition + Partición + + + + + Size + Tamaño + + + + Label + Etiqueta + + + + Current mount point + Punto de montaje actual + + + + New mount point + Nuevo punto de montaje + + + + Filesystem + sistema de archivos + + + + Device + Dispositivo + + + + + Top left + Arriba a la izquierda + + + + + + Top right + Arriba a la derecha + + + + + + Center + Centrada + + + + + + Bottom left + Abajo a la izquierda + + + + + Bottom right + Abajo a la derecha + + + + + + day(s) + día(s) + + + + + + hour(s) + hora(s) + + + + + + + + minute(s) + minuto(s) + + + + + + seconds + segundos + + + + + + + Everyone + Cualquiera + + + + + + Currently running system + sistema actual en ejecución + + + + + Emptying cache + Vaciando caché + + + + + Flushing filesystem buffers + + + + + + Restoring the full system + Restauración completa del sistema + + + + + Restoring the system files + Restaurando sistema de archivos + + + + Restoring the user(s) configuration files + Restaurando configuración de archivos de usuario(s) + + + + Repairing the system files + Reparando sistema de archivos + + + + Repairing the full system + Reparando por completo el sistema + + + + Repairing the GRUB 2 + Reparación del GRUB 2 + + + + Copying the system + Copiando sistema + + + + Installing the system + Instalando el sistema + + + + Writing Live image to the target device + Escribir la imagen Live en el dispositivo de destino + + + + Upgrading the system + Actualizado el sistema + + + + + Deleting incomplete restore point + Eliminando punto de restauración incompleto + + + + Interrupting the current process + Interrumpiendo el proceso actual + + + + Deleting old restore point + Eliminando punto de restauración obsoleto + + + + + Creating restore point + Creando punto de restauración + + + + + Deleting restore point + Eliminando punto de restauración + + + + Converting Live system image + Convirtiendo imagen del sistema Live + + + + + process + proceso + + + + Creating Live system + Creando sistema Live + + + + + + + + + Reboot + Reiniciar + + + + + + + X restart + Reiniciar X + + + + + + Live image + Imagen Live + + + + Restore the system files to the following restore point: + Restaurar los archivos de sistema al siguiente punto de restauración: + + + + Repair the system files with the following restore point: + Reparación de los archivos de sistema al siguiente punto de restauración: + + + + Repair the complete system with the following restore point: + Reparación completa del sistema al siguiente punto de restauración: + + + + Restore the complete user(s) configuration files to the following restore point: + Restauración completa de archivos de configuración de usuario(s) al siguiente punto de restauración: + + + + Restore the user(s) configuration files to the following restore point: + Restaurar los archivos de configuración de usuario(s) al siguiente punto de restauración: + + + + Copy the system, using the following restore point: + Copiar sistema usando el siguiente punto de restauración: + + + + Install the system, using the following restore point: + Instalar sistema usando el siguiente punto de restauración: + + + + Restore the complete system to the following restore point: + Restaurar completamente el sistema al siguiente punto de restauración: + + + + Format the %1, and write the following Live system image: + Formatear %1, y escribir la siguiente imagen del sistema Live: + + + + Repair the GRUB 2 bootloader. + Reparar el cargador de arranque GRUB 2. + + + + The user(s) configuration files full restoration are completed. + Completada la restauración total de archivos de configuración de usuario(s). + + + + + The X server will restart automatically within 30 seconds. + El servidor X se reiniciará automáticamente en 30 segundos. + + + + The user(s) configuration files restoration are completed. + Completada la restauración de archivos de configuración de usuario(s). + + + + The full system repair is completed. + Reaparación total del sistema completada. + + + + The system repair is completed. + Reaparación del sistema completada. + + + + + The system files restoration are completed. + Restauración del sistema de archivos completada. + + + + + + The computer will restart automatically within 30 seconds. + El equipo se reiniciará automáticamente en 30 segundos. + + + + + The full system restoration is completed. + Restauración completa del sistema realizada. + + + + The system copy is completed. + Copia del sistema completada. + + + + The Live system creation is completed. + La creación del systema Live se ha completado. + + + + The created .sblive file can be written to pendrive. + El archivo .sblive puede ser grabado en una memoria USB. + + + + The GRUB 2 repair is completed. + Reaparación del GRUB 2 completada. + + + + The system install is completed. + instalación del sistema completado. + + + + The Live system image write is completed. + La escritura de la imagen del sistema Live se ha completado. + + + + + An another Systemback process is currently running, please wait until it finishes. + Otro proceso de Systemback se está ejecutando, por favor espere hasta que éste termine. + + + + + Unable to get exclusive lock! + ¡No se pudo obtener el bloqueo exclusivo! + + + + + First, close all package manager. + Cierre cualquier gestor de paquetes que tenga abierto. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + The specified name contain(s) unsupported character(s)! + ¡El nombre especificado contiene caracteres no admitidos! + + + + Please enter a new name. + Por favor introduzca un nombre nuevo. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + ¡Reparación del sistema de archivos completada, pero se produjo un error al reinstalar GRUB! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + El sistema no podrá arrancar! (Una arquitectura diferente puede estar causando este problema.) + + + + + + + The restore point creation is aborted! + ¡Creación del punto de restauración abortado! + + + + + + Not enough free disk space to complete the process. + No hay suficiente espacio libre en el disco para completar el proceso. + + + + + Root privileges are required for running the Systemback! + ¡Se necesitan privilegios root para ejecutar Systemback! + + + + + + + + The system copy is aborted! + ¡La copia del sistema se abortó! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + La partición especificada no tiene suficiente espacio libre. La copia del sistema no funcionarán correctamente. + + + + The system copy is completed, but an error occurred while installing the GRUB! + ¡Copia del sistema completada, pero se produjo un error durante la instalación del GRUB! + + + + + You need to manually install a bootloader. + Será necesario instalar manualmente un gestor de arranque. + + + + + The system restoration is aborted! + ¡La restauración del sistema está cancelada! + + + + An error occurred while reinstalling the GRUB. + Un error ocurrió cuando se reinstalaba GRUB. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + ¡Reparación del sistema completada, pero se produjo un error al reinstalar el GRUB! + + + + + + + + The Live system creation is aborted! + ¡La creación del systema Live se ha abortado! + + + + An error occurred while creating the file system image. + Un error ocurrió mientras se creaba la imagen del sistema de archivo. + + + + An error occurred while creating the container file. + Se produjo un error al crear el archivo contenedor. + + + + + + The specified partition could not be mounted. + La partición especificada no se pudo montar. + + + + The system install is completed, but an error occurred while installing the GRUB! + ¡Instalación completada, pero se produjo un error durante la instalación del GRUB! + + + + + + + + The system installation is aborted! + ¡La instalación del sistema se abortó! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + La partición especificada no tiene suficiente espacio libre. El sistema instalado no funcionará correctamente. + + + + + + The specified partition could not be formatted (in use or unavailable). + No se pudo dar formato a la partición especificada (ésta se encuentra en uso o no está disponible). + + + + An error occurred while reinstalling the GRUB! + ¡Se produjo un error al reinstalar el GRUB! + + + + + + + + + + There has been critical changes in the file system during this operation. + No han habido cambios significativos en el sistema de archivos durante esta operación. + + + + + + + + The Live write is aborted! + ¡La escritura de Live ha sido interrumpida! + + + + The selected device does not have enough space to write the Live system. + El dispositivo seleccionado no tiene suficiente espacio para grabar el sistema Live. + + + + An error occurred while unpacking the Live system files. + Ocurrió un error al descomprimir los archivos del sistema Live. + + + + + + + The Live conversion is aborted! + ¡La conversión a Live se ha interrumpido! + + + + An error occurred while renaming the essential Live files. + Ocurrió un error al cambiar el nombre de archivos esenciales del sistema Live. + + + + An error occurred while creating the .iso image. + Se produjo un error durante la creación de la imagen .iso. + + + + An error occurred while reading the .sblive image. + Se produjo un error durante la lectura de la imagen . sblive. + + + + An error occurred while creating the new initramfs image. + Ocurrió un error al crear la nueva imagen initramfs. + + + + + The restore point deletion is aborted! + ¡La eliminación del punto de restauración está cancelada! + + + + + An error occurred while during the process. + Un error ocurrió durante el proceso. + + + + + + The Live image could not be mounted. + La imagen Live no puede ser montada. + + + + + The system repair is aborted! + ¡La reparación del sistema está cancelada! + + + + + There is not enough free space. + No hay suficiente espacio libre. + + + + + + + + Multiple mount points + Múltiples puntos de montaje + + + + Enabled + Activado + + + + Systemback worker thread is interrupted by the user. + + + + + Boot Live without xorg.conf file + Arrancar sistema Live sin el archivo xorg.conf + + + + + + Boot Live system + Arrancar sistema Live + + + + + + Boot system installer + Instalador de sistema de arranque + + + + + + Boot Live in safe graphics mode + Arrancar sistema Live en modo grafico seguro + + + + + + Boot Live in debug mode + Arrancar en modo de depuracion + + + + Press 'E' key to edit + Pulse la tecla 'E' para editar + + + + Press TAB key to edit + Pulse la tecla TAB para editar + + + + An error occurred while changing the access permissions of the following file: + + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + + + + + basic restore UI + + + + + The Systemback command line interface cannot be used on a Live system! + + + + + This stupid terminal does not support color! + ¡Esta estúpida terminal no permite colores! + + + + This terminal is too small! + ¡Esta terminal es muy pequeña! + + + + The specified storage directory path has not been set! + ¡No se estableció un directorio para la ruta de almacenamiento! + + + + The restoration is aborted! + ¡Se interrumpió la restauración! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + ¡Restauración completada, pero se produjo un error al reinstalar el GRUB! + + + + The restore points storage directory is not available or not writable! + ¡El directorio de almacenamiento de puntos de restauración no está disponible o no se puede escribir! + + + + Available restore point(s): + Punto(s) de Restauración disponible(s): + + + + Quit + Salir + + + + Selected restore point: + Punto de restauración seleccionado: + + + + The specified storage directory path is set. + Se estableció un directorio para la ruta de almacenamiento. + + + + Restore with the following restore point: + Restaurar al siguiente punto de restauración: + + + + Restore with the following restore method: + Realizar la restauración con el siguiete criterio: + + + + Users configuration files restore + Restaurar archivos de configuración de usuarios + + + + + Complete configuration files restore + Restauración completa de configuración de archivos + + + + Configuration files restore + Restaurar archivos de configuración + + + + + + You want to keep the current fstab file? + ¿Desea mantener el archivo actual fstab? + + + + + + + + + + + (Y/N) + (Y/N) + + + + + + + Reinstall the GRUB 2 bootloader? + ¿Reinstalar el gestor de arranque GRUB 2? + + + + Start the restore? + ¿Iniciar la restauración? + + + + The users configuration files full restoration are completed. + Completada la restauración total de archivos de configuración de usuarios. + + + + The users configuration files restoration are completed. + Completada la restauración de archivos de configuración de usuarios. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Presione «INTRO» para reiniciar el equipo o «Q» para salir. + + + + Press 'ENTER' key to quit. + Presione la tecla «INTRO» para salir. + + + + Deleting old restore point(s) + Borrando punto(s) de restauración antiguo(s) + + + + Restoring the users configuration files + Restaurando configuración de archivos de usuario + + + diff --git a/lang/systemback_fi.ts b/lang/systemback_fi.ts new file mode 100644 index 0000000..68d4db8 --- /dev/null +++ b/lang/systemback_fi.ts @@ -0,0 +1,1884 @@ + + + + + systemback + + + Full name of the new user: + Uuden käyttäjän koko nimi: + + + + New username to login: + Uusi käyttäjätunnus: + + + + New user account password: + Uuden käyttäjän salasana: + + + + New root password (optional, not recommended for Ubuntu): + Uusi root käyttäjän salasana (valinnainen, ei suositella Ubuntuun): + + + + New hostname: + Uusi hostname: + + + + + + + + + + + + + + + + Back + Edellinen + + + + + + + + Next + Seuraava + + + + + Working directory + Työkansio + + + + Created Live images + Valmistettu Live-kuvat + + + + Name of the Live system + Live järjestelmän nimi + + + + + + + + Options + Asetukset + + + + Write target + Kirjoita kohde + + + + Live operations + + + + + Include the user data files + + + + + Redetect devices + Tunnista laitteet uudelleen + + + + + + Delete + Poista + + + + Convert to ISO + Muutta ISO muotoon + + + + + + Create new + Luo uusi + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Liitta viallinen järjestelmaosio '/mnt' kansioon alkuperäinen rakennen mukaan .<br>('/' -> '/mnt', '/home' -> '/mnt/home', jne.) + + + + + Mount + Liitä + + + + Reset mounts + Nollata liitoskohdat + + + + Repair type + Korjaus tyyppi + + + + GRUB 2 repair + GRUB 2:n korjaus + + + + System files repair + Järjestelmätiedostojen korjaus + + + + + Reinstall GRUB 2 bootloader: + GRUB 2:n uudelleen asennus: + + + + + Auto detection + Automaattinen tunnistus + + + + Full repair + Täydellinen korjaus + + + + Do not repair the fstab file + Älä korjaa fstab:a + + + + Exclude hidden user files and directories from restore points + Ohita käyttäjien piilotetut tiedostot ja kansiot palautuspisteistä + + + + Exclude user data files and directories from Live system + + + + + Excluded items + Ohitetut kohteet + + + + + Remove item from the exclusion list + + + + + + Add item to the exclusion list + + + + + Scheduler state: + + + + + + + + + + + + + + + Disabled + Poistettu käytöstä + + + + Timer settings + Ajastimen asetukset + + + + Waiting time before creating a new restore point: + Odotusaika ennen uuden palautuspisteen luomista: + + + + Visible countdown time: + + + + + Pop-up window position on screen: + Pop-up ikkunan sijainti: + + + + Use silent mode + + + + + + + + More + Lisää + + + + + + + Less + Vähemmän + + + + Simple system backup and restore application with extra features + Yksinkertainen järjestelmän varmuuskopiointi ja palautussovellus joka sisältää lisäominaisuuksia + + + + Project homepage: + Projektin kotisivu: + + + + Contact: + Yhteystiedot: + + + + Donate: + Lahjoita: + + + + Systemback version: + Systemback versio: + + + + + License + Lisenssi + + + + Re-read directories + + + + + Writable Linux filesystem! + Kirjoitettava Linux tiedostojärjestelmä! + + + + + + + Cancel + Keskeytä + + + + + + + + + + + Maximum number of temporary restore points + Väliaikaisen palautuspisteiden enimmäismäärä + + + + + Include + + + + + + + + + + + + + + + + + + + empty + tyhjä + + + + + + + + + + + not used + ei käytetä + + + + Includable items + + + + + Included items + + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + + + Restore points + Palautuspisteet + + + + Highlighted restore points + Korostetut palautuspisteet + + + + Point operations + Palautuspiste toiminnot + + + + Highlight + Korosta + + + + Rename + Nimeä uudelleen + + + + + + + + + + + + + + + + + + Select restore point + Valitse palautuspiste + + + + + + + + + Storage directory + Tietohakemisto + + + + Function menu + Toimintovalikko + + + + + + System restore + Järjestelmän palautus + + + + + + + System copy + Kopio järjestelmästä + + + + + System install + Järjestelmän asennus + + + + + + + Live system create + Luo Live järjestelmä + + + + + System repair + Järjestelmän korjaus + + + + System upgrade + Järjestelmän päivitys + + + + + Exclude + Ohita + + + + + Schedule + Ajastin + + + + Excludable items + + + + + + + About + Tietoja + + + + + Settings + + + + + Change path + Muuta polku + + + + Restore type + Palautuksen tapa + + + + + + + + + Full restore + Koko järjestelmän palautus + + + + + + + + + System files restore + Järjestelmän tiedostojen palauttaminen + + + + User(s) configuration files restore + + + + + + Keep newly installed configuration files + Pidä uudet asennustiedostot + + + + Include user(s): + Sisällytä käyttäjä(t): + + + + Do not restore the fstab file + Älä palauta fstab:a + + + + Partition settings + Osion asetukset + + + + Need to set the mount point as '/boot/efi'! + + + + + Window DPI scaling + + + + + Multiplier factor for scaling the window contents + + + + + User interface + + + + + Window always on top + + + + + System + + + + + Disable scheduler daemon starting for the following users: + + + + + Use XZ compressor for squashfs filesystems + + + + + Override auto-detected language: + + + + + Override the used style: + + + + + Disable incremental restore points (do not use hard links between backups) + + + + + Create Live ISO images automatically (faster than the conversion) + + + + + Do not empty memory cache at the end of some processes + + + + + + + + + + + Unmount + Irrota + + + + Write to target + + + + + Mount point: + Liitoskohta: + + + + + + + + + ! Delete ! + + + + + Add new partition + + + + + Create new: + Luo uusi: + + + + Filesystem: + Tiedostojärjestelmä: + + + + + + Format + Alusta + + + + + + Reset partitions settings + + + + + Change partition settings + + + + + + + + + Transfer user configuration files + + + + + Copy user data files + Kopioi käyttäjän tiedostot + + + + Install GRUB 2 bootloader: + Asenna Grub 2 käynnistyslatain: + + + + + + + + + Transfer user configuration and data files + + + + + ! Interrupt ! + ! Keskeytys ! + + + + Creates a scheduled restore point within few seconds. + + + + + + + Start + Aloita + + + + Later + Myöhemmin + + + + Systemback user authentication + + + + + Administrator: + + + + + Password: + + + + + + Partition + Osio + + + + + Size + + + + + Current mount point + Nykyinen liitoskohta + + + + New mount point + Uusi liitoskohta + + + + Filesystem + Tiedostojärjestelmä + + + + Device + Laite + + + + + + scheduler + ajastin + + + + + Top left + Vasen yläreuna + + + + + + Top right + Oikea yläreuna + + + + + + Center + Keskellä + + + + + + Bottom left + Vasen alareuna + + + + + Bottom right + Oikea alareuna + + + + + + day(s) + päivä(ä) + + + + + + hour(s) + tunti(a) + + + + + + + + minute(s) + minuutti(a) + + + + + + seconds + sekunttia + + + + + + Live image + Live levykuva + + + + + + Currently running system + Tällä hetkellä käytössä järjestelmä + + + + + Creating restore point + Luodaan palautuspiste + + + + + Restoring the full system + Palautetaan koko järjestelmä + + + + + Restoring the system files + Palautetaan järjestelmätiedostot + + + + Restoring the user(s) configuration files + Palautetaan käyttäjä(t) asetustiedostot + + + + Repairing the system files + Korjataan järjestelmätiedot + + + + Repairing the full system + Koko järjestelmän korjaus + + + + Copying the system + Järjestelmän kopiointi + + + + Installing the system + Asennetaan järjestelmää + + + + Creating Live system + Luodaan Live järjestelmä + + + + + Deleting restore point + Poistetaan palautuspiste + + + + Deleting old restore point + Poistetaan vanha(t) palautuspiste + + + + + Deleting incomplete restore point + Epätäydellinen palautuspisteen poistaminen + + + + + Flushing filesystem buffers + + + + + + + + + + Reboot + Reboot + + + + + + + X restart + X restart + + + + Repairing the GRUB 2 + GRUB 2:n korjaaminen + + + + + Emptying cache + Tyhjennetään välimuisti + + + + + An another Systemback process is currently running, please wait until it finishes. + Toinen Systemback prosessi on käynnissä, odota kunnes se päättyy. + + + + Please enter a new name. + Anna uusi nimi. + + + + The Live system creation is completed. + + + + + The created .sblive file can be written to pendrive. + + + + + Restore the system files to the following restore point: + Palauta järjestelmän tiedostot seuraavaan palautuspisteen: + + + + Label + + + + + Writing Live image to the target device + + + + + The specified name contain(s) unsupported character(s)! + Nimi sisältää ei tuettuja merkkejä! + + + + Repair the system files with the following restore point: + Korjaa järjestelmätiedostot seuraavan palautuspisten avulla: + + + + Repair the complete system with the following restore point: + Täydellinen järjestelmän korjaus seuraavaan palautuspisteen: + + + + Restore the complete user(s) configuration files to the following restore point: + Täydellinen käyttäjä(t) asetustiedostojen palautus seuraavaan palautuspisteen: + + + + Restore the user(s) configuration files to the following restore point: + Palauttaa käyttäjä(t) asennustiedostot seuraavaan palautuspisteen: + + + + The user(s) configuration files full restoration are completed. + Käyttäjä(t) asetustiedostojen täysi palautuminen on valmis. + + + + + The X server will restart automatically within 30 seconds. + X palvelin käynnistyy automaattisesti 30 sekunnin kuluessa. + + + + The user(s) configuration files restoration are completed. + Käyttäjä(t) asennustiedostojen palauttaminen on valmis. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Järjestelmän korjaus on valmis, mutta tapahtui GRUB:n asennusvirhe! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + Ei voi käynnistää käyttöjärjestelmää! (Yleisesti eri arkkitehtuurin syystä.) + + + + The full system repair is completed. + Koko järjestelmän korjaus on valmis. + + + + The system repair is completed. + Järjestelmän korjaus on valmis. + + + + Copy the system, using the following restore point: + Kopioi järjestelmä, käyttäen palautuspisteen: + + + + Install the system, using the following restore point: + Asentaa järjestelmä, käyttäen palautuspisteen: + + + + + + + The restore point creation is aborted! + Palautuspisteen luominen on keskeytetty! + + + + + + Not enough free disk space to complete the process. + Ei tarpeeksi vapaata levytilaa prosessin suorittamiseen. + + + + + Root privileges are required for running the Systemback! + Systemback tarvitsee pääkäyttäjän oikeudet käynnistyäkseen! + + + + Restore the complete system to the following restore point: + Täydellinen järjestelmän palauttaminen seuraavaan palautuspisteeseen: + + + + + The system files restoration are completed. + Järjestelmätiedostojen palauttaminen on valmis. + + + + + + The computer will restart automatically within 30 seconds. + Tietokone käynnistyy uudelleen automaattisesti 30 sekunnin kuluessa. + + + + + The full system restoration is completed. + Koko järjestelmän palauttaminen on valmis. + + + + + + + + The system copy is aborted! + Järjestelmän kopiointi on keskeytetty! + + + + Format the %1, and write the following Live system image: + + + + + The selected device does not have enough space to write the Live system. + + + + + + There is not enough free space. + + + + + Interrupting the current process + + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + Valitulla osiolla(osioilla) ei ole tarpeeksi tilaa järjestelmän kopioimiseen. Järjestelmä ei saata toimia kunnolla. + + + + The system copy is completed, but an error occurred while installing the GRUB! + Järjestelmän kopiointi on valmis, mutta tapahtui virhe GRUB:n asennuksessa! + + + + + You need to manually install a bootloader. + Asenna käynnistyslatain manuaalisesti. + + + + + The system restoration is aborted! + + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + Osiolla ei ole tarpeeksi vapaata tilaa järjestelmän asentamiseen. Asennettu järjestelmä ei tule toimimaan oikein. + + + + + + The specified partition could not be formatted (in use or unavailable). + Valitun osion alustaminen ei onnistunut (käytössä tai ei saatavilla). + + + + An error occurred while reinstalling the GRUB! + GRUB:n uudelleen asennuksessa tapahtui virhe! + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Järjestelmän korjaus on valmis, mutta tapahtui virhe GRUB:n uudelleen asennuksessa! + + + + The system copy is completed. + Järjestelmän kopiointi on valmis. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + + + + + The Live system creation is aborted! + + + + + An error occurred while creating the file system image. + Virhe luotaessa tiedostojärjestelmän kuva. + + + + An error occurred while creating the container file. + + + + + + + The specified partition could not be mounted. + Valittua osiota ei voida liittää. + + + + An error occurred while unpacking the Live system files. + Live-järjestelmän tiedostojen purkamisesta tapahtui virhe. + + + + An error occurred while renaming the essential Live files. + Tärkeiden Live-tiedostojen uudelleennimeämisessä tapahtui virhe. + + + + An error occurred while creating the .iso image. + .iso kuvan luotaessa tapahtui virhe. + + + + An error occurred while reading the .sblive image. + + + + + An error occurred while creating the new initramfs image. + + + + + + + The Live image could not be mounted. + + + + + + + Boot system installer + + + + + The GRUB 2 repair is completed. + GRUB 2:n korjaus on valmis. + + + + An error occurred while reinstalling the GRUB. + + + + + The system install is completed. + Järjestelmän asennus on valmis. + + + + The system install is completed, but an error occurred while installing the GRUB! + Järjestelmän asennus on valmis, mutta tapahtui virhe käynnistyslataaja GRUB:n asennuksessa! + + + + + + + + The system installation is aborted! + Järjestelmän asennus on keskeytetty! + + + + + + + + + + There has been critical changes in the file system during this operation. + Toimenpiteen aikana tapahtui kriittisiä muutoksia tiedostojärjestelmään. + + + + Repair the GRUB 2 bootloader. + Korja GRUB 2 bootloader. + + + + + + + + The Live write is aborted! + + + + + The Live system image write is completed. + Live-järjestelmän luominen on valmis. + + + + + + + The Live conversion is aborted! + + + + + + The restore point deletion is aborted! + + + + + + An error occurred while during the process. + + + + + + The system repair is aborted! + + + + + + + + Everyone + + + + + Upgrading the system + Järjestelmän päivitys + + + + + + + + Multiple mount points + + + + + Enabled + + + + + Systemback worker thread is interrupted by the user. + + + + + + process + + + + + Boot Live without xorg.conf file + Boot Live-jarjestema ilman xorg.conf tiedostoa + + + + + + Boot Live system + Boot Live-jarjestelma + + + + + + Boot Live in safe graphics mode + Boot Live:n turvallisessa grafiikkatilassa + + + + + + Boot Live in debug mode + Boot Live:n debug-tilassa + + + + Press 'E' key to edit + + + + + Press TAB key to edit + + + + + Converting Live system image + + + + + + Unable to get exclusive lock! + Ei saatu haluttua lukitusta! + + + + + First, close all package manager. + Sulje kaikki pakettienhallintaohjelmaa. + + + + The specified storage directory path has not been set! + Määritelty varastointi hakemistopolkua ei asetettu! + + + + The restoration is aborted! + Palauta keskeytetään! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Palautus on valmis, mutta GRUB:n asennuksessa tapahtui virhe! + + + + The restore points storage directory is not available or not writable! + + + + + This stupid terminal does not support color! + + + + + This terminal is too small! + + + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + + + + + An error occurred while opening the following file: + + + + + An error occurred while creating the following directory: + + + + + An error occurred while removing the following file: + + + + + An error occurred while creating the following hard link: + + + + + Reference file: + + + + + An error occurred while creating the following file: + + + + + An error occurred while renaming the following item: + + + + + New path: + + + + + An error occurred while executing the following command: + + + + + Exit code: + + + + + Failed to detect the device for installing the GRUB! + + + + + An error occurred while upgrading the system! + Järjestelmän päivitys on virheellinen! + + + + Restart upgrade ... + Käynnistä uudelleen päivitys ... + + + + This file could not be copied because it does not exist: + + + + + The following partition has no UUID: + + + + + An error occurred while creating a new partition on the following device: + + + + + An error occurred while mounting the following partition/image: + + + + + An error occurred while setting one or more flags on the following partition: + + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + + + + + An error occurred while unmounting the following partition/image/mount point: + + + + + An error occurred while cloning the properties of the following item: + + + + + Target item: + + + + + An error occurred while cloning the following symbolic link: + + + + + Target symlink: + + + + + An error occurred while cloning the following file: + + + + + Target file: + + + + + An error occurred while cloning the following directory: + + + + + Target directory: + + + + + An error occurred while deleting the following directory: + + + + + basic restore UI + + + + + Available restore point(s): + + + + + Quit + Lopeta + + + + Selected restore point: + + + + + The specified storage directory path is set. + Määritelty varastointi hakemistopolkua on asetettu. + + + + Deleting old restore point(s) + + + + + Restore with the following restore point: + Palautus seuraavan palautuspisten avulla: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + + + + + The Systemback command line interface cannot be used on a Live system! + + + + + Restore with the following restore method: + Palauttaa seuraavaalla menetelmällä: + + + + Users configuration files restore + Palauta käyttäjien asennustiedostot + + + + + Complete configuration files restore + Täydellinen asetustiedostojen palautus + + + + Configuration files restore + Palautetaan asetustiedostot + + + + + + You want to keep the current fstab file? + Haluatko pitää nykyisen fstab tiedoston? + + + + + + + + + + + (Y/N) + (K/E) + + + + + + + Reinstall the GRUB 2 bootloader? + Asentamaanko GRUB 2:n uudelleen? + + + + Start the restore? + Aloitetaanko palautus? + + + + Restoring the users configuration files + Palautetaan käyttäjien asetustiedostot + + + + The users configuration files full restoration are completed. + Käyttäjien asetustiedostojen täysi palautuminen on valmis. + + + + The users configuration files restoration are completed. + Käyttäjien asennustiedostojen palauttaminen on valmis. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Painaa 'ENTER' käynnistä tietokone uudelleen, tai 'Q' lopettaa. + + + + Press 'ENTER' key to quit. + + + + + An error occurred while changing the access permissions of the following file: + + + + + + Cannot start the Systemback scheduler daemon! + + + + + + Missing, wrong or too much argument(s). + + + + + The process is disabled for this user. + + + + + Root privileges are required. + + + + + This system is a Live. + Tämä järjestelmä on Live. + + + + Already running. + + + + + Unable to daemonize. + + + + + Cannot start the Systemback graphical user interface! + + + + + Unable to get root permissions. + + + + + Unable to connect to the X server. + + + + + Unsafe X Window authorization! + + + + + Please do not use 'sudo' command. + Alä käytä 'sudo' komentoa. + + + diff --git a/lang/systemback_fr.ts b/lang/systemback_fr.ts new file mode 100644 index 0000000..1e6a068 --- /dev/null +++ b/lang/systemback_fr.ts @@ -0,0 +1,1899 @@ + + + + + systemback + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + Le niveau de débogage spécifié est invalide ! + + + + The default level (1) will be used. + Le niveau par défaut (1) sera utilisé. + + + + An error occurred while opening the following file: + Une erreur s'est produite lors de l'ouverture du fichier suivant : + + + + An error occurred while creating the following directory: + Une erreur s'est produite lors de la création du répertoire suivant : + + + + An error occurred while removing the following file: + Une erreur s'est produite lors de la suppression du fichier suivant : + + + + An error occurred while creating the following hard link: + Une erreur s'est produite lors de la création du lien physique suivant : + + + + Reference file: + fichier de référence : + + + + An error occurred while creating the following file: + Une erreur s'est produite lors de la création du fichier suivant : + + + + An error occurred while renaming the following item: + Une erreur s'est produite lors du changement de nom de l'élément suivant : + + + + New path: + Nouveau chemin : + + + + An error occurred while executing the following command: + Une erreur s'est produite lors de l’exécution de la commande suivante : + + + + Exit code: + Code de sortie : + + + + Failed to detect the device for installing the GRUB! + Échec de détection de périphérique pour l'installation de GRUB ! + + + + An error occurred while upgrading the system! + La mise à jour du système a généré une erreur ! + + + + Restart upgrade ... + Effectuer de nouveau la mise à jour du système ... + + + + This file could not be copied because it does not exist: + Ce fichier n'a pas pu être copié car il n'existe pas : + + + + The following partition has no UUID: + La partition suivante n'a pas d'UUID : + + + + An error occurred while creating a new partition on the following device: + Une erreur s'est produite lors de la création d'une nouvelle partition sur le périphérique suivant : + + + + An error occurred while mounting the following partition/image: + Une erreur s'est produite lors du montage de partition/image suivante : + + + + An error occurred while setting one or more flags on the following partition: + Une erreur s'est produite lors du réglage d'un ou plusieurs drapeau(x) sur la partition suivante : + + + + Flag(s): + Drapeau(x) : + + + + An error occurred while creating the partition table on the following device: + Une erreur s'est produite lors de la création de la table de partition sur le périphérique suivant : + + + + An error occurred while unmounting the following partition/image/mount point: + Une erreur s'est produite lors du démontage de partition/image/point de montage suivant : + + + + An error occurred while cloning the properties of the following item: + Une erreur s'est produite lors du clonage des propriétés de l'élément suivant : + + + + Target item: + Élément cible : + + + + An error occurred while cloning the following symbolic link: + Une erreur s'est produite lors du clonage du lien symbolique suivant : + + + + Target symlink: + Lien symbolique cible : + + + + An error occurred while cloning the following file: + Une erreur s'est produite lors du clonage du fichier suivant : + + + + Target file: + Fichier cible : + + + + An error occurred while cloning the following directory: + Une erreur s'est produite lors du clonage du répertoire suivant : + + + + Target directory: + Répertoire cible : + + + + An error occurred while deleting the following directory: + Une erreur s'est produite lors de la suppression du répertoire suivant : + + + + + Cannot start the Systemback scheduler daemon! + Impossible de démarrer le démon de planification de Systemback ! + + + + + Missing, wrong or too much argument(s). + Argument(s) manquant(s), incorrect(s) ou trop nombreux. + + + + The process is disabled for this user. + L'opération est désactivée pour cet utilisateur. + + + + Root privileges are required. + Les droits root sont nécessaires. + + + + This system is a Live. + Ceci est un système Live. + + + + Already running. + Déja en cours d'exécution. + + + + Unable to daemonize. + Impossible de se transformer en démon. + + + + Cannot start the Systemback graphical user interface! + Impossible de lancer l'interface graphique utilisateur de Systemback ! + + + + Unable to get root permissions. + Impossible d'obtenir les autorisations root. + + + + Unable to connect to the X server. + Impossible de se connecter au serveur X. + + + + Full name of the new user: + Nom complet du nouvel utilisateur : + + + + New username to login: + Nouveau nom d'utilisateur pour vous connecter : + + + + New user account password: + Mot de passe du nouveau compte utilisateur : + + + + New root password (optional, not recommended for Ubuntu): + Nouveau mot de passe root (optionnel, déconseillé pour Ubuntu) : + + + + New hostname: + Nouveau hostname : + + + + + + + + + + + + + + + + Back + Retour + + + + + + + + Next + Suivant + + + + + Working directory + Répertoire de travail + + + + Created Live images + Images Live créées + + + + Name of the Live system + Nom du système Live + + + + + + + + Options + Options + + + + Write target + Écrire la cible + + + + Live operations + Opérations Live + + + + Include the user data files + Inclure les fichiers de données utilisateur + + + + Redetect devices + Redétecter les appareils + + + + + + Delete + Supprimer + + + + Write to target + Écrire sur la cible + + + + Convert to ISO + Convertir en ISO + + + + + + Create new + Créer un nouveau + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Monter les partitions système défectueuses dans le répertoire '/mnt' en fonction de la structure originale. ('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + + + Mount + Monter + + + + Reset mounts + Réinitialiser les points de montage + + + + Repair type + Type de réparation + + + + GRUB 2 repair + Réparation de Grub 2 + + + + System files repair + Réparation du système de fichiers + + + + + Reinstall GRUB 2 bootloader: + Réinstaller le chargeur de démarrage de Grub 2 : + + + + + Auto detection + Auto Détection + + + + Full repair + Réparation complète + + + + Do not repair the fstab file + Ne pas réparer le fichier fstab + + + + Exclude hidden user files and directories from restore points + Exclure les fichiers et répertoires cachés de l'utilisateur des points de restauration + + + + Exclude user data files and directories from Live system + Exclure les fichiers et répertoires de données de l'utilisateur du système Live + + + + Excludable items + Éléments pouvant être exclus + + + + Excluded items + Éléments exclus + + + + + Remove item from the exclusion list + Enlever un élément de la liste d'exclusion + + + + + Add item to the exclusion list + Ajouter un élément à la liste d'exclusion + + + + Scheduler state: + État du planificateur : + + + + + + + + + + + + + + Disabled + Désactivé + + + + Timer settings + Paramètres de temporisation + + + + Waiting time before creating a new restore point: + Temps d'attente avant la création d'un nouveau point de restauration : + + + + Visible countdown time: + Compte à rebours visible : + + + + Pop-up window position on screen: + Position de la fenêtre pop-up à l'écran : + + + + Use silent mode + Utiliser le mode silencieux + + + + + + + More + Plus + + + + + + + Less + Moins + + + + Simple system backup and restore application with extra features + Application simple de sauvegarde et de restauration du système + + + + Project homepage: + Page d'accueil du projet : + + + + Contact: + Contact : + + + + Donate: + Faire un don : + + + + Systemback version: + Version de Systemback : + + + + + License + Licence + + + + Re-read directories + Re-parcourir les répertoires + + + + Writable Linux filesystem! + Système de fichier Linux accessible en écriture ! + + + + + + + Cancel + Annuler + + + + + + + + + + + Maximum number of temporary restore points + Nombre maximum de points de restauration temporaire + + + + Restore points + Points de restauration + + + + Highlighted restore points + Points mis en évidence + + + + Point operations + Opérations de points + + + + Highlight + Mise en subrillance + + + + Rename + Renommer + + + + + + + + + + + + + + + + + + Select restore point + Sélectionner un point de restauration + + + + + + + + + Storage directory + Répertoire de stockage + + + + Function menu + Fonction menu + + + + + Schedule + Planifier + + + + + + About + À propos de + + + + + Settings + Paramètres + + + + System upgrade + Mise à niveau du système + + + + + System install + Installation du système + + + + + + + Live system create + Création du Live système + + + + + System repair + Réparation du système + + + + + + System restore + Restauration du système + + + + + + + System copy + Copie du système + + + + + Exclude + Exclure + + + + + Include + Inclure + + + + Change path + Changer le chemin + + + + + + + + + + + + + + + + + + empty + vide + + + + + + + + + + + not used + inutilisé + + + + Restore type + Type de restauration + + + + + + + + + Full restore + Restauration complète + + + + + + + + + System files restore + Restauration des fichiers système + + + + User(s) configuration files restore + Restauration des fichiers de configuration utilisateur(s) + + + + + Keep newly installed configuration files + Conserver les fichiers de la récente configuration + + + + Include user(s): + Inclure le(s) utilisateur(s) : + + + + Do not restore the fstab file + Ne pas restaurer le fichier fstab + + + + Partition settings + Paramètres de partition + + + + + + + + Transfer user configuration files + Transférer les fichiers de configuration des utilisateurs + + + + Copy user data files + Copier les fichiers de données de l'utilisateur + + + + Install GRUB 2 bootloader: + Installer le chargeur d'armorçage GRUB2 : + + + + + + Format + Formater + + + + + + Reset partitions settings + Remettre à zéro les réglages des partitions + + + + + + + + + + Unmount + Démonter + + + + Change partition settings + Changer les réglages des partitions + + + + Filesystem: + Système de fichiers : + + + + Mount point: + Point de montage : + + + + + + + + + ! Delete ! + ! Détruire ! + + + + Add new partition + Ajouter une nouvelle partition + + + + Create new: + Créer un nouveau : + + + + Need to set the mount point as '/boot/efi'! + Besoin de mettre le point de montage à '/boot/efi' ! + + + + Window DPI scaling + Paramètre d'échelle de fenêtre DPI + + + + Multiplier factor for scaling the window contents + Facteur multiplicateur pour agrandir le contenu de la fenêtre + + + + User interface + Interface utilisateur + + + + Window always on top + Fenêtre toujours au-dessus + + + + System + Système + + + + Disable scheduler daemon starting for the following users: + Désactiver le démarrage du démon du planificateur pour les utilisateurs suivants : + + + + Use XZ compressor for squashfs filesystems + Utiliser la compression XZ poure système de fichiers squashfs + + + + Override auto-detected language: + Outrepasser la langue détectée : + + + + Override the used style: + Outrepasser le style utilsé : + + + + Disable incremental restore points (do not use hard links between backups) + Désactiver les points de restauration incrémentale (ne pas utiliser de liens durs) + + + + Create Live ISO images automatically (faster than the conversion) + Créer des images ISO Live automatiquement (plus rapide que la conversion) + + + + Do not empty memory cache at the end of some processes + Ne vide pas le cache mémoire à la fin de certains processus + + + + Includable items + Éléments pouvant être inclus + + + + Included items + Éléments inclus + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + Inclure les données et répertoires utilisateur dans le point de restauration +Ceux-ci seront définis comme fichiers de configuration restituables ! + + + + ! Interrupt ! + ! Arrêt critique ! + + + + Creates a scheduled restore point within few seconds. + Créer un point de restauration planifié en quelques secondes. + + + + + + Start + Démarrer + + + + Later + Plus tard + + + + Systemback user authentication + Authentification de l'utilisateur Systemback + + + + Administrator: + Administrateur : + + + + Password: + Mot de passe : + + + + Unsafe X Window authorization! + Autorisation X Window dangereuse ! + + + + Please do not use 'sudo' command. + Merci de ne pas utiliser la commande 'sudo'. + + + + + + + + + Transfer user configuration and data files + Transférer les fichiers de configuration et de données des utilisateurs + + + + + + scheduler + Planificateur + + + + + Partition + Partition + + + + + Size + Taille + + + + Label + Étiquette + + + + Current mount point + Point de montage courant + + + + New mount point + Nouveau point de montage + + + + Filesystem + Système de fichiers + + + + Device + Périphérique + + + + + Top left + En haut à gauche + + + + + + Top right + En haut à droite + + + + + + Center + Au centre + + + + + + Bottom left + En bas à gauche + + + + + Bottom right + En bas à droite + + + + + + day(s) + jour(s) + + + + + + hour(s) + heure(s) + + + + + + + + minute(s) + minute(s) + + + + + + seconds + secondes + + + + + + + Everyone + Tout le monde + + + + + + Currently running system + Système courant en action + + + + + Emptying cache + Effacement du cache en cours + + + + + Flushing filesystem buffers + Nettoyage des tampons du système de fichiers + + + + + Restoring the full system + Restauration complète du système + + + + + Restoring the system files + Restauration des fichiers système + + + + Restoring the user(s) configuration files + Restauration des fichiers de configuration de(s) utilisateur(s) + + + + Repairing the system files + Réparation des fichiers système + + + + Repairing the full system + Réparer complètement le système + + + + Repairing the GRUB 2 + Réparation de GRUB 2 + + + + Copying the system + Copie du système + + + + Installing the system + Installation du système + + + + Writing Live image to the target device + Écriture de l'image Live sur l'équipement cible + + + + Upgrading the system + Mise à jour du système + + + + + Deleting incomplete restore point + Suppression d'un point de restauration endommagé + + + + Interrupting the current process + Interruption du processus en cours + + + + Deleting old restore point + Suppression d'un ancien point de restauration + + + + + Creating restore point + Création d'un point de restauration + + + + + Deleting restore point + Suppression du point de restauration en cours + + + + Converting Live system image + Conversion de l'image du Live systeme + + + + + process + processus + + + + Creating Live system + Création du Live système + + + + + + + + + Reboot + Redémarrer + + + + + + + X restart + Redémarrage X + + + + + + Live image + Image Live + + + + Restore the system files to the following restore point: + Restaurer les fichiers système avec le point de restauration suivant : + + + + Repair the system files with the following restore point: + Réparer les fichiers système avec le point de restauration suivant : + + + + Repair the complete system with the following restore point: + Réparer le système complet avec le point de restauration suivant : + + + + Restore the complete user(s) configuration files to the following restore point: + Restaurer les fichiers de configuration complets de(s) utilisateur(s) au point de restauration suivant : + + + + Restore the user(s) configuration files to the following restore point: + Restaurer les fichiers de configuration de(s) utilisateur(s) au point de restauration suivant : + + + + Copy the system, using the following restore point: + Copier le système en utilisant le point de restauration suivant : + + + + Install the system, using the following restore point: + Installer le système, en utilisant le point de restauration suivant : + + + + Restore the complete system to the following restore point: + Restaurer le système complet au point de restauration suivant : + + + + Format the %1, and write the following Live system image: + Formatage de %1 et écriture de l'image Live système suivante : + + + + Repair the GRUB 2 bootloader. + Réparation du chargeur d'amorçage GRUB 2. + + + + The user(s) configuration files full restoration are completed. + La restauration complète des fichiers de configuration utilisateur(s) est terminée. + + + + + The X server will restart automatically within 30 seconds. + Le serveur X redémarrera automatiquement dans 30 secondes. + + + + The user(s) configuration files restoration are completed. + La restauration des fichiers de configuration utilisateur(s) est terminée. + + + + The full system repair is completed. + La réparation du système complet est terminée. + + + + The system repair is completed. + La réparation du système est terminée. + + + + + The system files restoration are completed. + La restauration des fichiers système s'est terminée avec succès. + + + + + + The computer will restart automatically within 30 seconds. + L'ordinateur redémarrera automatiquement dans 30 secondes. + + + + + The full system restoration is completed. + La restauration complète du système s'est terminée avec succès. + + + + The system copy is completed. + La copie du système est terminée. + + + + The Live system creation is completed. + La création du Live système est terminée. + + + + The created .sblive file can be written to pendrive. + Le fichier créé .sblive peut être écrit sur clé USB. + + + + The GRUB 2 repair is completed. + La réparation de GRUB2 s'est achevée sans erreur. + + + + The system install is completed. + L'installation du système est complètement terminée. + + + + The Live system image write is completed. + L'écriture de l'image du Live système est complètement terminée. + + + + + An another Systemback process is currently running, please wait until it finishes. + Un autre processus de Systemback est déjà en cours d'exécution, veuillez attendre jusqu'à ce qu'il se termine. + + + + + Unable to get exclusive lock! + Impossible d'obtenir le verrouillage exclusif ! + + + + + First, close all package manager. + Il est impératif de fermer tous les gestionnaires de paquets ouverts. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + The specified name contain(s) unsupported character(s)! + Le(s) nom(s) spécifié(s) contien(nen)t des caractères incompatibles ! + + + + Please enter a new name. + Veuillez entrer un nouveau nom. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + La réparation des fichiers système est terminée, mais une erreur s'est produite lors de la réinstallation de GRUB ! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + Le système peut ne pas démarrer ! (En général, une architecture différente est la cause du problème.) + + + + + + + The restore point creation is aborted! + La création du point de restauration a été annulée ! + + + + + + Not enough free disk space to complete the process. + Espace disque insuffisant pour terminer l'opération. + + + + + Root privileges are required for running the Systemback! + Les privilèges super-utilisateur sont requis pour exécuter Systemback ! + + + + + + + + The system copy is aborted! + La copie du système est annulée ! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + La partition spécifiée ne dispose pas suffisamment d'espace libre pour copier le système. Le système copié ne fonctionnera pas correctement. + + + + The system copy is completed, but an error occurred while installing the GRUB! + La copie du système est terminée, mais une erreur s'est produite lors de l'installation de GRUB ! + + + + + You need to manually install a bootloader. + Il est nécessaire d'installer un chargeur d'amorçage manuellement. + + + + + The system restoration is aborted! + La restauration du système est annulée ! + + + + An error occurred while reinstalling the GRUB. + Une erreur est survenue pendant la réinstallation de GRUB. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + La réparation du système s'est achevée pendant la réinstallation de GRUB ! + + + + + + + + The Live system creation is aborted! + La création du Live système est abandonnée ! + + + + An error occurred while creating the file system image. + Une erreur est intervenue pendant la création du système de fichiers. + + + + An error occurred while creating the container file. + Une erreur est survenue lors de la création fichier conteneur. + + + + + + The specified partition could not be mounted. + La partition spécifiée ne pourra être montée. + + + + The system install is completed, but an error occurred while installing the GRUB! + L'installation du système est terminée, mais une erreur est survenue pendant la réinstallation de GRUB ! + + + + + + + + The system installation is aborted! + L'installation du système est abandonnée ! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + La partition(s) spécifiée(s) ne dispose pas de suffisamment d'espace libre pour installer le système. Le système installé ne fonctionnera pas correctement. + + + + + + The specified partition could not be formatted (in use or unavailable). + La partition spécifiée ne pourrait ne pas être formatée (en cours d’utilisation ou indisponible). + + + + An error occurred while reinstalling the GRUB! + Une erreur est survenue pendant la réinstallation de GRUB ! + + + + + + + + + + There has been critical changes in the file system during this operation. + Cette manipulation a entraîné des modifications critiques dans le système de fichiers. + + + + + + + + The Live write is aborted! + L'écriture du Live est abandonnée ! + + + + The selected device does not have enough space to write the Live system. + L'emplacement sélectionné n'a pas assez de place pour écrire le Live système. + + + + An error occurred while unpacking the Live system files. + Une erreur est survenue pendant le désempaquettage du système de fichiers Live. + + + + + + + The Live conversion is aborted! + La conversion du Live est abandonnée ! + + + + An error occurred while renaming the essential Live files. + Une erreur est survenue pendant le rennomage des fichiers Live essentiels. + + + + An error occurred while creating the .iso image. + Une erreur est survenue pendant la création de l'image .iso. + + + + An error occurred while reading the .sblive image. + Une erreur est survenue pendant la lecture de l'image .sblive. + + + + An error occurred while creating the new initramfs image. + Une erreur est survenue pendant la création de l'image du nouveau initramfs. + + + + + The restore point deletion is aborted! + La destruction du point de restauration est abandonnée ! + + + + + An error occurred while during the process. + Une erreur est survenue pendant la durée du processus. + + + + + + The Live image could not be mounted. + L'image Live ne pourra pas être montée. + + + + + The system repair is aborted! + La réparation du système est abandonnée ! + + + + + There is not enough free space. + Il n'y a pas assez d'espace libre. + + + + + + + + Multiple mount points + Points de montage multiple + + + + Enabled + Activé + + + + Systemback worker thread is interrupted by the user. + Le processus de Systemback a été interrompu par l'utilisateur. + + + + Boot Live without xorg.conf file + Demarrage de Live sans fichier xorg.conf + + + + + + Boot Live system + Demarrage du Live systeme + + + + + + Boot system installer + Demarrage du systeme installeur + + + + + + Boot Live in safe graphics mode + Demarrage du Live en mode graphique minimal + + + + + + Boot Live in debug mode + Demarrage du Live en mode debug + + + + Press 'E' key to edit + Appuyer sur la touche 'E' pour modifier + + + + Press TAB key to edit + Appuyer sur la touche TAB pour modifier + + + + An error occurred while changing the access permissions of the following file: + Une erreur s'est produite lors du changement de permissions d'accès du fichier suivant : + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Utilisez: systemback-cli [option] + + Options: + + -n, --newbackup créer un nouveau point de restauration + + -s, --storagedir <path> obtenir ou définir des points de restauration + chemin du répertoire de stockage + + -u, --upgrade mise à niveau du système actuel + supprimer les fichiers inutiles et forfaits + + -v, --version imprimer le numéro de version de Systemback + + -h, --help montrer cette aide + + + + basic restore UI + IU basique de restauration + + + + The Systemback command line interface cannot be used on a Live system! + Le système en ligne de commande de Systemback ne peut pas être utilisé sur un système Live ! + + + + This stupid terminal does not support color! + Ce stupide terminal ne supporte pas la couleur ! + + + + This terminal is too small! + Ce terminal est trop petit ! + + + + The specified storage directory path has not been set! + Le chemin du répertoire de stockage spécifié n'a pas été attibué ! + + + + The restoration is aborted! + La restauration est annulée ! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + La restauration est terminée, néanmoins une erreur est survenue pendant la réinstallation de GRUB ! + + + + The restore points storage directory is not available or not writable! + Le répertoire de stockage des points de restauration est indisponible ou protégé contre l'écriture ! + + + + Available restore point(s): + Point(s) de restauration disponible(s) : + + + + Quit + Quitter + + + + Selected restore point: + Point de restauration sélectionné : + + + + The specified storage directory path is set. + La configuration du répertoire de sauvegarde a été prise en compte. + + + + Restore with the following restore point: + Effectuer la restauration à l'aide du point de restauration suivant : + + + + Restore with the following restore method: + Sélection de la méthode de restauration : + + + + Users configuration files restore + Restauration des fichiers de configuration utilisateur + + + + + Complete configuration files restore + Restauration complète des fichiers de configuration + + + + Configuration files restore + Restauration des fichiers de restauration + + + + + + You want to keep the current fstab file? + Souhaitez-vous conserver le fichier fstab courant ? + + + + + + + + + + + (Y/N) + (O/N) + + + + + + + Reinstall the GRUB 2 bootloader? + Réinstallation du chargeur d'amorçage GRUB 2 ? + + + + Start the restore? + Souhaitez-vous démarrez la restauration ? + + + + The users configuration files full restoration are completed. + La restauration complète de la configuration utilisateur s'est terminée avec succès. + + + + The users configuration files restoration are completed. + La restauration des fichiers de configuration s'est terminée avec succès. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Appuyez sur la touche <Entrée> pour redémarrer ou <Q> pour quitter. + + + + Press 'ENTER' key to quit. + Appuyez sur la touche <Entrée> pour quitter. + + + + Deleting old restore point(s) + Suppression du (des) point(s) de restauration archivés + + + + Restoring the users configuration files + Restauration des fichiers de configuration utilisateur + + + diff --git a/lang/systemback_gl_ES.ts b/lang/systemback_gl_ES.ts new file mode 100644 index 0000000..dd0acee --- /dev/null +++ b/lang/systemback_gl_ES.ts @@ -0,0 +1,1898 @@ + + + + + systemback + + + Full name of the new user: + Nome completo do novo usuario: + + + + New username to login: + Nome de usuario para iniciar sesión: + + + + New user account password: + Contrasinal da conta do nuevo usuario: + + + + New root password (optional, not recommended for Ubuntu): + Novo contrasinal do root (opcional, non recomendábel para Ubuntu): + + + + New hostname: + Novo nome do equipo: + + + + + + + + + + + + + + + + Back + Atrás + + + + + + + + Next + Seguinte + + + + + Working directory + Directorio de traballo + + + + Created Live images + Imaxes «en vivo» creadas + + + + Name of the Live system + Nome do sistema «en vivo» + + + + + + + + Options + Opcións + + + + Write target + Escribir no destino + + + + Live operations + Opcións para o «en vivo» + + + + Include the user data files + Incluir os ficheiros de datos do usuario + + + + Redetect devices + Volver detectar os dispositivos + + + + + + Delete + Eliminar + + + + Convert to ISO + Converter a ISO + + + + + + Create new + Crear novo + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Montar a partición do sistema defectuoso no directorio «/mnt» segundo a estrutura orixinal.<br>(«/» -> «/mnt», «/home» -> «/mnt/home», etc.) + + + + + Mount + Montar + + + + Reset mounts + Restabelecer as montaxes + + + + Repair type + Tipo de reparación + + + + GRUB 2 repair + Reparar o GRUB 2 + + + + System files repair + Reparación do sistema de ficheiros + + + + + Reinstall GRUB 2 bootloader: + Reinstalar o cargador de arrinque GRUB 2: + + + + + Auto detection + Detección automática + + + + Full repair + Reparación completa + + + + Do not repair the fstab file + Non reparar o ficheiro fstab + + + + Exclude hidden user files and directories from restore points + Excluír os ficheiros agochados do usuario e os directorios dos puntos de restauración + + + + Exclude user data files and directories from Live system + Excluir os ficheiros de datos do usuario e os directorios do sistema «en vivo» + + + + Excluded items + Excluír elementos + + + + + Remove item from the exclusion list + Eliminar elemento da lista de exclusión + + + + + Add item to the exclusion list + Engadir elemento na lista de exclusión + + + + Scheduler state: + Estado das tarefas programadas: + + + + + + + + + + + + + + Disabled + Desactivado + + + + Timer settings + Axustes do temporizador + + + + Waiting time before creating a new restore point: + O tempo de espera antes de crear un novo punto de restauración: + + + + Visible countdown time: + Temporizador de conta atrás visíbel: + + + + Pop-up window position on screen: + Posición na pantalla da xanela emerxente: + + + + Use silent mode + Utilizar o modo silencioso + + + + + + + More + Máis + + + + + + + Less + Menos + + + + Simple system backup and restore application with extra features + Un programa sinxelo para facer copias de seguranza e para a restauración do sistema + + + + Project homepage: + Páxina web do proxecto: + + + + Contact: + Contacto: + + + + Donate: + Facer unha doazón: + + + + Systemback version: + Versión do Systemback: + + + + + License + Licenza + + + + Re-read directories + Volver ler os directorios + + + + Writable Linux filesystem! + Sistema escrbíbel de ficheiros Linux! + + + + + + + Cancel + Cancelar + + + + + + + + + + + Maximum number of temporary restore points + Número máximo de puntos temporais de restauración + + + + + Include + + + + + + + + + + + + + + + + + + + empty + baleiro + + + + + + + + + + + not used + sen uso + + + + Includable items + + + + + Included items + + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + + + Restore points + Puntos de restauración + + + + Highlighted restore points + Puntos destacados + + + + Point operations + Accións + + + + Highlight + Destacar + + + + Rename + Cambiar o nome + + + + + + + + + + + + + + + + + + Select restore point + Seleccionar o punto de restauración + + + + + + + + + Storage directory + Ruta de almacenamento + + + + Function menu + Menú de funcións + + + + + + System restore + Restaurar o sistema + + + + + + + System copy + Copiar o sistema + + + + + System install + Instalar o sistema + + + + + + + Live system create + Crear sistema «en vivo» + + + + + System repair + Reparar o sistema + + + + System upgrade + Actualizar o sistema + + + + + Exclude + Excluír + + + + + Schedule + Planificar + + + + Excludable items + + + + + + + About + Sobre + + + + + Settings + + + + + Change path + Cambiar a ruta + + + + Restore type + Tipo de restauración + + + + + + + + + Full restore + Restauración completa + + + + + + + + + System files restore + Restaurar os ficheiros do sistema + + + + User(s) configuration files restore + Restaurar os ficheiros de configuración do(s) usuario(s) + + + + + Keep newly installed configuration files + Manter os ficheiros de configuración instalados recentemente + + + + Include user(s): + Incluír o(s) usuario(s): + + + + Do not restore the fstab file + Non restaurar o ficheiro fstab + + + + Partition settings + Configuración de discos e particións + + + + Need to set the mount point as '/boot/efi'! + + + + + Window DPI scaling + + + + + Multiplier factor for scaling the window contents + + + + + User interface + + + + + Window always on top + + + + + System + + + + + Disable scheduler daemon starting for the following users: + + + + + Use XZ compressor for squashfs filesystems + + + + + Override auto-detected language: + + + + + Override the used style: + + + + + Disable incremental restore points (do not use hard links between backups) + + + + + Create Live ISO images automatically (faster than the conversion) + + + + + Do not empty memory cache at the end of some processes + + + + + + + + + + + Unmount + Desmontar + + + + Write to target + + + + + Mount point: + Ponto de montaxe: + + + + + + + + + ! Delete ! + + + + + Add new partition + + + + + Create new: + Crear novo: + + + + Filesystem: + Sistema de ficheiros: + + + + + + Format + Formatar + + + + + + Reset partitions settings + Restabelecer os axustes das particións + + + + Change partition settings + Cambiar os axustes das particións + + + + + + + + Transfer user configuration files + + + + + Copy user data files + Copiar os ficheiros de datos do usuario + + + + Install GRUB 2 bootloader: + Instalar o cargador de arrinque GRUB 2: + + + + + + + + + Transfer user configuration and data files + + + + + ! Interrupt ! + ! Deter o proceso ! + + + + Creates a scheduled restore point within few seconds. + Crea un punto de restauración programado en poucos segundos. + + + + + + Start + Comezar + + + + Later + Máis adiante + + + + Systemback user authentication + + + + + Administrator: + + + + + Password: + + + + + + Partition + Partición + + + + + Size + + + + + Current mount point + Punto de montaxe actual + + + + New mount point + Novo punto de montaxe + + + + Filesystem + Sistema de ficheiros + + + + Device + Dispositivo + + + + + + scheduler + tarefas programadas + + + + + Top left + Arriba á esquerda + + + + + + Top right + Arriba á dereita + + + + + + Center + Centrada + + + + + + Bottom left + Abaixo á esquerda + + + + + Bottom right + Abaixo á dereita + + + + + + day(s) + día(s) + + + + + + hour(s) + hora(s) + + + + + + + + minute(s) + minuto(s) + + + + + + seconds + segundos + + + + + + Live image + Imaxe «en vivo» + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + + + Boot system installer + + + + + + + Currently running system + Sistema actual en execución + + + + Label + + + + + + Creating restore point + Creando o punto de restauración + + + + + Restoring the full system + Restauración completa do sistema + + + + + Restoring the system files + Restaurando o sistema de ficheiros + + + + Restoring the user(s) configuration files + Restaurando a configuración de ficheiros do(s) usuario(s) + + + + Repairing the system files + Reparando o sistema de ficheiros + + + + Repairing the full system + Reparando por completo o sistema + + + + Copying the system + Copiando o sistema + + + + Installing the system + Instalando o sistema + + + + Creating Live system + Creando o sistema «en vivo» + + + + + Deleting restore point + Eliminando o punto de restauración + + + + Deleting old restore point + Eliminando o punto de restauración obsoleto + + + + + Deleting incomplete restore point + Eliminando o punto de restauración incompleto + + + + + Flushing filesystem buffers + + + + + + + + + + Reboot + Reiniciar + + + + + + + X restart + Reiniciar X + + + + Repairing the GRUB 2 + Reparando o GRUB 2 + + + + + Emptying cache + Baleirando a caché + + + + + An another Systemback process is currently running, please wait until it finishes. + Hai outro proceso de Systemback en execución, agarde ata que remate. + + + + Please enter a new name. + Introduza outro nome. + + + + The specified name contain(s) unsupported character(s)! + O nome especificado conten caracteres non admitidos! + + + + Restore the system files to the following restore point: + Restaurar os ficheiros do sistema ao seguinte punto de restauración: + + + + Repair the system files with the following restore point: + Reparar os ficheiros do sistema usando o seguinte punto de restauración: + + + + Repair the complete system with the following restore point: + Reparación completa do sistema usando o seguinte punto de restauración: + + + + Restore the complete user(s) configuration files to the following restore point: + Restauración completa dos ficheiros de configuración do(s) usuario(s) segundo o seguinte punto de restauración: + + + + Restore the user(s) configuration files to the following restore point: + Restaurar os ficheiros de configuración do(s) usuario(s) segundo o seguinte punto de restauración: + + + + The user(s) configuration files full restoration are completed. + Completouse a restauración total dos ficheiros de configuración do(s) usuario(s). + + + + + The X server will restart automatically within 30 seconds. + O servidor X reiniciarase automaticamente en 30 segundos. + + + + The user(s) configuration files restoration are completed. + Completouse a restauración dos ficheiros de configuración do(s) usuario(s). + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Completouse a reparación do sistema de ficheiros, mais produciuse un erro ao reinstalar o GRUB! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + O sistema non poderá arrincar! (Isto pode deberse a unha arquitectura diferente.) + + + + The full system repair is completed. + Completouse a reaparación total do sistema. + + + + The system repair is completed. + Completouse a reaparación do sistema. + + + + Copy the system, using the following restore point: + Copiar o sistema usando o seguinte punto de restauración: + + + + Install the system, using the following restore point: + Instalar o sistema usando o seguinte punto de restauración: + + + + + + + The restore point creation is aborted! + Foi interrompida a creación do punto de restauración! + + + + + + Not enough free disk space to complete the process. + Non hai espazio libre abondo no disco para completar o proceso. + + + + + Root privileges are required for running the Systemback! + Precisanse privilexios de administrador (root) para executar o Systemback! + + + + Restore the complete system to the following restore point: + Restaurar completamente o sistema usando o seguinte punto de restauración: + + + + + The system files restoration are completed. + Completouse a restauración do sistema de ficheiros. + + + + + + The computer will restart automatically within 30 seconds. + O equipo reiniciarase automaticamente en 30 segundos. + + + + + The full system restoration is completed. + Completouse a restauración total do sistema. + + + + + + + + The system copy is aborted! + A copia do sistema foi interrompida! + + + + An error occurred while reinstalling the GRUB. + + + + + Format the %1, and write the following Live system image: + Formatar %1, e gravar a seguinte imaxe do sistema «en vivo»: + + + + The selected device does not have enough space to write the Live system. + + + + + + There is not enough free space. + + + + + Interrupting the current process + + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + A partición especificada non ten espazo libre abondo. A copia do sistema non funcionará correctamente. + + + + The system copy is completed, but an error occurred while installing the GRUB! + Completouse a copia do sistema, mais produciuse un erro durante a instalación do GRUB! + + + + + You need to manually install a bootloader. + É necesario instalar manualmente un cargador de arrinque. + + + + + The system restoration is aborted! + + + + + An error occurred while creating the file system image. + Produciuse un erro ao crear a imaxe do sistema de ficheiros. + + + + An error occurred while creating the container file. + Produciuse un erro ao crear o ficheiro contedor. + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + A(s) partición(s) especificada(s) non ten(teñen) espazo libre abondo. O sistema instalado non funcionará correctamente. + + + + + + The specified partition could not be formatted (in use or unavailable). + Non foi posíbel formatar a partición especificada (ou está a ser usada ou non está dispoñíbel). + + + + An error occurred while reinstalling the GRUB! + Produciuse un erro ao reinstalar o GRUB! + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Completouse a reparación do sistema, mais produciuse un erro ao reinstalar o GRUB! + + + + The system copy is completed. + Completouse a copia do sistema. + + + + + + + + The Live system creation is aborted! + + + + + + + The specified partition could not be mounted. + Non foi posíbel montar a partición especificada. + + + + An error occurred while unpacking the Live system files. + Produciuse un erro ao descomprimir os ficheiros do sistema «en vivo». + + + + An error occurred while renaming the essential Live files. + Produciuse un erro ao cambiarlle o nome a ficheiros esenciais do sistema «en vivo». + + + + An error occurred while creating the .iso image. + Produciuse un erro durante a creación da imaxe .iso. + + + + An error occurred while reading the .sblive image. + Produciuse un erro durante a lectura da imaxe .sblive. + + + + An error occurred while creating the new initramfs image. + + + + + + + The Live image could not be mounted. + + + + + The GRUB 2 repair is completed. + Completouse a reaparación do GRUB 2. + + + + Writing Live image to the target device + + + + + The Live system creation is completed. + Completouse a creación do sistema «en vivo». + + + + The created .sblive file can be written to pendrive. + O ficheiro .sblive creado pode ser transferido a unha memoria USB. + + + + The system install is completed. + Completouse a instalación do sistema. + + + + The system install is completed, but an error occurred while installing the GRUB! + Completouse a instalación, mais produciuse un error durante a instalación do GRUB! + + + + + + + + The system installation is aborted! + A instalación do sistema foi interrompida! + + + + + + + + + + There has been critical changes in the file system during this operation. + Non se fixeron cambios críticos no sistema de ficheiros durante esta operación. + + + + Repair the GRUB 2 bootloader. + Reparar o cargador de arrinque GRUB 2. + + + + + + + + The Live write is aborted! + + + + + The Live system image write is completed. + Completouse a escritura da imaxe do sistema «en vivo». + + + + + + + The Live conversion is aborted! + + + + + + The restore point deletion is aborted! + + + + + + An error occurred while during the process. + + + + + + The system repair is aborted! + + + + + + + + Everyone + + + + + Upgrading the system + Actualizado o sistema + + + + + + + + Multiple mount points + + + + + Enabled + Activado + + + + Systemback worker thread is interrupted by the user. + + + + + + process + + + + + Boot Live without xorg.conf file + Arrinque do sistema «en vivo» sen o ficheiro xorg.conf + + + + + + Boot Live system + Arrinque do sistema «en vivo» + + + + + + Boot Live in safe graphics mode + Arrinque do sistema «en vivo» en modo grafico seguro + + + + + + Boot Live in debug mode + Arrinque en modo de depuracion + + + + Press 'E' key to edit + Prema a tecla «E» para editar + + + + Press TAB key to edit + Prema a tecla TAB para editar + + + + Converting Live system image + Convertendo a imaxe do sistema «en vivo» + + + + + Unable to get exclusive lock! + Non foi posíbel obter o bloqueo exclusivo! + + + + + First, close all package manager. + Peche calquera xestor de paquetes que teña aberto. + + + + The specified storage directory path has not been set! + Non foi estabelecido un directorio para a ruta de almacenamento! + + + + The restoration is aborted! + A restauración foi interrompida! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Completouse a restauración, mais produciuse un erro ao reinstalar o GRUB! + + + + The restore points storage directory is not available or not writable! + O directorio de almacenamento dos puntos de restauración non está dispoñíbel ou non se pode escribir nel! + + + + This stupid terminal does not support color! + + + + + This terminal is too small! + + + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + + + + + An error occurred while opening the following file: + + + + + An error occurred while creating the following directory: + + + + + An error occurred while removing the following file: + + + + + An error occurred while creating the following hard link: + + + + + Reference file: + + + + + An error occurred while creating the following file: + + + + + An error occurred while renaming the following item: + + + + + New path: + + + + + An error occurred while executing the following command: + + + + + Exit code: + + + + + Failed to detect the device for installing the GRUB! + + + + + An error occurred while upgrading the system! + Produciuse un erro ao anovar o sistema! + + + + Restart upgrade ... + Reiniciar a anovación ... + + + + This file could not be copied because it does not exist: + + + + + The following partition has no UUID: + + + + + An error occurred while creating a new partition on the following device: + + + + + An error occurred while mounting the following partition/image: + + + + + An error occurred while setting one or more flags on the following partition: + + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + + + + + An error occurred while unmounting the following partition/image/mount point: + + + + + An error occurred while cloning the properties of the following item: + + + + + Target item: + + + + + An error occurred while cloning the following symbolic link: + + + + + Target symlink: + + + + + An error occurred while cloning the following file: + + + + + Target file: + + + + + An error occurred while cloning the following directory: + + + + + Target directory: + + + + + An error occurred while deleting the following directory: + + + + + basic restore UI + + + + + Available restore point(s): + Punto(s) de restauración dospoñíbel(eis): + + + + Quit + Saír + + + + Selected restore point: + Punto de restauración seleccionado: + + + + The specified storage directory path is set. + Estabeleceuse un directorio para a ruta de almacenamento. + + + + Deleting old restore point(s) + Eliminando o(s) punto(s) de restauración antigo(s) + + + + Restore with the following restore point: + Restaurar usando o seguinte punto de restauración: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Uso: systemback-cli [opción] + + Opcións: + + -n, --newbackup crear un novo punto de restauración + + -s, --storagedir <ruta> obter ou estabelecer a ruta do directorio de + almacenamento dos puntos de restauración + + -u, --upgrade anovar o sistema actual + retirar os ficheiros e paquetes innecesarios + + -v, --versión saída do número da versión do Systemback + + -h, --help amosa esta axuda + + + + The Systemback command line interface cannot be used on a Live system! + + + + + Restore with the following restore method: + Restaurar usando o seguinte método de restauración: + + + + Users configuration files restore + Restaurar os ficheiros de configuración do(s) usuarios + + + + + Complete configuration files restore + Restauración completa de ficheiros de configuración + + + + Configuration files restore + Restaurar os ficheiros de configuración + + + + + + You want to keep the current fstab file? + Quere manter o actual ficheiro fstab? + + + + + + + + + + + (Y/N) + (Y/N) + + + + + + + Reinstall the GRUB 2 bootloader? + Reinstalar o cargador de arrinque GRUB 2? + + + + Start the restore? + Comezar a restauración? + + + + Restoring the users configuration files + Restaurando a configuración de ficheiros do(s) usuarios + + + + The users configuration files full restoration are completed. + Completouse a restauración total dos ficheiros de configuración do(s) usuarios. + + + + The users configuration files restoration are completed. + Completouse a restauración dos ficheiros de configuración do(s) usuarios. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Prema a tecla «INTRO» para reiniciar o equipo, ou «Q» para saír. + + + + Press 'ENTER' key to quit. + + + + + An error occurred while changing the access permissions of the following file: + + + + + + Cannot start the Systemback scheduler daemon! + + + + + + Missing, wrong or too much argument(s). + + + + + The process is disabled for this user. + + + + + Root privileges are required. + + + + + This system is a Live. + + + + + Already running. + + + + + Unable to daemonize. + + + + + Cannot start the Systemback graphical user interface! + + + + + Unable to get root permissions. + + + + + Unable to connect to the X server. + + + + + Unsafe X Window authorization! + + + + + Please do not use 'sudo' command. + + + + diff --git a/lang/systemback_hu.ts b/lang/systemback_hu.ts new file mode 100644 index 0000000..08d63d6 --- /dev/null +++ b/lang/systemback_hu.ts @@ -0,0 +1,1899 @@ + + + + + systemback + + + Full name of the new user: + Az új felhasználó teljes neve: + + + + New username to login: + A bejelentkezéshez használandó új felhasználói név: + + + + New user account password: + A felhasználói fiókhoz tartozó új jelszó: + + + + New root password (optional, not recommended for Ubuntu): + A root felhasználó új jelszava (opcionális, Ubuntuhoz nem ajánlott): + + + + New hostname: + A számítógép új neve: + + + + + + + + + + + + + + + + Back + Vissza + + + + + + + + Next + Tovább + + + + + Working directory + Munkakönyvtár + + + + Created Live images + Elkészített Live rendszerképek + + + + Name of the Live system + A Live rendszer neve + + + + + + + + Options + Opciók + + + + Write target + Kiírási céleszköz + + + + Live operations + Live műveletek + + + + Include the user data files + Felhasználói adatfájlok belevétele + + + + Redetect devices + Eszközök újrakeresése + + + + + + Delete + Törlés + + + + Convert to ISO + Konvertálás ISO-vá + + + + + + Create new + Új készítése + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + A javítandó rendszer összes partícióját csatold a '/mnt' könyvtár alá az eredeti struktúra szerint.<br>('/' -> '/mnt', '/home' -> '/mnt/home', stb.) + + + + + Mount + Csatolás + + + + Reset mounts + Csatolások újrakezdése + + + + Repair type + Javítás típusa + + + + GRUB 2 repair + GRUB 2 javítása + + + + System files repair + Rendszerfájlok javítása + + + + + Reinstall GRUB 2 bootloader: + GRUB 2 rendszerbetöltő újratelepítése: + + + + + Auto detection + Automatikus beállítások + + + + Full repair + Teljes javítás + + + + Do not repair the fstab file + Ne javítsa az fstab fájlt + + + + Exclude hidden user files and directories from restore points + Visszaállítási pontokból kihagyandó rejtett felhasználói könyvtárak és fájlok + + + + Exclude user data files and directories from Live system + Live rendszerből kihagyandó felhasználói könyvtárak és fájlok + + + + Excluded items + Kihagyott elemek + + + + + Remove item from the exclusion list + Elem eltávolítása a kihagyási listából + + + + + Add item to the exclusion list + Elem hozzáadása a kihagyási listához + + + + Scheduler state: + Ütemező állapota: + + + + + + + + + + + + + + Disabled + Tiltva + + + + Timer settings + Időzítő beállítások + + + + Waiting time before creating a new restore point: + Várakozási idő új visszaállítási pont készítése előtt: + + + + Visible countdown time: + Látható visszaszámlálási idő: + + + + Pop-up window position on screen: + Felugró ablak elhelyezkedése a képernyőn: + + + + Use silent mode + Csendes mód engedélyezése + + + + + + + More + Több + + + + + + + Less + Kevesebb + + + + Simple system backup and restore application with extra features + Egyszerű rendszermentő és visszaállító alkalmazás további extra funkciókkal + + + + Project homepage: + Projekt honlap: + + + + Contact: + Kapcsolat: + + + + Donate: + Anyagi támogatás: + + + + Systemback version: + Systemback verziója: + + + + + License + Licenc + + + + Re-read directories + Könyvtárak újraolvasása + + + + Writable Linux filesystem! + Írható Linux fájlrendszer! + + + + + + + Cancel + Mégsem + + + + + + + + + + + Maximum number of temporary restore points + Átmeneti visszaállítási pontok maxmális száma + + + + + Include + Hozzáadás + + + + + + + + + + + + + + + + + + empty + üres + + + + + + + + + + + not used + nem használt + + + + Includable items + Hozzáadható elemek + + + + Included items + Hozzáadott elemek + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + Felhasználói könyvtárak és fájlok hozzáadása a visszaállítási pontokhoz +Ezek visszaállítható konfigurációs fájloknak lesznek definiálva! + + + + Restore points + Visszaállítási pontok + + + + Highlighted restore points + Kiemelt visszaállítási pontok + + + + Point operations + Pontműveletek + + + + Highlight + Kiemelés + + + + Rename + Átnevezés + + + + + + + + + + + + + + + + + + Select restore point + Visszaállítási pont kiválasztása + + + + + + + + + Storage directory + Tárolási könyvtár + + + + Function menu + Funkciómenü + + + + + + System restore + Rendszer-visszaállítás + + + + + + + System copy + Rendszermásolás + + + + + System install + Rendszertelepítés + + + + + + + Live system create + Live rendszer készítés + + + + + System repair + Rendszerjavítás + + + + System upgrade + Rendszerfrissítés + + + + + Exclude + Kivételek + + + + + Schedule + Ütemezés + + + + Excludable items + Kihagyható elemek + + + + + + About + Névjegy + + + + + Settings + Beállítások + + + + Change path + Útvonal megváltoztatása + + + + Restore type + Visszaállítás típusa + + + + + + + + + Full restore + Teljes visszaállítás + + + + + + + + + System files restore + Rendszerfájlok visszaállítása + + + + User(s) configuration files restore + Felhasználó(k) beállításfájljainak visszaállítása + + + + + Keep newly installed configuration files + Újonnan telepített alkalmazások beállításfájljainak megtartása + + + + Include user(s): + Felhasználó(k) belevétele: + + + + Do not restore the fstab file + Ne állítsa vissza az fstab fájlt + + + + Partition settings + Partíció beállítás + + + + Need to set the mount point as '/boot/efi'! + Be kell állítani a '/boot/efi' csatolási pontot! + + + + Window DPI scaling + Ablak méretezése a képernyőfelbontáshoz + + + + Multiplier factor for scaling the window contents + Szorzási tényező az ablaktartalom méretezéséhez + + + + User interface + Felhasználói felület + + + + Window always on top + Az ablak mindig felül + + + + System + Rendszer + + + + Disable scheduler daemon starting for the following users: + Ütemező démon indításának letiltása a következő felhasználóknál: + + + + Use XZ compressor for squashfs filesystems + XZ tömörítő használata squashfs fájlrendszerekhez + + + + Override auto-detected language: + Automatikusan érzékelt nyelv felülbírálása: + + + + Override the used style: + Használt stílus felülbírálása: + + + + Disable incremental restore points (do not use hard links between backups) + Visszaállítási pontok egymásra építésének tiltása (hard linkek használatának mellőzése) + + + + Create Live ISO images automatically (faster than the conversion) + Live ISO képfájlok automatikus létrehozása (gyorsabb mint a konvertálás) + + + + Do not empty memory cache at the end of some processes + Ne ürítse a memória-gyorsítótárat a folyamatok végén + + + + + + + + + + Unmount + Leválasztás + + + + Write to target + Kiírás céleszközre + + + + Mount point: + Csatolási pont: + + + + + + + + + ! Delete ! + ! Törlés ! + + + + Add new partition + Új partíció hozzáadása + + + + Create new: + Új készítése: + + + + Filesystem: + Fájlrendszer: + + + + + + Format + Formázás + + + + + + Reset partitions settings + Partícióbeállítások újrakezdése + + + + Change partition settings + Partíció beállításainak megváltoztatása + + + + + + + + Transfer user configuration files + Felhasználói beállításfájlok átvitele + + + + Copy user data files + Felhasználói adatfájlok másolása + + + + Install GRUB 2 bootloader: + GRUB 2 rendszerbetöltő telepítése: + + + + + + + + + Transfer user configuration and data files + Felhasználói beállítás- és adatfájlok átvitele + + + + ! Interrupt ! + ! Megszakítás ! + + + + Creates a scheduled restore point within few seconds. + Ütemezett visszaállítási pont készítése néhány másodpercen belül. + + + + + + Start + Indítás + + + + Later + Később + + + + Systemback user authentication + Systemback felhasználó hitelesítés + + + + Administrator: + Adminisztrátor: + + + + Password: + Jelszó: + + + + + Partition + Partíció + + + + + Size + Méret + + + + Current mount point + Jelenlegi csatolási pont + + + + New mount point + Új csatolási pont + + + + Filesystem + Fájlrendszer + + + + Device + Eszköz + + + + + + scheduler + ütemező + + + + + Top left + Balra fent + + + + + + Top right + Jobbra fent + + + + + + Center + Középen + + + + + + Bottom left + Balra lent + + + + + Bottom right + Jobbra lent + + + + + + day(s) + nap + + + + + + hour(s) + óra + + + + + + + + minute(s) + perc + + + + + + seconds + másodperc + + + + + + Live image + Live rendszerkép + + + + + + Currently running system + Jelenleg futó rendszer + + + + + Creating restore point + Új visszaállítási pont készítése + + + + + Restoring the full system + A rendszer teljes visszaállítása + + + + + Restoring the system files + A rendszerfájlok visszaállítása + + + + Restoring the user(s) configuration files + A felhasználó(k) beállításfájljainak visszaállítása + + + + Repairing the system files + Rendszerfájlok javítása + + + + Repairing the full system + A rendszer teljes javítása + + + + Copying the system + A rendszer másolása + + + + Installing the system + A rendszer telepítése + + + + Creating Live system + Live rendszer készítése + + + + + Deleting restore point + Visszaállítási pont törlése + + + + Deleting old restore point + Elöregedett visszaállítási pont törlése + + + + + Deleting incomplete restore point + Befejezetlen visszaállítási pont törlése + + + + + Flushing filesystem buffers + Fájlrendszer puffer kiírása + + + + + + + + + Reboot + Újraindítás + + + + + + + X restart + X újraindítás + + + + Repairing the GRUB 2 + A GRUB 2 javítása + + + + + Emptying cache + Gyorsítótár ürítése + + + + + An another Systemback process is currently running, please wait until it finishes. + Egy másik Systemback folyamat is fut, kérlek várd meg amíg az befejeződik. + + + + Please enter a new name. + Kérlek, adj meg egy új nevet. + + + + The Live system creation is completed. + A Live rendszer készítése befejeződött. + + + + The created .sblive file can be written to pendrive. + A létrehozott .sblive fájl pendrive-ra írható. + + + + Restore the system files to the following restore point: + A rendszerfájlok visszaállítása a következő visszaállítási pontra: + + + + Label + Címke + + + + Writing Live image to the target device + Live rendszerkép kiírása a céleszközre + + + + The specified name contain(s) unsupported character(s)! + A megadott név nem támogatott karakter(eke)t tartalmaz! + + + + Repair the system files with the following restore point: + A rendszerfájlok javítása a következő visszaállítási ponttal: + + + + Repair the complete system with the following restore point: + A rendszer teljes javítása a következő visszaállítási ponttal: + + + + Restore the complete user(s) configuration files to the following restore point: + A felhasználó(k) beállításfájljainak teljes visszaállítása a következő visszaállítási pontra: + + + + Restore the user(s) configuration files to the following restore point: + A felhasználó(k) beállításfájljainak visszaállítása a következő visszaállítási pontra: + + + + The user(s) configuration files full restoration are completed. + A felhasználó(k) beállításfájljainak teljes visszaállítása kész. + + + + + The X server will restart automatically within 30 seconds. + Az X kiszolgáló automatikusan újraindul 30 másodpercen belül. + + + + The user(s) configuration files restoration are completed. + A felhasználó(k) beállításfájljainak visszaállítása kész. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + A rendszerfájlok javítása kész, de a GRUB újratelepítése közben hiba történt! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + A rendszer indíthatósága nem biztosított! (Általában az eltérő architectúra okozza a problémát.) + + + + The full system repair is completed. + A rendszer teljes javítása befejeződött. + + + + The system repair is completed. + A rendszer javítása befejeződött. + + + + Copy the system, using the following restore point: + A rendszer másolása a következő visszaállítási pontot használva: + + + + Install the system, using the following restore point: + A rendszer telepítése a következő visszaállítási pontot használva: + + + + + + + The restore point creation is aborted! + A visszaállítási pont készítése megszakítva! + + + + + + Not enough free disk space to complete the process. + Nincs elég szabad tárhely a folyamat befejezéséhez. + + + + + Root privileges are required for running the Systemback! + A Systemback futtatásához root jogosultság szükséges! + + + + Restore the complete system to the following restore point: + A rendszer teljes visszaállítása a következő visszaállítási pontra: + + + + + The system files restoration are completed. + A rendszerfájlok visszaállítása kész. + + + + + + The computer will restart automatically within 30 seconds. + A számítógép automatikusan újraindul 30 másodpercen belül. + + + + + The full system restoration is completed. + A rendszer teljes visszaállítása kész. + + + + + + + + The system copy is aborted! + A rendszer másolása megszakítva! + + + + Format the %1, and write the following Live system image: + A %1 formázása, és a következő Live rendszerkép kiírása: + + + + The selected device does not have enough space to write the Live system. + A választott eszközön nincs elegendő tárhely a Live rendszer kiírásához. + + + + + There is not enough free space. + Nincs elég szabad hely. + + + + Interrupting the current process + Jelenleg futó folyamat megszakítása + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + A megadott partíció(ko)n nincs elég szabad tárhely. Az átmásolt rendszer nem fog megfelelően működni. + + + + The system copy is completed, but an error occurred while installing the GRUB! + A rendszer átmásolása befejezve, de a GRUB telepítése közben hiba történt! + + + + + You need to manually install a bootloader. + A rendszer indításához telepítsél kézzel egy rendszerbetöltőt. + + + + + The system restoration is aborted! + A rendszer visszaállítása megszakítva! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + A rendszer teljes telepítéséhez nincs elegendő szabad tárhely a megadott partíció(ko)n. A telepített rendszer nem fog megfelelően működni. + + + + + + The specified partition could not be formatted (in use or unavailable). + Az alábbi partíciót nem sikerűlt a megadott fájlrendszerre formázni (használatban van vagy nem elérhető). + + + + An error occurred while reinstalling the GRUB! + A GRUB újratelepítése közben hiba történt! + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + A rendszer teljes javítása befejeződött, de a GRUB újratelepítése közben hiba történt! + + + + The system copy is completed. + A rendszer másolása befejeződött. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + A csomagindexfájlok újraszinkronizálása jelenleg folyamatban van, kérlek várd meg amíg az befejeződik. + + + + + + + + The Live system creation is aborted! + A Live rendszer készítése megszakítva! + + + + An error occurred while creating the file system image. + A rendszerkép készítése közben hiba törént. + + + + An error occurred while creating the container file. + A konténerfájl készítése közben hiba történt. + + + + + + The specified partition could not be mounted. + Az alábbi partíciót nem sikerűlt csatolni. + + + + An error occurred while unpacking the Live system files. + A Live rendszerfájlok kicsomagolása közben hiba történt. + + + + An error occurred while renaming the essential Live files. + A fájlok szükséges átnvezése közben hiba történt. + + + + An error occurred while creating the .iso image. + A .iso képfájl készítése közben hiba történt. + + + + An error occurred while reading the .sblive image. + A .sblive képfájl olvasása közben hiba történt. + + + + An error occurred while creating the new initramfs image. + Az új initramfs kép készítése közben hiba történt. + + + + + + The Live image could not be mounted. + Az Live rendszerképet nem sikerűlt csatolni. + + + + + + Boot system installer + Rendszertelepito inditasa + + + + The GRUB 2 repair is completed. + A GRUB 2 javítása befejeződött. + + + + An error occurred while reinstalling the GRUB. + A GRUB újratelepítése közben hiba történt. + + + + The system install is completed. + A rendszer telepítése befejeződött. + + + + The system install is completed, but an error occurred while installing the GRUB! + A rendszer telepítése befejezve, de a GRUB telepítése közben hiba történt! + + + + + + + + The system installation is aborted! + A rendszer telepítése megszakítva! + + + + + + + + + + There has been critical changes in the file system during this operation. + A folyamat közben kritikus változások következtek be a fájlrendszerben. + + + + Repair the GRUB 2 bootloader. + A GRUB 2 rendszerbetöltő javítása. + + + + + + + + The Live write is aborted! + A Live rendszer kiírása megszakítva! + + + + The Live system image write is completed. + A Live rendszerkép kiírása befejeződött. + + + + + + + The Live conversion is aborted! + A Live rendszer konvertálása megszakítva! + + + + + The restore point deletion is aborted! + A rendszer-visszaállítási pont törlése megszakítva! + + + + + An error occurred while during the process. + A folyamat közben hiba történt. + + + + + The system repair is aborted! + A rendszer javítása megszakítva! + + + + + + + Everyone + Mindenki + + + + Upgrading the system + A rendszer frissítése + + + + + + + + Multiple mount points + Többszörös csatolási pont + + + + Enabled + Engedélyezve + + + + Systemback worker thread is interrupted by the user. + Systemback munkaszál a felhasználó által megszakítva. + + + + + process + folyamat + + + + Boot Live without xorg.conf file + Live inditasa xorg.conf fajl nelkul + + + + + + Boot Live system + Live rendszer inditasa + + + + + + Boot Live in safe graphics mode + Live inditasa csokkentett grafikus modban + + + + + + Boot Live in debug mode + Live inditasa debug modban + + + + Press 'E' key to edit + Szerkeszteshez nyomd le az 'E' billentyut + + + + Press TAB key to edit + Szerkeszteshez nyomd le a TAB billentyut + + + + Converting Live system image + Live rendszerkép konvertálása + + + + + Unable to get exclusive lock! + Nem sikerült kizárólagos zárat szerezni! + + + + + First, close all package manager. + Előbb zárj be minden csomagkezelőt. + + + + The specified storage directory path has not been set! + A megadott tárolási könyvtár nem állítható be! + + + + The restoration is aborted! + A visszaállítás megszakítva! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + A rendszer visszaállítása kész, de a GRUB újratelepítése közben ismeretlen hiba történt! + + + + The restore points storage directory is not available or not writable! + A visszaállítási pontok tárolási könyvtára nem elérhető vagy nem írható! + + + + This stupid terminal does not support color! + Ez a buta terminál nem támogatja a színeket! + + + + This terminal is too small! + Ez a terminál túl kicsi! + + + + Version: + Verzió: + + + + Compilation date and time: + Fordítási dátum és idő: + + + + + Installed files: + Telepített fájlok: + + + + Operating system: + Operációs rendszer: + + + + + Mounted filesystems: + Csatolt fájlrendszerek: + + + + System language: + Rendszernyelv: + + + + Translation: + Fordítás: + + + + The specified debug level is invalid! + A megadott hibakeresési szint érvénytelen! + + + + The default level (1) will be used. + Az alapértelmezett szint (1) lesz használva. + + + + An error occurred while opening the following file: + Az alábbi fájl megnyitása közben hiba történt: + + + + An error occurred while creating the following directory: + Az alábbi könyvtár létrehozása közben hiba történt: + + + + An error occurred while removing the following file: + Az alábbi fájl törlése közben hiba történt: + + + + An error occurred while creating the following hard link: + Az alábbi hard link létrehozása közben hiba történt: + + + + Reference file: + Referencia link: + + + + An error occurred while creating the following file: + Az alábbi fájl létrehozása közben hiba történt: + + + + An error occurred while renaming the following item: + Az alábbi elem átnevezése közben hiba történt: + + + + New path: + Új útvonal: + + + + An error occurred while executing the following command: + Az alábbi parancs végrehajtása közben hiba történt: + + + + Exit code: + Kilépési kód: + + + + Failed to detect the device for installing the GRUB! + Nem sikerült eszközt detektálni a GRUB telepítéséhez! + + + + An error occurred while upgrading the system! + A rendszer frissítése közben hibák léptek fel! + + + + Restart upgrade ... + Frissítés újrakezdése ... + + + + This file could not be copied because it does not exist: + Az alábbi fájl nem másolható, mivel nem létezik: + + + + The following partition has no UUID: + Az alábbi partíció nem rendelkezik UUID-vel: + + + + An error occurred while creating a new partition on the following device: + Az alábbi eszközön nem sikerült új partíciót létrehozni: + + + + An error occurred while mounting the following partition/image: + Az alábbi partíció/kép csatolása közben hiba történt: + + + + An error occurred while setting one or more flags on the following partition: + Az alábbi partíción nem sikerült egy vagy több új jelzőt beállítani: + + + + Flag(s): + Jelző(k): + + + + An error occurred while creating the partition table on the following device: + Az alábbi eszközön nem sikerült partíciós táblát létrehozni: + + + + An error occurred while unmounting the following partition/image/mount point: + Az alábbi partíció/kép/csatolási pont leválasztása közben hiba történt: + + + + An error occurred while cloning the properties of the following item: + Az alábbi elem tulajdonságainak klónozása közben hiba történt: + + + + Target item: + Cél elem: + + + + An error occurred while cloning the following symbolic link: + Az alábbi szimbolikus link klónozása közben hiba történt: + + + + Target symlink: + Cél szimlink: + + + + An error occurred while cloning the following file: + Az alábbi fájl klónozása közben hiba történt: + + + + Target file: + Célfájl: + + + + An error occurred while cloning the following directory: + Az alábbi könyvtár klónozása közben hiba történt: + + + + Target directory: + Célkönyvtár: + + + + An error occurred while deleting the following directory: + Az alábbi könyvtár törlése közben hiba történt: + + + + basic restore UI + alap visszaállítási felület + + + + Available restore point(s): + Elérhető visszaállítási pont(ok): + + + + Quit + Kilépés + + + + Selected restore point: + Választott visszaállítási pont: + + + + The specified storage directory path is set. + A megadott tárolási könyvtár beállítva. + + + + Deleting old restore point(s) + Elöregedett visszaállítási pont(ok) törlése + + + + Restore with the following restore point: + Visszaállítás a következő visszaállítási ponttal: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Használat: systemback-cli [kapcsoló] + + Kapcsolók: + + -n, --newbackup új visszaállítási pont készítése + + -s, --storagedir <útvonal> a visszaállítási pontok tárolására szolgáló + könyvtár útvonalának kiírása vagy beállítása + + -u, --upgrade a rendszer frissítése + felesleges fájlok és csomagok eltávolítása + + -v, --version a telepített Systemback verziószámának kiírása + + -h, --help ezen súgó megjelenítése + + + + The Systemback command line interface cannot be used on a Live system! + A Systemback parancssoros felülete nem használható Live rendszeren! + + + + Restore with the following restore method: + Visszaállítás a következő visszaállítási móddal: + + + + Users configuration files restore + Felhasználók beállításfájljainak visszaállítása + + + + + Complete configuration files restore + Beállításfájlok teljes visszaállítása + + + + Configuration files restore + Beállításfájlok visszaállítása + + + + + + You want to keep the current fstab file? + A jelenleg használt fstab fájlt megkívánod tartani? + + + + + + + + + + + (Y/N) + (I/N) + + + + + + + Reinstall the GRUB 2 bootloader? + A GRUB 2 rendszerbetöltőt újratelepítsem? + + + + Start the restore? + Indulhat a visszaállítás? + + + + Restoring the users configuration files + A felhasználók beállításfájljainak visszaállítása + + + + The users configuration files full restoration are completed. + A felhasználók beállításfájljainak teljes visszaállítása kész. + + + + The users configuration files restoration are completed. + A felhasználók beállításfájljainak visszaállítása kész. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + A számítógép újraindításához nyomd meg az 'Enter' billentyűt, vagy kilépéshez a 'Q'-t. + + + + Press 'ENTER' key to quit. + A kilépéshez nyomd meg az 'ENTER' billentyűt. + + + + An error occurred while changing the access permissions of the following file: + Az alábbi fájl hozzáférési jogosultságainak módosítása közben hiba történt: + + + + + Cannot start the Systemback scheduler daemon! + A Systemback ütemező démon nem indult el! + + + + + Missing, wrong or too much argument(s). + Hiányzó, hibás vagy túl sok argumentum. + + + + The process is disabled for this user. + A folyamat le lett tiltva ennél a felhasználónál. + + + + Root privileges are required. + Root jogosultság szükséges. + + + + This system is a Live. + Ez a rendszer egy Live. + + + + Already running. + Már fut egy példányban. + + + + Unable to daemonize. + Nem sikerült démonizálni. + + + + Cannot start the Systemback graphical user interface! + A Systemback grafikus felülete nem indult el! + + + + Unable to get root permissions. + Nem sikerült root jogosultságot szerezni. + + + + Unable to connect to the X server. + Nem sikerült az X szerverhez csatlakozni. + + + + Unsafe X Window authorization! + Nem biztonságos X Window hitelesítés! + + + + Please do not use 'sudo' command. + Kérlek, ne használd a 'sudo' parancsot. + + + diff --git a/lang/systemback_id.ts b/lang/systemback_id.ts new file mode 100644 index 0000000..cb657cc --- /dev/null +++ b/lang/systemback_id.ts @@ -0,0 +1,1898 @@ + + + + + systemback + + + Full name of the new user: + Nama lengkap untuk pengguna baru: + + + + New username to login: + Nama pengguna baru untuk masuk: + + + + New user account password: + Sandi untuk akun baru: + + + + New root password (optional, not recommended for Ubuntu): + Sandi baru root (opsional, tidak disarankan untuk Ubuntu): + + + + New hostname: + Hostname yang baru: + + + + + + + + + + + + + + + + Back + Kembali + + + + + + + + Next + Berikutnya + + + + + Working directory + Direktori kerja + + + + Created Live images + Menciptakan Live images + + + + Name of the Live system + Nama untuk system Live-nya + + + + + + + + Options + Pilihan + + + + Write target + Tulis target + + + + Live operations + Operasi Live + + + + Include the user data files + Masukkan berkas data-data pengguna + + + + Redetect devices + Mendeteksi ulang perangkat + + + + + + Delete + Hapus + + + + Write to target + Menulis ke tujuan + + + + Convert to ISO + Konversi ke ISO + + + + + + Create new + Buat baru + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Kaitkan partisi sistem yang cacat ke direktori '/mnt' menurut sususan aslinya.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + + + Mount + Kaitkan + + + + Reset mounts + Ulangi mengaitkan + + + + Repair type + Tipe perbaikan + + + + GRUB 2 repair + Perbaikan GRUB 2 + + + + System files repair + Perbaikan berkas sistem + + + + + Reinstall GRUB 2 bootloader: + Pasang ulang bootloader GRUB 2: + + + + + Auto detection + Deteksi otomatis + + + + Full repair + Perbaikan penuh + + + + Do not repair the fstab file + Jangan perbaiki berkas fstab + + + + Exclude hidden user files and directories from restore points + Kecualikan berkas pengguna yang tersembunyi dan direktori-direktori yang berasal dari restore point + + + + Exclude user data files and directories from Live system + Kecualikan berkas data-data pengguna dan direktori yang berasal dari sistem Live + + + + Excluded items + Item-item yang dikecualikan + + + + + Remove item from the exclusion list + Hapus item dari daftar pengecualian + + + + + Add item to the exclusion list + Tambah item kedaftar pengecualian + + + + Scheduler state: + Keadaan penjadwalan: + + + + + + + + + + + + + + Disabled + Tidak berfungsi + + + + Timer settings + Pengaturan waktu + + + + Waiting time before creating a new restore point: + Waktu tunggu sebelum pembuatan restore point yang baru: + + + + Visible countdown time: + Munculkan waktu hitung mundur: + + + + Pop-up window position on screen: + Posisi kemunculan jendela pada layar: + + + + Use silent mode + Gunakan mode senyap + + + + + + + More + Lagi + + + + + + + Less + Kurang + + + + Simple system backup and restore application with extra features + sistem backup yang mudah dan aplikasi pemulihan dengan fitur tambahan + + + + Project homepage: + Homepage proyek: + + + + Contact: + Kontak: + + + + Donate: + Donasi: + + + + Systemback version: + Versi Sytemback: + + + + + License + Lisensi + + + + Re-read directories + Baca ulang direktori + + + + Writable Linux filesystem! + Filesystem Linux yang dapat ditulisi! + + + + + + + Cancel + Batal + + + + + + + + + + + Maximum number of temporary restore points + Jumlah maksimal titik pemulihan sementara + + + + + Include + + + + + + + + + + + + + + + + + + + empty + kosong + + + + + + + + + + + not used + tidak digunakan + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + + + Restore points + Titik pemulihan + + + + Highlighted restore points + Titik pemulihan yang ditandai + + + + Point operations + Titik operasi + + + + Highlight + Tanda + + + + Rename + Ubah nama + + + + + + + + + + + + + + + + + + Select restore point + Pilih titik pemulihan + + + + + + + + + Storage directory + Direktori penampungan + + + + Function menu + Menu fungsi + + + + + + System restore + Pemulihan sistem + + + + + + + System copy + Duplikasi sistem + + + + + System install + Pemasangan sistem + + + + + + + Live system create + Membuat Live system + + + + + System repair + Perbaikan sistem + + + + System upgrade + Pembaharuan sistem + + + + + Exclude + Pengecualian + + + + + Schedule + Penjadwalan + + + + Excludable items + + + + + + + About + Tentang + + + + + Settings + Pengaturan + + + + Change path + Ubah jalur + + + + Restore type + Tipe pemulihan + + + + + + + + + Full restore + Pemulihan penuh + + + + + + + + + System files restore + Pemulihan file-file sistem + + + + User(s) configuration files restore + Pemulihan berkas-berkas konfigurasi pengguna + + + + + Keep newly installed configuration files + Tetapkan berkas konfigurasi yang baru terpasang + + + + Include user(s): + Masukkan pengguna: + + + + Do not restore the fstab file + Jangan memulihkan berkas fstab + + + + Partition settings + Pengaturan partisi + + + + + + + + Transfer user configuration files + Transfer konfigurasi berkas-berkas pengguna + + + + Copy user data files + Duplikat berkas-berkas data pengguna + + + + Install GRUB 2 bootloader: + Pasang bootloader GRUB 2: + + + + + + Format + Format + + + + + + Reset partitions settings + Kembalikan pengaturan partisi + + + + + + + + + + Unmount + Lepaskan kaitan + + + + Change partition settings + Ubah pengaturan partisi + + + + Filesystem: + Filesystem: + + + + Mount point: + Titik kait: + + + + + + + + + ! Delete ! + ! Hapus ! + + + + Add new partition + Tambah partisi baru + + + + Create new: + Buat baru: + + + + Need to set the mount point as '/boot/efi'! + Perlu untuk menempatkan titik kait sebagai '/boot/efi'! + + + + Window DPI scaling + Skala jendela DPI + + + + Multiplier factor for scaling the window contents + Faktor pengali untuk penyekalaan isi-isi jendela + + + + User interface + Antarmuka pengguna + + + + Window always on top + Jendela selalu diatas + + + + System + Sistem + + + + Disable scheduler daemon starting for the following users: + Mencegah mulainya daemon terjadwal untuk pengguna berikut: + + + + Use XZ compressor for squashfs filesystems + Gunakan kompresi XZ untuk sistemfile squashfs + + + + Override auto-detected language: + Mencegah deteksi bahasa secara otomatis: + + + + Override the used style: + Mencegah gunakan gaya: + + + + Disable incremental restore points (do not use hard links between backups) + Nonaktifkan penambahan file cadangan (jangan gunakan hardlink ketika mencadangkan) + + + + Create Live ISO images automatically (faster than the conversion) + Membuat file Live ISO secara otomatis (lebih cepat daripada penggantian) + + + + Do not empty memory cache at the end of some processes + + + + + Includable items + + + + + Included items + + + + + ! Interrupt ! + ! Interupsi ! + + + + Creates a scheduled restore point within few seconds. + Buat sebuah jadwal titik pemulihan dalam hitungan detik. + + + + + + Start + Mulai + + + + Later + Nanti + + + + Systemback user authentication + Otentikasi pengguna Systemback + + + + Administrator: + Administrator: + + + + Password: + Sandi: + + + + + + scheduler + Penjadwalan + + + + Upgrading the system + Memperbaharui sistem + + + + + Partition + Partisi + + + + + Size + Ukuran + + + + Label + Label + + + + Current mount point + Titik kait yang sekarang + + + + New mount point + Titik kait yang baru + + + + Filesystem + Filesystem + + + + Device + Perangkat + + + + + Top left + Kiri atas + + + + + + Top right + Kanan atas + + + + + + Center + Tengah + + + + + + Bottom left + Kiri bawah + + + + + Bottom right + Kanan bawah + + + + + + day(s) + hari + + + + + + hour(s) + jam + + + + + + + + minute(s) + menit + + + + + + seconds + detik + + + + + + + Everyone + Semua orang + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + + + Boot system installer + + + + + + + + + + Transfer user configuration and data files + Transfer konfigurasi pengguna dan berkas-berkas data + + + + + + Currently running system + Sistem yang sedang berjalan + + + + + Creating restore point + Membuat titik pemulihan + + + + + Restoring the full system + Memulihkan sistem secara penuh + + + + + Restoring the system files + Memulihkan berkas-berkas sistem + + + + Restoring the user(s) configuration files + Memulihkan berkas-berkas konfigurasi + + + + Repairing the system files + Memperbaiki berkas-berkas sistem + + + + Repairing the full system + Memperbaiki sistem menyeluruh + + + + Copying the system + Menduplikat sistem + + + + Installing the system + Memasang sistem + + + + Creating Live system + Membuat system Live + + + + + process + proses + + + + Converting Live system image + Mengkonversi bekas sistem Live + + + + Writing Live image to the target device + Sedang membuat Live image ke device tujuan + + + + + Deleting restore point + Menghapus titik pemulihan + + + + Deleting old restore point + Menghapus titik pemulihan yang lama + + + + + Deleting incomplete restore point + Menghapus titik pemulihan yang tak sempurna + + + + + Flushing filesystem buffers + + + + + + + + + + Reboot + Muat ulang + + + + + + + X restart + Ulang X + + + + Repairing the GRUB 2 + Memperbaiki GRUB 2 + + + + + Emptying cache + Mengosongkan cache + + + + + An another Systemback process is currently running, please wait until it finishes. + Proses Systemback yang lain sedang berjalan, mohon ditunggu sampai selesai. + + + + + Unable to get exclusive lock! + Tidak mampu untuk mendapatkan kunci ekslusif! + + + + + First, close all package manager. + Pertama, tutuplah semua manajer paket. + + + + The specified name contain(s) unsupported character(s)! + Nama yang dispesifik mengandung karakter-karakter yang tidak didukung! + + + + Please enter a new name. + Silahkan masukkan nama baru. + + + + Restore the system files to the following restore point: + Pulihkan berkas-berkas sistem kedalam titik kait: + + + + Repair the system files with the following restore point: + Perbaiki berkas-berkas sistem dengan titik pemulihan berikut: + + + + Repair the complete system with the following restore point: + Perbaiki sistem keseluruhan dengan menggunakan titik kait berikut: + + + + Restore the complete user(s) configuration files to the following restore point: + Pulihkan berkas-berkas konfigurasi secara keseluruhan dari para pengguna kedalam titik kait berikut: + + + + Restore the user(s) configuration files to the following restore point: + Pulihkan berkas-berkas konfigurasi pengguna kedalam titik kait berikut: + + + + The user(s) configuration files full restoration are completed. + Pemulihan menyeluruh berkas-berkas konfigurasi pengguna sudah selesai. + + + + + The X server will restart automatically within 30 seconds. + X server akan memulai ulang secara otomatis dalam 30 detik. + + + + The user(s) configuration files restoration are completed. + Pemulihan berkas-berkas pengguna sudah selesai. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Perbaikan berkas sistem sudah selesai, akan tetapi ada kesalahan muncul ketika melakukan pemasangan ulang GRUB! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + Sistem mungkin tidak bisa dimuat! (Umumnya, perbedaan arsitektur yang menjadi penyebabnya.) + + + + The full system repair is completed. + Perbaikan sistem menyeluruh sudah selesai. + + + + The system repair is completed. + Perbaikan sistem telah selesai. + + + + Copy the system, using the following restore point: + Duplikasi sistem, menggunakan titik pulih berikut: + + + + Install the system, using the following restore point: + Pasang sistem, menggunakan titik pulih berikut: + + + + + + + The restore point creation is aborted! + Pembuatan titik pemulihan digagalkan! + + + + + + Not enough free disk space to complete the process. + Tidak cukup ruang tersisa untuk melanjutkan proses. + + + + + Root privileges are required for running the Systemback! + Hak akses root diperlukan untuk menjalankan Systemback! + + + + Restore the complete system to the following restore point: + Pulihkan keseluruhan sistem kedalam titik pulih berikut: + + + + + The system files restoration are completed. + Pemulihan berkas sistem sudah selesai. + + + + + + The computer will restart automatically within 30 seconds. + Komputer akan menyala ulang secara otomatis dalam 30 detik. + + + + + The full system restoration is completed. + Pemulihan sistem menyeluruh sudah selesai. + + + + + + + + The system copy is aborted! + Duplikasi sistem digagalkan! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + Partisi yang dispesifik tidak mempunyai cukup ruang sisa untuk menduplikasi sistem. Sistem yang terduplikasi tidak akan berfungsi dengan baik. + + + + The system copy is completed, but an error occurred while installing the GRUB! + Duplikasi sistem sudah selesa, akan tetapi ada kesalahan yang muncul ketika memasang GRUB! + + + + + You need to manually install a bootloader. + Perlu untuk melakuakan pemasangan bootloader secara manual. + + + + + The system restoration is aborted! + Pemulihan sistem digagalkan! + + + + An error occurred while reinstalling the GRUB. + Kesalahan muncul ketika pemasangan ulang GRUB. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Perbaikan sistem menyeluruh sudah selesai, akan tetapi ada kesalahan ketika melakukan pemasangan ulang GRUB! + + + + The system copy is completed. + Duplikasi sistem sudah selesai. + + + + + + + + The Live system creation is aborted! + Pembuatan sistem Live digagalkan! + + + + An error occurred while creating the file system image. + Kesalahan terjadi ketika membuat berkas image sistem. + + + + An error occurred while creating the container file. + Kesalahan terjadi ketika pembuatan berkas penampung. + + + + The Live system creation is completed. + Pembuatan system Live sudah selesai. + + + + The created .sblive file can be written to pendrive. + Pembuatan berkas .sblive tidak bisa dituliskan pada USB. + + + + Format the %1, and write the following Live system image: + Format %1, dan tulis kedalam image Live sistem berikut: + + + + + + The specified partition could not be mounted. + Partisi yang dispesifik tidak dapat dikaitkan. + + + + The GRUB 2 repair is completed. + Perbaikan GRUB 2 selesai. + + + + The system install is completed. + Pemasangan sistem telah selesai. + + + + The system install is completed, but an error occurred while installing the GRUB! + Pemasangan sistem selesai, akan tetapi ada kesalahan ketika pemasangan GRUB! + + + + + + + + The system installation is aborted! + Pemasangan sistem digagalkan! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + Partisi yang dispesifik tidak mempunyai cukup ruang sisa untuk menduplikasi sistem. Sistem yang terduplikasi tidak akan berfungsi dengan baik. + + + + + + The specified partition could not be formatted (in use or unavailable). + Partisi yang dispesifik tidak dapat diformat (sedang digunakan atau tidak tersedia). + + + + An error occurred while reinstalling the GRUB! + Kesalahan terjadi ketika melakukan pemasangan ulang GRUB! + + + + + + + + + + There has been critical changes in the file system during this operation. + Ada perubahan yang penting dalam sistem berkas ketika proses operasi berjalan. + + + + Repair the GRUB 2 bootloader. + Memperbaiki bootloader GRUB 2. + + + + + + + + The Live write is aborted! + Penulisan Live digagalkan! + + + + The selected device does not have enough space to write the Live system. + Tujuan yang dipilih tidak memiliki cukup ruang untuk membuat sistem Live. + + + + An error occurred while unpacking the Live system files. + Kesalahan terjadi ketika pembongkaran berkas sistem Live. + + + + The Live system image write is completed. + Penulisan berkas sistem Live sudah selesai. + + + + + + + The Live conversion is aborted! + Konversi Live digagalkan! + + + + An error occurred while renaming the essential Live files. + Kesalahan terjadi ketika merubah nama berkas penting dalam sistem Live. + + + + An error occurred while creating the .iso image. + Kesalahan muncul ketika pembuatan berkas .iso. + + + + An error occurred while reading the .sblive image. + Kesalahan muncul ketika pembacaan berkas .sblive. + + + + An error occurred while creating the new initramfs image. + Kesalahan muncul ketika pembuatan berkas initramfs baru. + + + + + The restore point deletion is aborted! + Penghapusan titik kait digagalkan! + + + + + An error occurred while during the process. + Kesalahan muncul ketika dalam proses. + + + + + + The Live image could not be mounted. + Berkas Live tidak dapat dikaitkan. + + + + + The system repair is aborted! + Perbaikan sistem digagalkan! + + + + + There is not enough free space. + Tak ada cukup ruang sisa. + + + + + + Live image + Image Live + + + + + + + + Multiple mount points + Pengali titik kait + + + + Enabled + Diaktifkan + + + + Interrupting the current process + Menggagalkan proses yang sedang berjalan + + + + Systemback worker thread is interrupted by the user. + Rangkain kerja systemback diinterupsi pengguna. + + + + Boot Live without xorg.conf file + Boot Live tanpa berkas xorg.conf + + + + + + Boot Live system + Boot sistem Live + + + + + + Boot Live in safe graphics mode + Boot Live dalam mode grafis aman + + + + + + Boot Live in debug mode + Boot Live dalam mode debug + + + + Press 'E' key to edit + Tekan 'E' untuk mengubah + + + + Press TAB key to edit + Tekan TAB untuk mengubah + + + + + + + + + + + (Y/N) + (Y/T) + + + + The specified storage directory path has not been set! + Jalur penampungan direktori yg spesifik belum ditetapkan! + + + + The restoration is aborted! + Pemulihan digagalkan! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Pemulihan berhasil, akan tetapi mengalami kesalahan ketika melakukan pemasangan ulang GRUB! + + + + The restore points storage directory is not available or not writable! + Direktori penampungan untuk titik pulih tidak tersedia atau tidak dapat ditulisi! + + + + This stupid terminal does not support color! + Terminal yang konyol ini tidak mendukung pewarnaan! + + + + This terminal is too small! + Terminal ini terlalu kecil! + + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + + + + + An error occurred while opening the following file: + + + + + An error occurred while creating the following directory: + + + + + An error occurred while removing the following file: + + + + + An error occurred while creating the following hard link: + + + + + Reference file: + + + + + An error occurred while creating the following file: + + + + + An error occurred while renaming the following item: + + + + + New path: + + + + + An error occurred while executing the following command: + + + + + Exit code: + + + + + Failed to detect the device for installing the GRUB! + + + + + An error occurred while upgrading the system! + Ada kesalahan proses ketika memperbarui sistem! + + + + Restart upgrade ... + Ulangi pembaruan ... + + + + This file could not be copied because it does not exist: + + + + + The following partition has no UUID: + + + + + An error occurred while creating a new partition on the following device: + + + + + An error occurred while mounting the following partition/image: + + + + + An error occurred while setting one or more flags on the following partition: + + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + + + + + An error occurred while unmounting the following partition/image/mount point: + + + + + An error occurred while cloning the properties of the following item: + + + + + Target item: + + + + + An error occurred while cloning the following symbolic link: + + + + + Target symlink: + + + + + An error occurred while cloning the following file: + + + + + Target file: + + + + + An error occurred while cloning the following directory: + + + + + Target directory: + + + + + An error occurred while deleting the following directory: + + + + + basic restore UI + pemulihan dasar UI + + + + Available restore point(s): + Titik pulih yang tersedia: + + + + Quit + Hentikan + + + + Selected restore point: + Titik pulih yang dipilih: + + + + The specified storage directory path is set. + Direktori penampungan yang spesifik telah ditetapkan. + + + + Deleting old restore point(s) + Menghapus titik pulih yang lama + + + + Restore with the following restore point: + Pulihkan dengan titik pulih berikut: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Penggunaan: systemback-cli + + Opsi: + + -n, --newbackup membuat sebuah titik pulih + + -s, --storagedir <path> mendapatkan atau menetapkan lokasi direktori titik + pulih + + -u, --upgrade memperbaharui sistem yang berjalan + hapus paket dan berkas yang tidak diperlukan + + -v, --version menampilkan keluaran nomor versi dari Systemback + + -h, --help tunjukkan pesan bantuan ini + + + + The Systemback command line interface cannot be used on a Live system! + + + + + Restore with the following restore method: + Pulihkan dengan metode pemulihan berikut: + + + + Users configuration files restore + Pemulihan konfigurasi berkas-berkas pengguna + + + + + Complete configuration files restore + Pemulihan secara lengkap berkas-berkas konfigurasi + + + + Configuration files restore + Pemulihan berkas-berkas konfigurasi + + + + + + You want to keep the current fstab file? + Apakah anda ingin menyimpan berkas fstab yang sekarang? + + + + + + + Reinstall the GRUB 2 bootloader? + Pasang ulang bootloader GRUB 2? + + + + Start the restore? + Mulai pemulihan? + + + + Restoring the users configuration files + Memulihkan berkas-berkas konfigurasi pengguna + + + + The users configuration files full restoration are completed. + Pemulihan secara utuh berkas-berkas konfigurasi pengguna telah selesai. + + + + The users configuration files restoration are completed. + Pemulihan berkas-berkas konfigurasi pengguna telah selesai. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Tekan tombol 'ENTER' untuk menyalakan ulang komputer, atau 'Q' untuk berhenti. + + + + Press 'ENTER' key to quit. + Tekan tombol 'ENTER' untuk berhenti. + + + + An error occurred while changing the access permissions of the following file: + + + + + + Cannot start the Systemback scheduler daemon! + Tidak mampu memulai penjadwalan daemon Systemback! + + + + + Missing, wrong or too much argument(s). + Hilang, salah atau terlalu banyak argumen. + + + + The process is disabled for this user. + Proses ini terlarang untuk pengguna sekarang. + + + + Root privileges are required. + Hak akses root diperlukan. + + + + This system is a Live. + Sistem ini adalah Live. + + + + Already running. + Sudah berjalan. + + + + Unable to daemonize. + Tidak mampu untuk menghanguskan. + + + + Cannot start the Systemback graphical user interface! + Tidak dapat memulai antar muka grafis Systemback! + + + + Unable to get root permissions. + Tidak mampu memperoleh hak akses root. + + + + Unable to connect to the X server. + Tidak mampu terhubung dengan X server. + + + + Unsafe X Window authorization! + Otorisasi X Window yang tidak aman! + + + + Please do not use 'sudo' command. + Mohon jangan menggunakan perintah 'sudo'. + + + diff --git a/lang/systemback_ko.ts b/lang/systemback_ko.ts new file mode 100644 index 0000000..675b361 --- /dev/null +++ b/lang/systemback_ko.ts @@ -0,0 +1,1290 @@ + + + + + systemback + + Full name of the new user: + 사용자 이름: + + + New username to login: + 로그인 사용자명: + + + New user account password: + 계정 비밀번호: + + + New root password (optional, not recommended for Ubuntu): + root 비밀번호(옵션, 우분투는 추천하지 않음): + + + New hostname: + 호스트명: + + + Back + 이전 + + + Next + 다음 + + + Working directory + 작업 디렉토리 + + + Created Live images + 라이브 이미지를 생성했습니다 + + + Name of the Live system + 라이브 시스템 이름 + + + Options + 옵션 + + + Write target + 저장 디렉토리 + + + Live operations + 라이브 명령들 + + + Include the user data files + 사용자 데이터 포함 + + + Redetect devices + 장치 다시 탐색 + + + Delete + 삭제 + + + Write to target + 디렉토리에 쓰기 + + + Convert to ISO + ISO 로 변환하기 + + + Create new + 새 이미지 생성 + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + 원본 구조대로 /mnt 디렉토리에 결함이 있는 시스템 파티션을 마운트 합니다.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + Mount + 마운트 + + + Reset mounts + 마운트 초기화 + + + Repair type + type 복구 + + + GRUB 2 repair + GRUB 2 복구 + + + System files repair + 시스템 파일 복구 + + + Reinstall GRUB 2 bootloader: + GRUB 2 부트로더 재 설치 + + + Auto detection + 자동 감지 + + + Full repair + 전체 복구 + + + Do not repair the fstab file + fstab 파일을 복구하지 않습니다. + + + Exclude hidden user files and directories from restore points + 복원 지점에서 숨김 파일과 디렉토리를 제외합니다. + + + Exclude user data files and directories from Live system + 라이브 시스템에서 사용자 데이터와 디렉토리를 제외합니다 + + + Excluded items + 제외한 항목들 + + + Remove item from the exclusion list + 예외 목록에서 항목 제거 + + + Add item to the exclusion list + 예외 목록에 항목 추가 + + + Scheduler state: + 예약 작업 상태: + + + Disabled + 선택하지않음 + + + Timer settings + 타이머 설정 + + + Waiting time before creating a new restore point: + 새 복원 포인트 생성 전 대기 시간: + + + Visible countdown time: + 진행 시간 보이기: + + + Pop-up window position on screen: + 화면의 팝업창 위치: + + + Use silent mode + silent 모드 사용 + + + More + 더보기 + + + Less + 감추기 + + + Simple system backup and restore application with extra features + 다양한 기능을 제공하는 시스템 백업 및 복구 프로그램 + + + Project homepage: + 프로젝트 홈페이지: + + + Contact: + 연락처: + + + Donate: + 후원: + + + Systemback version: + Systemback 버전: + + + License + Licence + + + Re-read directories + 디렉토리 다시 읽기 + + + Writable Linux filesystem! + 쓰기 가능한 파일 시스템 + + + Cancel + 취소 + + + Maximum number of temporary restore points + 복원 지점의 최대 수 + + + empty + 비어있음 + + + not used + 사용안함 + + + Restore points + 복원 지점 + + + Highlighted restore points + 중요 표시한 복원 지점 + + + Point operations + 주요 명령어 + + + Highlight + 중요 표시 + + + Rename + 이름 바꾸기 + + + Select restore point + 복원 지점 선택 + + + Storage directory + 결과물 저장 디렉토리 + + + Function menu + 기능 메뉴 + + + System restore + 시스템 복원 + + + System copy + 시스템 복사 + + + System install + 시스템 설치 + + + Live system create + 라이브 시스템 생성 + + + System repair + 시스템 복구 + + + System upgrade + 시스템 업그레이드 + + + Exclude + 예외 + + + Schedule + 예약작업 + + + About + 정보 + + + Settings + 설정 + + + Change path + 경로 변경 + + + Restore type + type 복원 + + + Full restore + 전체 복원 + + + System files restore + 시스템 파일 복원 + + + User(s) configuration files restore + 사용자 설정 파일 복원 + + + Keep newly installed configuration files + 새로 설치한 설정 파일들을 유지 + + + Include user(s): + 포함할 사용자: + + + Do not restore the fstab file + fatab 파일을 복원 하지 않음 + + + Partition settings + 파티션 설정 + + + Transfer user configuration files + 사용자 설정 전송 + + + Copy user data files + 사용자 데이터 복사 + + + Install GRUB 2 bootloader: + GRUB 2 부트로더 설치: + + + Format + 포맷 + + + Reset partitions settings + 파티션 설정 초기화 + + + Unmount + 마운트 해제 + + + Change partition settings + 파티션 설정 변경 + + + Filesystem: + 파일시스템: + + + Mount point: + 마운트 지점: + + + ! Delete ! + ! 삭제 ! + + + Add new partition + 새 파티션 추가 + + + Create new: + 새로 생성: + + + Need to set the mount point as '/boot/efi'! + '/boot/efi'를 마운트 지점으로 설정해야 합니다.! + + + Window DPI scaling + 창 확대(DPI scaling) + + + Multiplier factor for scaling the window contents + 화면 크기 조정을 위한 배율 + + + User interface + 사용자 인터페이스 + + + Window always on top + 항상 최상위에 보이기 + + + System + 시스템 + + + Disable scheduler daemon starting for the following users: + 예약 작업을 제한할 사용자: + + + Use XZ compressor for squashfs filesystems + squashfs 파일시스템 XZ 압축 사용 + + + Override auto-detected language: + 자동 탐지된 언어 재설정: + + + Override the used style: + 사용중인 스타일 재설정: + + + Disable incremental restore points (do not use hard links between backups) + 증분 복원 비활성화(백업에 하드링크를 사용하지 않음) + + + Create Live ISO images automatically (faster than the conversion) + 라이브 ISO 이미지를 자동으로 생성 (변환보다 빠름) + + + Do not empty memory cache at the end of some processes + 동일 프로세스 종료 시 메모리 캐시를 비우지 않음 + + + ! Interrupt ! + ! 작업 중단 ! + + + Creates a scheduled restore point within few seconds. + 몇 초 내에 예약 된 복원 지점을 만듭니다. + + + Start + 시작 + + + Later + 나중에 + + + Systemback user authentication + 프로그램 사용자 인증 + + + Administrator: + 시스템 관리자: + + + Password: + 비밀번호: + + + scheduler + 스케쥴러 + + + Upgrading the system + 시스템 업그레이드 + + + Partition + 파티션 + + + Size + 크기 + + + Label + 레이블 + + + Current mount point + 현재 마운트 지점 + + + New mount point + 새 마운트 지점 + + + Filesystem + 파일시스템 + + + Device + 장치 + + + Top left + 왼쪽 상단 + + + Top right + 오른쪽 상단 + + + Center + 가운데 + + + Bottom left + 왼쪽 하단 + + + Bottom right + 오른쪽 하단 + + + day(s) + + + + hour(s) + + + + minute(s) + + + + seconds + + + + Everyone + 누구나 + + + Transfer user configuration and data files + 사용자 설정 및 데이터 전송 + + + Currently running system + 현재 구동중인 시스템 + + + Creating restore point + 복원 지점 생성 + + + Restoring the full system + 전체 시스템 복원 + + + Restoring the system files + 시스템 파일 복원 + + + Restoring the user(s) configuration files + 사용자 설정 파일 복원 + + + Repairing the system files + 시스템 파일 복구 + + + Repairing the full system + 전체 시스템 복구 + + + Copying the system + 시스템 복사 + + + Installing the system + 시스템 설치 + + + Creating Live system + 라이브 시스템 생성 + + + process + 프로세스 + + + Writing Live image to the target device + 저장 디렉토리에 라이브 이미지 쓰기 + + + Converting Live system image + 라이브 시스템 이미지 변환 + + + Deleting restore point + 복원 지점 삭제 + + + Deleting old restore point + 오래된 복원 지점 삭제 + + + Deleting incomplete restore point + 완료되지 않은 복원 지점 삭제 + + + Emptying cache + 캐시 비우기 + + + Flushing filesystem buffers + 파일시스템 버퍼 비우기 + + + Reboot + 재시작 + + + X restart + 윈도우 재시작 + + + Repairing the GRUB 2 + GRUB 2 복구 + + + Restore the system files to the following restore point: + 다음 복원 지점을 사용하여 시스템 파일을 복원합니다: + + + Repair the system files with the following restore point: + 다음 복원 지점을 사용하여 시스템 파일을 복구합니다: + + + Repair the complete system with the following restore point: + 다음 복원 지점을 사용하여 완전한 시스템을 복구합니다: + + + Restore the complete user(s) configuration files to the following restore point: + 다음 복원 지점을 사용하여 완전한 사용자 설정을 복원합니다: + + + Restore the user(s) configuration files to the following restore point: + 다음 복원 지점을 사용하여 사용자 설정을 복원합니다: + + + Copy the system, using the following restore point: + 다음 복원 지점을 사용하여 시스템을 복사합니다: + + + Install the system, using the following restore point: + 다음 복원 지점을 사용하여 시스템을 설치합니다: + + + Restore the complete system to the following restore point: + 다음 복원 지점을 사용하여 완전한 시스템을 복원합니다: + + + Format the %1, and write the following Live system image: + %1 포멧 후 다음 라이브 시스템 이미지를 사용: + + + Repair the GRUB 2 bootloader. + GRUB 2 부트로더 재설치. + + + The user(s) configuration files full restoration are completed. + 사용자 설정 파일의 전체 복원이 완료되었습니다. + + + The X server will restart automatically within 30 seconds. + 30초후에 윈도우가 자동으로 재시작 됩니다. + + + The user(s) configuration files restoration are completed. + 사용자 설정 파일의 복원이 완료되었습니다. + + + The full system repair is completed. + 전체 시스템 복구가 완료되었습니다. + + + The system repair is completed. + 시스템 복구가 완료되었습니다. + + + The system files restoration are completed. + 시스템 파일 복원이 완료되었습니다. + + + The computer will restart automatically within 30 seconds. + 30초후 시스템이 재시작됩니다. + + + The full system restoration is completed. + 전체 시스템 복원이 완료되었습니다. + + + The system copy is completed. + 시스템 복사가 완료되었습니다. + + + The Live system creation is completed. + 라이브 시스템 생성이 완료되었습니다. + + + The created .sblive file can be written to pendrive. + USB에 작성할 수 있는 .sblive 파일이 생성되었습니다. + + + The GRUB 2 repair is completed. + GRUB 2 부트로더 복구가 완료되었습니다. + + + The system install is completed. + 시스템 설치가 완료되었습니다. + + + The Live system image write is completed. + 라이브 시스템 작성이 완료되었습니다. + + + An another Systemback process is currently running, please wait until it finishes. + 다른 systemback 프로세스가 현재 동작중입니다. 프로세스가 종료될 때까지 기다려 주세요. + + + Unable to get exclusive lock! + + + + First, close all package manager. + 먼저 모든 패키지 관리자를 종료하세요. + + + The specified name contain(s) unsupported character(s)! + 지정한 이름에 지원되지 않는 문자가 있습니다. + + + Please enter a new name. + 새 이름을 입력하세요. + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + 시스템 복구가 완료되었지만 부트로더 GRUB 2 재설치를 하는 동안 오류가 발생하였습니다. + + + The system may not bootable! (In general, the different architecture is causing the problem.) + 시스템이 부팅되지 않을 수 있습니다! (일반적으로 다른 아키텍처로 인해 문제가 발생합니다.) + + + The restore point creation is aborted! + 복구 지점 생성이 중단되었습니다. + + + Not enough free disk space to complete the process. + 디스크 용량 부족으로 프로세스를 완료할 수 없습니다. + + + Root privileges are required for running the Systemback! + 프로그램 구동을 위해 root 권한이 필요합니다. + + + The system copy is aborted! + 시스템 복사가 중단되었습니다. + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + 지정된 파티션에 시스템을 복사할 충분한 여유 공간이 없습니다. 복사된 시스템이 제대로 작동하지 않습니다. + + + The system copy is completed, but an error occurred while installing the GRUB! + 시스템 복사가 완료되었지만 부트로더 GRUB 설치를 하는 동안 오류가 발생하였습니다. + + + You need to manually install a bootloader. + 부트로더를 수동으로 설치해야 합니다. + + + The system restoration is aborted! + 시스템 복원이 중단되었습니다. + + + An error occurred while reinstalling the GRUB. + 부트로더 재설치 도중 오류가 발생하였습니다. + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + 전체 시스템 복구가 완료되었지만 부트로더 GRUB 2 재설치를 하는 동안 오류가 발생하였습니다. + + + The Live system creation is aborted! + 라이브 시스템 생성이 중단되었습니다. + + + An error occurred while creating the file system image. + 파일시스템 이미지 생성 중 오류가 발생하였습니다. + + + An error occurred while creating the container file. + 컨테이너 파일을 만드는 동안 오류가 발생했습니다. + + + The specified partition could not be mounted. + 지정한 파티션을 마운트 할 수 없습니다. + + + The system install is completed, but an error occurred while installing the GRUB! + 시스템 설치가 완료되었지만 부트로더를 설치하는 동안 오류가 발생하였습니다. + + + The system installation is aborted! + 시스템 설치가 중단되었습니다. + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + 지정된 파티션에 시스템을 설치할 충분한 여유 공간이 없습니다. 시스템이 제대로 작동하지 않습니다. + + + The specified partition could not be formatted (in use or unavailable). + 지정한 파티션을 마운트 할 수 없습니다.(사용 중이거나 존재하지 않음) + + + An error occurred while reinstalling the GRUB! + 부트로더 재설치 도중 오류가 발생하였습니다. + + + There has been critical changes in the file system during this operation. + 이 작업 중에 파일 시스템에 중요한 변경이있었습니다. + + + The Live write is aborted! + 라이브 시스템 작성이 중단되었습니다. + + + The selected device does not have enough space to write the Live system. + 선택한 드라이브에 라이브 시스템을 생성할 충분한 공간이 없습니다. + + + An error occurred while unpacking the Live system files. + 라이브 시스템 파일을 해제하는 동안 오류가 발생하였습니다. + + + The Live conversion is aborted! + 라이브 시스템 변환이 중단되었습니다. + + + An error occurred while renaming the essential Live files. + 필요한 라이브 시스템 파일들의 이름을 변경하는 도중 오류가 발생하였습니다. + + + An error occurred while creating the .iso image. + ISO 이미지를 생성하는 도중 오류가 발생하였습니다. + + + An error occurred while reading the .sblive image. + 라이브 시스템 이미지를 읽는 도중 오류가 발생하였습니다. + + + An error occurred while creating the new initramfs image. + 새 부팅 이미지 initramfs 생성 도중 오류가 발생하였습니다. + + + The restore point deletion is aborted! + 복원 지점 삭제가 중단되었습니다. + + + An error occurred while during the process. + 프로세스 실행 도중 오류가 발생하였습니다. + + + The Live image could not be mounted. + 라이브 이미지를 마운트 할 수 없습니다. + + + The system repair is aborted! + 시스템 복구가 중단되었습니다. + + + There is not enough free space. + 충분한 공간이 없습니다. + + + Live image + 라이브 이미지 + + + Multiple mount points + 마운트 지점들 + + + Enabled + 활성화됨 + + + Interrupting the current process + 현재 프로세스 중단 + + + Systemback worker thread is interrupted by the user. + 사용자에 의해 프로세스가 중단되었습니다. + + + Boot Live without xorg.conf file + xorg.conf 파일 없이 라이브 부팅 + + + Boot Live system + 라이브 시스템 부팅 + + + Boot Live in safe graphics mode + 안전 그래픽 모드로 라이브 부팅 + + + Boot Live in debug mode + 디버그 모드로 라이브 부팅 + + + Press 'E' key to edit + 수정하려면 'E' 키를 누르세요 + + + Press TAB key to edit + 수정하려면 TAB 키를 누르세요 + + + (Y/N) + (예/아니오) + + + The specified storage directory path has not been set! + 저장할 디렉토리 경로가 설정되지 않았습니다! + + + The restoration is aborted! + 복원이 중단되었습니다. + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + 복원이 완료되었지만 부트로더 GRUB 2 재설치를 하는 동안 오류가 발생하였습니다. + + + The restore points storage directory is not available or not writable! + 복원 지점이 저장된 디렉토리가 존재하지 않거나 쓰기 권한이 없습니다. + + + This stupid terminal does not support color! + This stupid terminal does not support colour! + + + This terminal is too small! + 터미널이 너무 작습니다 + + + An error occurred while upgrading the system! + 시스템 업그레이드 도중 오류가 발생하였습니다. + + + Restart upgrade ... + 업그레이드를 다시 시작합니다. + + + basic restore UI + 기본 복원 화면 + + + Available restore point(s): + 존재하는 복원 지점 + + + Quit + 종료 + + + Selected restore point: + 선택한 복원 지점: + + + The specified storage directory path is set. + 저장할 디렉토리 경로가 설정되지 않았습니다. + + + Deleting old restore point(s) + 오래된 복원 지점을 삭제합니다. + + + Restore with the following restore point: + 복원할 복원 지점: + + + Restore with the following restore method: + 복원에 사용할 복원 방법: + + + Users configuration files restore + 사용자 설정 파일 복원 + + + Complete configuration files restore + 설정 파일 복원이 완료되었습니다. + + + Configuration files restore + 설정 파일 복원 + + + You want to keep the current fstab file? + 현재의 fstab 파일을 그대로 유지하시겠습니까? + + + Reinstall the GRUB 2 bootloader? + GRUB 2 부트로더를 다시 설치하시겠습니까? + + + Start the restore? + 복원을 시작하시겠습니까? + + + Restoring the users configuration files + 사용자 설정 파일을 복원합니다. + + + The users configuration files full restoration are completed. + 사용자 설정 파일의 전체 복원이 완료되었습니다. + + + The users configuration files restoration are completed. + 사용자 설정 파일의 복원이 완료되었습니다. + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + 시스템 재시작을 위해서 ENTER 키를 누르거나 Q 를 눌러서 프로그램을 종료하세요. + + + Press 'ENTER' key to quit. + ENTER 키를 누르면 종료됩니다. + + + An error occurred while changing the access permissions of the following file: + 접근 권한을 변경하는 도중 중 오류가 발생한 파일: + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + + + + An error occurred while opening the following file: + 파일을 여는 도중 오류가 발생한 파일: + + + An error occurred while creating the following directory: + 디렉토리 생성 도중 오류가 발생한 디렉토리: + + + An error occurred while removing the following file: + 삭제 도중 오류가 발생한 파일: + + + An error occurred while creating the following hard link: + 하드 링크 생성 중 오류가 발생한 링크: + + + Reference file: + 참조 파일: + + + An error occurred while creating the following file: + 파일 생성 도중 오류가 발생한 파일: + + + An error occurred while renaming the following item: + 이름 변경 도중 오류가 발생한 항목: + + + New path: + 새 경로: + + + An error occurred while executing the following command: + 실행 도중 오류가 발생한 명령어: + + + Exit code: + 종료 코드: + + + Failed to detect the device for installing the GRUB! + 부트로더를 설치할 장치를 찾을 수 없습니다. + + + This file could not be copied because it does not exist: + 복사할 수 없는 파일(존재하지 않음): + + + The following partition has no UUID: + UUID 가 존재하지 않는 파티션: + + + An error occurred while creating a new partition on the following device: + 파티션 생성 도중 오류가 발생한 장치: + + + An error occurred while mounting the following partition/image: + 마운트 도중 오류가 발생한 파티션 또는 이미지: + + + An error occurred while creating the partition table on the following device: + 파티션 테이블 생성 도중 오류가 발생한 장치: + + + An error occurred while unmounting the following partition/image/mount point: + 마운트 해제 도중 오류가 발생한 파티션/이미지/마운트 지점: + + + An error occurred while cloning the properties of the following item: + 등록정보 복제 도중 오류가 발생한 항목: + + + Target item: + 대상 항목: + + + An error occurred while cloning the following symbolic link: + 심볼릭 링크 복제 도중 오류가 발생한 링크: + + + Target symlink: + 대상 심볼릭 링크: + + + An error occurred while cloning the following file: + 복제 도중 오류가 발생한 파일: + + + Target file: + 대상 파일: + + + An error occurred while cloning the following directory: + 복제 도중 오류가 발생한 디렉토리: + + + Target directory: + 대상 디렉토리: + + + An error occurred while deleting the following directory: + 삭제 도중 오류가 발생한 디렉토리: + + + Cannot start the Systemback scheduler daemon! + 예약작업을 위한 스케쥴러를 시작할 수 없습니다. + + + Missing, wrong or too much argument(s). + 인수가 없거나 잘못되었거나 너무 많습니다. + + + The process is disabled for this user. + 이 사용자에 대해 이 프로세스는 비활성화되었습니다. + + + Root privileges are required. + root 권한이 필요합니다. + + + This system is a Live. + 이 시스템은 라이브 시스템입니다. + + + Already running. + 이미 구동되고 있습니다. + + + Unable to daemonize. + Unable to daemonise. + + + Cannot start the Systemback graphical user interface! + GUI 모드를 시작할 수 없습니다. + + + Unable to get root permissions. + root 권한을 사용할 수 없습니다. + + + Unable to connect to the X server. + X 서버에 접속할 수 없습니다. + + + Unsafe X Window authorization! + Unsafe X Window authorisation! + + + Please do not use 'sudo' command. + sudo 명령어를 사용하지 마세요. + + + An error occurred while setting one or more flags on the following partition: + 하나 이상의 플래그를 설정하는 동안 오류가 발생한 파티션: + + + Flag(s): + 플래그: + + + Boot system installer + 시스템 설치프로그램 부팅 + + + Include + 포함 + + + The Systemback command line interface cannot be used on a Live system! + 라이브 시스템에서는 CLI를 사용할 수 없습니다. + + + Included items + 포함된 항목 + + + Excludable items + 제외 가능한 항목 + + + Includable items + 포함 가능한 항목 + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + 복원 지점에 사용자 데이터 파일 및 디렉터리 포함 +복원 가능한 구성 파일로 정의됩니다! + + + The specified debug level is invalid! + 지정한 디버그 레벨이 존재하지 않습니다. + + + The default level (1) will be used. + 기본 레벨 (1)을 사용합니다. + + + Version: + 버전: + + + Compilation date and time: + 수정 일시: + + + Installed files: + 설치된 파일: + + + Operating system: + 운영체제: + + + Mounted filesystems: + 마운트 된 파일시스템: + + + System language: + 시스템 언어: + + + Translation: + 번역: + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + 현재 진행중인 패키지 인덱스 파일의 재 동기화가 완료 될 때까지 기다리십시오. + + + diff --git a/lang/systemback_pt_BR.ts b/lang/systemback_pt_BR.ts new file mode 100644 index 0000000..e5b6fb8 --- /dev/null +++ b/lang/systemback_pt_BR.ts @@ -0,0 +1,1898 @@ + + + + + systemback + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + + + + + An error occurred while opening the following file: + + + + + An error occurred while creating the following directory: + + + + + An error occurred while removing the following file: + + + + + An error occurred while creating the following hard link: + + + + + Reference file: + + + + + An error occurred while creating the following file: + + + + + An error occurred while renaming the following item: + + + + + New path: + + + + + An error occurred while executing the following command: + + + + + Exit code: + + + + + Failed to detect the device for installing the GRUB! + + + + + An error occurred while upgrading the system! + Ocorreu um erro durante a atualização do sistema! + + + + Restart upgrade ... + Reinicie a atualização ... + + + + This file could not be copied because it does not exist: + + + + + The following partition has no UUID: + + + + + An error occurred while creating a new partition on the following device: + + + + + An error occurred while mounting the following partition/image: + + + + + An error occurred while setting one or more flags on the following partition: + + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + + + + + An error occurred while unmounting the following partition/image/mount point: + + + + + An error occurred while cloning the properties of the following item: + + + + + Target item: + + + + + An error occurred while cloning the following symbolic link: + + + + + Target symlink: + + + + + An error occurred while cloning the following file: + + + + + Target file: + + + + + An error occurred while cloning the following directory: + + + + + Target directory: + + + + + An error occurred while deleting the following directory: + + + + + + Cannot start the Systemback scheduler daemon! + + + + + + Missing, wrong or too much argument(s). + + + + + The process is disabled for this user. + + + + + Root privileges are required. + + + + + This system is a Live. + Este sistema é um Live. + + + + Already running. + + + + + Unable to daemonize. + + + + + Cannot start the Systemback graphical user interface! + Não foi possível iniciar a interface gráfica do Systemback! + + + + Unable to get root permissions. + Incapaz de obter permissões de root. + + + + Unable to connect to the X server. + Incapaz de se conectar ao servidor X. + + + + Full name of the new user: + Nome completo do novo usuário: + + + + New username to login: + Novo nome de usuário para logar: + + + + New user account password: + Nova senha da conta de usuário: + + + + New root password (optional, not recommended for Ubuntu): + Nova senha do root (opcional, não recomendado para o Ubuntu): + + + + New hostname: + Novo nome da máquina: + + + + + + + + + + + + + + + + Back + Voltar + + + + + + + + Next + Próximo + + + + + Working directory + Diretório de trabalho + + + + Created Live images + Imagens Live criadas + + + + Name of the Live system + Nome do sistema Live + + + + + + + + Options + Opções + + + + Write target + Escrever no alvo + + + + Live operations + Operações Live + + + + Include the user data files + Incluir arquivos de dados do usuário + + + + Redetect devices + Redetectar dispositivos + + + + + + Delete + Excluir + + + + Write to target + + + + + Convert to ISO + Converter para ISO + + + + + + Create new + Criar nova + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Monte a(s) partição(ões) do sistema defeituoso para o diretório '/mnt' de acordo com a estrutura original. ('/' -> '/mnt', '/home' -> '/mnt /home', etc.) + + + + + Mount + Montar + + + + Reset mounts + Redefinição de montagens + + + + Repair type + Tipo de reparo + + + + GRUB 2 repair + reparo do GRUB 2 + + + + System files repair + Reparar o sistema de arquivos + + + + + Reinstall GRUB 2 bootloader: + Reinstalar o carregador de boot GRUB 2: + + + + + Auto detection + Detecção automática + + + + Full repair + Reparação completa + + + + Do not repair the fstab file + Não reparar o arquivo fstab + + + + Exclude hidden user files and directories from restore points + Excluir arquivos e diretórios ocultos do usuário a partir de pontos de restauração + + + + Exclude user data files and directories from Live system + Excluir arquivo de dados de usuário do sistema Live + + + + Excludable items + + + + + Excluded items + Itens excluídos + + + + + Remove item from the exclusion list + Retirar item da lista de exclusão + + + + + Add item to the exclusion list + Adicionar item a lista de exclusão + + + + Scheduler state: + Estado do agendador: + + + + + + + + + + + + + + Disabled + Desabilitado + + + + Timer settings + Definições de tempo + + + + Waiting time before creating a new restore point: + Tempo de espera antes de criar um novo ponto de restauração: + + + + Visible countdown time: + Contagem regressiva visível: + + + + Pop-up window position on screen: + Posição do pop-up na tela: + + + + Use silent mode + Usar modo silencioso + + + + + + + More + Mais + + + + + + + Less + Menos + + + + Simple system backup and restore application with extra features + Sistema de backup simples e restauração de aplicativos com recursos extras + + + + Project homepage: + Página do projeto: + + + + Contact: + Contato: + + + + Donate: + Doações: + + + + Systemback version: + Versão do Systemback: + + + + + License + Licença + + + + Re-read directories + Reler diretórios + + + + Writable Linux filesystem! + Sistema de arquivos Linux gravável! + + + + + + + Cancel + Cancelar + + + + + + + + + + + Maximum number of temporary restore points + Número máximo de pontos de restaurações temporários + + + + Restore points + Pontos de restauranção + + + + Highlighted restore points + Pontos destaque + + + + Point operations + Ponto de operações + + + + Highlight + Destacar + + + + Rename + Renomear + + + + + + + + + + + + + + + + + + Select restore point + Selecionar ponto de restauração + + + + + + + + + Storage directory + Diretório de armazenamento + + + + Function menu + Menu de funções + + + + + Schedule + Agendamento + + + + + + About + Sobre + + + + + Settings + Configurações + + + + System upgrade + Atualização do sistema + + + + + System install + Instalação do sistema + + + + + + + Live system create + Criar sistema Live + + + + + System repair + Reparo do sistema + + + + + + System restore + Restauração do sistema + + + + + + + System copy + Cópia do sistema + + + + + Exclude + Ignorar + + + + + Include + Incluir + + + + Change path + Alterar caminho + + + + + + + + + + + + + + + + + + empty + vazio + + + + + + + + + + + not used + não utilizado + + + + Restore type + Tipo de restauração + + + + + + + + + Full restore + Restauração completa + + + + + + + + + System files restore + Arquivos de restauração do sistema + + + + User(s) configuration files restore + Restaurar os arquivos de configuração dos usuário(s) + + + + + Keep newly installed configuration files + Manter os arquivos de configuração recém-instalados + + + + Include user(s): + Incluir usuário(s): + + + + Do not restore the fstab file + Impossível restaurar arquivo fstab + + + + Partition settings + Configurações da partição + + + + + + + + Transfer user configuration files + + + + + Copy user data files + Copiar arquivos de dados do usuário + + + + Install GRUB 2 bootloader: + Instalar o bootloader GRUB 2: + + + + + + Format + Formatar + + + + + + Reset partitions settings + Resetar as configurações da partição + + + + + + + + + + Unmount + Desmontar + + + + Change partition settings + Alterar as configurações da partição + + + + Filesystem: + Sistema de arquivos: + + + + Mount point: + Ponto de montagem: + + + + + + + + + ! Delete ! + + + + + Add new partition + Adicionar nova partição + + + + Create new: + Criar nova: + + + + Need to set the mount point as '/boot/efi'! + É preciso definir o ponto de montagem como '/boot/efi'! + + + + Window DPI scaling + + + + + Multiplier factor for scaling the window contents + + + + + User interface + + + + + Window always on top + + + + + System + Sistema + + + + Disable scheduler daemon starting for the following users: + + + + + Use XZ compressor for squashfs filesystems + + + + + Override auto-detected language: + + + + + Override the used style: + + + + + Disable incremental restore points (do not use hard links between backups) + + + + + Create Live ISO images automatically (faster than the conversion) + + + + + Do not empty memory cache at the end of some processes + + + + + Includable items + + + + + Included items + + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + + + ! Interrupt ! + ! Interromper ! + + + + Creates a scheduled restore point within few seconds. + Cria um ponto de restauração programada em poucos segundos. + + + + + + Start + Iniciar + + + + Later + Mais tarde + + + + Systemback user authentication + Autenticação do usuário Systemback + + + + Administrator: + Administrador: + + + + Password: + Palavra-passe: + + + + Unsafe X Window authorization! + + + + + Please do not use 'sudo' command. + Por favor não use o comando 'sudo'. + + + + + + + + + Transfer user configuration and data files + + + + + + + scheduler + programar + + + + + Partition + Partição + + + + + Size + + + + + Label + + + + + Current mount point + Ponto de montagem atual + + + + New mount point + Novo ponto de montagem + + + + Filesystem + Sistema de arquivos + + + + Device + Dispositivo + + + + + Top left + Superior esquerda + + + + + + Top right + Superior direita + + + + + + Center + Centro + + + + + + Bottom left + Inferior esquerda + + + + + Bottom right + Inferior direita + + + + + + day(s) + dia(s) + + + + + + hour(s) + hora(s) + + + + + + + + minute(s) + minuto(s) + + + + + + seconds + segundos + + + + + + + Everyone + + + + + + + Currently running system + Rodando atualmente o sistema + + + + + Emptying cache + Limpando o cache + + + + + Flushing filesystem buffers + + + + + + Restoring the full system + Restaurando o sistema completo + + + + + Restoring the system files + Restaurando os arquivos de sistema + + + + Restoring the user(s) configuration files + Restaurando os arquivos de configuração dos usuário(s) + + + + Repairing the system files + Reparando os arquivos de sistema + + + + Repairing the full system + Reparando o sistema completo + + + + Repairing the GRUB 2 + Reparando o GRUB 2 + + + + Copying the system + Copiando o sistema + + + + Installing the system + Instalando o sistema + + + + Writing Live image to the target device + + + + + Upgrading the system + Atualizando o sistema + + + + + Deleting incomplete restore point + Apagando o ponto de restauração imcompleto + + + + Interrupting the current process + + + + + Deleting old restore point + Excluindo ponto(s) de restauração antigo + + + + + Creating restore point + Criando ponto de restauração + + + + + Deleting restore point + Excluindo ponto de restauração + + + + Converting Live system image + Convertendo a imagem do sistema Live + + + + + process + + + + + Creating Live system + Criando sistema Live + + + + + + + + + Reboot + Reiniciar + + + + + + + X restart + Reiniciar o X + + + + + + Live image + Imagem Live + + + + Restore the system files to the following restore point: + Restaurar os arquivos de sistema para o seguinte ponto de restauração: + + + + Repair the system files with the following restore point: + Reparar os arquivos de sistema com o seguinte ponto de restauração: + + + + Repair the complete system with the following restore point: + O reparo completo do sistema foi realizado com o seguinte ponto de restauração: + + + + Restore the complete user(s) configuration files to the following restore point: + Restaurar todos arquivos de configuração dos usuário(s) para o seguinte ponto de restauração: + + + + Restore the user(s) configuration files to the following restore point: + Restaurar os arquivos de configuração dos usuário(s) para o seguinte ponto de restauração: + + + + Copy the system, using the following restore point: + Copie o sistema, usando o seguinte ponto de restauração: + + + + Install the system, using the following restore point: + Instalar o sistema, utilizando o seguinte ponto de restauração: + + + + Restore the complete system to the following restore point: + Restauração completa do sistema para o seguinte ponto de restauração: + + + + Format the %1, and write the following Live system image: + Formate o %1, e grave a imagem do sistema Live existente: + + + + Repair the GRUB 2 bootloader. + Recuperar o inicializador do GRUB2. + + + + The user(s) configuration files full restoration are completed. + A restauração completa dos arquivos de configuração dos usuário(s) está concluída. + + + + + The X server will restart automatically within 30 seconds. + O servidor X irá reiniciar automaticamente em 30 segundos. + + + + The user(s) configuration files restoration are completed. + A restauração dos arquivos de configuração dos usuário(s) foi completada. + + + + The full system repair is completed. + O reparo completo do sistema está concluído. + + + + The system repair is completed. + O reparo do sistema está concluído. + + + + + The system files restoration are completed. + Restauração dos arquivos de sistema foi concluída. + + + + + + The computer will restart automatically within 30 seconds. + O computador irá reiniciar automaticamente em 30 segundos. + + + + + The full system restoration is completed. + Restauração completa do sistema concluída. + + + + The system copy is completed. + A cópia do sistema está concluída. + + + + The Live system creation is completed. + Criação do sistema Live está concluída. + + + + The created .sblive file can be written to pendrive. + O arquivo criado em .sbLive, pode ser gravado no pendrive. + + + + The GRUB 2 repair is completed. + O reparo do GRUB 2 está finalizado. + + + + The system install is completed. + A instalação do sistema está completa. + + + + The Live system image write is completed. + A imagem do sistema Live foi gravada. + + + + + An another Systemback process is currently running, please wait until it finishes. + Outro processo Systemback está sendo executado, por favor aguarde até que ele termine. + + + + + Unable to get exclusive lock! + Não foi possível obter a trava exclusiva! + + + + + First, close all package manager. + Primeiro, feche todo o gerenciador de pacotes. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + The specified name contain(s) unsupported character(s)! + O nome especificado contém caractere(s) não suportáveis! + + + + Please enter a new name. + Por favor, entre com um novo nome. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + O reparo do arquivos de sistema está concluído, mas ocorreu um erro durante a reinstalação do GRUB! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + O sistema pode não iniciar! (Em geral, a causa do problema está na arquitetura diferente.) + + + + + + + The restore point creation is aborted! + A restauração do ponto de criação foi cancelada! + + + + + + Not enough free disk space to complete the process. + Não existe espaço livre em disco para completar o procedimento. + + + + + Root privileges are required for running the Systemback! + Privilégios de root são necessários para a execução do Systemback! + + + + + + + + The system copy is aborted! + + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + A partição espeficada não tem espaço livre suficiente para a cópia do sistema. O sistema copiado não irá funcionar perfeitamente. + + + + The system copy is completed, but an error occurred while installing the GRUB! + A cópia do sistema foi concluída, mas ocorreu um erro durante a instalação do GRUB! + + + + + You need to manually install a bootloader. + Necessária instalação manual de um bootloader. + + + + + The system restoration is aborted! + + + + + An error occurred while reinstalling the GRUB. + + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + O reparo completo do sistema foi concluído, mas ocorreu um erro durante a reinstalação do GRUB! + + + + + + + + The Live system creation is aborted! + + + + + An error occurred while creating the file system image. + + + + + An error occurred while creating the container file. + Ocorreu um erro ao criar o arquivo do conteúdo. + + + + + + The specified partition could not be mounted. + A partição especificada não pode ser montada. + + + + The system install is completed, but an error occurred while installing the GRUB! + A instalação do sistema está completa, mas ocorreu um erro durante a instalação do GRUB! + + + + + + + + The system installation is aborted! + Instalação do sistema abortada! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + A partição especificada não tem espaço livre suficiente para instalação do sistema. O sistema instalado não irá funcionar corretamente. + + + + + + The specified partition could not be formatted (in use or unavailable). + A partição especificada não pode ser formatada (em uso ou indisponível). + + + + An error occurred while reinstalling the GRUB! + Ocorreu um erro ao reinstalar o GRUB! + + + + + + + + + + There has been critical changes in the file system during this operation. + Houve mudanças críticas no sistema de arquivos durante esta operação. + + + + + + + + The Live write is aborted! + + + + + The selected device does not have enough space to write the Live system. + + + + + An error occurred while unpacking the Live system files. + Ocorreu um erro ao descompactar os arquivos desse sistema Live. + + + + + + + The Live conversion is aborted! + + + + + An error occurred while renaming the essential Live files. + Um erro ocorreu ao renomear os arquivos essenciais do Live. + + + + An error occurred while creating the .iso image. + Um erro ocorreu ao criar a imagem .iso. + + + + An error occurred while reading the .sblive image. + Um erro ocorreu ao ler a imagem .sblive. + + + + An error occurred while creating the new initramfs image. + + + + + + The restore point deletion is aborted! + + + + + + An error occurred while during the process. + + + + + + + The Live image could not be mounted. + + + + + + The system repair is aborted! + + + + + + There is not enough free space. + + + + + + + + + Multiple mount points + + + + + Enabled + Habilitado + + + + Systemback worker thread is interrupted by the user. + + + + + Boot Live without xorg.conf file + Iniciar Live sem arquivo xorg.conf + + + + + + Boot Live system + Iniciar sistema Live + + + + + + Boot system installer + + + + + + + Boot Live in safe graphics mode + Iniciar Live em modo grafico seguro + + + + + + Boot Live in debug mode + Iniciar Live no modo de depuracao + + + + Press 'E' key to edit + Pressione a tecla 'E' para editar + + + + Press TAB key to edit + Pressione a tecla TAB para editar + + + + An error occurred while changing the access permissions of the following file: + + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Uso: systemback-cli [opção] + + Opção: + + -n, --newback Cria um novo ponto de restauração + + -s, --storagedir <path> Obter ou definir o caminho do ponto de + restauração no diretório de armazenamento + + -u, --upgrade Atualiza o sistema atual + Remover arquivos desnecessários e pacotes + + -v, --version Exibe a versão do Systemback + + -h, --help Mostra esta ajuda + + + + basic restore UI + + + + + The Systemback command line interface cannot be used on a Live system! + + + + + This stupid terminal does not support color! + + + + + This terminal is too small! + + + + + The specified storage directory path has not been set! + O caminho do diretório de armazenamento especificado não está definido! + + + + The restoration is aborted! + Restauração abortada! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + A restauração está concluída, mas ocorreu um erro ao reinstalar GRUB! + + + + The restore points storage directory is not available or not writable! + O diretório de armazenamento que contém os pontos de recuperação, não está disponível ou não pode ser escrito! + + + + Available restore point(s): + Ponto de recuperação disponível: + + + + Quit + Sair + + + + Selected restore point: + Selecionar ponto de restauração: + + + + The specified storage directory path is set. + O caminho do diretório de armazenamento especificado está definido. + + + + Restore with the following restore point: + Restaure com o seguinte ponto de restauração: + + + + Restore with the following restore method: + Restaure com o seguinte método de restauração: + + + + Users configuration files restore + Restaurar os arquivos de configuração dos usuários + + + + + Complete configuration files restore + Restauração completa dos arquivos de configuração + + + + Configuration files restore + Restaura arquivos de configuração + + + + + + You want to keep the current fstab file? + Você deseja manter o arquivo atual do fstab? + + + + + + + + + + + (Y/N) + (S/N) + + + + + + + Reinstall the GRUB 2 bootloader? + Reinstalar o gerenciador de inicialização GRUB2? + + + + Start the restore? + Iniciar a restauração? + + + + The users configuration files full restoration are completed. + A restauração completa dos arquivos de configuração dos usuário está concluída. + + + + The users configuration files restoration are completed. + A restauração dos arquivos de configuração dos usuários foi completada. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Pressione a tecla 'ENTER' para reiniciar o computador, ou 'Q' para sair. + + + + Press 'ENTER' key to quit. + + + + + Deleting old restore point(s) + Apagando pontos de restauração antigos + + + + Restoring the users configuration files + Restaurando os arquivos de configuração dos usuários + + + diff --git a/lang/systemback_ro.ts b/lang/systemback_ro.ts new file mode 100644 index 0000000..8e89482 --- /dev/null +++ b/lang/systemback_ro.ts @@ -0,0 +1,1898 @@ + + + + + systemback + + + The specified debug level is invalid! + Nivelul de depanare specificat este invalid! + + + + The default level (1) will be used. + Nivelul implicit (1) va fi folosit. + + + + Version: + Versiunea: + + + + Compilation date and time: + Data de compilare: + + + + + Installed files: + Fișiere instalate: + + + + Operating system: + Sistem de operare: + + + + + Mounted filesystems: + Sisteme de fișiere montate: + + + + System language: + Limba sistemului: + + + + Translation: + Traducere: + + + + An error occurred while opening the following file: + Eroare la deschiderea următorului fișier: + + + + An error occurred while creating the following directory: + Eroare la crearea dosarului următor: + + + + An error occurred while removing the following file: + Eroare la eliminarea următorul fișier: + + + + An error occurred while creating the following hard link: + Eroare la crearea link-ul hard următor: + + + + Reference file: + Fișier de referință: + + + + An error occurred while creating the following file: + Eroare la crearea următorului fișier: + + + + An error occurred while renaming the following item: + Eroare la redenumirea elementului următor: + + + + New path: + Cale nou: + + + + An error occurred while executing the following command: + Eroare în timpul executării comanda următoare: + + + + Exit code: + Codul de ieșire: + + + + Failed to detect the device for installing the GRUB! + Nu a reușit să detecteze dispozitivul pentru instalare GRUB! + + + + An error occurred while upgrading the system! + Eroare la actualizarea sistemului! + + + + Restart upgrade ... + Reporniți actualizarea ... + + + + This file could not be copied because it does not exist: + Acest fișier nu există, imposibil de copiat: + + + + The following partition has no UUID: + Partiția nu are UUID: + + + + An error occurred while creating a new partition on the following device: + Eroare la crearea partiției nou pe următorul dispozitiv: + + + + An error occurred while mounting the following partition/image: + A apărut o eroare la montarea următoarului partiție/imagine: + + + + An error occurred while setting one or more flags on the following partition: + Eroare în timpul setării una sau mai multe steaguri pe următoarea partiție: + + + + Flag(s): + Steag(uri): + + + + An error occurred while creating the partition table on the following device: + Eroare la crearea tablei de partiții pe următorul dispozitiv: + + + + An error occurred while unmounting the following partition/image/mount point: + Eroare la demontarea următorului partiție/imagine/punct de montare: + + + + An error occurred while cloning the properties of the following item: + Eroare la clonarea proprietățile următorului element: + + + + Target item: + Element țintă: + + + + An error occurred while cloning the following symbolic link: + Eroare la clonarea următorului link simbolic: + + + + Target symlink: + Țintă symlink: + + + + An error occurred while cloning the following file: + Eroare la clonarea următorului fișier: + + + + Target file: + Fișier țintă: + + + + An error occurred while cloning the following directory: + Eroare la clonarea următorului dosar: + + + + Target directory: + Dosar țintă: + + + + An error occurred while deleting the following directory: + Eroare la ștergerea următorul dosar: + + + + + Cannot start the Systemback scheduler daemon! + Nu pot porni demonul planificator! + + + + + Missing, wrong or too much argument(s). + Lipsa, greșit sau prea multe argument(e). + + + + The process is disabled for this user. + Procesul a fost dezactivat pentru acest utilizator. + + + + Root privileges are required. + Sunt necesare privilegii de root. + + + + This system is a Live. + Acest sistem este un Live. + + + + Already running. + În funcțiune. + + + + Unable to daemonize. + Demonizare imposibilă. + + + + Cannot start the Systemback graphical user interface! + Interfață grafică nu a pornit! + + + + Unable to get root permissions. + Nu se poate obține permisiuni de root. + + + + Unable to connect to the X server. + Nu se poate conecta la serverul X. + + + + Full name of the new user: + Numele complet al noului utilizator: + + + + New username to login: + Noul nume de utilizator pentru autentificare: + + + + New user account password: + Parola pentru contul noului utilizator: + + + + New root password (optional, not recommended for Ubuntu): + Noua parolă de root (opțional, nu este recomandată pentru Ubuntu): + + + + New hostname: + Nume nou pentru sistemul gazdă: + + + + + + + + + + + + + + + + Back + Înapoi + + + + + + + + Next + Înainte + + + + + Working directory + Dosar de lucru + + + + Created Live images + Imagini Live create + + + + Name of the Live system + Numele sistemului Live + + + + + + + + Options + Opțiuni + + + + Write target + Destinație scriere + + + + Live operations + operațiuni Live + + + + Include the user data files + Include fișiere de date ale utilizatorului + + + + Redetect devices + Redetectare dispozitive + + + + + + Delete + Șterge + + + + Write to target + Scrie pe dispozitiv + + + + Convert to ISO + Conversie în format ISO + + + + + + Create new + Creare nou + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Montează partițiile sistemului defect sub dosarul '/mnt', în conformitate cu structura inițială.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + + + Mount + Montează + + + + Reset mounts + Resetare mounts + + + + Repair type + Tipul de reparație + + + + GRUB 2 repair + Reparare GRUB 2 + + + + System files repair + Repararea fișierelor de sistem + + + + + Reinstall GRUB 2 bootloader: + Reinstalare încărcător de sisteme GRUB 2: + + + + + Auto detection + Detectare automată + + + + Full repair + Reparare totală + + + + Do not repair the fstab file + Nu repara fișierul fstab + + + + Exclude hidden user files and directories from restore points + Exclude fișierele și dosarele ascunse ale utilizatorului din punctele de restabilire + + + + Exclude user data files and directories from Live system + Exclude fișierele de date și dosarele ale utilizatorului din sistemul Live + + + + Excludable items + Elemente de exclus + + + + Excluded items + Elemente excluse + + + + + Remove item from the exclusion list + Înlăturare elemente din lista de excludere + + + + + Add item to the exclusion list + Adaugă element la lista de excludere + + + + Scheduler state: + Stare programări: + + + + + + + + + + + + + + Disabled + Dezactivat + + + + Timer settings + Setări temporizator + + + + Waiting time before creating a new restore point: + Timp de așteptare înainte de a crea un nou punct de restaurare: + + + + Visible countdown time: + Numărătorul invers vizibil: + + + + Pop-up window position on screen: + Poziția ferestrei Pop-up pe ecran: + + + + Use silent mode + Modul silențios activat + + + + + + + More + Mai mult + + + + + + + Less + Mai puțin + + + + Simple system backup and restore application with extra features + O aplicație simplă pentru crearea de copii de siguranță și restabilirea acestora, cu caracteristici supl + + + + Project homepage: + Pagina web a proiectului: + + + + Contact: + Contact: + + + + Donate: + Donație: + + + + Systemback version: + Versiune Systemback: + + + + + License + Licență + + + + Re-read directories + Recitirea dosarelor + + + + Writable Linux filesystem! + Sistem de fișiere Linux cu drepturi de scriere! + + + + + + + Cancel + Renunță + + + + + + + + + + + Maximum number of temporary restore points + Numărul maxim al punctelor de restabilire temporare + + + + Restore points + Puncte de restaurare + + + + Highlighted restore points + Puncte de restaurare evidențiate + + + + Point operations + Operațiuni cu puncte + + + + Highlight + Evidențiere + + + + Rename + Redenumire + + + + + + + + + + + + + + + + + + Select restore point + Selectează punctul de restaurare + + + + + + + + + Storage directory + Dosarul de salvare + + + + Function menu + Funcție meniu + + + + + Schedule + Programare + + + + + + About + Despre aplicație + + + + + Settings + Setări + + + + System upgrade + Actualizare sistem + + + + + System install + Instalare sistem + + + + + + + Live system create + Creare sistem Live + + + + + System repair + Reparare sistem + + + + + + System restore + Restaurare sistem + + + + + + + System copy + Copiere sistem + + + + + Exclude + Excludere + + + + + Include + Include + + + + Change path + Schimbare cale + + + + + + + + + + + + + + + + + + empty + gol + + + + + + + + + + + not used + neutilizat + + + + Restore type + Tipul de restaurare + + + + + + + + + Full restore + Restaurare completă + + + + + + + + + System files restore + Restaurare fișiere sistem + + + + User(s) configuration files restore + Restaurare fișiere de configurare ale utilizatorului + + + + + Keep newly installed configuration files + Păstrează fișierele de configurare nou instalate + + + + Include user(s): + Include utilizator(i): + + + + Do not restore the fstab file + Nu restaurează fișierul fstab + + + + Partition settings + Configurări partiție + + + + + + + + Transfer user configuration files + Transferul fișierelor de configurare ale utilizatorului + + + + Copy user data files + Copiază fișiere de date ale utilizatorilor + + + + Install GRUB 2 bootloader: + Instalare încărcător de sistem GRUB 2: + + + + + + Format + Formatare + + + + + + Reset partitions settings + Anulează setările partiției + + + + + + + + + + Unmount + Demontează + + + + Change partition settings + Modificarea setărilor partiției + + + + Filesystem: + Sistem de fișiere: + + + + Mount point: + Punct de montare: + + + + + + + + + ! Delete ! + ! Șterge ! + + + + Add new partition + Adăugare partiție nouă + + + + Create new: + Creare nou: + + + + Need to set the mount point as '/boot/efi'! + Trebuie setat punctul de montare ca '/boot/efi'! + + + + Window DPI scaling + Scalarea DPI a ferestrei + + + + Multiplier factor for scaling the window contents + Factor de multiplicare pentru scalarea conținutului al ferestrei + + + + User interface + Interfață utilizator + + + + Window always on top + Fereastră mereu deasupra + + + + System + Sistem + + + + Disable scheduler daemon starting for the following users: + Dezactivare demonul planificator pentru următoarele utilizatorii: + + + + Use XZ compressor for squashfs filesystems + Utilizare XZ compresor pentru sisteme de fișiere SquashFS + + + + Override auto-detected language: + Înlocuire limba autodetectată: + + + + Override the used style: + Înlocuire stilul folosit: + + + + Disable incremental restore points (do not use hard links between backups) + Dezactivare puncte de restaurare incrementale (fără legături directe între puncte de restaurare) + + + + Create Live ISO images automatically (faster than the conversion) + Creare automată a unui Live ISO (mai repede decât conversia) + + + + Do not empty memory cache at the end of some processes + Nu goli memoria cache la sfârșitul unor procese + + + + Includable items + Elemente de introdus + + + + Included items + Elemente incluse + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + Include fișiere de date ale utilizatorului în punctele de restaurare +Acestea vor fi definite ca fișiere de configurare pentru restaurare! + + + + ! Interrupt ! + ! Întrerupe ! + + + + Creates a scheduled restore point within few seconds. + Crează un punct de restaurare programat în câteva secunde. + + + + + + Start + Pornește + + + + Later + Mai târziu + + + + Systemback user authentication + Autentificare utilizator Systemback + + + + Administrator: + Administrator: + + + + Password: + Parolă: + + + + Unsafe X Window authorization! + Autentificare X Window nu este sigur! + + + + Please do not use 'sudo' command. + Va rog să nu folosiți comanda 'sudo'. + + + + + + + + + Transfer user configuration and data files + Transferul fișierelor de configurare și de date ale utilizatorului + + + + + + scheduler + Programator + + + + + Partition + Partiție + + + + + Size + Dimensiune + + + + Label + Label + + + + Current mount point + Punctul actual de montare + + + + New mount point + Punct nou de montare + + + + Filesystem + Sistem de fișiere + + + + Device + Dispozitiv + + + + + Top left + Stânga sus + + + + + + Top right + Dreapta sus + + + + + + Center + În centru + + + + + + Bottom left + Stânga jos + + + + + Bottom right + Dreapta jos + + + + + + day(s) + zi(le) + + + + + + hour(s) + oră(e) + + + + + + + + minute(s) + minut(e) + + + + + + seconds + secunde + + + + + + + Everyone + Toți + + + + + + Currently running system + În prezent sistemul rulează + + + + + Emptying cache + Golire cache + + + + + Flushing filesystem buffers + Golire bufferul sistemului de fișiere + + + + + Restoring the full system + Restaurare sistem complet + + + + + Restoring the system files + Restaurare fișiere sistem + + + + Restoring the user(s) configuration files + Restaurare fișiere de configurare ale utilizatorilor + + + + Repairing the system files + Reparare fișiere de sistem + + + + Repairing the full system + Reparare sistem complet + + + + Repairing the GRUB 2 + Reparare GRUB 2 + + + + Copying the system + Copiere sistem + + + + Installing the system + Instalare sistem + + + + Writing Live image to the target device + Scrierea imagini Live la dispozitivul țintă + + + + Upgrading the system + Actualizare sistem + + + + + Deleting incomplete restore point + Ștergere punct de restaurare incomplet + + + + Interrupting the current process + Întreruperea procesului actual + + + + Deleting old restore point + Ștergere punct vechi de restaurare + + + + + Creating restore point + Creare punct de restaurare + + + + + Deleting restore point + Ștergere punct de restaurare + + + + Converting Live system image + Conversare imagine sistem Live + + + + + process + proces + + + + Creating Live system + Creare sistem Live + + + + + + + + + Reboot + Repornire + + + + + + + X restart + Reporniți X + + + + + + Live image + Imagine Live + + + + Restore the system files to the following restore point: + Restabilire fișiere de sistem folosind următorul punct de restabilire: + + + + Repair the system files with the following restore point: + Reparare fișiere de sistem folsoind următorul punct de restabilire: + + + + Repair the complete system with the following restore point: + Reparare sistem complet folosind următorul punct de restabilire: + + + + Restore the complete user(s) configuration files to the following restore point: + Restabilire completă a fișierelor de configurare folosind următorul punct de restabilire: + + + + Restore the user(s) configuration files to the following restore point: + Restabilire fișiere de configurare ale utilizatorilor folosind următorul punct de restabilire: + + + + Copy the system, using the following restore point: + Copiază sistemul, folosind următorul punct de restabilire: + + + + Install the system, using the following restore point: + Instalează sistemul, folosind următorul punct de restabilire: + + + + Restore the complete system to the following restore point: + Restaurarea sistemului complet folosind următorul punct de restabilire: + + + + Format the %1, and write the following Live system image: + Formatați %1, și scrie următorul imagine de sistem Live: + + + + Repair the GRUB 2 bootloader. + Repararea încărcătorului de sisteme GRUB 2. + + + + The user(s) configuration files full restoration are completed. + Restabilirea completă a fișierelor de configurare este finalizată. + + + + + The X server will restart automatically within 30 seconds. + Serverul X repornește automat într-un interval de 30 de secunde. + + + + The user(s) configuration files restoration are completed. + Restabilirea fișierelor de configurare este finalizată. + + + + The full system repair is completed. + Repararea completă a sistemului este finalizată. + + + + The system repair is completed. + Repararea sistemului este finalizată. + + + + + The system files restoration are completed. + Restabilirea fișierelor de sistem este finalizată. + + + + + + The computer will restart automatically within 30 seconds. + Calculatorul va fi repornit automat în interval de 30 de secunde. + + + + + The full system restoration is completed. + Restabilirea sistemului complet este finalizată. + + + + The system copy is completed. + Copierea sistemului este finalizată. + + + + The Live system creation is completed. + Crearea sistemului Live este completă. + + + + The created .sblive file can be written to pendrive. + Fișierul .sblive creat se poate scrie la stick-ul de memorie. + + + + The GRUB 2 repair is completed. + Repararea GRUB 2 este finalizată. + + + + The system install is completed. + Instalarea sistemului este finalizată. + + + + The Live system image write is completed. + Scrierea este finalizată (imaginea sistemului Live). + + + + + An another Systemback process is currently running, please wait until it finishes. + Un alt proces Systemback se execută în prezent, vă rugăm să așteptați până când se termină. + + + + + Unable to get exclusive lock! + Blocarea exclusivă nu este posibilă! + + + + + First, close all package manager. + Închideți toate programele pentru administrare pachete. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + Resincronizare fișierelor la indexul pachetelor în curs de desfășurare, vă rog să așteptați până când se termină. + + + + The specified name contain(s) unsupported character(s)! + Numele specificat conține caracter(e) neacceptat(e)! + + + + Please enter a new name. + Vă rugăm să introduceți un nume nou. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Repararea fișierelor de sistem este finalizată, dar cu eroare la reinstalarea GRUB! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + Pornirea sistemului nu este garantată! (În general, problema este cauzată de diferența de arhitectură.) + + + + + + + The restore point creation is aborted! + Crearea punctului de restabilire este abandonată! + + + + + + Not enough free disk space to complete the process. + Nu este spațiu pentru terminarea procesului. + + + + + Root privileges are required for running the Systemback! + Pentru Systemback sunt necesare privilegii root! + + + + + + + + The system copy is aborted! + Copierea sistemului este abandonată! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + Partiția specificată nu are suficient spațiu liber pentru a copia sistemul. Sistemul copiat nu va funcționa corect. + + + + The system copy is completed, but an error occurred while installing the GRUB! + Copierea sistemului este finalizată, dar cu eroare la instalarea GRUB! + + + + + You need to manually install a bootloader. + Trebuie să instalați manual un încărcător de sisteme. + + + + + The system restoration is aborted! + Restabilirea sistemului este abandonată! + + + + An error occurred while reinstalling the GRUB. + Eroare la reinstalarea GRUB-ului. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Repararea completă a sistemului este finalizată, dar cu eroare la reinstalarea GRUB! + + + + + + + + The Live system creation is aborted! + Crearea sistemului Live este abandonată! + + + + An error occurred while creating the file system image. + Eroare la crearea imagini a sistemului de fișiere. + + + + An error occurred while creating the container file. + Eroare la crearea fișierului container. + + + + + + The specified partition could not be mounted. + Partiția specificată nu se poate monta. + + + + The system install is completed, but an error occurred while installing the GRUB! + Instalarea sistemului este terminată, dar cu eroare la instalarea GRUB-ului! Trebuie să instalați manual încărcătorul de sisteme! + + + + + + + + The system installation is aborted! + Instalarea sistemului este abandonată! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + Partițiile specificate nu au suficient spațiu liber pentru a instala sistemul. Sistemul instalat nu va funcționa corect. + + + + + + The specified partition could not be formatted (in use or unavailable). + Partiția specificată nu se poate formata (este în uz sau nu este disponibilă). + + + + An error occurred while reinstalling the GRUB! + Eroare la reinstalarea GRUB! + + + + + + + + + + There has been critical changes in the file system during this operation. + În sistemul de fișiere au fost schimbări critice in timpul operației. + + + + + + + + The Live write is aborted! + Scriere abandonată la Live! + + + + The selected device does not have enough space to write the Live system. + Dispozitivul selectat nu are suficient spațiu pentru scrierea sistemului Live. + + + + An error occurred while unpacking the Live system files. + Eroare la despachetarea fișiere de sistem Live. + + + + + + + The Live conversion is aborted! + Conversia (in Live) este abandonată! + + + + An error occurred while renaming the essential Live files. + Eroare la redenumirea fișierelor esențiale la Live. + + + + An error occurred while creating the .iso image. + Eroare în timpul creării imaginei .iso. + + + + An error occurred while reading the .sblive image. + Eroare în timpul citirii imaginei .sblive. + + + + An error occurred while creating the new initramfs image. + Eroare la crearea a noi imagini initramfs. + + + + + The restore point deletion is aborted! + Ștergerea punctului de restaurare abandonată! + + + + + An error occurred while during the process. + A apărut o eroare în timpul procesului. + + + + + + The Live image could not be mounted. + Imaginea Live nu este montabil. + + + + + The system repair is aborted! + Repararea sistemului este abandonată! + + + + + There is not enough free space. + Nu există suficient spațiu liber. + + + + + + + + Multiple mount points + Mai multe puncte de montare + + + + Enabled + Activat(ă) + + + + Systemback worker thread is interrupted by the user. + Firul de lucru Systemback este întreruptă de către utilizator. + + + + Boot Live without xorg.conf file + Pornire Live fara fisier xorg.conf + + + + + + Boot Live system + Pornire sistem Live + + + + + + Boot system installer + Pornire sistemul de instalare + + + + + + Boot Live in safe graphics mode + Pornire Live in modul de grafica redusa + + + + + + Boot Live in debug mode + Poenire Live în modul de depanare + + + + Press 'E' key to edit + Apăsați tasta 'E' pentru editare + + + + Press TAB key to edit + Apăsați tasta TAB pentru editare + + + + An error occurred while changing the access permissions of the following file: + Eroare la schimbarea permisiunile de acces ale următorului fișier: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Utilizare: systemback-cli [opțiune] + + Opțiuni: + + -n, --newbackup creare punct nou de restaurare + + -s, --storagedir <cale> setare cale a dosarului pentru punctul de restaurare + + -u, --upgrade upgrade sistem actual + șterge fișierele și pachetele inutile + + -v, --version numărul de versiune Systemback + + -h, --help arată ajutorul + + + + basic restore UI + interfață de bază + + + + The Systemback command line interface cannot be used on a Live system! + Pe sistemul Live nu este utilizabil interfața linie de comandă a programului! + + + + This stupid terminal does not support color! + Acest terminal prost nu suportă culorile! + + + + This terminal is too small! + Acest terminal este prea mic! + + + + The specified storage directory path has not been set! + Calea dosarului de salvare nu a fost setat! + + + + The restoration is aborted! + Restabilirea este abandonată! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Restabilirea este finalizată, dar cu eroare la reinstalare GRUB! + + + + The restore points storage directory is not available or not writable! + Dosarul de salvare nu este accesibil, sau nu este permis scrierea! + + + + Available restore point(s): + Punct(e) de restabilire accesibil(e): + + + + Quit + Închide + + + + Selected restore point: + Punct de restabilire selectat: + + + + The specified storage directory path is set. + Calea dosarului de salvare este setat. + + + + Restore with the following restore point: + Restabilirea se efectuează cu următorul punct de restabilire: + + + + Restore with the following restore method: + Restabilirea se efectuează cu metoda următoare: + + + + Users configuration files restore + Restabilire fișiere de configurare ale utilizatorilor + + + + + Complete configuration files restore + Restabilire completă a fișierelor de configurare + + + + Configuration files restore + Restabilire fișiere de configurare + + + + + + You want to keep the current fstab file? + Doriţi să păstrați fișierul fstab curent? + + + + + + + + + + + (Y/N) + (Y/N) + + + + + + + Reinstall the GRUB 2 bootloader? + Reinstalați încărcătorul de sisteme GRUB 2? + + + + Start the restore? + Începeți restabilirea? + + + + The users configuration files full restoration are completed. + Restabilirea completă a fișierelor de configurare este finalizată. + + + + The users configuration files restoration are completed. + Restabilirea fișierelor de configurare este finalizată. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Apasă pe 'ENTER' pentru reporníre, or 'Q' pentru închidere. + + + + Press 'ENTER' key to quit. + Apăsă pe 'ENTER' pentru a ieși. + + + + Deleting old restore point(s) + Ștergerea punctelor de restabilire vechi + + + + Restoring the users configuration files + Restabilire fișiere de configurare ale utilizatorilor + + + diff --git a/lang/systemback_ru.ts b/lang/systemback_ru.ts new file mode 100644 index 0000000..4f249bb --- /dev/null +++ b/lang/systemback_ru.ts @@ -0,0 +1,1898 @@ + + + + + systemback + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + + + + + An error occurred while opening the following file: + Произошла ошибка при открытии следующего файла: + + + + An error occurred while creating the following directory: + Произошла ошибка при создании следующего каталога: + + + + An error occurred while removing the following file: + Произошла ошибка при удалении следующего файла: + + + + An error occurred while creating the following hard link: + Произошла ошибка при создании следующей жесткой ссылки: + + + + Reference file: + Ссылка файла: + + + + An error occurred while creating the following file: + Произошла ошибка при создании следующего файла: + + + + An error occurred while renaming the following item: + + + + + New path: + Новый путь: + + + + An error occurred while executing the following command: + Произошла ошибка при выполнении следующей команды: + + + + Exit code: + Код выхода: + + + + Failed to detect the device for installing the GRUB! + Не удалось обнаружить устройство для установки GRUB! + + + + An error occurred while upgrading the system! + Произошла ошибка при обновлении системы! + + + + Restart upgrade ... + Перезапуск обновления ... + + + + This file could not be copied because it does not exist: + Этот файл не может быть скопирован, потому что не существует: + + + + The following partition has no UUID: + Этот раздел не имеет UUID: + + + + An error occurred while creating a new partition on the following device: + Произошла ошибка при создании нового раздела на следующем устройстве: + + + + An error occurred while mounting the following partition/image: + Произошла ошибка при монтировании следующего раздела/образа: + + + + An error occurred while setting one or more flags on the following partition: + Произошла ошибка при установке одного или более флагов на следующий раздел: + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + Произошла ошибка при создании таблицы разделов на следующем устройстве: + + + + An error occurred while unmounting the following partition/image/mount point: + Произошла ошибка при размонтировании следующего раздела/образа/точки монтирования: + + + + An error occurred while cloning the properties of the following item: + + + + + Target item: + + + + + An error occurred while cloning the following symbolic link: + Произошла ошибка при клонировании следующей символической ссылки: + + + + Target symlink: + + + + + An error occurred while cloning the following file: + Произошла ошибка при клонировании следующего файла: + + + + Target file: + + + + + An error occurred while cloning the following directory: + Произошла ошибка при клонировании следующего каталога: + + + + Target directory: + + + + + An error occurred while deleting the following directory: + Произошла ошибка при удалении следующего каталога: + + + + + Cannot start the Systemback scheduler daemon! + Не удается запустить демон - планировщик Systemback! + + + + + Missing, wrong or too much argument(s). + Параметры отсутствуют или ошибочны (или их слишком много). + + + + The process is disabled for this user. + Процесс запрещен для этого пользователя. + + + + Root privileges are required. + Требуются права root. + + + + This system is a Live. + Эта система является т.н. Live-CD. + + + + Already running. + Уже выполняется. + + + + Unable to daemonize. + Невозможно "демонизировать". + + + + Cannot start the Systemback graphical user interface! + Не удается запустить Systemback GUI! + + + + Unable to get root permissions. + Не удалось получить права root. + + + + Unable to connect to the X server. + Не удалось подключиться к X-серверу. + + + + Full name of the new user: + Полное имя нового пользователя: + + + + New username to login: + Новое имя для входа пользователя: + + + + New user account password: + Новый пароль пользователя: + + + + New root password (optional, not recommended for Ubuntu): + Новый пароль root (не обязательно, для Ubuntu НЕ рекомендовано!): + + + + New hostname: + Новое имя компютера (hostname): + + + + + + + + + + + + + + + + Back + Назад + + + + + + + + Next + Далее + + + + + Working directory + Рабочий каталог + + + + Created Live images + Создание Live-образа + + + + Name of the Live system + Имя Live-системы + + + + + + + + Options + Опции + + + + Write target + Диск для записи + + + + Live operations + Действия с системой Live + + + + Include the user data files + Включить пользовательские файлы + + + + Redetect devices + Переопределить устройства + + + + + + Delete + Удалить + + + + Write to target + Записать на диск + + + + Convert to ISO + Преобразовать в ISO + + + + + + Create new + Создать новую + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Смонтируйте неисправный системный раздел(ы) в каталог '/mnt' в соответствии с оригинальной<br>структурой. ('/' -> '/mnt', '/home' -> '/mnt/home', и т.д.) + + + + + Mount + Монтировать + + + + Reset mounts + + + + + Repair type + Тип восстановления + + + + GRUB 2 repair + Восстановление загрузчика GRUB 2 + + + + System files repair + Восстановление системных файлов + + + + + Reinstall GRUB 2 bootloader: + Переустановка загрузчика GRUB 2: + + + + + Auto detection + Автоматическое определение + + + + Full repair + Полное восстановление + + + + Do not repair the fstab file + Не восстановлен файл fstab + + + + Exclude hidden user files and directories from restore points + Исключить скрытые файлы и каталоги пользоватлей из точки восстановления + + + + Exclude user data files and directories from Live system + Исключить файлы и каталоги пользователя из Live-системы + + + + Excludable items + + + + + Excluded items + Исключенные элементы + + + + + Remove item from the exclusion list + Удалить элемент из списка исключений + + + + + Add item to the exclusion list + Добавить элемент в список исключений + + + + Scheduler state: + Состояние планировщика: + + + + + + + + + + + + + + Disabled + Выключен + + + + Timer settings + Настройки таймера + + + + Waiting time before creating a new restore point: + Время ожидания перед созданием новой точки восстановления: + + + + Visible countdown time: + Показать обратный отсчет времени: + + + + Pop-up window position on screen: + Позиция всплывающего окна на экране: + + + + Use silent mode + Использовать "скрытый" режим + + + + + + + More + Больше + + + + + + + Less + Меньше + + + + Simple system backup and restore application with extra features + Простое резервное копирование системы и восстановление данных + + + + Project homepage: + Домашняя страница проекта: + + + + Contact: + Контактная информация: + + + + Donate: + Пожертвовать: + + + + Systemback version: + Версия Systemback: + + + + + License + Лицензия + + + + Re-read directories + Перечитать каталоги + + + + Writable Linux filesystem! + + + + + + + + Cancel + Отменить + + + + + + + + + + + Maximum number of temporary restore points + Максимальное количество временных точек восстановления + + + + Restore points + Точки восстановления + + + + Highlighted restore points + Выделенные точки + + + + Point operations + Действия + + + + Highlight + Выделить + + + + Rename + Переименовать + + + + + + + + + + + + + + + + + + Select restore point + Выберите точку восстановления + + + + + + + + + Storage directory + Каталог хранения + + + + Function menu + Меню + + + + + Schedule + Расписание + + + + + + About + О программе + + + + + Settings + Настройки + + + + System upgrade + Обновление системы + + + + + System install + Установка системы + + + + + + + Live system create + Создание системы Live + + + + + System repair + Ремонт системы + + + + + + System restore + Восстановление системы + + + + + + + System copy + Копирование системы + + + + + Exclude + Исключить + + + + + Include + + + + + Change path + Изменить путь + + + + + + + + + + + + + + + + + + empty + пустой + + + + + + + + + + + not used + не используется + + + + Restore type + Тип восстановления + + + + + + + + + Full restore + Полное восстановление + + + + + + + + + System files restore + Восстановление системных файлов + + + + User(s) configuration files restore + Восстановление конфигурационных файлов пользователя(ей) + + + + + Keep newly installed configuration files + Сохранить вновь установленные файлы конфигурации + + + + Include user(s): + Включить в состав пользователя(ей): + + + + Do not restore the fstab file + Не восстанавливать файл fstab + + + + Partition settings + Настройки разделов + + + + + + + + Transfer user configuration files + Перенести конфигурационные файлы пользователя + + + + Copy user data files + Копировать файлы данных пользователя + + + + Install GRUB 2 bootloader: + Установить загрузчик GRUB 2: + + + + + + Format + Форматировать + + + + + + Reset partitions settings + Сбросить настройки разделов + + + + + + + + + + Unmount + Отсоединить + + + + Change partition settings + Изменить настройки разделов + + + + Filesystem: + Файловая система: + + + + Mount point: + Точка монтир: + + + + + + + + + ! Delete ! + ! Удалить ! + + + + Add new partition + Добавить новый раздел + + + + Create new: + Создать новый: + + + + Need to set the mount point as '/boot/efi'! + Необходимо установить точку монтирования как '/boot/efi'! + + + + Window DPI scaling + Масшатирование DPI окна + + + + Multiplier factor for scaling the window contents + Коэффициент масштабирования содержания окна + + + + User interface + Интерфейс пользователя + + + + Window always on top + Поверх всех окон + + + + System + Система + + + + Disable scheduler daemon starting for the following users: + Отключить автозапуск планировщика для следующих пользователей: + + + + Use XZ compressor for squashfs filesystems + Использовать сжатие XZ для файловых систем Squashfs + + + + Override auto-detected language: + Переопределить автоматическое определение языка: + + + + Override the used style: + Переопределить используемый стиль: + + + + Disable incremental restore points (do not use hard links between backups) + Отключить инкрементальные точки восстановления + + + + Create Live ISO images automatically (faster than the conversion) + Создать образ iso Live автоматически (быстрее, чем преобразование) + + + + Do not empty memory cache at the end of some processes + Не очищать кэш памяти в конце некоторых процессов + + + + Includable items + + + + + Included items + + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + Включить файлы данных и директории пользователя в точки восстановления +Они будут определены как восстанавливаемые файлы конфигурации! + + + + ! Interrupt ! + ! Прервать ! + + + + Creates a scheduled restore point within few seconds. + Создает точку восстановления по расписанию в течение нескольких секунд. + + + + + + Start + Старт + + + + Later + Позже + + + + Systemback user authentication + Аутентификация пользователя Systemback + + + + Administrator: + Администратор: + + + + Password: + Пароль: + + + + Unsafe X Window authorization! + Небезопасная авторизация X Window!! + + + + Please do not use 'sudo' command. + Пожалуйста, не используйте команду 'sudo'. + + + + + + + + + Transfer user configuration and data files + Перенести файлы данных и конфигурации пользователя + + + + + + scheduler + планировщик + + + + + Partition + Раздел + + + + + Size + Размер + + + + Label + Метка + + + + Current mount point + Текущая точка монтирования + + + + New mount point + Новая точка монтирования + + + + Filesystem + Файловая система + + + + Device + Устройство + + + + + Top left + Сверху слева + + + + + + Top right + Сверху справа + + + + + + Center + В центре + + + + + + Bottom left + Снизу слева + + + + + Bottom right + Снизу справа + + + + + + day(s) + день(дней) + + + + + + hour(s) + ч + + + + + + + + minute(s) + мин + + + + + + seconds + сек + + + + + + + Everyone + Все + + + + + + Currently running system + Текущая работающая система + + + + + Emptying cache + Очистка кеш-памяти + + + + + Flushing filesystem buffers + Сброс буфера файловой системы + + + + + Restoring the full system + Восстановление всей системы + + + + + Restoring the system files + Восстановление системних файлов + + + + Restoring the user(s) configuration files + Восстановление конфигурационных файлов пользователя (ей) + + + + Repairing the system files + Ремонт системных файлов + + + + Repairing the full system + Ремонт всей системы + + + + Repairing the GRUB 2 + Ремонт GRUB 2 + + + + Copying the system + Копирование системы + + + + Installing the system + Установка системы + + + + Writing Live image to the target device + Запись образаLive на носитель + + + + Upgrading the system + Обновление системы + + + + + Deleting incomplete restore point + Удаление незавершенной точки восстановления + + + + Interrupting the current process + Прерывание текущего процесса + + + + Deleting old restore point + Удаление старой точки восстановления + + + + + Creating restore point + Создание точки восстановления + + + + + Deleting restore point + Удаление точки восстановления + + + + Converting Live system image + Преобразование системы Live + + + + + process + процесс + + + + Creating Live system + Создание системы Live + + + + + + + + + Reboot + Перезагрузка + + + + + + + X restart + Перезапуск X + + + + + + Live image + Образ Live + + + + Restore the system files to the following restore point: + Восстановление системных файлов из указанной точки восстановления: + + + + Repair the system files with the following restore point: + Ремонт системных файлов из указанной точки восстановления: + + + + Repair the complete system with the following restore point: + Ремонт всей системы из указанной точки восстановления: + + + + Restore the complete user(s) configuration files to the following restore point: + Полное восстановление конфигурационных файлов пользователя(ей) из указанной точки восстановления: + + + + Restore the user(s) configuration files to the following restore point: + Восстановление конфигурационных файлов пользователя(ей) из указанной точки восстановления: + + + + Copy the system, using the following restore point: + Копирование системы из указанной точки восстановления: + + + + Install the system, using the following restore point: + Установка системы из указанной точки восстановления: + + + + Restore the complete system to the following restore point: + Восстановление системы целиком из указанной точки восстановления: + + + + Format the %1, and write the following Live system image: + Форматирование %1, и запись указаного образа системы Live: + + + + Repair the GRUB 2 bootloader. + Ремонт загрузчика GRUB 2. + + + + The user(s) configuration files full restoration are completed. + Полное восстановление конфигурационных файлов пользователя(ей) завершено. + + + + + The X server will restart automatically within 30 seconds. + Х-сервер автоматически перезапустится в течении 30 секунд. + + + + The user(s) configuration files restoration are completed. + Восстановление конфигурационных файлов пользователя завершено. + + + + The full system repair is completed. + Полный ремонт системы завершён. + + + + The system repair is completed. + Ремонт системы завершён. + + + + + The system files restoration are completed. + Восстановление системных файлов завершено. + + + + + + The computer will restart automatically within 30 seconds. + Компютер будет автоматически перезагружен в течении 30 секунд. + + + + + The full system restoration is completed. + Полное восстановление системы завершено. + + + + The system copy is completed. + Копирование системы завершено. + + + + The Live system creation is completed. + Создание системы Live завершено. + + + + The created .sblive file can be written to pendrive. + Созданный файл .sblive можно записать на флешку. + + + + The GRUB 2 repair is completed. + Ремонт GRUB 2 завершён. + + + + The system install is completed. + Установка системы завершена. + + + + The Live system image write is completed. + Запись образа системы Live завершено. + + + + + An another Systemback process is currently running, please wait until it finishes. + Другой процесс Systemback в настоящее время работает, пожалуйста, подождите, пока он не завершится. + + + + + Unable to get exclusive lock! + Не удалось получить эксклюзивную блокировку! + + + + + First, close all package manager. + Во-первых, закройте все менеджеры пакетов. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + The specified name contain(s) unsupported character(s)! + Указанное имя содержит недопустимый(ые) символ(ы)! + + + + Please enter a new name. + Пожалуйста, введите новое имя. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Ремонт системных файлов завершён, но произошла ошибка при переустановке GRUB! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + + + + + + + + The restore point creation is aborted! + Создание точки восстановления было отменено! + + + + + + Not enough free disk space to complete the process. + Не хватает свободного места на диске, чтобы завершить процесс. + + + + + Root privileges are required for running the Systemback! + Для запуска Systemback необходимы права Root! + + + + + + + + The system copy is aborted! + Копирование системы отменено! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + Указанный раздел(ы) не имеет достаточно свободного места для копирования системы. Скопированая система не будет функционировать должным образом. + + + + The system copy is completed, but an error occurred while installing the GRUB! + Копирование системы завершено, но произошла ошибка при установке GRUB! + + + + + You need to manually install a bootloader. + Вы должны вручную установить загрузчик. + + + + + The system restoration is aborted! + Восстановление системы отменено! + + + + An error occurred while reinstalling the GRUB. + Ошибка при переустановке GRUB. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Полный ремонт системы завершён, но произошла ошибка при переустановке GRUB! + + + + + + + + The Live system creation is aborted! + Создание системы Live отменено! + + + + An error occurred while creating the file system image. + Ошибка при создании образа файловой системы. + + + + An error occurred while creating the container file. + Ошибка при создании файла-контейнера. + + + + + + The specified partition could not be mounted. + Указанный раздел не может быть смонтирован. + + + + The system install is completed, but an error occurred while installing the GRUB! + Установка системы завершена, но произошла ошибка при установке GRUB! + + + + + + + + The system installation is aborted! + Установка системы отменена! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + Указанный раздел(ы) не имеет достаточно свободного места для установки системы. Установленная система не будет функционировать должным образом. + + + + + + The specified partition could not be formatted (in use or unavailable). + Указанный раздел не может быть отформатирован (используется или недоступен). + + + + An error occurred while reinstalling the GRUB! + Ошибка при переустановке GRUB! + + + + + + + + + + There has been critical changes in the file system during this operation. + Во время этой операции произошли критические изменения в файловой системе. + + + + + + + + The Live write is aborted! + Запись Live отменена! + + + + The selected device does not have enough space to write the Live system. + На выбранном устройстве недостаточно места для записи системы Live. + + + + An error occurred while unpacking the Live system files. + Произошла ошибка при распаковке файлов системы Live. + + + + + + + The Live conversion is aborted! + Преобразование Live отменено! + + + + An error occurred while renaming the essential Live files. + Ошибка при переименовании основных файлов Live. + + + + An error occurred while creating the .iso image. + Ошибка при создании образа ISO. + + + + An error occurred while reading the .sblive image. + Произошла ошибка при чтении образа .sblive. + + + + An error occurred while creating the new initramfs image. + Ошибка при создании нового образа initramfs. + + + + + The restore point deletion is aborted! + Удаление точки восстановления отменено! + + + + + An error occurred while during the process. + Ошибка во время процесса. + + + + + + The Live image could not be mounted. + Образ Live не может быть смонтирован. + + + + + The system repair is aborted! + Ремонт системы отменен! + + + + + There is not enough free space. + Недостаточно свободного места. + + + + + + + + Multiple mount points + Несколько точек монтирования + + + + Enabled + Включено + + + + Systemback worker thread is interrupted by the user. + Systemback "работа" перервана пользователем. + + + + Boot Live without xorg.conf file + Загрузить Live без файла xorg.conf + + + + + + Boot Live system + Загрузить систему Live + + + + + + Boot system installer + + + + + + + Boot Live in safe graphics mode + Загрузить Live в безопасном графическом режиме + + + + + + Boot Live in debug mode + Загрузить Live в режиме отладки + + + + Press 'E' key to edit + Нажмите клавишу 'E' для редактирования + + + + Press TAB key to edit + Нажмите клавишу TAB для редактирования + + + + An error occurred while changing the access permissions of the following file: + Произошла ошибка при изменении прав доступа следующего файла: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Использование: systemback-cli [опція] + + Опції: + + -n, --newbackup создать новую точку восстановления + + -s, --storagedir <path> путь к каталогу хранения точек восстановления + + -u, --upgrade обновить существующую систему + удалить ненужные файлы и пакеты + + -v, --version версия Systemback + + -h, --help показать эту справку + + + + basic restore UI + основной UI восстановления + + + + The Systemback command line interface cannot be used on a Live system! + Интерфейс командной строки Systemback не может быть использован на Live системе! + + + + This stupid terminal does not support color! + Этот тупой терминал не поддерживает цвет! + + + + This terminal is too small! + Этот терминал слишком мал! + + + + The specified storage directory path has not been set! + Указанный путь каталога хранения не установлен! + + + + The restoration is aborted! + Восстановление отменено! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Восстановление завершено, но возникла ошибка при переустановке GRUB! + + + + The restore points storage directory is not available or not writable! + Каталог хранения точек восстановления недоступен или недоступен для записи! + + + + Available restore point(s): + Доступные точки восстановления: + + + + Quit + Выйти + + + + Selected restore point: + Выбранная точка восстановления: + + + + The specified storage directory path is set. + Указанный путь каталога хранения установлен. + + + + Restore with the following restore point: + Восстановить из указанной точки восстановления: + + + + Restore with the following restore method: + Восстановить указанным способом восстановления: + + + + Users configuration files restore + Восстановить конфигурационные файлы пользователей + + + + + Complete configuration files restore + Восстановить конфигурационные файлы полностью + + + + Configuration files restore + Восстановить конфигурационные файлы + + + + + + You want to keep the current fstab file? + Вы хотите сохранить текущий файл fstab? + + + + + + + + + + + (Y/N) + (Y/N) + + + + + + + Reinstall the GRUB 2 bootloader? + Переустановить загрузчик GRUB 2? + + + + Start the restore? + Начать восстановление? + + + + The users configuration files full restoration are completed. + Полное восстановление конфигурационных файлов пользователей завершено. + + + + The users configuration files restoration are completed. + Восстановление конфигурационных файлов пользователей завершено. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Нажать клавишу 'ENTER', для перезагрузки компютера или 'Q' выхода. + + + + Press 'ENTER' key to quit. + Нажать клавишу 'ENTER' для выхода. + + + + Deleting old restore point(s) + Удаление старых точек восстановления + + + + Restoring the users configuration files + Восстановление конфигурационных файлов пользователей + + + diff --git a/lang/systemback_tr.ts b/lang/systemback_tr.ts new file mode 100644 index 0000000..439d476 --- /dev/null +++ b/lang/systemback_tr.ts @@ -0,0 +1,1884 @@ + + + + + systemback + + + Full name of the new user: + Yeni kullanıcının tam ismi: + + + + New username to login: + Giriş için yeni kullanıcı ismi: + + + + New user account password: + Yeni kullanıcı hesap şifresi: + + + + New root password (optional, not recommended for Ubuntu): + Yeni root şifresi (isteğe bağlı, Ubuntu/Linux Mint için tavsiye edilmez): + + + + New hostname: + Yeni ana makine: + + + + + + + + + + + + + + + + Back + Geri + + + + + + + + Next + İleri + + + + + Working directory + Çalışma dizini + + + + Created Live images + Oluşturulan çalışan kalıplar + + + + Name of the Live system + Çalışan sistemin adı + + + + + + + + Options + Seçenekler + + + + Write target + Yazma hedefi + + + + Live operations + + + + + Include the user data files + Kullanıcı veri dosyalarını içer + + + + Redetect devices + Aygıtları tekrar algıla + + + + + + Delete + Sil + + + + Convert to ISO + ISO'ya dönüştür + + + + + + Create new + Yeni oluştur + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + + + + Mount + Bağla + + + + Reset mounts + Bağlı aygıtları sıfırla + + + + Repair type + Onarım türü + + + + GRUB 2 repair + GRUB 2 onarımı + + + + System files repair + Sistem dosyaları onarımı + + + + + Reinstall GRUB 2 bootloader: + GRUB 2 önyükleyiciyi tekrar kur: + + + + + Auto detection + Otomatik algılama + + + + Full repair + Tam onarım + + + + Do not repair the fstab file + Fstab dosyasını onarma + + + + Exclude hidden user files and directories from restore points + Gizli kullanıcı dosyaları ve dizinlerini geri yükleme noktası haricinde tut + + + + Exclude user data files and directories from Live system + Kullanıcı veri dosyaları ve dizinlerini Çalışan sistem haricinde tut + + + + Excluded items + Dışlanan öğeler + + + + + Remove item from the exclusion list + Dışlananlar listesinden öğeyi çıkar + + + + + Add item to the exclusion list + Dışlananlar listesine öğe ekle + + + + Scheduler state: + Zamanlayıcı durumu: + + + + + + + + + + + + + + Disabled + Devre dışı + + + + Timer settings + Zamanlayıcı ayarları + + + + Waiting time before creating a new restore point: + Yeni geri yükleme noktası oluşturma öncesi bekleme süresi: + + + + Visible countdown time: + + + + + Pop-up window position on screen: + Açılır pencere ekran pozisyonu: + + + + Use silent mode + Sessiz kipi kullan + + + + + + + More + Daha fazla + + + + + + + Less + Daha az + + + + Simple system backup and restore application with extra features + + + + + Project homepage: + Proje anasayfası: + + + + Contact: + İletişim: + + + + Donate: + Bağış yap: + + + + Systemback version: + Systemback sürümü: + + + + + License + Lisans + + + + Re-read directories + Dizinleri tekrar oku + + + + Writable Linux filesystem! + Yazılabilir Linux dosya sistemi! + + + + + + + Cancel + İptal + + + + + + + + + + + Maximum number of temporary restore points + Geçici geri yükleme noktaları için maksiumum sayı + + + + + Include + + + + + + + + + + + + + + + + + + + empty + boş + + + + + + + + + + + not used + kullanılmaz + + + + Includable items + + + + + Included items + + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + + + Restore points + Geri yükleme noktaları + + + + Highlighted restore points + Vurgulanmış noktaları + + + + Point operations + Nokta işlemleri + + + + Highlight + Vurgula + + + + Rename + Yeniden adlandır + + + + + + + + + + + + + + + + + + Select restore point + Geri yükleme noktası seç + + + + + + + + + Storage directory + Depolama dizini + + + + Function menu + İşlev menüsü + + + + + + System restore + Sistem geri yükleme + + + + + + + System copy + Sistem kopyalama + + + + + System install + Sistem kurulum + + + + + + + Live system create + Çalışan sistem oluşturma + + + + + System repair + Sistem onarımı + + + + System upgrade + Sistem yükseltme + + + + + Exclude + Hariç tut + + + + + Schedule + Zamanlama + + + + Excludable items + + + + + + + About + Hakkında + + + + + Settings + + + + + Change path + Yolu değiştir + + + + Restore type + Geri yükleme türü + + + + + + + + + Full restore + Tam geri yükleme + + + + + + + + + System files restore + Sistem dosyaları geri yükleme + + + + User(s) configuration files restore + Kullanıcı ayar dosyaları geri yükleme + + + + + Keep newly installed configuration files + Yeni yüklenmiş yapılandırma dosyalarını koru + + + + Include user(s): + Kullanıcıları içer: + + + + Do not restore the fstab file + Fstab dosyasını geri yüklememe + + + + Partition settings + Disk bölümleme ayarları + + + + Need to set the mount point as '/boot/efi'! + + + + + Window DPI scaling + + + + + Multiplier factor for scaling the window contents + + + + + User interface + + + + + Window always on top + + + + + System + + + + + Disable scheduler daemon starting for the following users: + + + + + Use XZ compressor for squashfs filesystems + + + + + Override auto-detected language: + + + + + Override the used style: + + + + + Disable incremental restore points (do not use hard links between backups) + + + + + Create Live ISO images automatically (faster than the conversion) + + + + + Do not empty memory cache at the end of some processes + + + + + + + + + + + Unmount + Çıkart + + + + Write to target + + + + + Mount point: + Bağlama noktası: + + + + + + + + + ! Delete ! + ! Sil ! + + + + Add new partition + Yeni bir disk bölümü ekle + + + + Create new: + Yeni oluştur: + + + + Filesystem: + Dosya sistemi: + + + + + + Format + Biçimlendir + + + + + + Reset partitions settings + Disk bölümleme ayarlarını sıfırla + + + + Change partition settings + Disk bölümleme ayarlarını değiştir + + + + + + + + Transfer user configuration files + Kullanıcı yapılandırma dosyalarını aktar + + + + Copy user data files + Kullanıcı veri dosyalarını kopyala + + + + Install GRUB 2 bootloader: + Grub 2 önyükleyiciyi kur: + + + + + + + + + Transfer user configuration and data files + Kullanıcı yapılandırma ve veri dosyalarını aktar + + + + ! Interrupt ! + + + + + Creates a scheduled restore point within few seconds. + + + + + + + Start + Başlat + + + + Later + Daha sonra + + + + Systemback user authentication + + + + + Administrator: + Yönetici: + + + + Password: + Şifre: + + + + + Partition + Disk Bölümü + + + + + Size + Boyut + + + + Current mount point + Geçerli bağlama noktası + + + + New mount point + Yeni bağlama noktası + + + + Filesystem + Dosya sistemi + + + + Device + Aygıt + + + + + + scheduler + + + + + + Top left + Üst sol + + + + + + Top right + Üst sağ + + + + + + Center + Orta + + + + + + Bottom left + Alt sol + + + + + Bottom right + Alt sağ + + + + + + day(s) + gün + + + + + + hour(s) + saat + + + + + + + + minute(s) + dakika + + + + + + seconds + saniye + + + + + + Live image + Çalışan kalıp + + + + + + Currently running system + + + + + + Creating restore point + + + + + + Restoring the full system + + + + + + Restoring the system files + + + + + Restoring the user(s) configuration files + + + + + Repairing the system files + + + + + Repairing the full system + + + + + Copying the system + + + + + Installing the system + + + + + Creating Live system + + + + + + Deleting restore point + + + + + Deleting old restore point + + + + + + Deleting incomplete restore point + + + + + + Flushing filesystem buffers + + + + + + + + + + Reboot + Yeniden başlat + + + + + + + X restart + X şarj + + + + Repairing the GRUB 2 + + + + + + Emptying cache + + + + + + An another Systemback process is currently running, please wait until it finishes. + + + + + Please enter a new name. + + + + + The Live system creation is completed. + + + + + The created .sblive file can be written to pendrive. + + + + + Restore the system files to the following restore point: + + + + + Label + + + + + Writing Live image to the target device + + + + + The specified name contain(s) unsupported character(s)! + + + + + Repair the system files with the following restore point: + + + + + Repair the complete system with the following restore point: + Aşağıdaki geri yükleme noktası ile tüm sistemi onar: + + + + Restore the complete user(s) configuration files to the following restore point: + Aşağıdaki geri yükleme noktası ile tüm kullanıcı ayar dosyalarını geri yükle: + + + + Restore the user(s) configuration files to the following restore point: + Aşağıdaki geri yükleme noktası ile kullanıcı ayar dosyalarını geri yükle: + + + + The user(s) configuration files full restoration are completed. + + + + + + The X server will restart automatically within 30 seconds. + + + + + The user(s) configuration files restoration are completed. + + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + + + + + The full system repair is completed. + + + + + The system repair is completed. + + + + + Copy the system, using the following restore point: + + + + + Install the system, using the following restore point: + + + + + + + + The restore point creation is aborted! + + + + + + + Not enough free disk space to complete the process. + + + + + + Root privileges are required for running the Systemback! + + + + + Restore the complete system to the following restore point: + + + + + + The system files restoration are completed. + + + + + + + The computer will restart automatically within 30 seconds. + + + + + + The full system restoration is completed. + + + + + + + + + The system copy is aborted! + + + + + Format the %1, and write the following Live system image: + + + + + The selected device does not have enough space to write the Live system. + + + + + + There is not enough free space. + + + + + Interrupting the current process + + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + + + + + The system copy is completed, but an error occurred while installing the GRUB! + + + + + + You need to manually install a bootloader. + + + + + + The system restoration is aborted! + + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + + + + + + + The specified partition could not be formatted (in use or unavailable). + + + + + An error occurred while reinstalling the GRUB! + + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + + + + + The system copy is completed. + + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + + + + + The Live system creation is aborted! + + + + + An error occurred while creating the file system image. + + + + + An error occurred while creating the container file. + + + + + + + The specified partition could not be mounted. + + + + + An error occurred while unpacking the Live system files. + + + + + An error occurred while renaming the essential Live files. + + + + + An error occurred while creating the .iso image. + + + + + An error occurred while reading the .sblive image. + + + + + An error occurred while creating the new initramfs image. + + + + + + + The Live image could not be mounted. + + + + + + + Boot system installer + + + + + The GRUB 2 repair is completed. + + + + + An error occurred while reinstalling the GRUB. + + + + + The system install is completed. + + + + + The system install is completed, but an error occurred while installing the GRUB! + + + + + + + + + The system installation is aborted! + + + + + + + + + + + There has been critical changes in the file system during this operation. + + + + + Repair the GRUB 2 bootloader. + + + + + + + + + The Live write is aborted! + + + + + The Live system image write is completed. + + + + + + + + The Live conversion is aborted! + + + + + + The restore point deletion is aborted! + + + + + + An error occurred while during the process. + + + + + + The system repair is aborted! + + + + + + + + Everyone + + + + + Upgrading the system + + + + + + + + + Multiple mount points + + + + + Enabled + + + + + Systemback worker thread is interrupted by the user. + + + + + + process + + + + + Boot Live without xorg.conf file + + + + + + + Boot Live system + + + + + + + Boot Live in safe graphics mode + + + + + + + Boot Live in debug mode + + + + + Press 'E' key to edit + + + + + Press TAB key to edit + + + + + Converting Live system image + + + + + + Unable to get exclusive lock! + + + + + + First, close all package manager. + + + + + The specified storage directory path has not been set! + + + + + The restoration is aborted! + + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + + + + + The restore points storage directory is not available or not writable! + + + + + This stupid terminal does not support color! + + + + + This terminal is too small! + + + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + + + + + An error occurred while opening the following file: + + + + + An error occurred while creating the following directory: + + + + + An error occurred while removing the following file: + + + + + An error occurred while creating the following hard link: + + + + + Reference file: + + + + + An error occurred while creating the following file: + + + + + An error occurred while renaming the following item: + + + + + New path: + + + + + An error occurred while executing the following command: + + + + + Exit code: + + + + + Failed to detect the device for installing the GRUB! + + + + + An error occurred while upgrading the system! + Sistem yükseltilirken bir hata oluştu! + + + + Restart upgrade ... + Yükseltmeyi yeniden başlat ... + + + + This file could not be copied because it does not exist: + + + + + The following partition has no UUID: + + + + + An error occurred while creating a new partition on the following device: + + + + + An error occurred while mounting the following partition/image: + + + + + An error occurred while setting one or more flags on the following partition: + + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + + + + + An error occurred while unmounting the following partition/image/mount point: + + + + + An error occurred while cloning the properties of the following item: + + + + + Target item: + + + + + An error occurred while cloning the following symbolic link: + + + + + Target symlink: + + + + + An error occurred while cloning the following file: + + + + + Target file: + + + + + An error occurred while cloning the following directory: + + + + + Target directory: + + + + + An error occurred while deleting the following directory: + + + + + basic restore UI + + + + + Available restore point(s): + + + + + Quit + + + + + Selected restore point: + + + + + The specified storage directory path is set. + + + + + Deleting old restore point(s) + + + + + Restore with the following restore point: + Aşağıdaki geri yükleme noktası ile Geri Yükle: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + + + + + The Systemback command line interface cannot be used on a Live system! + + + + + Restore with the following restore method: + Aşağıdaki geri yükleme türü ile Geri Yükle: + + + + Users configuration files restore + Kullanıcı ayar dosyaları geri yüklemesi + + + + + Complete configuration files restore + Tüm ayar dosyaları geri yüklemesi + + + + Configuration files restore + Ayar dosyaları geri yükleme + + + + + + You want to keep the current fstab file? + Mevcut fstab dosyasını korumak istiyor musunuz? + + + + + + + + + + + (Y/N) + (E/H) + + + + + + + Reinstall the GRUB 2 bootloader? + + + + + Start the restore? + Geri yükleme başlasın mı? + + + + Restoring the users configuration files + Kullanıcı ayar dosyaları geri yükleniyor + + + + The users configuration files full restoration are completed. + + + + + The users configuration files restoration are completed. + + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Bilgisayarı yeniden başlatmak için 'ENTER' tuşuna ya da çıkmak için 'Q' tuşuna basınız. + + + + Press 'ENTER' key to quit. + Çıkmak için 'ENTER' tuşuna basınız. + + + + An error occurred while changing the access permissions of the following file: + + + + + + Cannot start the Systemback scheduler daemon! + Systemback zamanlayıcısı arkaplan hizmeti başlatılamadı! + + + + + Missing, wrong or too much argument(s). + Eksik, hatalı ya da çok fazla değişken. + + + + The process is disabled for this user. + + + + + Root privileges are required. + Yönetici ayrıcalıkları gerekli. + + + + This system is a Live. + Bu bir çalışan sistem. + + + + Already running. + Zaten çalışıyor. + + + + Unable to daemonize. + + + + + Cannot start the Systemback graphical user interface! + Systemback grafik kullanıcı arayüzü başlatılamadı! + + + + Unable to get root permissions. + Root izinleri alınamıyor. + + + + Unable to connect to the X server. + X Sunucusu ile bağlantı kurulamıyor. + + + + Unsafe X Window authorization! + Güvensiz X Pencere yetkilendirmesi! + + + + Please do not use 'sudo' command. + Lütfen 'sudo' komutunu kullanmayın. + + + diff --git a/lang/systemback_uk.ts b/lang/systemback_uk.ts new file mode 100644 index 0000000..e392d67 --- /dev/null +++ b/lang/systemback_uk.ts @@ -0,0 +1,1898 @@ + + + + + systemback + + + Full name of the new user: + Повне ім'я нового користувача: + + + + New username to login: + Нове ім'я користувача для входу: + + + + New user account password: + Новий пароль користувача: + + + + New root password (optional, not recommended for Ubuntu): + Новий пароль root (не обов'язково, для Ubuntu НЕ рекомендовано!): + + + + New hostname: + Нове ім'я комп'ютера (hostname): + + + + + + + + + + + + + + + + Back + Повернутися + + + + + + + + Next + Далі + + + + + Working directory + Робочий каталог + + + + Created Live images + Створені "Live"-образи + + + + Name of the Live system + Ім'я Live-системи + + + + + + + + Options + Налаштування + + + + Write target + Цільовий диск для запису + + + + Live operations + Дії з системою "Live" + + + + Include the user data files + Включити користувацькі файли + + + + Redetect devices + Перевизначити пристрої + + + + + + Delete + Вилучити + + + + Write to target + Записати на диск + + + + Convert to ISO + Перетворити в ISO + + + + + + Create new + Створити нову + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + Змонтувати несправний системний розділ(и) в каталог '/mnt' відповідно до оригінальної структури. ('/' -> '/mnt', '/home' -> '/mnt/home', і т.д.) + + + + + Mount + Змонтувати + + + + Reset mounts + + + + + Repair type + Тип відновлення + + + + GRUB 2 repair + Відновлення завантажувача "GRUB 2" + + + + System files repair + Відновлення системних файлів + + + + + Reinstall GRUB 2 bootloader: + Перевстановлення завантажувача "GRUB 2": + + + + + Auto detection + Автовиявлення + + + + Full repair + Повне відновлення + + + + Do not repair the fstab file + Не відновлювати файл fstab + + + + Exclude hidden user files and directories from restore points + Вилучити приховані файли і каталоги користувачів з точок відновлення + + + + Exclude user data files and directories from Live system + Вилучити файли даних і каталогі користувача з Live-системи + + + + Excludable items + + + + + Excluded items + Вилучені елементи + + + + + Remove item from the exclusion list + Видалити елемент зі списку винятків + + + + + Add item to the exclusion list + Додати елемент до списку винятків + + + + Scheduler state: + Стан планувальника: + + + + + + + + + + + + + + Disabled + Вимкнено + + + + Timer settings + Налаштування таймера + + + + Waiting time before creating a new restore point: + Час очікування перед створенням нової точки відновлення: + + + + Visible countdown time: + Видимий відлік часу: + + + + Pop-up window position on screen: + Позиція спливаючого вікна на екрані: + + + + Use silent mode + Використовуйте "прихований" режим + + + + + + + More + Більше + + + + + + + Less + Менше + + + + Simple system backup and restore application with extra features + Застосунок простого резервного копіювання системи і відновлення + + + + Project homepage: + Домашня сторінка проекту: + + + + Contact: + Контактна інформація: + + + + Donate: + Пожертвувати: + + + + Systemback version: + Версія Systemback: + + + + + License + Ліцензія + + + + Re-read directories + Перечитати каталогі + + + + Writable Linux filesystem! + + + + + + + + Cancel + Скасувати + + + + + + + + + + + Maximum number of temporary restore points + Максимальна кількість тимчасових точок відновлення + + + + Restore points + Точки відновлення + + + + Highlighted restore points + Виділені кольором + + + + Point operations + Дії з точками відновлення + + + + Highlight + Підсвічування + + + + Rename + Перейменувати + + + + + + + + + + + + + + + + + + Select restore point + Виберіть точку відновлення + + + + + + + + + Storage directory + Каталог зберігання + + + + Function menu + Меню функцій + + + + + Schedule + Розклад + + + + + + About + Про проґраму + + + + + Settings + Налаштування + + + + System upgrade + Оновлення системи + + + + + System install + Встановлення системи + + + + + + + Live system create + Створення системи "Live" + + + + + System repair + Ремонт системи + + + + + + System restore + Відновлення системи + + + + + + + System copy + Копіювання системи + + + + + Exclude + Вилучити + + + + + Include + + + + + Change path + Змінити шлях + + + + + + + + + + + + + + + + + + empty + порожньо + + + + + + + + + + + not used + не використовується + + + + Restore type + Тип відновлення + + + + + + + + + Full restore + Повне відновлення + + + + + + + + + System files restore + Відновлення системних файлів + + + + User(s) configuration files restore + Відновлення файлів конфігурації користувача(ів) + + + + + Keep newly installed configuration files + Зберегти знов встановлені файли конфігурації + + + + Include user(s): + Включити до складу користувача(ів): + + + + Do not restore the fstab file + Не відновлювати файл fstab + + + + Partition settings + Налаштування розділу + + + + + + + + Transfer user configuration files + Перенести конфігураційні файли користувача + + + + Copy user data files + Копіювати файли даних користувача + + + + Install GRUB 2 bootloader: + Встановити завантажувач GRUB 2: + + + + + + Format + Форматувати + + + + + + Reset partitions settings + Скинути налаштування розділів + + + + + + + + + + Unmount + Демонтувати + + + + Change partition settings + Змінити налаштування розділу + + + + Filesystem: + Файлова система: + + + + Mount point: + Точка монтування: + + + + + + + + + ! Delete ! + ! Видалити ! + + + + Add new partition + Додати новий розділ + + + + Create new: + Створити новий: + + + + Need to set the mount point as '/boot/efi'! + Необхідно встановити точку монтування як '/boot/efi'! + + + + Window DPI scaling + Масшатбування DPI вікна + + + + Multiplier factor for scaling the window contents + Фактор множення для масштабування змісту вікна + + + + User interface + Інтерфейс користувача + + + + Window always on top + Вікно завжди поверх + + + + System + Системні + + + + Disable scheduler daemon starting for the following users: + Відключити автозапуск планувальника для наступних користувачів: + + + + Use XZ compressor for squashfs filesystems + Використання компресії XZ для файлових систем Squashfs + + + + Override auto-detected language: + Замістити автоматично визначену мову: + + + + Override the used style: + Замістити використаний стиль: + + + + Disable incremental restore points (do not use hard links between backups) + Відключити інкрементальні точки відновлення (не використовувати жорсткі посилання) + + + + Create Live ISO images automatically (faster than the conversion) + Створювати образи iso "Live" автоматично (швидше, ніж перетворення) + + + + Do not empty memory cache at the end of some processes + Не очищати кеш пам'яті в кінці деяких процесів + + + + Includable items + + + + + Included items + + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + + + ! Interrupt ! + ! Перервано ! + + + + Creates a scheduled restore point within few seconds. + Створює точку відновлення за розкладом протягом декількох секунд. + + + + + + Start + Почати + + + + Later + Пізніше + + + + Systemback user authentication + Аутентифікація користувача Systemback + + + + Administrator: + Адміністратор: + + + + Password: + Пароль: + + + + + + scheduler + планувальник + + + + + Partition + Розділ + + + + + Size + Розмір + + + + Label + Мітка + + + + Current mount point + Поточна точка монтування + + + + New mount point + Нова точка монтування + + + + Filesystem + Файлова система + + + + Device + Пристрій + + + + + Top left + Згори зліва + + + + + + Top right + Згори справа + + + + + + Center + У центрі + + + + + + Bottom left + Знизу зліва + + + + + Bottom right + Знизу справа + + + + + + day(s) + день(днів) + + + + + + hour(s) + год + + + + + + + + minute(s) + хв + + + + + + seconds + секунд + + + + + + + Everyone + Усі + + + + + + + + + Transfer user configuration and data files + Перенести файли даних та конфігурації користувача + + + + + + Currently running system + Поточна працююча система + + + + + Emptying cache + Очищення кеш-пам'яті + + + + + Flushing filesystem buffers + Зливаємо буфери файлової системи + + + + + Restoring the full system + Відновлення системи цілком + + + + + Restoring the system files + Відновлення системних файлів + + + + Restoring the user(s) configuration files + Відновлення конфігураційних файлів користувача(ів) + + + + Repairing the system files + Ремонт системних файлів + + + + Repairing the full system + Ремонт системи цілком + + + + Repairing the GRUB 2 + Ремонт GRUB 2 + + + + Copying the system + Копіювання системи + + + + Installing the system + Встановлення системи + + + + Writing Live image to the target device + Записуємо образ "Live" на цільовий пристрій + + + + Upgrading the system + Оновлюємо систему + + + + + Deleting incomplete restore point + Видалення незавершеної точки відновлення + + + + Interrupting the current process + Перериваємо поточний процес + + + + Deleting old restore point + Видалення старої точки відновлення + + + + + Creating restore point + Створення точки відновлення + + + + + Deleting restore point + Видалення точки відновлення + + + + Converting Live system image + Перетворення системи "Live" + + + + + process + процес + + + + Creating Live system + Створення системи "Live" + + + + + + + + + Reboot + Перезавант + + + + + + + X restart + Перезавант X + + + + Restore the system files to the following restore point: + Відновлення системних файлів до наступної точки відновлення: + + + + Repair the system files with the following restore point: + Ремонт системних файлів з наступної точки відновлення: + + + + Repair the complete system with the following restore point: + Ремонт системи цілком з наступної точки відновлення: + + + + Restore the complete user(s) configuration files to the following restore point: + Повне відновлення конфігураційних файлів користувача(ів) з наступної точки відновлення: + + + + Restore the user(s) configuration files to the following restore point: + Відновлення конфігураційних файлів користувача(ів) з наступної точки відновлення: + + + + Copy the system, using the following restore point: + Копіюємо систему з наступної точки відновлення: + + + + Install the system, using the following restore point: + Встановлюємо систему з наступної точки відновлення: + + + + Restore the complete system to the following restore point: + Відновити систему цілком до наступної точки відновлення: + + + + Format the %1, and write the following Live system image: + Форматуємо %1, та записуємо наступний образ системи "Live": + + + + Repair the GRUB 2 bootloader. + Ремонт завантажувача GRUB 2. + + + + The user(s) configuration files full restoration are completed. + Повне відновлення конфігураційних файлів користувача(ів) завершено. + + + + + The X server will restart automatically within 30 seconds. + X-сервер буде автоматично перезапущений протягом 30 сек. + + + + The user(s) configuration files restoration are completed. + Відновлення конфігураційних файлів користувача завершено. + + + + The full system repair is completed. + Повний ремонт системи завершений. + + + + The system repair is completed. + Ремонт системи завершений. + + + + + The system files restoration are completed. + Відновлення системних файлів завершено. + + + + + + The computer will restart automatically within 30 seconds. + Комп'ютер буде автоматично перезавантажено протягом 30 секунд. + + + + + The full system restoration is completed. + Повне відновлення системи завершено. + + + + The system copy is completed. + Копіювання системи завершено. + + + + The Live system creation is completed. + Створення системи "Live" завершено. + + + + The created .sblive file can be written to pendrive. + Створений файл .sblive можна записати на флешку. + + + + The GRUB 2 repair is completed. + Ремонт GRUB завершено. + + + + The system install is completed. + Встановлення системи завершено. + + + + The Live system image write is completed. + Запис образу системи "Live" завершено. + + + + + An another Systemback process is currently running, please wait until it finishes. + Інший процес Systemback в даний час працює, будь ласка, почекайте, поки він не закінчить. + + + + + Unable to get exclusive lock! + Не вдалося ексклюзивне блокування! + + + + + First, close all package manager. + По-перше, закрийте усі менеджери пакетів. + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + The specified name contain(s) unsupported character(s)! + Зазначене ім'я містить непідтримуваний символ(и)! + + + + Please enter a new name. + Будь ласка, введіть нове ім'я. + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + Ремонт системних файлів завершено, але сталася помилка під час перевстановлення GRUB! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + + + + + + + + The restore point creation is aborted! + Створення точки відновлення було скасовано! + + + + + + Not enough free disk space to complete the process. + Бракує вільного місця на диску, щоб завершити процес. + + + + + Root privileges are required for running the Systemback! + Для запуску Systemback необхідні права Root! + + + + + + + + The system copy is aborted! + Копіювання системи скасовано! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + Зазначений розділ(и) не має достатньо вільного місця для копіювання системи. Скопійована система не буде функціонувати належним чином. + + + + The system copy is completed, but an error occurred while installing the GRUB! + Копіювання системи завершено, але сталася помилка при установці GRUB! + + + + + You need to manually install a bootloader. + Потрібно вручну встановити завантажувач. + + + + + The system restoration is aborted! + Відновлення системи скасовано! + + + + An error occurred while reinstalling the GRUB. + Сталася помилка при перевстановленні GRUB. + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + Повний ремонт системи завершено, але сталася помилка під час перевстановлення GRUB! + + + + + + + + The Live system creation is aborted! + Створення системи "Live" скасовано! + + + + An error occurred while creating the file system image. + Сталася помилка при створенні образу файлової системи. + + + + An error occurred while creating the container file. + Сталася помилка при створенні файла-контейнера. + + + + + + The specified partition could not be mounted. + Зазначений розділ не може бути змонтований. + + + + The system install is completed, but an error occurred while installing the GRUB! + Встановлення системи завершено, але сталася помилка при встановленні GRUB! + + + + + + + + The system installation is aborted! + Встановлення системи скасовано! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + Зазначений розділ(и) не має достатньо вільного місця для встановлення системи. Встановлена система не буде функціонувати належним чином. + + + + + + The specified partition could not be formatted (in use or unavailable). + Зазначений розділ не може бути відформатований (використовується або недійсний). + + + + An error occurred while reinstalling the GRUB! + Сталася помилка під час перевстановлення GRUB! + + + + + + + + + + There has been critical changes in the file system during this operation. + Під час цієї операції сталися критичні зміни в файлової системі. + + + + + + + + The Live write is aborted! + Запис "Live" скасовано! + + + + The selected device does not have enough space to write the Live system. + На вибраному пристрої не достатньо місця для запису системи "Live". + + + + An error occurred while unpacking the Live system files. + Сталася помилка при розпакуванні файлів системи "Live". + + + + + + + The Live conversion is aborted! + Перетворення "Live" скасовано! + + + + An error occurred while renaming the essential Live files. + Сталася помилка при перейменуванні основних файлів "Live". + + + + An error occurred while creating the .iso image. + Сталася помилка при створенні образу ISO. + + + + An error occurred while reading the .sblive image. + Сталася помилка при читанні образу .sblive. + + + + An error occurred while creating the new initramfs image. + Сталася помилка при створенні нового образу initramfs. + + + + + The restore point deletion is aborted! + Видалення точки відновлення скасовано! + + + + + An error occurred while during the process. + Сталася помилка під час процесу. + + + + + + The Live image could not be mounted. + Образ "Live" не може бути змонтований. + + + + + The system repair is aborted! + Ремонт системи скасовано! + + + + + There is not enough free space. + Не достатньо вільного місця. + + + + + + Live image + Образ "Live" + + + + + + + + Multiple mount points + Декілька точок монтування + + + + Enabled + Увімкнено + + + + Systemback worker thread is interrupted by the user. + Systemback "worker thread" перервано користувачем. + + + + Boot Live without xorg.conf file + Завантажити "Live" без файлу xorg.conf + + + + + + Boot Live system + Завантажити систему "Live" + + + + + + Boot Live in safe graphics mode + Завантажити "Live" у безпечному графічному режимі + + + + + + Boot Live in debug mode + Завантажити "Live" в режимі налагодження + + + + + + Boot system installer + + + + + Press 'E' key to edit + Натисніть клавішу 'E' для редагування + + + + Press TAB key to edit + Натисніть клавішу TAB для редагування + + + + Version: + + + + + Compilation date and time: + + + + + + Installed files: + + + + + Operating system: + + + + + + Mounted filesystems: + + + + + System language: + + + + + Translation: + + + + + The specified debug level is invalid! + + + + + The default level (1) will be used. + + + + + An error occurred while opening the following file: + + + + + An error occurred while creating the following directory: + + + + + An error occurred while removing the following file: + + + + + An error occurred while creating the following hard link: + + + + + Reference file: + + + + + An error occurred while creating the following file: + + + + + An error occurred while renaming the following item: + + + + + New path: + + + + + An error occurred while executing the following command: + + + + + Exit code: + + + + + Failed to detect the device for installing the GRUB! + + + + + An error occurred while upgrading the system! + Під час оновлення системи виникла помилка! + + + + Restart upgrade ... + Перезапуск оновлення ... + + + + This file could not be copied because it does not exist: + + + + + The following partition has no UUID: + + + + + An error occurred while creating a new partition on the following device: + + + + + An error occurred while mounting the following partition/image: + + + + + An error occurred while setting one or more flags on the following partition: + + + + + Flag(s): + + + + + An error occurred while creating the partition table on the following device: + + + + + An error occurred while unmounting the following partition/image/mount point: + + + + + An error occurred while cloning the properties of the following item: + + + + + Target item: + + + + + An error occurred while cloning the following symbolic link: + + + + + Target symlink: + + + + + An error occurred while cloning the following file: + + + + + Target file: + + + + + An error occurred while cloning the following directory: + + + + + Target directory: + + + + + An error occurred while deleting the following directory: + + + + + basic restore UI + Початковий UI відновлення + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + Використання: systemback-cli [опція] + + Опції: + + -n, --newbackup створити нову точку відновлення + + -s, --storagedir <path> отримати або встановити шлях до каталогу зберігання + точок відновлення + + -u, --upgrade оновити існуючу систему + видалити непотрібні файли і пакети + + -v, --version номер версії Systemback + + -h, --help показати цю довідку + + + + The specified storage directory path has not been set! + Зазначений шлях каталогу зберігання не встановлено! + + + + The restoration is aborted! + Відновлення скасовано! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + Відновлення завершено, але виникла помилка при перевстановленні GRUB! + + + + The restore points storage directory is not available or not writable! + Каталог зберігання точок відновлення недоступний або недоступний для запису! + + + + This stupid terminal does not support color! + Цей дурний термінал не підтримує колір! + + + + The Systemback command line interface cannot be used on a Live system! + + + + + This terminal is too small! + Цей термінал занадто малий! + + + + Available restore point(s): + Доступні точки відновлення: + + + + Quit + Вийти + + + + Selected restore point: + Обрана точка відновлення: + + + + The specified storage directory path is set. + Зазначений шлях каталогу зберігання встановлено. + + + + Restore with the following restore point: + Відновити з наступної точки відновлення: + + + + Restore with the following restore method: + Відновити з наступним способом відновлення: + + + + Users configuration files restore + Відновити конфігураційні файли користувачів + + + + + Complete configuration files restore + Відновити конфігураційні файли повністю + + + + Configuration files restore + Відновити конфігураційні файли + + + + + + You want to keep the current fstab file? + Ви хочете зберегти поточний файл fstab? + + + + + + + + + + + (Y/N) + (T/H) + + + + + + + Reinstall the GRUB 2 bootloader? + Перевстановити завантажувач GRUB 2? + + + + Start the restore? + Почати відновлення? + + + + The users configuration files full restoration are completed. + Повне відновлення конфігураційних файлів користувачів завершено. + + + + The users configuration files restoration are completed. + Відновлення конфігураційних файлів користувачів завершено. + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + Натисніть клавішу "ENTER", щоб перезавантажити комп'ютер, або 'Q', щоб вийти. + + + + Press 'ENTER' key to quit. + Натисніть клавішу "ENTER", щоб вийти. + + + + Deleting old restore point(s) + Видалення старих точок відновлення + + + + Restoring the users configuration files + Відновлюємо конфігураційні файли користувачів + + + + An error occurred while changing the access permissions of the following file: + + + + + + Cannot start the Systemback scheduler daemon! + Не можу запустити планувальник Systemback! + + + + + Missing, wrong or too much argument(s). + Не вистачає, чи помилкові параметри (або їх занадто багато). + + + + The process is disabled for this user. + Процесс заборонений для цього користувача. + + + + Root privileges are required. + Потрібні права root. + + + + This system is a Live. + Ця система є т.з. "Live-CD". + + + + Already running. + Вже виконується. + + + + Unable to daemonize. + Не в змозі "демонізувати". + + + + Cannot start the Systemback graphical user interface! + Не можу запустити Systemback GUI! + + + + Unable to get root permissions. + Не можу отримати права root. + + + + Unable to connect to the X server. + Не можу підключитися до X-серверу. + + + + Unsafe X Window authorization! + Небезпечна авторізація X Window! + + + + Please do not use 'sudo' command. + Будь ласка, не використовуйте команду "sudo". + + + diff --git a/lang/systemback_zh_CN.ts b/lang/systemback_zh_CN.ts new file mode 100644 index 0000000..5c7dd45 --- /dev/null +++ b/lang/systemback_zh_CN.ts @@ -0,0 +1,1898 @@ + + + + + systemback + + + The specified debug level is invalid! + 特定的调试等级无效! + + + + The default level (1) will be used. + 默认等级(1)将被使用。 + + + + Version: + 版本: + + + + Compilation date and time: + 编译日期和时间: + + + + + Installed files: + 已安装的文件: + + + + Operating system: + 操作系统: + + + + + Mounted filesystems: + 挂载文件系统: + + + + System language: + 系统语言: + + + + Translation: + 翻译: + + + + An error occurred while opening the following file: + 在打开以下文件时发生了一个错误: + + + + An error occurred while creating the following directory: + 在创建以下目录时发生了一个错误: + + + + An error occurred while removing the following file: + 在移除以下目录时发生了一个错误: + + + + An error occurred while creating the following hard link: + 在创建以下硬链接时发生了一个错误: + + + + Reference file: + 参考文件: + + + + An error occurred while creating the following file: + 在创建以下文件时发生了一个错误: + + + + An error occurred while renaming the following item: + 在重命名以下条目时发生了一个错误: + + + + New path: + 新路径: + + + + An error occurred while executing the following command: + 在执行以下命令时发生了一个错误: + + + + Exit code: + 退出代码: + + + + Failed to detect the device for installing the GRUB! + 为安装GRUB探测设备失败! + + + + An error occurred while upgrading the system! + 进行系统更新出现错误! + + + + Restart upgrade ... + 重新更新…… + + + + This file could not be copied because it does not exist: + 这个文件由于不存在而无法被复制: + + + + The following partition has no UUID: + 以下分区没有UUID: + + + + An error occurred while creating a new partition on the following device: + 在以下设备上新建分区时发生了一个错误: + + + + An error occurred while mounting the following partition/image: + 在挂载以下分区/镜像时发生了一个错误: + + + + An error occurred while setting one or more flags on the following partition: + 在以下分区上设置一个或多个标志位时发生了一个错误: + + + + Flag(s): + 标志位: + + + + An error occurred while creating the partition table on the following device: + 在以下设备上新建分区表时发生了一个错误: + + + + An error occurred while unmounting the following partition/image/mount point: + 在卸载以下分区/镜像/挂载点时发生了一个错误: + + + + An error occurred while cloning the properties of the following item: + 在克隆以下条目的属性时发生了一个错误: + + + + Target item: + 目标条目: + + + + An error occurred while cloning the following symbolic link: + 在克隆以下符号链接时发生了一个错误: + + + + Target symlink: + 目标链接: + + + + An error occurred while cloning the following file: + 在克隆以下文件时发生了一个错误: + + + + Target file: + 目标文件: + + + + An error occurred while cloning the following directory: + 在克隆以下目录时发生了一个错误: + + + + Target directory: + 目标目录: + + + + An error occurred while deleting the following directory: + 在删除以下目录时发生了一个错误: + + + + + Cannot start the Systemback scheduler daemon! + 无法启动Systemback计划任务守护进程! + + + + + Missing, wrong or too much argument(s). + 太少、错误或太多的参数。 + + + + The process is disabled for this user. + 这个用户无法使用该进程。 + + + + Root privileges are required. + 需要root权限。 + + + + This system is a Live. + 这个系统有Live模式。 + + + + Already running. + 已经在运行。 + + + + Unable to daemonize. + 无法创建守护进程。 + + + + Cannot start the Systemback graphical user interface! + 无法启动Systemback的图形界面! + + + + Unable to get root permissions. + 无法获得root权限。 + + + + Unable to connect to the X server. + 无法连接到X服务。 + + + + Full name of the new user: + 新用户全名: + + + + New username to login: + 新用户登录名: + + + + New user account password: + 新用户密码: + + + + New root password (optional, not recommended for Ubuntu): + 新管理员密码(可选,Ubuntu里不建议使用): + + + + New hostname: + 新主机名: + + + + + + + + + + + + + + + + Back + 返回 + + + + + + + + Next + 下一步 + + + + + Working directory + 工作目录 + + + + Created Live images + 创建支持Live模式的镜像 + + + + Name of the Live system + Live模式系统名称 + + + + + + + + Options + 选项 + + + + Write target + 写入目标设备 + + + + Live operations + Live模式选项 + + + + Include the user data files + 包含用户数据文件 + + + + Redetect devices + 重新检测设备 + + + + + + Delete + 删除 + + + + Write to target + 向目标设备写入 + + + + Convert to ISO + 转存为光盘镜像 + + + + + + Create new + 创建新的 + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + 请按照原来的结构把错误的系统分区挂载于'/mnt'文件夹。<br>(如 '/' -> '/mnt','/home' -> '/mnt/home',等。) + + + + + Mount + 挂载 + + + + Reset mounts + 挂载重置 + + + + Repair type + 修复类型 + + + + GRUB 2 repair + GRUB2修复 + + + + System files repair + 系统文件修复 + + + + + Reinstall GRUB 2 bootloader: + 重装GRUB2引导程序: + + + + + Auto detection + 自动检测 + + + + Full repair + 全面修复 + + + + Do not repair the fstab file + 别修复fstab文件 + + + + Exclude hidden user files and directories from restore points + 从还原点排除隐藏用户文件和文件夹 + + + + Exclude user data files and directories from Live system + 从Live模式系统中排除用户数据文件及文件夹 + + + + Excludable items + 可被排除条目 + + + + Excluded items + 排除项目 + + + + + Remove item from the exclusion list + 从排除列表中清除条目 + + + + + Add item to the exclusion list + 向排除列表中添加条目 + + + + Scheduler state: + 进程状态: + + + + + + + + + + + + + + Disabled + 禁用 + + + + Timer settings + 定时器设置 + + + + Waiting time before creating a new restore point: + 创建一个新的还原点的等待时间: + + + + Visible countdown time: + 倒计时可见: + + + + Pop-up window position on screen: + 屏幕中弹出窗口位置: + + + + Use silent mode + 使用静默模式 + + + + + + + More + 更多 + + + + + + + Less + 收起 + + + + Simple system backup and restore application with extra features + 简单系统备份和还原程序,新增更多功能 + + + + Project homepage: + 项目主页: + + + + Contact: + 联系: + + + + Donate: + 捐赠: + + + + Systemback version: + 系统版本: + + + + + License + 许可协议 + + + + Re-read directories + 重新读取目录 + + + + Writable Linux filesystem! + 可写Linux文件系统! + + + + + + + Cancel + 取消 + + + + + + + + + + + Maximum number of temporary restore points + 最多还原点数目 + + + + Restore points + 还原点 + + + + Highlighted restore points + 高亮还原点 + + + + Point operations + 还原点操作 + + + + Highlight + 高亮 + + + + Rename + 重命名 + + + + + + + + + + + + + + + + + + Select restore point + 选择还原点 + + + + + + + + + Storage directory + 存储文件夹 + + + + Function menu + 功能菜单 + + + + + Schedule + 进度表 + + + + + + About + 关于 + + + + + Settings + 设置 + + + + System upgrade + 系统升级 + + + + + System install + 系统安装 + + + + + + + Live system create + 创建Live系统 + + + + + System repair + 系统修复 + + + + + + System restore + 系统还原 + + + + + + + System copy + 系统复制 + + + + + Exclude + 排除 + + + + + Include + 包含目录 + + + + Change path + 变更路径 + + + + + + + + + + + + + + + + + + empty + + + + + + + + + + + + not used + 未被使用 + + + + Restore type + 还原方式 + + + + + + + + + Full restore + 齐全还原 + + + + + + + + + System files restore + 系统文件还原 + + + + User(s) configuration files restore + 用户配置文件还原 + + + + + Keep newly installed configuration files + 保留新安装的配置文件 + + + + Include user(s): + 包括用户: + + + + Do not restore the fstab file + 别还原fstab文件 + + + + Partition settings + 分区设置 + + + + + + + + Transfer user configuration files + 传递用户配置文件 + + + + Copy user data files + 复制用户数据文件 + + + + Install GRUB 2 bootloader: + 安装GRUB2引导程序: + + + + + + Format + 格式 + + + + + + Reset partitions settings + 重置分区设置 + + + + + + + + + + Unmount + 卸载 + + + + Change partition settings + 变更分区设置 + + + + Filesystem: + 文件系统: + + + + Mount point: + 挂载点: + + + + + + + + + ! Delete ! + !删除! + + + + Add new partition + 新建分区 + + + + Create new: + 新建: + + + + Need to set the mount point as '/boot/efi'! + 需要将挂载点设为'/boot/efi'! + + + + Window DPI scaling + 窗口DPI缩放 + + + + Multiplier factor for scaling the window contents + 缩放窗口内容的乘积因子 + + + + User interface + 用户界面 + + + + Window always on top + 窗口始终置顶 + + + + System + 系统 + + + + Disable scheduler daemon starting for the following users: + 禁用以下用户启动进度表进程守护: + + + + Use XZ compressor for squashfs filesystems + 在squashfs文件系统中使用XZ压缩 + + + + Override auto-detected language: + 覆盖自动检测的语言: + + + + Override the used style: + 覆盖已使用的风格: + + + + Disable incremental restore points (do not use hard links between backups) + 禁用增量还原点(不使用备份之间的硬链接) + + + + Create Live ISO images automatically (faster than the conversion) + 自动生成Live模式的ISO光盘镜像(比转换要快) + + + + Do not empty memory cache at the end of some processes + 在一些步骤结束后不清空缓存 + + + + Includable items + 可包含条目 + + + + Included items + 已包含条目 + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + 包含用户数据文件及文件夹至还原点 +它们会被作为可还原的配置文件! + + + + ! Interrupt ! + !打断! + + + + Creates a scheduled restore point within few seconds. + 在几秒钟内创建一个计划任务还原点。 + + + + + + Start + 开始 + + + + Later + 稍后再说 + + + + Systemback user authentication + Systemback用户认证 + + + + Administrator: + 管理员: + + + + Password: + 密码: + + + + Unsafe X Window authorization! + 不安全的X Window授权! + + + + Please do not use 'sudo' command. + 请不要使用'sudo'命令。 + + + + + + + + + Transfer user configuration and data files + 传递用户配置文件及用户数据 + + + + + + scheduler + 计划表 + + + + + Partition + 分区 + + + + + Size + 大小 + + + + Label + 标签 + + + + Current mount point + 当前挂载点 + + + + New mount point + 新挂载点 + + + + Filesystem + 文件系统 + + + + Device + 设备 + + + + + Top left + 左上 + + + + + + Top right + 右上 + + + + + + Center + 居中 + + + + + + Bottom left + 左下 + + + + + Bottom right + 右下 + + + + + + day(s) + + + + + + + hour(s) + 小时 + + + + + + + + minute(s) + 分钟 + + + + + + seconds + + + + + + + + Everyone + 所有人 + + + + + + Currently running system + 当前的系统 + + + + + Emptying cache + 正在删除缓存 + + + + + Flushing filesystem buffers + 清除文件系统缓冲区 + + + + + Restoring the full system + 正在做全系统还原 + + + + + Restoring the system files + 正在还原系统文件 + + + + Restoring the user(s) configuration files + 正在还原用户配置文件 + + + + Repairing the system files + 正在修复系统文件 + + + + Repairing the full system + 正在进行全系统修复 + + + + Repairing the GRUB 2 + 正在修复GRUB2 + + + + Copying the system + 正在复制系统 + + + + Installing the system + 正在安装系统 + + + + Writing Live image to the target device + 将Live镜像写入目标设备 + + + + Upgrading the system + 正在升级系统 + + + + + Deleting incomplete restore point + 正在删除未完成还原点 + + + + Interrupting the current process + 终止当前进程 + + + + Deleting old restore point + 正在删除旧还原点 + + + + + Creating restore point + 正在创建还原点 + + + + + Deleting restore point + 正在删除还原点 + + + + Converting Live system image + 转换Live系统镜像 + + + + + process + 进程 + + + + Creating Live system + 正在创建Live系统 + + + + + + + + + Reboot + 重启 + + + + + + + X restart + 重新启动X + + + + + + Live image + Live映像 + + + + Restore the system files to the following restore point: + 还原系统文件用下面还原点: + + + + Repair the system files with the following restore point: + 修复系统文件用下面还原点: + + + + Repair the complete system with the following restore point: + 全面系统修复用下面还原点: + + + + Restore the complete user(s) configuration files to the following restore point: + 还原所有用户配置文件用下面还原点: + + + + Restore the user(s) configuration files to the following restore point: + 还原用户配置文件用下面还原点: + + + + Copy the system, using the following restore point: + 是有下面还原点复制系统: + + + + Install the system, using the following restore point: + 是有下面还原点安装系统: + + + + Restore the complete system to the following restore point: + 进行全面系统还原用下面还原点: + + + + Format the %1, and write the following Live system image: + 格式化%1,并且写入一下系统镜像: + + + + Repair the GRUB 2 bootloader. + 修复GRUB2引导程序。 + + + + The user(s) configuration files full restoration are completed. + 用户配置文件全面还原已完成。 + + + + + The X server will restart automatically within 30 seconds. + X服务器30秒内会自动重启。 + + + + The user(s) configuration files restoration are completed. + 用户配置文件还原已完成。 + + + + The full system repair is completed. + 全面系统修复已完成。 + + + + The system repair is completed. + 系统修复已完成。 + + + + + The system files restoration are completed. + 系统文件还原已完成。 + + + + + + The computer will restart automatically within 30 seconds. + 计算机将在30秒内开始自动重启。 + + + + + The full system restoration is completed. + 全面系统还原已完成。 + + + + The system copy is completed. + 复杂系统已完成。 + + + + The Live system creation is completed. + 支持Live模式的系统创建完成。 + + + + The created .sblive file can be written to pendrive. + 创建的.sblive文件可以被写入随身碟。 + + + + The GRUB 2 repair is completed. + GRUB2修复已完成。 + + + + The system install is completed. + 安装系统已完成。 + + + + The Live system image write is completed. + Live系统镜像写入完成。 + + + + + An another Systemback process is currently running, please wait until it finishes. + 另一个Systemback程序正在运行,请等待结束。 + + + + + Unable to get exclusive lock! + 没法得到独占锁! + + + + + First, close all package manager. + 请先关闭所有包管理程序。 + + + + + The re-synchronization of package index files currently in progress, please wait until it finishes. + + + + + The specified name contain(s) unsupported character(s)! + 指定的名称有非支持字母! + + + + Please enter a new name. + 请选择新名称。 + + + + The system files repair are completed, but an error occurred while reinstalling the GRUB! + 系统文件修复已完成,不过安装GRUB的过程当中出现错误! + + + + + + The system may not bootable! (In general, the different architecture is causing the problem.) + 系统有可能无法启动!(基本原因是不同体系结构。) + + + + + + + The restore point creation is aborted! + 创建还原点已中止! + + + + + + Not enough free disk space to complete the process. + 磁盘没有足够自由空间。 + + + + + Root privileges are required for running the Systemback! + Systemback需要管理员权利才可以运行! + + + + + + + + The system copy is aborted! + 系统复制已中止! + + + + The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly. + 指定的分区空间不够。已复制的系统会出现错误。 + + + + The system copy is completed, but an error occurred while installing the GRUB! + 复制系统已完成,不过安装GRUB的过程当中出现错误! + + + + + You need to manually install a bootloader. + 请手动安装引导程序。 + + + + + The system restoration is aborted! + 系统还原被中止! + + + + An error occurred while reinstalling the GRUB. + 重新安装GRUB时发生了一个错误。 + + + + The full system repair is completed, but an error occurred while reinstalling the GRUB! + 全面系统修复已完成,不过安装GRUB的过程当中出现错误! + + + + + + + + The Live system creation is aborted! + Live系统创建被中止! + + + + An error occurred while creating the file system image. + 创建文件系统图像出现错误。 + + + + An error occurred while creating the container file. + 在创建容器文件时发生了一个错误。 + + + + + + The specified partition could not be mounted. + 指定的分区无法挂载。 + + + + The system install is completed, but an error occurred while installing the GRUB! + 安装系统已完成,不够安装GRUB的过程当中出现错误! + + + + + + + + The system installation is aborted! + 安装系统已中止! + + + + The specified partition(s) does not have enough free space to install the system. The installed system will not function properly. + 指定的分区空间安装系统不够用。已安装的系统运行会出现问题。 + + + + + + The specified partition could not be formatted (in use or unavailable). + 指定的分区无法格式化(因正在使用或不可用)。 + + + + An error occurred while reinstalling the GRUB! + 重装GRUB的过程当中出现错误! + + + + + + + + + + There has been critical changes in the file system during this operation. + 进行的过程当中文件系统发生了严重变化。 + + + + + + + + The Live write is aborted! + Live镜像写入被中止! + + + + The selected device does not have enough space to write the Live system. + 被选中的设备空间不足以写入Live系统。 + + + + An error occurred while unpacking the Live system files. + 解压Live系统文件时发生了一个错误。 + + + + + + + The Live conversion is aborted! + Live镜像转换被中止! + + + + An error occurred while renaming the essential Live files. + 重命名基本文件时发生了一个错误。 + + + + An error occurred while creating the .iso image. + 创建.iso镜像时发生了一个错误。 + + + + An error occurred while reading the .sblive image. + 读取.sblive镜像时发生了一个错误。 + + + + An error occurred while creating the new initramfs image. + 创建initramfs镜像时发生了一个错误。 + + + + + The restore point deletion is aborted! + 还原点删除被中止! + + + + + An error occurred while during the process. + 在处理的过程中发生了一个错误。 + + + + + + The Live image could not be mounted. + 无法挂载Live镜像。 + + + + + The system repair is aborted! + 系统修复被中止! + + + + + There is not enough free space. + 剩余空间不足。 + + + + + + + + Multiple mount points + 多个挂载点 + + + + Enabled + 已启用 + + + + Systemback worker thread is interrupted by the user. + Systemback工作进程被用户中止。 + + + + Boot Live without xorg.conf file + 不使用xorg.conf文件启动Live系统 + + + + + + Boot Live system + 启动Live系统 + + + + + + Boot system installer + 启动系统安装器 + + + + + + Boot Live in safe graphics mode + 在安全图像模式下启动Live系统 + + + + + + Boot Live in debug mode + 在调试模式下启动Live系统 + + + + Press 'E' key to edit + 按'E'键编辑 + + + + Press TAB key to edit + 按TAB键编辑 + + + + An error occurred while changing the access permissions of the following file: + 在更改以下文件的访问权限时发生了一个错误: + + + + Usage: systemback-cli [option] + + Options: + + -n, --newbackup create a new restore point + + -s, --storagedir <path> get or set the restore points storage directory path + + -u, --upgrade upgrade the current system + remove the unnecessary files and packages + + -v, --version output the Systemback version number + + -h, --help show this help + 用法:systemback-cli [选项] + + 选项: + + -n, --newbackup 新建一个还原点 + + -s, --storagedir <路径> 获得或设置花园典储存目录路径 + + -u, --upgrade 升级当前系统 + 移除不需要的文件和包 + + -v, --version 输出Systemback的版本号 + + -h, --help 显示本帮助 + + + + basic restore UI + 基本还原用户界面 + + + + The Systemback command line interface cannot be used on a Live system! + Systemback的命令行用户界面无法在Live系统上使用! + + + + This stupid terminal does not support color! + 这傻X终端不支持彩色显示! + + + + This terminal is too small! + 这终端太小了! + + + + The specified storage directory path has not been set! + 指定的存储文件夹路径还未设定! + + + + The restoration is aborted! + 还原被中止! + + + + The restoration is completed, but an error occurred while reinstalling the GRUB! + 还原已完成,不过安装GRUB的时候出现错误! + + + + The restore points storage directory is not available or not writable! + 储存还原点的文件夹不可用或不可写入! + + + + Available restore point(s): + 可用的还原点: + + + + Quit + 退出 + + + + Selected restore point: + 已选择的还原点: + + + + The specified storage directory path is set. + 指定的存储文件夹路径已设定。 + + + + Restore with the following restore point: + 使用下面还原点进行还原: + + + + Restore with the following restore method: + 使用下面的方式进行还原: + + + + Users configuration files restore + 还原用户配置文件 + + + + + Complete configuration files restore + 还原全部配置文件 + + + + Configuration files restore + 还原配置文件 + + + + + + You want to keep the current fstab file? + 保留当前的fstab文件? + + + + + + + + + + + (Y/N) + (Y/N) + + + + + + + Reinstall the GRUB 2 bootloader? + 重新安装GRUB2引导程序? + + + + Start the restore? + 开始还原? + + + + The users configuration files full restoration are completed. + 用户配置文件全面还原已完成。 + + + + The users configuration files restoration are completed. + 用户配置文件还原已完成。 + + + + Press 'ENTER' key to reboot the computer, or 'Q' to quit. + 请按ENTER重新启动电脑,或者按Q退出程序。 + + + + Press 'ENTER' key to quit. + 按'ENTER'键退出。 + + + + Deleting old restore point(s) + 删除旧的还原点 + + + + Restoring the users configuration files + 正在还原用户配置文件 + + + diff --git a/libsystemback/bstr.hpp b/libsystemback/bstr.hpp new file mode 100644 index 0000000..ca65a91 --- /dev/null +++ b/libsystemback/bstr.hpp @@ -0,0 +1,51 @@ +/* + * Copyright(C) 2015-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef BSTR_HPP +#define BSTR_HPP + +#include "sbtypedef.hpp" + +class bstr +{ +private: + QBA ba; + +public: + inline bstr() {} + inline bstr(cchar *txt) : data(txt) {} + inline bstr(cQBA &txt) : data(txt.constData()) {} + inline bstr(cQStr &txt) : ba(txt.toUtf8()), data(ba.constData()) {} + operator cchar *() const; + + cchar *data; + + cchar *rplc(cchar *bef, cchar *aft); +}; + +inline bstr::operator cchar *() const +{ + return data; +} + +inline cchar *bstr::rplc(cchar *bef, cchar *aft) +{ + return ba.replace(bef, aft); +} + +#endif diff --git a/libsystemback/lcheck.sh b/libsystemback/lcheck.sh new file mode 100755 index 0000000..eab33af --- /dev/null +++ b/libsystemback/lcheck.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright(C) 2015-2016, Krisztián Kende +# +# This file is part of the Systemback. +# +# The Systemback is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 3 of the License, or (at your option) any later +# version. +# +# The Systemback is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with the +# Systemback. If not, see . +# + +grep "*new)" /usr/include/libmount/libmount.h >/dev/null && sed "s/*new)/*new_table)/g" /usr/include/libmount/libmount.h > libmount.hpp diff --git a/libsystemback/libsystemback.pro b/libsystemback/libsystemback.pro new file mode 100644 index 0000000..f6fc07f --- /dev/null +++ b/libsystemback/libsystemback.pro @@ -0,0 +1,53 @@ +QT -= gui + +TARGET = systemback + +CONFIG += c++11 \ + exceptions_off + +TEMPLATE = lib + +DEFINES += SYSTEMBACK_LIBRARY \ + _FILE_OFFSET_BITS=64 + +system(./lcheck.sh):exists(libmount.hpp) { + DEFINES += C_MNT_LIB +} + +SOURCES += sblib.cpp + +HEADERS += sblib.hpp \ + sblib_global.hpp \ + sbtypedef.hpp \ + bstr.hpp + +RESOURCES += version.qrc + +QMAKE_CXXFLAGS += -g \ + -fno-rtti \ + -fvisibility=hidden \ + -fvisibility-inlines-hidden \ + -fno-asynchronous-unwind-tables + +QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-result + +CONFIG(debug, debug|release) { + QMAKE_CXXFLAGS_WARN_ON += -Wextra \ + -Wshadow \ + -Werror +} + +QMAKE_LFLAGS += -g \ + -Wl,-Bsymbolic-functions \ + -Wl,--as-needed \ + -fuse-ld=gold \ + -Wl,-z,relro + +! equals(QMAKE_CXX, clang++) { + QMAKE_CXXFLAGS += -flto + QMAKE_LFLAGS += -flto +} + +LIBS += -lmount \ + -lblkid \ + -lparted diff --git a/libsystemback/sblib.cpp b/libsystemback/sblib.cpp new file mode 100644 index 0000000..dcee66a --- /dev/null +++ b/libsystemback/sblib.cpp @@ -0,0 +1,4243 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "sblib.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef C_MNT_LIB +#include "libmount.hpp" +#else +#include +#endif + +#ifdef bool +#undef bool +#endif + +sb sb::SBThrd; +QTrn *sb::SBtr(nullptr); +QSL *sb::ThrdSlst; +QStr sb::ThrdStr[3], sb::eout, sb::sdir[3], sb::schdlr[2], sb::pnames[15], sb::lang, sb::style, sb::wsclng; +ullong sb::ThrdLng[]{0, 0}; +int sb::sblock[4]; +uchar sb::ThrdType, sb::ThrdChr, sb::dbglev, sb::pnumber(0), sb::ismpnt(sb::Empty), sb::schdle[]{sb::Empty, sb::Empty, sb::Empty, sb::Empty, sb::Empty, sb::Empty}, sb::waot(sb::Empty), sb::incrmtl(sb::Empty), sb::xzcmpr(sb::Empty), sb::autoiso(sb::Empty), sb::ecache(sb::Empty); +schar sb::Progress(-1); +bool sb::ThrdBool, sb::ExecKill(true), sb::ThrdKill(true), sb::ThrdRslt; + +sb::sb() +{ + qputenv("PATH", "/usr/lib/systemback:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"), + setlocale(LC_ALL, "C.UTF-8"), chdir("/"), umask(0); + + dbglev = qEnvironmentVariableIsEmpty("DBGLEV") ? Nulldbg : [] { + bool ok; + + switch(qgetenv("DBGLEV").toUShort(&ok)) { + case Errdbg: + return Nulldbg; + case Alldbg: + return Alldbg; + case Extdbg: + return Extdbg; + case Nodbg: + if(ok) return Nodbg; + default: + return Falsedbg; + } + }(); +} + +sb::~sb() +{ + if(SBtr) delete SBtr; +} + +void sb::ldtltr() +{ + QTrn *tltr(new QTrn); + cfgread(); + + if(lang == "auto") + { + if(QLocale::system().name() != "en_EN") tltr->load(QLocale::system(), "systemback", "_", "/usr/share/systemback/lang"); + } + else if(lang != "en_EN") + tltr->load("systemback_" % lang, "/usr/share/systemback/lang"); + + if(tltr->isEmpty()) + delete tltr; + else + qApp->installTranslator(SBtr = tltr); + + switch(dbglev) { + case Falsedbg: + error("\n " % tr("The specified debug level is invalid!") % "\n\n " % tr("The default level (1) will be used.") % "\n\n"), + dbglev = Nulldbg; + break; + case Extdbg: + QTS(stderr) << (isatty(fileno(stderr)) ? "\033[1;31m" % dbginf() % "\033[0m" : right(dbginf().replace("\n ", "\n"), -1)); + } +} + +void sb::print(cQStr &txt) +{ + QTS(stdout) << (isatty(fileno(stdout)) ? "\033[1m" % txt % "\033[0m" : QStr(txt).replace("\n ", "\n")); +} + +bool sb::error(QStr txt, bool dbg) +{ + auto splt([](cQStr &stxt) { + if(stxt.length() > 80) + { + QStr ftxt; + QSL llst(stxt.split('\n')); + + for(uchar a(1) ; a < llst.count() ; ++a) + { + cQStr &line(llst.at(a)); + ftxt.append('\n' % (line.length() > 79 && ! like(line, {"*: /*", "*: /*"}) ? llst.value(a).replace(line.left(79).lastIndexOf(' '), 0, '\n') : line)); + } + + return ftxt; + } + else + return stxt; + }); + + auto pfix([&txt]{ if(txt.contains("\n\n ./")) txt.replace("\n\n ./", "\n\n /"); }); + if(! dbg) goto print; + + switch(dbglev) { + case Errdbg: + case Cextdbg: + pfix(), eout.append(isatty(fileno(stderr)) ? splt(txt) : splt(txt).replace("\n ", "\n")); + break; + case Alldbg: + case Extdbg: + pfix(); +print: + QTS(stderr) << (isatty(fileno(stderr)) ? "\033[1;31m" % splt(txt) % "\033[0m" : splt(txt).replace("\n ", "\n")); + } + + return false; +} + +QStr sb::appver() +{ + QFile file(":version"); + fopen(file); + QStr vrsn(qVersion()); + + return file.readLine().trimmed() % "_Qt" % (vrsn == QT_VERSION_STR ? vrsn : vrsn % '(' % QT_VERSION_STR % ')') % '_' % +#ifdef __clang__ + "Clang" % QStr::number(__clang_major__) % '.' % QStr::number(__clang_minor__) % '.' % QStr::number(__clang_patchlevel__) +#elif defined(__INTEL_COMPILER) || ! defined(__GNUC__) + "compiler?" +#elif defined(__GNUC__) + "GCC" % QStr::number(__GNUC__) % '.' % QStr::number(__GNUC_MINOR__) % '.' % QStr::number(__GNUC_PATCHLEVEL__) +#endif + % '_' % +#ifdef __amd64__ + "amd64"; +#elif defined(__i386__) + "i386"; +#else + "arch?"; +#endif +} + +QStr sb::dbginf() +{ + QStr txt("\n Systemback\n\n " % tr("Version:") % ' ' % appver() % "\n " % tr("Compilation date and time:") % ' ' % __DATE__ % ' ' % __TIME__ % "\n " % tr("Installed files:") % [] { + QStr fls; + QSL lst{"/etc/xdg/autostart/sbschedule-kde.desktop", "/etc/xdg/autostart/sbschedule.desktop", "/usr/bin/systemback", "/usr/bin/systemback-cli", "/usr/bin/systemback-sustart", "/usr/lib/systemback/libsystemback.so", "/usr/lib/systemback/libsystemback.so.1", "/usr/lib/systemback/libsystemback.so.1.0", "/usr/lib/systemback/libsystemback.so.1.0.0", "/usr/lib/systemback/sbscheduler", "/usr/lib/systemback/sbsustart", "/usr/lib/systemback/sbsysupgrade", "/usr/share/applications/systemback-kde.desktop", "/usr/share/applications/systemback.desktop", "/usr/share/systemback/efi-amd64.bootfiles"}; + uchar ind(tr("Installed files:").length() + 2); + + if(isdir("/usr/share/systemback/lang")) + for(cQStr &file : QDir("/usr/share/systemback/lang").entryList(QDir::Files)) + if(file.endsWith(".qm")) lst.append("/usr/share/systemback/lang/" % file); + + for(cQStr &file : lst) + if(isfile(file)) fls.append((fls.isEmpty() ? " " : QStr('\n' % QStr(ind, ' '))) % file); + + return fls; + }() % "\n " % tr("Operating system:") % []() -> QStr { + QFile file("/etc/os-release"); + + if(fopen(file)) + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + if(cline.startsWith("PRETTY_NAME=\"")) return ' ' % mid(cline, 14, cline.length() - 14); + } + + return nullptr; + }() % "\n " % tr("Mounted filesystems:") % [] { + uchar ind(tr("Mounted filesystems:").length() + 2); + QStr mpts, spcs('\n' % QStr(ind++, ' ')); + QBA mnts(fload("/proc/self/mounts")); + QTS in(&mnts, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + + if(cline.startsWith("/dev/")) mpts.append((mpts.isEmpty() ? " " : spcs) % [&, ind] { + if((cline.contains("\\040") ? cline.replace("\\040", " ") : cline).length() > 81 - ind && isatty(fileno(stderr))) + { + ushort clen(cline.length()); + uchar mlen(80 - ind); + for(struct{ushort a; uchar b;} a{mlen, 0} ; a.a < clen ; a.a += mlen, ++a.b) cline.replace(a.a + a.b * ind, 0, spcs); + } + + return cline; + }()); + } + + return mpts; + }() % "\n " % tr("System language:") % ' ' % QLocale::system().name() % "\n " % tr("Translation:") % ' ' % (SBtr ? lang : QStr('-')) % "\n\n"); + + return txt; +} + +QStr sb::fdbg(cQStr &path1, cQStr &path2) +{ + switch(dbglev) { + default: + return "\n\n"; + case Extdbg: + case Cextdbg: + QStr path, txt; + int cerrno(errno); + + for(uchar a(0) ; a < 2 && ! (a && path2.isEmpty()) ; ++a) + { + txt.append('\n'), path = a ? path2 : path1; + bool cut(false); + + do { + txt.append("\n " % (cut ? path = path.left(rinstr(path, "/") - 1) : path) % "\n "); + struct stat istat; + + if(lstat(bstr(path), &istat)) + txt.append('-'); + else + { + auto perm([&istat] { + QStr prm, rwx("rwxrwxrwx"); + ushort ugo[]{S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH}; + for(uchar b(0) ; b < 9 ; ++b) prm.append((istat.st_mode & ugo[b]) ? rwx.at(b) : '-'); + if(istat.st_mode & S_ISUID) prm.replace(2, 1, (prm.at(2) == '-' ? 'S' : 's')); + if(istat.st_mode & S_ISGID) prm.replace(5, 1, (prm.at(5) == '-' ? 'S' : 's')); + if(istat.st_mode & S_ISVTX) prm.replace(8, 1, (prm.at(8) == '-' ? 'T' : 't')); + return prm; + }); + + switch(istat.st_mode & S_IFMT) { + case S_IFREG: + txt.append("f " % perm() % ' ' % QStr::number(istat.st_nlink) % ' ' % QStr::number(istat.st_uid) % ' ' % QStr::number(istat.st_gid) % ' ' % QStr::number(istat.st_dev) % ' ' % hunit(istat.st_size).replace(' ', nullptr)); + break; + case S_IFDIR: + txt.append("d " % perm() % " - " % QStr::number(istat.st_uid) % ' ' % QStr::number(istat.st_gid) % ' ' % QStr::number(istat.st_dev) % " -"); + break; + case S_IFLNK: + { + QStr lpath(rlink(path, istat.st_size)); + + txt.append("l " % perm() % ' ' % QStr::number(istat.st_nlink) % ' ' % QStr::number(istat.st_uid) % ' ' % QStr::number(istat.st_gid) % ' ' % QStr::number(istat.st_dev) % " -\n " % lpath % "\n " % [&lpath]() -> QStr { + switch(stype(lpath)) { + case Notexist: + return "-"; + case Isfile: + return "f"; + case Isdir: + return "d"; + case Islink: + return "l / " % [&lpath]() -> QChar { + switch(stype(lpath, true)) { + case Notexist: + return '-'; + case Isfile: + return 'f'; + case Isdir: + return 'd'; + case Isblock: + return 'b'; + default: + return '?'; + } + }(); + case Isblock: + return "b"; + default: + return "?"; + } + }()); + + break; + } + case S_IFBLK: + txt.append("b " % perm() % " - " % QStr::number(istat.st_uid) % ' ' % QStr::number(istat.st_gid) % ' ' % QStr::number(istat.st_dev) % ' ' % hunit(devsize(path)).replace(' ', nullptr)); + break; + default: + txt.append('?'); + } + } + + if(! cut) cut = true; + } while(path.count('/') > 1); + } + + return (txt.contains("\n ./") ? txt.replace("\n ./", "\n /") : txt) % "\n\n Errno: " % QStr::number(cerrno) % "\n\n"; + } +} + +bool sb::fopen(QFile &file) +{ + return file.open(QIODevice::ReadOnly) ? true : error("\n " % tr("An error occurred while opening the following file:") % "\n\n " % file.fileName() % fdbg(file.fileName()), true); +} + +bool sb::like(cQStr &txt, cQSL &lst, uchar mode) +{ + switch(mode) { + default: + for(cQStr &stxt : lst) + if(stxt.startsWith('*')) + { + if(stxt.endsWith('*')) + { + if(txt.contains(stxt.mid(1, stxt.length() - 2))) return true; + } + else if(txt.endsWith(stxt.mid(1, stxt.length() - 2))) + return true; + } + else if(stxt.endsWith('*')) + { + if(txt.startsWith(stxt.mid(1, stxt.length() - 2))) return true; + } + else if(txt == stxt.mid(1, stxt.length() - 2)) + return true; + + return false; + case All: + for(cQStr &stxt : lst) + if(stxt.startsWith('*')) + { + if(stxt.endsWith('*')) + { + if(! txt.contains(stxt.mid(1, stxt.length() - 2))) return false; + } + else if(! txt.endsWith(stxt.mid(1, stxt.length() - 2))) + return false; + } + else if(stxt.endsWith('*')) + { + if(! txt.startsWith(stxt.mid(1, stxt.length() - 2))) return false; + } + else if(txt != stxt.mid(1, stxt.length() - 2)) + return false; + + return true; + case Mixed: + QSL alst, nlst; + + for(cQStr &stxt : lst) + switch(stxt.at(0).toLatin1()) { + case '+': + alst.append(right(stxt, -1)); + break; + case '-': + nlst.append(right(stxt, -1)); + break; + default: + return false; + } + + return like(txt, alst, All) && like(txt, nlst); + } +} + +QStr sb::rndstr(uchar vlen) +{ + QStr val, chrs("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./"); + val.reserve(vlen), qsrand(QTime::currentTime().msecsSinceStartOfDay()); + uchar clen(vlen == 16 ? 64 : 62), num(255); + + do { + uchar prev(num); + while((num = qrand() % clen) == prev); + val.append(chrs.at(num)); + } while(val.length() < vlen); + + return val; +} + +bool sb::access(cQStr &path, uchar mode) +{ + switch(mode) { + case Read: + return QFileInfo(path).isReadable(); + case Write: + return QFileInfo(path).isWritable(); + case Exec: + return QFileInfo(path).isExecutable(); + default: + return false; + } +} + +QStr sb::fload(cQStr &path, bool ascnt) +{ + QBA ba; + { QFile file(path); + if(! fopen(file)) return nullptr; + ba = file.readAll(); } + if(! ascnt || ba.isEmpty()) return ba; + QSL lst; + lst.reserve(100); + QTS in(&ba, QIODevice::ReadOnly); + while(! in.atEnd()) lst.append(in.readLine()); + QStr str; + str.reserve(ba.size() + 1), ba.clear(); + for(ushort a(lst.count()) ; a ; --a) str.append(lst.at(a - 1) % '\n'); + return str; +} + +QBA sb::fload(cQStr &path) +{ + QFile file(path); + if(! fopen(file)) return nullptr; + return file.readAll(); +} + +bool sb::islnxfs(cQStr &path) +{ + QTemporaryFile file(path % "/.sbdirtestfile_" % rndstr()); + return file.open() && file.setPermissions(QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner | QFile::ReadGroup | QFile::ExeGroup | QFile::ReadOther) && file.permissions() == 30548; +} + +bool sb::cerr(uchar type, cQStr &str1, cQStr &str2) +{ + return error("\n " % [&, type]() -> QStr { + switch(type) { + case Crtdir: + return tr("An error occurred while creating the following directory:"); + case Rmfile: + return tr("An error occurred while removing the following file:"); + default: + return tr("An error occurred while creating the following hard link:") % "\n\n " % str2 % "\n\n " % tr("Reference file:"); + } + }() % "\n\n " % str1 % fdbg(str1, str2), true); +} + +bool sb::crtfile(cQStr &path, cQStr &txt) +{ + auto err([&] { return error("\n " % tr("An error occurred while creating the following file:") % "\n\n " % path % fdbg(path), true); }); + uchar otp(stype(path)); + if(! (like(otp, {Notexist, Isfile}) && isdir(left(path, rinstr(path, "/") - 1)))) return err(); + QFile file(path); + if(! file.open(QFile::WriteOnly | QFile::Truncate) || file.write(txt.toUtf8()) == -1) return err(); + file.flush(); + return otp == Isfile || file.setPermissions(QFile::ReadOwner | QFile::WriteOwner | QFile::ReadGroup | QFile::ReadOther) ? true : err(); +} + +bool sb::rename(cQStr &opath, cQStr &npath) +{ + return QFile::rename(opath, npath) ? true : error("\n " % tr("An error occurred while renaming the following item:") % "\n\n " % opath % "\n\n " % tr("New path:") % "\n\n " % npath % fdbg(opath, npath), true); +} + +template inline bool sb::crthlnk(const T1 &srclnk, const T2 &newlnk) +{ + return link(bstr(srclnk), bstr(newlnk)) ? cerr(Crthlnk, srclnk, newlnk) : true; +} + +bool sb::lock(uchar type) +{ + return (sblock[type] = open([type] { + switch(type) { + case Sblock: + return isdir("/run") ? "/run/systemback.lock" : "/var/run/systemback.lock"; + case Dpkglock: + return "/var/lib/dpkg/lock"; + case Aptlock: + return "/var/lib/apt/lists/lock"; + default: + return isdir("/run") ? "/run/sbscheduler.lock" : "/var/run/sbscheduler.lock"; + } + }(), O_RDWR | O_CREAT, 0644)) > -1 && ! lockf(sblock[type], F_TLOCK, 0); +} + +void sb::unlock(uchar type) +{ + close(sblock[type]); +} + +void sb::delay(ushort msec) +{ + QTime time; + time.start(); + do msleep(10), qApp->processEvents(); + while(ushort(time.elapsed()) < msec); +} + +void sb::thrdelay() +{ + while(SBThrd.isRunning()) msleep(10), qApp->processEvents(); +} + +bool sb::cfgwrite(cQStr &file) +{ + QStr cdir(file.startsWith("/.") ? isdir("/.sbsystemcopy" % sdir[0]) ? sdir[0] : "/home" : nullptr); + + return crtfile(file, "# Restore points settings\n# storage_directory=\n# storage_dir_is_mount_point=[true/false]\n# max_temporary_restore_points=[3-10]\n# use_incremental_backup_method=[true/false]\n\n" + "storage_directory=" % (cdir.isEmpty() ? sdir[0] : cdir) % + "\nstorage_dir_is_mount_point=" % (cdir.isEmpty() ? ismpnt ? "true" : "false" : issmfs("/.sbsystemcopy" % cdir, cdir.count('/') == 1 ? "/.sbsystemcopy" : QStr("/.sbsystemcopy" % left(cdir, rinstr(cdir, "/") - 1))) ? "false" : "true") % + "\nmax_temporary_restore_points=" % QStr::number(pnumber) % + "\nuse_incremental_backup_method=" % (incrmtl ? "true" : "false") % + "\n\n\n# Live system settings\n# working_directory=\n# use_xz_compressor=[true/false]\n# auto_iso_images=[true/false]\n\n" + "working_directory=" % sdir[2] % + "\nuse_xz_compressor=" % (xzcmpr ? "true" : "false") % + "\nauto_iso_images=" % (autoiso ? "true" : "false") % + "\n\n\n# Scheduler settigns\n# enabled=[true/false]\n# schedule=[0-7]:[0-23]:[0-59]:[10-99]\n# silent=[true/false]\n# window_position=[topleft/topright/center/bottomleft/bottomright]\n# disable_starting_for_users=[false/everyone/:]\n\n" + "enabled=" % (cdir.isEmpty() && schdle[0] ? "true" : "false") % + "\nschedule=" % QStr::number(schdle[1]) % ':' % QStr::number(schdle[2]) % ':' % QStr::number(schdle[3]) % ':' % QStr::number(schdle[4]) % + "\nsilent=" % (schdle[5] ? "true" : "false") % + "\nwindow_position=" % schdlr[0] % + "\ndisable_starting_for_users=" % schdlr[1] % + "\n\n\n# User interface settings\n# language=[auto/]\n\n" + "language=" % lang % + "\n\n\n# Graphical user interface settings\n# style=[auto/]\n# window_scaling_factor=[auto/1/1.5/2]\n# always_on_top=[true/false]\n\n" + "style=" % style % + "\nwindow_scaling_factor=" % wsclng % + "\nalways_on_top=" % (waot ? "true" : "false") % + "\n\n\n# Host system settings\n# disable_cache_emptying=[true/false]\n\n" % + "disable_cache_emptying=" % (ecache ? "false" : "true") % '\n'); +} + +void sb::cfgread() +{ + if(! isdir("/etc/systemback")) + crtdir("/etc/systemback"); + else if(isfile(cfgfile)) + { + QFile file(cfgfile); + + if(fopen(file)) + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()), cval(right(cline, -instr(cline, "="))); + + if(! (cval.isEmpty() || cval.startsWith('#'))) + { + if(cline.startsWith("storage_directory=")) + sdir[0] = cval; + else if(cline.startsWith("storage_dir_is_mount_point=")) + { + if(cval == "true") + ismpnt = True; + else if(cval == "false") + ismpnt = False; + } + else if(cline.startsWith("max_temporary_restore_points=")) + pnumber = cval.toUShort(); + else if(cline.startsWith("use_incremental_backup_method=")) + { + if(cval == "true") + incrmtl = True; + else if(cval == "false") + incrmtl = False; + } + else if(cline.startsWith("working_directory=")) + sdir[2] = cval; + else if(cline.startsWith("use_xz_compressor=")) + { + if(cval == "true") + xzcmpr = True; + else if(cval == "false") + xzcmpr = False; + } + else if(cline.startsWith("auto_iso_images=")) + { + if(cval == "true") + autoiso = True; + else if(cval == "false") + autoiso = False; + } + else if(cline.startsWith("enabled=")) + { + if(cval == "true") + schdle[0] = True; + else if(cval == "false") + schdle[0] = False; + } + else if(cline.startsWith("schedule=")) + { + QSL vals(cval.split(':')); + + if(vals.count() == 4) + for(uchar a(0) ; a < 4 ; ++a) + { + bool ok; + uchar num(vals.at(a).toUShort(&ok)); + if(ok) schdle[a + 1] = num; + } + } + else if(cline.startsWith("silent=")) + { + if(cval == "true") + schdle[5] = True; + else if(cval == "false") + schdle[5] = False; + } + else if(cline.startsWith("window_position=")) + schdlr[0] = cval; + else if(cline.startsWith("disable_starting_for_users=")) + schdlr[1] = cval; + else if(cline.startsWith("language=")) + lang = cval; + else if(cline.startsWith("style=")) + style = cval; + else if(cline.startsWith("window_scaling_factor=")) + wsclng = cval; + else if(cline.startsWith("always_on_top=")) + { + if(cval == "true") + waot = True; + else if(cval == "false") + waot = False; + } + else if(cline.startsWith("disable_cache_emptying=")) + { + if(cval == "true") + ecache = False; + else if(cval == "false") + ecache = True; + } + } + } + } + + bool cfgupdt(false); + + if(sdir[0].isEmpty()) + { + sdir[0] = "/home", cfgupdt = true; + if(ismpnt != Empty) ismpnt = Empty; + if(! isdir("/home/Systemback")) crtdir("/home/Systemback"); + if(! isfile("/home/Systemback/.sbschedule")) crtfile("/home/Systemback/.sbschedule"); + } + else + { + if(! isdir(sdir[0] % "/Systemback") && isdir(sdir[0]) && ! (ismpnt == True && issmfs(sdir[0], sdir[0].count('/') == 1 ? "/" : left(sdir[0], rinstr(sdir[0], "/") - 1))) && crtdir(sdir[0] % "/Systemback")) crtfile(sdir[0] % "/Systemback/.sbschedule"); + QStr cpath(QDir::cleanPath(sdir[0])); + if(sdir[0] != cpath) sdir[0] = cpath, cfgupdt = true; + } + + if(sdir[2].isEmpty()) + { + sdir[2] = "/home"; + if(! cfgupdt) cfgupdt = true; + } + else + { + QStr cpath(QDir::cleanPath(sdir[2])); + + if(sdir[2] != cpath) + { + sdir[2] = cpath; + if(! cfgupdt) cfgupdt = true; + } + } + + if(ismpnt == Empty) + { + QStr pdir(sdir[0].count('/') == 1 ? "/" : left(sdir[0], rinstr(sdir[0], "/") - 1)); + ismpnt = sdir[0] != pdir && isdir(pdir) && ! issmfs(sdir[0], pdir); + if(! cfgupdt) cfgupdt = true; + } + + if(incrmtl == Empty) + { + incrmtl = True; + if(! cfgupdt) cfgupdt = true; + } + + if(xzcmpr == Empty) + { + xzcmpr = False; + if(! cfgupdt) cfgupdt = true; + } + + if(autoiso == Empty) + { + autoiso = False; + if(! cfgupdt) cfgupdt = true; + } + + if(schdle[0] == Empty) + { + schdle[0] = False; + if(! cfgupdt) cfgupdt = true; + } + + if(schdle[1] > 7 || schdle[2] > 23 || schdle[3] > 59 || schdle[4] < 10 || schdle[4] > 99) + { + schdle[1] = 1, schdle[2] = schdle[3] = 0, schdle[4] = 10; + if(! cfgupdt) cfgupdt = true; + } + else if(schdle[3] < 30 && ! (schdle[1] || schdle[2])) + { + schdle[3] = 30; + if(! cfgupdt) cfgupdt = true; + } + + if(schdle[5] == Empty) + { + schdle[5] = False; + if(! cfgupdt) cfgupdt = true; + } + + if(! like(schdlr[0], {"_topleft_", "_topright_", "_center_", "_bottomleft_", "_bottomright_"})) + { + schdlr[0] = "topright"; + if(! cfgupdt) cfgupdt = true; + } + + if(! like(schdlr[1], {"_false_", "_everyone_", "_:*"})) + { + schdlr[1] = "false"; + if(! cfgupdt) cfgupdt = true; + } + + if(pnumber < 3 || pnumber > 10) + { + pnumber = 5; + if(! cfgupdt) cfgupdt = true; + } + + if(lang.isEmpty() || ! (lang == "auto" || (lang.length() == 5 && lang.at(2) == '_' && lang.at(0).isLower() && lang.at(1).isLower() && lang.at(3).isUpper() && lang.at(4).isUpper()))) + { + lang = "auto"; + if(! cfgupdt) cfgupdt = true; + } + + if(style.isEmpty() || style.contains(' ')) + { + style = "auto"; + if(! cfgupdt) cfgupdt = true; + } + + if(! like(wsclng, {"_auto_", "_1_", "_1.5_", "_2_"})) + { + wsclng = "auto"; + if(! cfgupdt) cfgupdt = true; + } + + if(waot == Empty) + { + waot = False; + if(! cfgupdt) cfgupdt = true; + } + + if(ecache == Empty) + { + ecache = True; + if(! cfgupdt) cfgupdt = true; + } + + sdir[1] = sdir[0] % "/Systemback"; + if(cfgupdt) cfgwrite(); + + for(cQStr &file : {excfile, incfile}) + if(! isfile(file)) crtfile(file); +} + +bool sb::execsrch(cQStr &fname, cQStr &ppath) +{ + for(cQStr &path : qgetenv("PATH").split(':')) + { + QStr fpath(ppath % path % '/' % fname); + if(isfile(fpath)) return access(fpath, Exec); + } + + return false; +} + +uchar sb::exec(cQStr &cmd, uchar flag, cQStr &envv) +{ + auto exit([&cmd](uchar rv) -> uchar { + if(! ExecKill && rv && ! like(cmd, {"_apt*", "_dpkg*", "_sbscheduler*"})) error("\n " % tr("An error occurred while executing the following command:") % "\n\n " % cmd % "\n\n " % tr("Exit code:") % ' ' % QStr::number(rv) % "\n\n", true); + return rv; + }); + + if(ExecKill) ExecKill = false; + bool silent, bckgrnd, wait; + uchar rprcnt; + + if(flag == Noflag) + silent = bckgrnd = wait = false, rprcnt = 0; + else + { + silent = flag != (flag & ~Silent), wait = flag != (flag & ~Wait); + if((rprcnt = (bckgrnd = flag != (flag & ~Bckgrnd)) || wait || flag == (flag & ~Prgrss) ? 0 : cmd.startsWith("mksquashfs") ? 1 : cmd.startsWith("genisoimage") ? 2 : cmd.startsWith("tar -cf") ? 3 : cmd.startsWith("tar -xf") ? 4 : 0)) Progress = 0; + } + + QProcess proc; + + if(silent) + proc.setStandardOutputFile("/dev/null"), proc.setStandardErrorFile("/dev/null"); + else if(! rprcnt) + proc.setProcessChannelMode(QProcess::ForwardedChannels), proc.setInputChannelMode(QProcess::ForwardedInputChannel); + + if(! envv.isEmpty()) + { + QProcessEnvironment env(QProcessEnvironment::systemEnvironment()); + env.insert(left(envv, instr(envv, "=") - 1), right(envv, envv.length() - instr(envv, "="))), proc.setProcessEnvironment(env); + } + + if(bckgrnd) return proc.startDetached(cmd) ? 0 : exit(255); + proc.start(cmd, QProcess::ReadOnly); + while(proc.state() == QProcess::Starting) msleep(10), qApp->processEvents(); + if(proc.error() == QProcess::FailedToStart) return exit(255); + + if(wait) + proc.waitForFinished(-1); + else + { + if(rprcnt == 1) setpriority(0, proc.pid(), 10); + ullong inum(0); + uchar cperc; + + while(proc.state() == QProcess::Running) + { + msleep(10), qApp->processEvents(); + if(ExecKill) proc.kill(); + + switch(rprcnt) { + case 1: + if(Progress < (cperc = ((inum += proc.readAllStandardOutput().count('\n')) * 100 + 50) / ThrdLng[0])) Progress = cperc; + QTS(stderr) << proc.readAllStandardError(); + + if(dfree(sdir[2]) < 104857600) + { + proc.kill(); + return exit(255); + } + + break; + case 2: + { + QStr pout(proc.readAllStandardError()); + if(Progress < (cperc = mid(pout, rinstr(pout, "%") - 5, 2).toUShort())) Progress = cperc; + break; + } + case 3: + if(! ThrdLng[0]) + { + QBA itms; + QUCL itmst; + itms.reserve(10000), itmst.reserve(500); + ushort lcnt(0); + rodir(itms, itmst, sdir[2] % "/.sblivesystemcreate"); + + if(! itmst.isEmpty()) + { + QTS in(&itms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()); + if(itmst.at(lcnt++) == Isfile) ThrdLng[0] += fsize(sdir[2] % "/.sblivesystemcreate/" % item); + } + } + } + else if(isfile(ThrdStr[0]) && Progress < (cperc = (fsize(ThrdStr[0]) * 100 + 50) / ThrdLng[0])) + Progress = cperc; + + break; + case 4: + QBA itms; + QUCL itmst; + itms.reserve(10000), itmst.reserve(500); + ushort lcnt(0); + rodir(itms, itmst, ThrdStr[0]); + + if(! itmst.isEmpty()) + { + QTS in(&itms, QIODevice::ReadOnly); + ullong size(0); + + while(! in.atEnd()) + { + QStr item(in.readLine()); + if(itmst.at(lcnt++) == Isfile) size += fsize(ThrdStr[0] % '/' % item); + } + + if(Progress < (cperc = (size * 100 + 50) / ThrdLng[0])) Progress = cperc; + } + } + } + } + + return exit(proc.exitStatus() == QProcess::CrashExit ? 255 : proc.exitCode()); +} + +uchar sb::exec(cQSL &cmds) +{ + uchar rv; + + for(cQStr &cmd : cmds) + if((rv = exec(cmd))) return rv; + + return 0; +} + +bool sb::mcheck(cQStr &item, cQStr &mnts) +{ + cQStr &itm(item.contains(' ') ? bstr(item).rplc(" ", "\\040") : item); + + if(! itm.startsWith("/dev/")) + return itm.endsWith('/') && itm.length() > 1 ? like(mnts, {"* " % left(itm, -1) % " *", "* " % itm % "*"}) : mnts.contains(' ' % itm % ' '); + else if(QStr('\n' % mnts).contains('\n' % itm % (itm.length() > (item.contains("mmc") ? 12 : 8) ? " " : nullptr))) + return true; + else + { + blkid_probe pr(blkid_new_probe_from_filename(bstr(itm))); + cchar *val(nullptr); + blkid_do_probe(pr), blkid_probe_lookup_value(pr, "UUID", &val, nullptr); + QStr uuid(val); + blkid_free_probe(pr); + return ! uuid.isEmpty() && QStr('\n' % mnts).contains("\n/dev/disk/by-uuid/" % uuid % ' '); + } +} + +QStr sb::gdetect(cQStr rdir) +{ + QStr mnts(fload("/proc/self/mounts", true)); + QTS in(&mnts, QIODevice::ReadOnly); + QSL incl[]{{"* " % rdir % " *", "* " % rdir % (rdir.endsWith('/') ? nullptr : "/") % "boot *"}, {"_/dev/sd*", "_/dev/hd*", "_/dev/vd*"}}; + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + + if(like(cline, incl[0])) + { + if(like(cline, incl[1])) + return left(cline, 8); + else if(cline.startsWith("/dev/mmcblk")) + return left(cline, 12); + else if(cline.startsWith("/dev/disk/by-uuid")) + { + QStr uid(right(left(cline, instr(cline, " ") - 1), -18)); + + if(islink("/dev/disk/by-uuid/" % uid)) + { + QStr dev(QFile("/dev/disk/by-uuid/" % uid).readLink()); + return left(dev, dev.contains("mmc") ? 12 : 8); + } + } + + break; + } + } + + error("\n " % tr("Failed to detect the device for installing the GRUB!") % "\n\n", true); + return nullptr; +} + +void sb::pupgrade() +{ + bool rerun; + + do { + rerun = false; + + for(uchar a(0) ; a < 15 ; ++a) + if(! pnames[a].isEmpty()) pnames[a].clear(); + + if(isdir(sdir[1]) && access(sdir[1], Write)) + { + for(cQStr &item : QDir(sdir[1]).entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)) + if(! item.contains(' ')) + { + QStr pre(left(item, 4)); + + if(pre.at(1).isDigit() && pre.at(2).isDigit() && pre.at(3) == '_') + { + if(pre.at(0) == 'S') + { + if(pre.at(1) == '0' || mid(pre, 2, 2) == "10") pnames[mid(pre, 2, 2).toUShort() - 1] = right(item, -4); + } + else if(pre.at(0) == 'H' && pre.at(1) == '0' && like(pre.at(2), {"_1_", "_2_", "_3_", "_4_", "_5_"})) + pnames[9 + mid(pre, 3, 1).toUShort()] = right(item, -4); + } + } + + for(uchar a(14) ; a ; --a) + if(! (a == 10 || pnames[a].isEmpty()) && pnames[a - 1].isEmpty()) + { + rename(sdir[1] % (a > 10 ? QStr("/H0" % QStr::number(a - 9)) : (a < 9 ? "/S0" : "/S") % QStr::number(a + 1)) % '_' % pnames[a], sdir[1] % (a > 10 ? ("/H0" % QStr::number(a - 10)) : "/S0" % QStr::number(a)) % '_' % pnames[a]); + if(! rerun) rerun = true; + } + } + } while(rerun); +} + +void sb::supgrade() +{ + exec("apt-get update"); + + QStr fyes([] { + QProcess proc; + proc.start("apt -v", QProcess::ReadOnly), proc.waitForFinished(-1); + QStr sout(proc.readAllStandardOutput()); + return sout.length() < 7 || mid(sout, 5, 3).replace('.', nullptr).toUShort() < 12 ? "--force-yes" : "--allow-downgrades --allow-change-held-packages"; + }()); + + forever + { + if(! exec({"apt-get install -fym " % fyes, "dpkg --configure -a", "apt-get dist-upgrade --no-install-recommends -ym " % fyes, "apt-get autoremove --purge -y"})) + { + QStr rklist; + + { + QSL dlst(QDir("/boot").entryList(QDir::Files, QDir::Reversed)); + + for(cQStr &item : dlst) + if(item.startsWith("vmlinuz-")) + { + QStr vmlinuz(right(item, -8)), kernel(left(vmlinuz, instr(vmlinuz, "-") - 1)), kver(mid(vmlinuz, kernel.length() + 2, instr(vmlinuz, "-", kernel.length() + 2) - kernel.length() - 2)); + + if(isnum(kver) && vmlinuz.startsWith(kernel % '-' % kver % '-') && ! rklist.contains(kernel % '-' % kver % "-*")) + { + for(ushort a(1) ; a < 101 ; ++a) + { + QStr subk(kernel % '-' % QStr::number(kver.toUShort() - a)); + + for(cQStr &ritem : dlst) + if(ritem.startsWith("vmlinuz-" % subk % '-') && ! rklist.contains(' ' % subk % "-*")) rklist.append(' ' % subk % "-*"); + } + } + } + } + + uchar cproc(rklist.isEmpty() ? 0 : exec("apt-get autoremove --purge " % rklist)); + + if(like(cproc, {0, 1})) + { + { + QProcess proc; + proc.start("dpkg -l", QProcess::ReadOnly), proc.waitForFinished(-1); + QBA sout(proc.readAllStandardOutput()); + QStr iplist; + QTS in(&sout, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + if(cline.startsWith("rc")) iplist.append(' ' % mid(cline, 5, instr(cline, " ", 5) - 5)); + } + + if(! iplist.isEmpty()) exec("dpkg --purge " % iplist); + } + + exec("apt-get clean"); + + { + QSL dlst(QDir("/var/cache/apt").entryList(QDir::Files)); + + for(uchar a(0) ; a < dlst.count() ; ++a) + { + cQStr &item(dlst.at(a)); + if(item.contains(".bin.")) rmfile("/var/cache/apt/" % item); + } + } + + for(cQStr &item : QDir("/lib/modules").entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)) + if(! exist("/boot/vmlinuz-" % item)) QDir("/lib/modules/" % item).removeRecursively(); + + break; + } + } + else + exec("dpkg --configure -a"); + + exec({"tput reset", "tput civis"}); + + for(uchar a(3) ; a ; --a) error("\n " % tr("An error occurred while upgrading the system!") % '\n'), + print("\n " % tr("Restart upgrade ...") % ' ' % QStr::number(a)), + sleep(1), exec("tput cup 0 0"); + + exec("tput reset"); + } +} + +ullong sb::devsize(cQStr &dev) +{ + ullong bsize; + int odev; + bool err; + + if(! (err = (odev = open(bstr(dev), O_RDONLY)) == -1)) + { + if(ioctl(odev, BLKGETSIZE64, &bsize) == -1) err = true; + close(odev); + } + + return err ? 0 : bsize; +} + +bool sb::copy(cQStr &srcfile, cQStr &newfile) +{ + if(! isfile(srcfile)) return error("\n " % tr("This file could not be copied because it does not exist:") % "\n\n " % srcfile % fdbg(srcfile), true); + ThrdType = Copy, + ThrdStr[0] = srcfile, + ThrdStr[1] = newfile, + SBThrd.start(), thrdelay(); + return ThrdRslt; +} + +QStr sb::ruuid(cQStr &part) +{ + ThrdType = Ruuid, + ThrdStr[0] = part, + SBThrd.start(), thrdelay(); + if(ThrdStr[1].isEmpty()) error("\n " % tr("The following partition has no UUID:") % "\n\n " % part % "\n\n", true); + return ThrdStr[1]; +} + +bool sb::srestore(uchar mthd, cQStr &usr, cQStr &srcdir, cQStr &trgt, bool sfstab) +{ + ThrdType = Srestore, + ThrdChr = mthd, + ThrdStr[0] = usr, + ThrdStr[1] = srcdir, + ThrdStr[2] = trgt, + ThrdBool = sfstab, + SBThrd.start(), thrdelay(); + return ThrdRslt; +} + +bool sb::mkpart(cQStr &dev, ullong start, ullong len, uchar type) +{ + auto err([&dev] { return error("\n " % tr("An error occurred while creating a new partition on the following device:") % "\n\n " % dev % fdbg(dev), true); }); + if(dev.length() > (dev.contains("mmc") ? 12 : 8) || stype(dev) != Isblock) return err(); + ThrdType = Mkpart, + ThrdStr[0] = dev, + ThrdLng[0] = start, + ThrdLng[1] = len, + ThrdChr = type, + SBThrd.start(), thrdelay(); + return ThrdRslt ? true : err(); +} + +bool sb::mount(cQStr &dev, cQStr &mpoint, cQStr &moptns) +{ + auto err([&dev] { return error("\n " % tr("An error occurred while mounting the following partition/image:") % "\n\n " % dev % fdbg(dev), true); }); +#ifdef C_MNT_LIB + if(moptns == "loop") return exec("mount -o loop " % dev % ' ' % mpoint) ? err() : true; +#endif + ThrdType = Mount, + ThrdStr[0] = dev, + ThrdStr[1] = mpoint, + ThrdStr[2] = moptns, + SBThrd.start(), thrdelay(); + return ThrdRslt ? true : err(); +} + +bool sb::scopy(uchar mthd, cQStr &usr, cQStr &srcdir) +{ + ThrdType = Scopy, + ThrdChr = mthd, + ThrdStr[0] = usr, + ThrdStr[1] = srcdir, + SBThrd.start(), thrdelay(); + return ThrdRslt; +} + +bool sb::crtrpoint(cQStr &pname) +{ + ThrdType = Crtrpoint, + ThrdStr[0] = "/.S00_" % pname, + SBThrd.start(), thrdelay(); + return ThrdRslt; +} + +bool sb::setpflag(cQStr &part, cQStr &flags) +{ + auto err([&] { return error("\n " % tr("An error occurred while setting one or more flags on the following partition:") % "\n\n " % part % "\n\n " % tr("Flag(s):") % ' ' % flags % fdbg(part), true); }); + { bool ismmc(part.contains("mmc")); + if(part.length() < (ismmc ? 14 : 9) || stype(part) != Isblock || stype(left(part, (ismmc ? 12 : 8))) != Isblock) return err(); } + ThrdType = Setpflag, + ThrdStr[0] = part, + ThrdStr[1] = flags, + SBThrd.start(), thrdelay(); + return ThrdRslt ? true : err(); +} + +bool sb::lvprpr(bool iudata) +{ + ThrdType = Lvprpr, + ThrdBool = iudata, + SBThrd.start(), thrdelay(); + return ThrdRslt; +} + +bool sb::mkptable(cQStr &dev, cQStr &type) +{ + auto err([&dev] { return error("\n " % tr("An error occurred while creating the partition table on the following device:") % "\n\n " % dev % fdbg(dev), true); }); + if(dev.length() > (dev.contains("mmc") ? 12 : 8) || stype(dev) != Isblock) return err(); + ThrdType = Mkptable, + ThrdStr[0] = dev, + ThrdStr[1] = type, + SBThrd.start(), thrdelay(); + return ThrdRslt ? true : err(); +} + +bool sb::remove(cQStr &path) +{ + ThrdType = Remove, + ThrdStr[0] = path, + SBThrd.start(), thrdelay(); + return ThrdRslt; +} + +bool sb::umount(cQStr &dev) +{ + ThrdType = Umount, + ThrdStr[0] = dev, + SBThrd.start(), thrdelay(); + return ThrdRslt ? true : error("\n " % tr("An error occurred while unmounting the following partition/image/mount point:") % "\n\n " % dev % fdbg(dev), true); +} + +void sb::readlvdevs(QSL &strlst) +{ + ThrdType = Readlvdevs, + ThrdSlst = &strlst, + SBThrd.start(), thrdelay(); +} + +void sb::readprttns(QSL &strlst) +{ + ThrdType = Readprttns, + ThrdSlst = &strlst, + SBThrd.start(), thrdelay(); +} + +void sb::fssync() +{ + ThrdType = Sync, + SBThrd.start(), thrdelay(); +} + +void sb::delpart(cQStr &part) +{ + if(stype(part) == Isblock) + { + ThrdType = Delpart, + ThrdStr[0] = part, + SBThrd.start(), thrdelay(); + } +} + +inline QStr sb::rlink(cQStr &path, ushort blen) +{ + char rpath[blen]; + short rlen(readlink(bstr(path), rpath, blen)); + return rlen > 0 ? QStr(rpath).left(rlen) : nullptr; +} + +uchar sb::fcomp(cQStr &file1, cQStr &file2) +{ + struct stat fstat[2]; + + return stat(bstr(file1), &fstat[0]) || stat(bstr(file2), &fstat[1]) ? 0 + : fstat[0].st_size == fstat[1].st_size && fstat[0].st_mtim.tv_sec == fstat[1].st_mtim.tv_sec ? fstat[0].st_mode == fstat[1].st_mode && fstat[0].st_uid == fstat[1].st_uid && fstat[0].st_gid == fstat[1].st_gid ? 2 : 1 : 0; +} + +bool sb::cpertime(cQStr &srcitem, cQStr &newitem, bool skel) +{ + auto err([&] { return error("\n " % tr("An error occurred while cloning the properties of the following item:") % "\n\n " % srcitem % "\n\n " % tr("Target item:") % "\n\n " % newitem % fdbg(srcitem, newitem), true); }); + struct stat istat[2]; + if(stat(bstr(srcitem), &istat[0])) return err(); + bstr nitem(newitem); + if(stat(nitem, &istat[1])) return err(); + + if(skel) + { + struct stat ustat; + if(stat(bstr(left(newitem, instr(newitem, "/", 21) - 1)), &ustat)) return err(); + istat[0].st_uid = ustat.st_uid, istat[0].st_gid = ustat.st_gid; + } + + if(istat[0].st_uid != istat[1].st_uid || istat[0].st_gid != istat[1].st_gid) + { + if(chown(nitem, istat[0].st_uid, istat[0].st_gid) || ((istat[0].st_mode != (istat[0].st_mode & ~(S_ISUID | S_ISGID)) || istat[0].st_mode != istat[1].st_mode) && chmod(nitem, istat[0].st_mode))) return err(); + } + else if(istat[0].st_mode != istat[1].st_mode && chmod(nitem, istat[0].st_mode)) + return err(); + + if(istat[0].st_atim.tv_sec != istat[1].st_atim.tv_sec || istat[0].st_mtim.tv_sec != istat[1].st_mtim.tv_sec) + { + utimbuf sitimes; + sitimes.actime = istat[0].st_atim.tv_sec, sitimes.modtime = istat[0].st_mtim.tv_sec; + if(utime(nitem, &sitimes)) return err(); + } + + return true; +} + +bool sb::cplink(cQStr &srclink, cQStr &newlink) +{ + auto err([&] { return error("\n " % tr("An error occurred while cloning the following symbolic link:") % "\n\n " % srclink % "\n\n " % tr("Target symlink:") % "\n\n " % newlink % fdbg(srclink, newlink), true); }); + struct stat sistat; + if(lstat(bstr(srclink), &sistat) || ! S_ISLNK(sistat.st_mode)) return err(); + QStr path(rlink(srclink, sistat.st_size)); + bstr nlink(newlink); + if(path.isEmpty() || symlink(bstr(path), nlink)) return err(); + timeval sitimes[2]; + sitimes[0].tv_sec = sistat.st_atim.tv_sec, sitimes[1].tv_sec = sistat.st_mtim.tv_sec, sitimes[0].tv_usec = sitimes[1].tv_usec = 0; + return lutimes(nlink, sitimes) ? err() : true; +} + +bool sb::cpfile(cQStr &srcfile, cQStr &newfile, bool skel) +{ + auto err([&] { return error("\n " % tr("An error occurred while cloning the following file:") % "\n\n " % srcfile % "\n\n " % tr("Target file:") % "\n\n " % newfile % fdbg(srcfile, newfile), true); }); + int src, dst; + struct stat fstat; + { bstr sfile(srcfile); + if(stat(sfile, &fstat) || (src = open(sfile, O_RDONLY | O_NOATIME)) == -1) return err(); } + bstr nfile(newfile); + bool herr; + + if(! (herr = (dst = creat(nfile, fstat.st_mode)) == -1)) + { + if(fstat.st_size) + { + llong size(0); + + do { + llong csize(size) +#ifdef __i386__ + , rsize(fstat.st_size - size) +#endif + ; + if((size += sendfile(dst, src, nullptr, +#ifdef __i386__ + rsize < 2147483648 ? rsize : 2147483647 +#else + fstat.st_size - size +#endif + )) <= csize) herr = true; + } while(! herr && size < fstat.st_size); + } + + close(dst); + } + + close(src); + if(herr) return err(); + + if(skel) + { + struct stat ustat; + if(stat(bstr(left(newfile, instr(newfile, "/", 21) - 1)), &ustat)) return err(); + fstat.st_uid = ustat.st_uid, fstat.st_gid = ustat.st_gid; + } + + if(fstat.st_uid + fstat.st_gid && (chown(nfile, fstat.st_uid, fstat.st_gid) || (fstat.st_mode != (fstat.st_mode & ~(S_ISUID | S_ISGID)) && chmod(nfile, fstat.st_mode)))) return err(); + utimbuf sftimes; + sftimes.actime = fstat.st_atim.tv_sec, sftimes.modtime = fstat.st_mtim.tv_sec; + return utime(nfile, &sftimes) ? err() : true; +} + +bool sb::cpdir(cQStr &srcdir, cQStr &newdir) +{ + auto err([&] { return error("\n " % tr("An error occurred while cloning the following directory:") % "\n\n " % srcdir % "\n\n " % tr("Target directory:") % "\n\n " % newdir % fdbg(srcdir, newdir), true); }); + struct stat dstat; + if(stat(bstr(srcdir), &dstat) || ! S_ISDIR(dstat.st_mode)) return err(); + bstr ndir(newdir); + if(mkdir(ndir, dstat.st_mode) || (dstat.st_uid + dstat.st_gid && (chown(ndir, dstat.st_uid, dstat.st_gid) || (dstat.st_mode != (dstat.st_mode & ~(S_ISUID | S_ISGID)) && chmod(ndir, dstat.st_mode))))) return err(); + utimbuf sdtimes; + sdtimes.actime = dstat.st_atim.tv_sec, sdtimes.modtime = dstat.st_mtim.tv_sec; + return utime(ndir, &sdtimes) ? err() : true; +} + +void sb::edetect(QSL &elst, bool spath) +{ + QSL mpts; + + { + QBA mnts(fload("./proc/self/mounts")); + QTS in(&mnts, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + if(cline.contains(" /var/lib/")) mpts.append(cline.split(' ').at(1) % '/'); + } + } + + if(! mpts.isEmpty()) + { + if(isfile("./etc/fstab")) + { + QFile file("./etc/fstab"); + + if(fopen(file)) + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + + if(! cline.startsWith('#')) + { + cline.replace('\t', ' '); + + for(uchar a(0) ; a < mpts.count() ; ++a) + if(cline.contains(' ' % left(mpts.at(a), -1) % ' ')) + { + if(mpts.count() == 1) return; + mpts.removeAt(a); + break; + } + } + } + } + + if(spath) + for(cQStr &mpt : mpts) elst.append(right(mpt, -5)); + else + elst.append(mpts); + } +} + +bool sb::exclcheck(cQSL &elist, cQStr &item) +{ + for(cQStr &excl : elist) + if(excl.endsWith('/')) + { + if(item.startsWith(excl)) return true; + } + else if(excl.endsWith('*')) + { + if(item.startsWith(left(excl, -1))) return true; + } + else if(like(item, {'_' % excl % '_', '_' % excl % "/*"})) + return true; + + return false; +} + +bool sb::inclcheck(cQSL &ilist, cQStr &item) +{ + for(cQStr &ixcl : ilist) + if(ixcl.length() >= item.length()) + { + if(like(ixcl, {'_' % item % '_', '_' % item % "/*"})) return true; + } + else if(item.startsWith(ixcl % '/')) + return true; + + return false; +} + +bool sb::lcomp(cQStr &link1, cQStr &link2) +{ + struct stat istat[2]; + if(lstat(bstr(link1), &istat[0]) || lstat(bstr(link2), &istat[1]) || ! (S_ISLNK(istat[0].st_mode) && S_ISLNK(istat[1].st_mode)) || istat[0].st_mtim.tv_sec != istat[1].st_mtim.tv_sec) return false; + QStr lnk(rlink(link1, istat[0].st_size)); + return ! lnk.isEmpty() && lnk == rlink(link2, istat[1].st_size); +} + +bool sb::rodir(QBA &ba, QUCL &ucl, cQStr &path, uchar hidden, cQSL &ilist, uchar oplen) +{ + DIR *dir(opendir(bstr(path))); + + if(dir) + { + dirent *ent; + QStr ppath(ba.isEmpty() ? nullptr : QStr(right(path, -(oplen == 1 ? 1 : oplen + 1)) % '/')); + QSL dd{"_._", "_.._"}; + + while(! ThrdKill && (ent = readdir(dir))) + { + QStr iname(ent->d_name), npath(ppath % iname); + + if(! like(iname, dd) && [&, hidden] { + switch(hidden) { + case False: + return true; + case True: + return like(iname, {"_.*", "_snap_"}) || (! ilist.isEmpty() && inclcheck(ilist, iname)); + default: + return like(npath, {"_.*", "_snap/*"}) || inclcheck(ilist, npath); + } + }()) + { + uchar type([&]() -> uchar { + switch(ent->d_type) { + case DT_LNK: + return Islink; + case DT_DIR: + return Isdir; + case DT_REG: + return Isfile; + case DT_UNKNOWN: + return stype(path % '/' % iname); + default: + return Unknown; + } + }()); + + switch(type) { + case Islink: + case Isfile: + ucl.append(type), ba.append(npath % '\n'); + break; + case Isdir: + rodir(ba.append(npath % '\n'), ucl << Isdir, path % '/' % iname, hidden == True ? ilist.isEmpty() ? uchar(False) : uchar(Include) : hidden, ilist, (oplen ? oplen : path.length())); + } + } + } + + closedir(dir); + if(! (ThrdKill || oplen)) ba.squeeze(); + } + + return ! ThrdKill; +} + +bool sb::rodir(cQStr &path, QBA &ba, QUCL &ucl, ullong id, uchar oplen) +{ + DIR *dir(opendir(bstr(path))); + + if(dir) + { + if(! oplen) + { + struct stat dstat; + if(! stat(bstr(path), &dstat)) id = dstat.st_dev; + } + + dirent *ent; + QStr ppath(ba.isEmpty() ? nullptr : QStr(right(path, -(oplen == 1 ? 1 : oplen + 1)) % '/')); + QSL dd{"_._", "_.._"}; + + while(! ThrdKill && (ent = readdir(dir))) + { + QStr iname(ent->d_name), npath(ppath % iname); + + if(! like(iname, dd)) + { + uchar type([&]() -> uchar { + switch(ent->d_type) { + case DT_LNK: + return Islink; + case DT_DIR: + return Isdir; + case DT_REG: + return Isfile; + case DT_UNKNOWN: + return stype(path % '/' % iname); + default: + return Unknown; + } + }()); + + switch(type) { + case Islink: + case Isfile: + ucl.append(type), ba.append(npath % '\n'); + break; + case Isdir: + QStr fpath(path % '/' % iname); + struct stat dstat; + + if(! stat(bstr(fpath), &dstat) && dstat.st_dev == id) + rodir(fpath, ba.append(npath % '\n'), ucl << Isdir, id, (oplen ? oplen : path.length())); + else + ucl.append(Isdir), ba.append(npath % '\n'); + } + } + } + + closedir(dir); + if(! (ThrdKill || oplen)) ba.squeeze(); + } + + return ! ThrdKill; +} + +bool sb::rodir(QBA &ba, cQStr &path, uchar oplen) +{ + DIR *dir(opendir(bstr(path))); + + if(dir) + { + dirent *ent; + QStr ppath(ba.isEmpty() ? nullptr : QStr(right(path, -(oplen == 1 ? 1 : oplen + 1)) % '/')); + QSL dd{"_._", "_.._"}; + + while(! ThrdKill && (ent = readdir(dir))) + { + QStr iname(ent->d_name); + + if(! like(iname, dd)) + switch([&]() -> uchar { + switch(ent->d_type) { + case DT_LNK: + case DT_REG: + return Isfile; + case DT_DIR: + return Isdir; + case DT_UNKNOWN: + return stype(path % '/' % iname); + default: + return Unknown; + } + }()) { + case Islink: + case Isfile: + ba.append(ppath % iname % '\n'); + break; + case Isdir: + rodir(ba.append(ppath % iname % '\n'), path % '/' % iname, (oplen ? oplen : path.length())); + } + } + + closedir(dir); + if(! (ThrdKill || oplen)) ba.squeeze(); + } + + return ! ThrdKill; +} + +bool sb::rodir(QUCL &ucl, cQStr &path, uchar oplen) +{ + DIR *dir(opendir(bstr(path))); + + if(dir) + { + dirent *ent; + QSL dd{"_._", "_.._"}; + + while(! ThrdKill && (ent = readdir(dir))) + { + QStr iname(ent->d_name); + + if(! like(iname, dd)) + switch([&]() -> uchar { + switch(ent->d_type) { + case DT_LNK: + case DT_REG: + return Isfile; + case DT_DIR: + return Isdir; + case DT_UNKNOWN: + return stype(path % '/' % iname); + default: + return Unknown; + } + }()) { + case Islink: + case Isfile: + ucl.append(0); + break; + case Isdir: + rodir(ucl << 0, path % '/' % iname, (oplen ? oplen : path.length())); + } + } + + closedir(dir); + } + + return ! ThrdKill; +} + +bool sb::odir(QBAL &balst, cQStr &path, uchar hidden, cQSL &ilist, cQStr &ppath) +{ + DIR *dir(opendir(bstr(path))); + + if(dir) + { + balst.reserve(1000); + dirent *ent; + QSL dd{"_._", "_.._"}; + + while(! ThrdKill && (ent = readdir(dir))) + { + QStr iname(ent->d_name); + + if(! like(iname, dd) && [&, hidden] { + switch(hidden) { + case False: + return true; + case True: + return like(iname, {"_.*", "_snap_"}) || (! ilist.isEmpty() && inclcheck(ilist, iname)); + default: + return inclcheck(ilist, ppath % '/' % iname); + } + }()) balst.append(QBA(ent->d_name)); + } + + closedir(dir); + } + + return ! ThrdKill; +} + +bool sb::recrmdir(cbstr &path, bool slimit) +{ + DIR *dir(opendir(path)); + + if(dir) + { + auto size([](cbstr &spath) -> ullong { + struct stat fstat; + if(stat(spath, &fstat)) return 8000001; + return fstat.st_size; + }); + + dirent *ent; + QSL dd{"_._", "_.._"}; + + while(! ThrdKill && (ent = readdir(dir))) + { + QBA iname(ent->d_name); + + if(! like(iname, dd)) + { + QBA fpath(QBA(path) % '/' % iname); + + switch(ent->d_type) { + case DT_UNKNOWN: + switch(stype(fpath)) { + case Isfile: + if(slimit && size(fpath) > 8000000) continue; + default: + rmfile(fpath); + continue; + case Isdir:; + } + case DT_DIR: + if(! recrmdir(fpath, slimit)) + { + closedir(dir); + return false; + } + + break; + case DT_REG: + if(slimit && size(fpath) > 8000000) break; + default: + rmfile(fpath); + } + } + } + + closedir(dir); + } + + return ! ThrdKill && (! rmdir(path) || slimit || (errno == ENOTEMPTY ? false : error("\n " % tr("An error occurred while deleting the following directory:") % "\n\n " % QStr(path) % fdbg(QStr(path)), true))); +} + +void sb::run() +{ + if(ThrdKill) ThrdKill = false; + + auto psalign([](ullong pstart, ushort ssize) -> ullong { + if(pstart <= 1048576 / ssize) return 1048576 / ssize; + ushort rem(pstart % (1048576 / ssize)); + return rem ? pstart + 1048576 / ssize - rem : pstart; + }); + + auto pealign([](ullong end, ushort ssize) -> ullong { + ushort rem(end % (1048576 / ssize)); + return rem ? rem < (1048576 / ssize) - 1 ? end - rem - 1 : end : end - 1; + }); + + switch(ThrdType) { + case Remove: + ThrdRslt = [this] { + switch(stype(ThrdStr[0])) { + case Isdir: + return recrmdir(ThrdStr[0]); + default: + return rmfile(ThrdStr[0]); + } + }(); + + break; + case Copy: + ThrdRslt = cpfile(ThrdStr[0], ThrdStr[1]); + break; + case Sync: + return sync(); + case Mount: + { + libmnt_context *mcxt(mnt_new_context()); + mnt_context_set_source(mcxt, bstr(ThrdStr[0])), + mnt_context_set_target(mcxt, bstr(ThrdStr[1])), + mnt_context_set_options(mcxt, ! ThrdStr[2].isEmpty() ? bstr(ThrdStr[2]).data : isdir(ThrdStr[0]) ? "bind" : "noatime"), + ThrdRslt = ! mnt_context_mount(mcxt); + return mnt_free_context(mcxt); + } + case Umount: + ThrdRslt = umnt(ThrdStr[0]); + return; + case Readprttns: + { + ThrdSlst->reserve(25); + QSL dlst{"_/dev/sd*", "_/dev/hd*", "_/dev/vd*", "_/dev/mmcblk*"}; + + for(cQStr &spath : QDir("/dev").entryList(QDir::System)) + { + QStr path("/dev/" % spath); + + if(like(path.length(), {8, 12}) && like(path, dlst) && devsize(path) > 536870911) + { + PedDevice *dev(ped_device_get(bstr(path))); + PedDisk *dsk(ped_disk_new(dev)); + + uchar type(dsk ? [&dsk] { + QStr name(dsk->type->name); + return name == "gpt" ? GPT : name == "msdos" ? MSDOS : Clear; + }() : Clear); + + ThrdSlst->append(path % '\n' % QStr::number(dev->length * dev->sector_size) % '\n' % QStr::number(type)); + + if(type != Clear) + { + PedPartition *prt(nullptr); + QLIL egeom; + + while((prt = ped_disk_next_partition(dsk, prt))) + if(prt->geom.length >= 1048576 / dev->sector_size) + { + if(prt->num > 0) + { + QStr ppath(path % (path.length() == 12 ? "p" : nullptr) % QStr::number(prt->num)); + + if(stype(ppath) == Isblock) + { + if(prt->type == PED_PARTITION_EXTENDED) + ThrdSlst->append(ppath % '\n' % QStr::number(prt->geom.length * dev->sector_size) % '\n' % QStr::number(Extended) % '\n' % QStr::number(prt->geom.start * dev->sector_size)), + egeom.append({prt->geom.start, prt->geom.end}); + else + { + if(egeom.count() > 2) + { + ullong pstart(psalign(egeom.at(2), dev->sector_size)); + ThrdSlst->append(path % "?\n" % QStr::number((pealign(egeom.at(3), dev->sector_size) - pstart + 1) * dev->sector_size - (prt->type == PED_PARTITION_LOGICAL ? 2097152 : 1048576 - dev->sector_size)) % '\n' % QStr::number(Emptyspace) % '\n' % QStr::number(pstart * dev->sector_size + 1048576)); + for(uchar a(3) ; a > 1 ; --a) egeom.removeAt(a); + } + + blkid_probe pr(blkid_new_probe_from_filename(bstr(ppath))); + blkid_do_probe(pr); + cchar *uuid(nullptr), *fstype("?"), *label(nullptr); + + if(! blkid_probe_lookup_value(pr, "UUID", &uuid, nullptr)) blkid_probe_lookup_value(pr, "TYPE", &fstype, nullptr), + blkid_probe_lookup_value(pr, "LABEL", &label, nullptr); + + ThrdSlst->append(ppath % '\n' % QStr::number(prt->geom.length * dev->sector_size) % '\n' % QStr::number(prt->type == PED_PARTITION_LOGICAL ? Logical : Primary) % '\n' % QStr::number(prt->geom.start * dev->sector_size) % '\n' % fstype % '\n' % label % '\n' % uuid), + blkid_free_probe(pr); + } + } + } + else if(prt->type == PED_PARTITION_FREESPACE) + { + if(egeom.count() > 2) + { + ullong pstart(psalign(egeom.at(2), dev->sector_size)); + ThrdSlst->append(path % "?\n" % QStr::number((pealign(egeom.at(3), dev->sector_size) - pstart + 1) * dev->sector_size - 1048576) % '\n' % QStr::number(Emptyspace) % '\n' % QStr::number(pstart * dev->sector_size + 1048576)), + egeom.clear(); + } + + llong fgeom[]{llong(prt->geom.start < 1048576 / dev->sector_size ? 1048576 / dev->sector_size : psalign(prt->geom.start, dev->sector_size)), llong(prt->next && prt->next->type == PED_PARTITION_METADATA ? type == MSDOS ? prt->next->geom.end : prt->next->geom.end - (34816 / dev->sector_size * 10 + 5) / 10 : pealign(prt->geom.end, dev->sector_size))}; + if(fgeom[1] - fgeom[0] > 1048576 / dev->sector_size - 2) ThrdSlst->append(path % "?\n" % QStr::number((fgeom[1] - fgeom[0] + 1) * dev->sector_size) % '\n' % QStr::number(Freespace) % '\n' % QStr::number(fgeom[0] * dev->sector_size)); + } + else if(! egeom.isEmpty()) + { + if(prt->geom.end <= egeom.at(1)) + switch(egeom.count()) { + case 2: + if(prt->geom.length >= 3145728 / dev->sector_size) egeom.append({(prt->geom.start - egeom.at(0) < 1048576 / dev->sector_size ? egeom.at(0) : prt->geom.start), prt->geom.end + (prt->geom.end == egeom.at(1) ? 1 : 0)}); + break; + default: + egeom.replace(3, prt->geom.end + (prt->geom.end == egeom.at(1) ? 1 : 0)); + } + else + egeom.clear(); + } + } + + if(egeom.count() > 2) + { + ullong pstart(psalign(egeom.at(2), dev->sector_size)); + ThrdSlst->append(path % "?\n" % QStr::number((pealign(egeom.at(3), dev->sector_size) - pstart + 1) * dev->sector_size - 1048576) % '\n' % QStr::number(Emptyspace) % '\n' % QStr::number(pstart * dev->sector_size + 1048576)); + } + } + else if(! dsk) + goto next_1; + + ped_disk_destroy(dsk); + next_1: + ped_device_destroy(dev); + } + } + + break; + } + case Readlvdevs: + { + ThrdSlst->reserve(10); + QBA fstab(fload("/etc/fstab")); + QSL dlst[]{{"_usb-*", "_mmc-*"}, {"_/dev/sd*", "_/dev/mmcblk*"}}; + + for(cQStr &item : QDir("/dev/disk/by-id").entryList(QDir::Files)) + { + if(like(item, dlst[0]) && islink("/dev/disk/by-id/" % item)) + { + QStr path(rlink("/dev/disk/by-id/" % item, 14)); + + if(! path.isEmpty() && like((path = "/dev" % right(path, -5)).length(), {8, 12}) && like(path, dlst[1])) + { + ullong size(devsize(path)); + + if(size > 536870911) + { + if(! fstab.isEmpty()) + { + QSL fchk('_' % path % '*'); + + { + PedDevice *dev(ped_device_get(bstr(path))); + PedDisk *dsk(ped_disk_new(dev)); + + if(dsk) + { + PedPartition *prt(nullptr); + + while((prt = ped_disk_next_partition(dsk, prt))) + if(prt->num > 0 && prt->type != PED_PARTITION_EXTENDED) + { + QStr ppath(path % (path.length() == 12 ? "p" : nullptr) % QStr::number(prt->num)); + + if(stype(ppath) == Isblock) + { + blkid_probe pr(blkid_new_probe_from_filename(bstr(ppath))); + blkid_do_probe(pr); + cchar *uuid(nullptr); + if(! blkid_probe_lookup_value(pr, "UUID", &uuid, nullptr) && uuid) fchk.append("_UUID=" % QStr(uuid) % '*'); + blkid_free_probe(pr); + } + } + + ped_disk_destroy(dsk); + } + + ped_device_destroy(dev); + } + + QTS in(&fstab, QIODevice::ReadOnly); + + while(! in.atEnd()) + if(like(in.readLine().trimmed(), fchk)) goto next_2; + } + + ThrdSlst->append(path % '\n' % mid(item, 5, rinstr(item, "_") - 5).replace('_', ' ') % '\n' % QStr::number(size)); + } + } + } + + next_2:; + } + + return ThrdSlst->sort(); + } + case Ruuid: + { + blkid_probe pr(blkid_new_probe_from_filename(bstr(ThrdStr[0]))); + blkid_do_probe(pr); + cchar *uuid(nullptr); + blkid_probe_lookup_value(pr, "UUID", &uuid, nullptr), + ThrdStr[1] = uuid; + return blkid_free_probe(pr); + } + case Setpflag: + { + PedDevice *dev(ped_device_get(bstr(left(ThrdStr[0], (ThrdStr[0].contains("mmc") ? 12 : 8))))); + PedDisk *dsk(ped_disk_new(dev)); + PedPartition *prt(nullptr); + if(ThrdRslt) ThrdRslt = false; + + while(! ThrdKill && (prt = ped_disk_next_partition(dsk, prt))) + if(QStr(ped_partition_get_path(prt)) == ThrdStr[0]) + { + for(cQStr &flag : ThrdStr[1].split(' ')) + if(! ped_partition_set_flag(prt, ped_partition_flag_get_by_name(bstr(flag)), 1)) goto err; + + if(ped_disk_commit_to_dev(dsk)) ThrdRslt = true; + err: + ped_disk_commit_to_os(dsk); + break; + } + + return ped_disk_destroy(dsk), ped_device_destroy(dev); + } + case Mkptable: + { + PedDevice *dev(ped_device_get(bstr(ThrdStr[0]))); + PedDisk *dsk(ped_disk_new_fresh(dev, ped_disk_type_get(bstr(ThrdStr[1])))); + ThrdRslt = ped_disk_commit_to_dev(dsk); + return ped_disk_commit_to_os(dsk), ped_disk_destroy(dsk), ped_device_destroy(dev); + } + case Mkpart: + { + PedDevice *dev(ped_device_get(bstr(ThrdStr[0]))); + PedDisk *dsk(ped_disk_new(dev)); + PedPartition *prt(nullptr); + if(ThrdRslt) ThrdRslt = false; + + if(ThrdLng[0] && ThrdLng[1]) + { + PedPartition *crtprt(ped_partition_new(dsk, ThrdChr == Primary ? PED_PARTITION_NORMAL : ThrdChr == Extended ? PED_PARTITION_EXTENDED : PED_PARTITION_LOGICAL, ped_file_system_type_get("ext2"), psalign(ThrdLng[0] / dev->sector_size, dev->sector_size), ullong(dev->length - 1048576 / dev->sector_size) >= (ThrdLng[0] + ThrdLng[1]) / dev->sector_size - 1 ? pealign((ThrdLng[0] + ThrdLng[1]) / dev->sector_size - 1, dev->sector_size) : (ThrdLng[0] + ThrdLng[1]) / dev->sector_size - 1)); + if(ped_disk_add_partition(dsk, crtprt, ped_constraint_exact(&crtprt->geom)) && ped_disk_commit_to_dev(dsk)) ThrdRslt = true; + ped_disk_commit_to_os(dsk); + } + else + while(! ThrdKill && (prt = ped_disk_next_partition(dsk, prt))) + if(prt->type == PED_PARTITION_FREESPACE && prt->geom.length >= 1048576 / dev->sector_size) + { + PedPartition *crtprt(ped_partition_new(dsk, PED_PARTITION_NORMAL, ped_file_system_type_get("ext2"), ThrdLng[0] ? psalign(ThrdLng[0] / dev->sector_size, dev->sector_size) : psalign(prt->geom.start, dev->sector_size), ThrdLng[1] ? pealign((ThrdLng[0] + ThrdLng[1]) / dev->sector_size - 1, dev->sector_size) : prt->next && prt->next->type == PED_PARTITION_METADATA ? prt->next->geom.end : pealign(prt->geom.end, dev->sector_size))); + if(ped_disk_add_partition(dsk, crtprt, ped_constraint_exact(&crtprt->geom)) && ped_disk_commit_to_dev(dsk)) ThrdRslt = true; + ped_disk_commit_to_os(dsk); + break; + } + + return ped_disk_destroy(dsk), ped_device_destroy(dev); + } + case Delpart: + { + bool ismmc(ThrdStr[0].contains("mmc")); + PedDevice *dev(ped_device_get(bstr(left(ThrdStr[0], ismmc ? 12 : 8)))); + PedDisk *dsk(ped_disk_new(dev)); + if(ped_disk_delete_partition(dsk, ped_disk_get_partition(dsk, right(ThrdStr[0], -(ismmc ? 13 : 8)).toUShort()))) ped_disk_commit_to_dev(dsk), ped_disk_commit_to_os(dsk); + return ped_disk_destroy(dsk), ped_device_destroy(dev); + } + case Crtrpoint: + ThrdRslt = thrdcrtrpoint(ThrdStr[0]); + break; + case Srestore: + ThrdRslt = thrdsrestore(ThrdChr, ThrdStr[0], ThrdStr[1], ThrdStr[2], ThrdBool); + break; + case Scopy: + ThrdRslt = thrdscopy(ThrdChr, ThrdStr[0], ThrdStr[1]); + break; + case Lvprpr: + ThrdRslt = thrdlvprpr(ThrdBool); + } +} + +bool sb::umnt(cbstr &dev) +{ + libmnt_context *ucxt(mnt_new_context()); + mnt_context_set_target(ucxt, dev), + mnt_context_enable_force(ucxt, true), + mnt_context_enable_lazy(ucxt, true); +#ifndef C_MNT_LIB + mnt_context_enable_loopdel(ucxt, true); +#endif + bool rv(! mnt_context_umount(ucxt)); + mnt_free_context(ucxt); + return rv; +} + +bool sb::thrdcrtrpoint(cQStr &trgt) +{ + QStr rsdir('.' % QDir(sdir[1]).canonicalPath()); + if(chroot(bstr(sdir[1]))) return false; + + auto out([](bool val = false) { + chroot(bstr("./")); + return val; + }); + + QStr rtrgt(rsdir % trgt); + uint lcnt; + + { + QBA sysitms[13]; + QUCL sysitmst[13]; + + { + QStr dirs[]{"./bin", "./boot", "./etc", "./lib", "./lib32", "./lib64", "./opt", "./sbin", "./selinux", "./srv", "./usr", "./var"}; + uint bbs[]{10000, 20000, 100000, 500000, 10000, 10000, 100000, 10000, 10000, 10000, 10000000, 1000000}, ibs[]{500, 1000, 10000, 20000, 500, 500, 5000, 1000, 500, 500, 500000, 50000}; + + for(uchar a(0) ; a < 12 ; ++a) + if(isdir(dirs[a])) + { + sysitms[a].reserve(bbs[a]), sysitmst[a].reserve(ibs[a]); + if(! rodir(sysitms[a], sysitmst[a], dirs[a])) return out(); + } + } + + if(isdir("./snap")) + { + sysitms[12].reserve(10000), sysitmst[12].reserve(500); + if(! rodir("./snap", sysitms[12], sysitmst[12])) return out(); + } + + uint anum(0), cnum(0); + for(uchar a(0) ; a < 12 ; ++a) anum += sysitmst[a].count(); + QSL rplst; + QBA *cditms; + QUCL *cditmst; + uchar cperc; + + { + QSL usrs; + QBAL homeitms; + QUCLL homeitmst; + + { + QFile file("./etc/passwd"); + if(! fopen(file)) return out(); + + while(! file.atEnd()) + { + QStr usr(file.readLine().trimmed()); + + if(usr.contains(":/home/") && isdir("./home/" % (usr = left(usr, instr(usr, ":") -1)))) usrs.append(usr), + homeitms.append(nullptr), + homeitmst.append(QUCL()); + } + } + + { + QSL ilst; + + { + QFile file("." incfile); + if(! fopen(file)) return out(); + + while(! file.atEnd()) + { + QStr cline(left(file.readLine(), -1)); + if(! cline.isEmpty()) ilst.append(cline); + if(ThrdKill) return out(); + } + } + + if(! (usrs << (isdir("./root") ? "" : nullptr)).last().isNull()) + { + homeitms.append(nullptr), homeitms.last().reserve(50000), + homeitmst.append(QUCL()), homeitmst.last().reserve(1000); + if(! rodir(homeitms.last(), homeitmst.last(), "./root", True, ilst)) return out(); + } + + for(schar a(usrs.count() - 2) ; a > -1 ; --a) + { + homeitms[a].reserve(5000000), homeitmst[a].reserve(100000); + if(! rodir(homeitms[a], homeitmst[a], "./home/" % usrs.at(a), True, ilst)) return out(); + } + } + + for(cQUCL &cucl : homeitmst) anum += cucl.count(); + Progress = 0; + if(! crtdir(rtrgt) || (isdir("./home") && ! crtdir(rtrgt % "/home"))) return out(); + + if(incrmtl) + { + rplst.reserve(15); + QSL incl{"_S01_*", "_S02_*", "_S03_*", "_S04_*", "_S05_*", "_S06_*", "_S07_*", "_S08_*", "_S09_*", "_S10_*", "_H01_*", "_H02_*", "_H03_*", "_H04_*", "_H05_*"}; + + for(cQStr &item : QDir("/").entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)) + { + if(like(item, incl)) rplst.append(item); + if(ThrdKill) return out(); + } + } + + QSL elst{".sbuserdata", ".cache/gvfs", ".local/share/Trash/files/", ".local/share/Trash/info/", ".Xauthority", ".ICEauthority"}; + + { + QFile file("." excfile); + if(! fopen(file)) return out(); + + while(! file.atEnd()) + { + QStr cline(left(file.readLine(), -1)); + if(like(cline, {"_.*", "_snap_", "_snap/*"})) elst.append(cline); + if(ThrdKill) return out(); + } + } + + QSL excl{"_lost+found_", "_lost+found/*", "*/lost+found_", "*/lost+found/*", "_Systemback_", "_Systemback/*", "*/Systemback_", "*/Systemback/*", "*~_", "*~/*"}; + + for(uchar a(0) ; a < usrs.count() ; ++a) + { + cQStr &usr(usrs.at(a)); + + if(! usr.isNull()) + { + QStr srcd(usr.isEmpty() ? QStr("/root") : "/home/" % usr); + if(! crtdir(rtrgt % srcd)) return out(); + + if(! (cditmst = &homeitmst[a])->isEmpty()) + { + lcnt = 0; + QTS in(cditms = &homeitms[a], QIODevice::ReadOnly); + + while(! in.atEnd()) + { + if(Progress < (cperc = (++cnum * 100 + 50) / anum)) Progress = cperc; + QStr item(in.readLine()); + + if(! (like(item, excl) || (like(item, {"_.*", "_snap_", "_snap/*"}) && exclcheck(elst, item)))) + { + QStr srci(srcd % '/' % item), rsrci('.' % srci); + + if(exist(rsrci)) + { + QStr nrpi(rtrgt % srci); + + switch(cditmst->at(lcnt)) { + case Islink: + for(cQStr &pname : rplst) + { + QStr orpi(rsdir % '/' % pname % srci); + + if(stype(orpi) == Islink && lcomp(rsrci, orpi)) + { + if(! crthlnk(orpi, nrpi)) return out(); + goto nitem_1; + } + + if(ThrdKill) return out(); + } + + if(! cplink(rsrci, nrpi)) return out(); + break; + case Isdir: + if(! crtdir(nrpi)) return out(); + break; + case Isfile: + if(fsize(rsrci) <= 8000000) + { + for(cQStr &pname : rplst) + { + QStr orpi(rsdir % '/' % pname % srci); + + if(stype(orpi) == Isfile && fcomp(rsrci, orpi) == 2) + { + if(! crthlnk(orpi, nrpi)) return out(); + goto nitem_1; + } + + if(ThrdKill) return out(); + } + + if(! cpfile(rsrci, nrpi)) return out(); + } + } + } + } + + nitem_1: + if(ThrdKill) return out(); + ++lcnt; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(cditmst->at(lcnt++) == Isdir) + { + QStr srci(srcd % '/' % item), nrpi(rtrgt % srci); + if(exist(nrpi) && ! cpertime('.' % srci, nrpi)) return out(); + } + + if(ThrdKill) return out(); + } + + cditms->clear(), cditmst->clear(); + } + + if(! cpertime('.' % srcd, rtrgt % srcd)) return out(); + } + } + } + + if(isdir(rtrgt % "/home") && ! cpertime("./home", rtrgt % "/home")) return out(); + + { + QSL incl{"_initrd.img_", "_initrd.img.old_", "_vmlinuz_", "_vmlinuz.old_"}; + + for(cQStr &item : QDir("./").entryList(QDir::Files)) + { + if(like(item, incl)) + { + QStr srci('/' % item), rsrci('.' % srci); + + if(islink(rsrci)) + { + QStr nrpi(rtrgt % srci); + + for(cQStr &pname : rplst) + { + QStr orpi(rsdir % '/' % pname % srci); + + if(stype(orpi) == Islink && lcomp(rsrci, orpi)) + { + if(! crthlnk(orpi, nrpi)) return out(); + goto nitem_2; + } + + if(ThrdKill) return out(); + } + + if(! cplink(rsrci, nrpi)) return out(); + } + } + + nitem_2: + if(ThrdKill) return out(); + } + } + + for(cQStr &cdir : {"/cdrom", "/dev", "/mnt", "/proc", "/run", "/sys", "/tmp"}) + { + QStr rcdir('.' % cdir); + if(isdir(rcdir) && ! cpdir(rcdir, rtrgt % cdir)) return out(); + if(ThrdKill) return out(); + } + + QSL elst{"/etc/mtab", "/snap/.sblvtmp", "/var/.sblvtmp", "/var/cache/fontconfig/", "/var/lib/dpkg/lock", "/var/lib/udisks2/", "/var/lib/ureadahead/", "/var/log/", "/var/run/", "/var/tmp/"}, dlst{"/bin", "/boot", "/etc", "/lib", "/lib32", "/lib64", "/opt", "/sbin", "/selinux", "/srv", "/usr", "/var", "/snap"}, excl[]{{"_lost+found_", "_lost+found/*", "*/lost+found_", "*/lost+found/*", "_Systemback_", "_Systemback/*", "*/Systemback_", "*/Systemback/*", "*.dpkg-old_", "*~_", "*~/*"}, {"+_/var/cache/apt/*", "-*.bin_", "-*.bin.*"}, {"_/var/cache/apt/archives/*", "*.deb_"}}; + edetect(elst); + + for(uchar a(0) ; a < dlst.count() ; ++a) + { + cQStr &cdir(dlst.at(a)), rcdir('.' % cdir); + + if(isdir(rcdir)) + { + if(! crtdir(rtrgt % cdir)) return out(); + + if(! (cditmst = &sysitmst[a])->isEmpty()) + { + lcnt = 0; + QTS in(cditms = &sysitms[a], QIODevice::ReadOnly); + + while(! in.atEnd()) + { + if(Progress < (cperc = (++cnum * 100 + 50) / anum)) Progress = cperc; + QStr item(in.readLine()); + + if(! like(item, excl[0])) + { + QStr srci(cdir % '/' % item), rsrci; + + if(! (like(srci, excl[1], Mixed) || like(srci, excl[2], All) || exclcheck(elst, srci)) && exist(rsrci = '.' % srci)) + { + QStr nrpi(rtrgt % srci); + + switch(cditmst->at(lcnt)) { + case Islink: + for(cQStr &pname : rplst) + { + QStr orpi(rsdir % '/' % pname % srci); + + if(stype(orpi) == Islink && lcomp(rsrci, orpi)) + { + if(! crthlnk(orpi, nrpi)) return out(); + goto nitem_3; + } + + if(ThrdKill) return out(); + } + + if(! cplink(rsrci, nrpi)) return out(); + break; + case Isdir: + if(! crtdir(nrpi)) return out(); + break; + case Isfile: + for(cQStr &pname : rplst) + { + QStr orpi(rsdir % '/' % pname % srci); + + if(stype(orpi) == Isfile && fcomp(rsrci, orpi) == 2) + { + if(! crthlnk(orpi, nrpi)) return out(); + goto nitem_3; + } + + if(ThrdKill) return out(); + } + + if(! cpfile(rsrci, nrpi)) return out(); + } + } + } + + nitem_3: + if(ThrdKill) return out(); + ++lcnt; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(cditmst->at(lcnt++) == Isdir) + { + QStr srci(cdir % '/' % item), nrpi(rtrgt % srci); + if(exist(nrpi) && ! cpertime('.' % srci, nrpi)) return out(); + } + + if(ThrdKill) return out(); + } + + cditms->clear(), cditmst->clear(); + } + + if(! cpertime(rcdir, rtrgt % cdir)) return out(); + } + } + } + + if(isdir("./media")) + { + if(! crtdir(rtrgt % "/media")) return out(); + + if(isfile("./etc/fstab")) + { + QSL dlst(QDir("./media").entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)); + QFile file("./etc/fstab"); + if(! fopen(file)) return out(); + + for(uchar a(0) ; a < dlst.count() ; ++a) + { + cQStr &item(dlst.at(a)); + if(a && ! fopen(file)) return out(); + QSL incl{"* /media/" % item % " *", "* /media/" % item % "/*"}; + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()), fdir; + + if(! cline.startsWith('#') && like(cline.replace('\t', ' ').contains("\\040") ? QStr(cline).replace("\\040", " ") : cline, incl)) + for(cQStr cdname : mid(cline, instr(cline, "/media/") + 7, instr(cline, " ", instr(cline, "/media/")) - instr(cline, "/media/") - 7).split('/')) + if(! cdname.isEmpty()) + { + QStr nrpi(rtrgt % "/media" % fdir.append('/' % (cdname.contains("\\040") ? QStr(cdname).replace("\\040", " ") : cdname))); + if(! (isdir(nrpi) || cpdir("./media" % fdir, nrpi))) return out(); + } + + if(ThrdKill) return out(); + } + + file.close(); + } + } + + if(! cpertime("./media", rtrgt % "/media")) return out(); + } + + if(isdir("./var/log")) + { + QBA logitms; + QUCL logitmst; + logitms.reserve(20000), logitmst.reserve(1000); + if(! rodir(logitms, logitmst, "./var/log")) return out(); + + if(! logitmst.isEmpty()) + { + QSL excl{"*.gz_", "*.old_"}; + lcnt = 0; + QTS in(&logitms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + switch(logitmst.at(lcnt++)) { + case Isdir: + if(! crtdir(rtrgt % "/var/log/" % item)) return out(); + break; + case Isfile: + if(! (like(item, excl) || (item.contains('.') && isnum(right(item, -rinstr(item, ".")))))) + { + QStr srci("/var/log/" % item), nrpi(rtrgt % srci); + crtfile(nrpi); + if(! cpertime('.' % srci, nrpi)) return out(); + } + } + + if(ThrdKill) return out(); + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(logitmst.at(lcnt++) == Isdir) + { + QStr srci("/var/log/" % item), nrpi(rtrgt % srci); + if(exist(nrpi) && ! cpertime('.' % srci, nrpi)) return out(); + } + + if(ThrdKill) return out(); + } + } + + if(! (cpertime("./var/log", rtrgt % "/var/log") && cpertime("./var", rtrgt % "/var"))) return out(); + } + + return out(true); +} + +bool sb::thrdsrestore(uchar mthd, cQStr &usr, cQStr &srcdir, cQStr &trgt, bool sfstab) +{ + QSL usrs, ilst; + QBAL homeitms; + QUCLL homeitmst; + uint anum(0); + + if(mthd != 2) + { + if(! like(mthd, {4, 6})) + { + if(isdir(srcdir % "/home")) + for(cQStr &cusr : QDir(srcdir % "/home").entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)) usrs.append(cusr), + homeitms.append(nullptr), + homeitmst.append(QUCL()); + + usrs.append(isdir(srcdir % "/root") ? "" : nullptr); + } + else if(usr == "root") + usrs.append(isdir(srcdir % "/root") ? "" : nullptr); + else if(isdir(srcdir % "/home/" % usr)) + usrs = QSL{usr, nullptr}, homeitms.append(nullptr), homeitmst.append(QUCL()); + else + usrs.append(nullptr); + + if(isfile(srcdir % incfile)) + { + QFile file(srcdir % incfile); + if(! fopen(file)) return false; + + while(! file.atEnd()) + { + QStr cline(left(file.readLine(), -1)); + if(! cline.isEmpty()) ilst.append(cline); + if(ThrdKill) return false; + } + } + + if(! usrs.last().isNull()) + { + homeitms.append(nullptr), homeitms.last().reserve(50000), + homeitmst.append(QUCL()), homeitmst.last().reserve(1000); + if(! rodir(homeitms.last(), homeitmst.last(), srcdir % "/root", True, ilst)) return false; + } + + for(schar a(usrs.count() - 2) ; a > -1 ; --a) + { + homeitms[a].reserve(5000000), homeitmst[a].reserve(100000); + if(! rodir(homeitms[a], homeitmst[a], srcdir % "/home/" % usrs.at(a), True, ilst)) return false; + } + + for(cQUCL &cucl : homeitmst) anum += cucl.count(); + } + + QBA *cditms; + QUCL *cditmst; + uint cnum(0), lcnt; + uchar cperc; + auto fspchk([&trgt] { return dfree(trgt.isEmpty() ? "/" : trgt) > 10485760; }); + + if(mthd < 3) + { + { + QBA sysitms[13]; + QUCL sysitmst[13]; + + { + QStr dirs[]{srcdir % "/bin", srcdir % "/boot", srcdir % "/etc", srcdir % "/lib", srcdir % "/lib32", srcdir % "/lib64", srcdir % "/opt", srcdir % "/sbin", srcdir % "/selinux", srcdir % "/snap", srcdir % "/srv", srcdir % "/usr", srcdir % "/var"}; + uint bbs[]{10000, 20000, 100000, 500000, 10000, 10000, 100000, 10000, 10000, 10000, 10000, 10000000, 1000000}, ibs[]{500, 1000, 10000, 20000, 500, 500, 5000, 1000, 500, 500, 500, 500000, 50000}; + + for(uchar a(0) ; a < 13 ; ++a) + if(isdir(dirs[a])) + { + sysitms[a].reserve(bbs[a]), sysitmst[a].reserve(ibs[a]); + if(! rodir(sysitms[a], sysitmst[a], dirs[a])) return false; + } + } + + for(uchar a(0) ; a < 12 ; ++a) anum += sysitmst[a].count(); + Progress = 0; + + { + QSL incl{"_initrd.img_", "_initrd.img.old_", "_vmlinuz_", "_vmlinuz.old_"}; + + for(cQStr &item : QDir(trgt.isEmpty() ? "/" : trgt).entryList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Files | QDir::System)) + { + if(like(item, incl)) + { + QStr trgi(trgt % '/' % item); + + switch(stype(trgi)) { + case Islink: + { + QStr srci(srcdir % '/' % item); + if(exist(srci) && lcomp(srci, trgi)) break; + } + case Isfile: + rmfile(trgi); + break; + case Isdir: + recrmdir(trgi); + } + } + + if(ThrdKill) return false; + } + + for(cQStr &item : QDir(srcdir).entryList(QDir::Files | QDir::System)) + { + if(like(item, incl)) + { + QStr trgi(trgt % '/' % item); + if(! exist(trgi)) cplink(srcdir % '/' % item, trgi); + } + + if(ThrdKill) return false; + } + } + + for(cQStr &cdir : {"/cdrom", "/dev", "/home", "/mnt", "/root", "/proc", "/run", "/sys", "/tmp"}) + { + QStr srci(srcdir % cdir), trgi(trgt % cdir); + + if(! isdir(srci)) + { + if(exist(trgi)) stype(trgi) == Isdir ? recrmdir(trgi) : rmfile(trgi); + } + else if(isdir(trgi)) + cpertime(srci, trgi); + else + { + if(exist(trgi)) rmfile(trgi); + if(! (cpdir(srci, trgi) || fspchk())) return false; + } + + if(ThrdKill) return false; + } + + QSL elst; + if(trgt.isEmpty()) elst = QSL{"/etc/mtab", "/var/cache/fontconfig/", "/var/lib/dpkg/lock", "/var/lib/udisks2/", "/var/run/", "/var/tmp/"}; + if(trgt.isEmpty() || (isfile("/mnt/etc/xdg/autostart/sbschedule.desktop") && isfile("/mnt/etc/xdg/autostart/sbschedule-kde.desktop") && isfile("/mnt/usr/bin/systemback") && isfile("/mnt/usr/lib/systemback/libsystemback.so.1.0.0") && isfile("/mnt/usr/lib/systemback/sbscheduler") && isfile("/mnt/usr/lib/systemback/sbsustart") && isfile("/mnt/usr/lib/systemback/sbsysupgrade")&& isdir("/mnt/usr/share/systemback/lang") && isfile("/mnt/usr/share/systemback/efi.tar.gz") && isfile("/mnt/usr/share/systemback/splash.png") && isfile("/mnt/var/lib/dpkg/info/systemback.list") && isfile("/mnt/var/lib/dpkg/info/systemback.md5sums"))) elst.append({"/etc/systemback", "/etc/xdg/autostart/sbschedule*", "/usr/bin/systemback*", "/usr/lib/systemback/", "/usr/share/systemback/", "/var/lib/dpkg/info/systemback*"}); + if(sfstab) elst.append("/etc/fstab"); + edetect(elst); + QSL dlst{"/bin", "/boot", "/etc", "/lib", "/lib32", "/lib64", "/opt", "/sbin", "/selinux", "/snap", "/srv", "/usr", "/var"}, excl[]{{"_lost+found_", "_Systemback_"}, {"_lost+found_", "_lost+found/*", "*/lost+found_", "*/lost+found/*", "_Systemback_", "_Systemback/*", "*/Systemback_", "*/Systemback/*"}}; + QStr mnts; + + auto mchk([&](cQStr &dir) { + if(mcheck(dir % '/', mnts.isEmpty() ? mnts = fload("/proc/self/mounts", true) : mnts)) + { + cQStr &mpt(dir.contains(' ') ? bstr(dir).rplc(" ", "\\040") : dir); + QTS in(&mnts, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + if(like(cline, {"* " % mpt % " *", "* " % mpt % "/*"})) umnt(cline.split(' ').value(1).replace("\\040", " ")); + } + } + }); + + for(uchar a(0) ; a < dlst.count() ; ++a) + { + cQStr &cdir(dlst.at(a)); + QStr srcd(srcdir % cdir), trgd(trgt % cdir); + + if(isdir(srcd)) + { + if(isdir(trgd)) + { + QBAL sdlst; + if(! odir(sdlst, trgd)) return false; + + for(cQStr &item : sdlst) + { + if(! (like(item, excl[0]) || exclcheck(elst, cdir % '/' % item) || exist(srcd % '/' % item))) + { + QStr trgi(trgd % '/' % item); + if(a == 9) mchk(trgi); + stype(trgi) == Isdir ? recrmdir(trgi) : rmfile(trgi); + } + + if(ThrdKill) return false; + } + } + else + { + if(exist(trgd)) rmfile(trgd); + if(! (crtdir(trgd) || fspchk())) return false; + } + + if(! (cditmst = &sysitmst[a])->isEmpty()) + { + lcnt = 0; + QTS in(cditms = &sysitms[a], QIODevice::ReadOnly); + + while(! in.atEnd()) + { + if(Progress < (cperc = (++cnum * 100 + 50) / anum)) Progress = cperc; + QStr item(in.readLine()); + + if(! (like(item, excl[1]) || exclcheck(elst, cdir % '/' % item))) + { + QStr srci(srcd % '/' % item), trgi(trgd % '/' % item); + + switch(cditmst->at(lcnt)) { + case Islink: + switch(stype(trgi)) { + case Islink: + if(lcomp(srci, trgi)) goto nitem_1; + case Isfile: + rmfile(trgi); + break; + case Isdir: + if(a == 9) mchk(trgi); + recrmdir(trgi); + } + + if(! (cplink(srci, trgi) || fspchk())) return false; + break; + case Isdir: + switch(stype(trgi)) { + case Isdir: + { + if(a == 9) mchk(trgi); + QBAL sdlst; + if(! odir(sdlst, trgi)) return false; + + for(cQStr &sitem : sdlst) + { + if(! (like(sitem, excl[0]) || exclcheck(elst, cdir % '/' % item % '/' % sitem) || exist(srci % '/' % sitem))) + { + QStr strgi(trgi % '/' % sitem); + if(a == 9) mchk(strgi); + stype(strgi) == Isdir ? recrmdir(strgi) : rmfile(strgi); + } + + if(ThrdKill) return false; + } + + goto nitem_1; + } + case Islink: + case Isfile: + rmfile(trgi); + } + + if(! (crtdir(trgi) || fspchk())) return false; + break; + case Isfile: + switch(stype(trgi)) { + case Isfile: + switch(fcomp(srci, trgi)) { + case 1: + cpertime(srci, trgi); + case 2: + goto nitem_1; + } + case Islink: + rmfile(trgi); + break; + case Isdir: + if(a == 9) mchk(trgi); + recrmdir(trgi); + } + + if(! (cpfile(srci, trgi) || fspchk())) return false; + } + } + + nitem_1: + if(ThrdKill) return false; + ++lcnt; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(cditmst->at(lcnt++) == Isdir) + { + QStr trgi(trgd % '/' % item); + if(exist(trgi)) cpertime(srcd % '/' % item, trgi); + } + + if(ThrdKill) return false; + } + + cditms->clear(), cditmst->clear(); + } + + cpertime(srcd, trgd); + } + else if(exist(trgd)) + { + if(a == 9) mchk(trgd); + stype(trgd) == Isdir ? recrmdir(trgd) : rmfile(trgd); + } + } + } + + { + QStr srcd(srcdir % "/media"), trgd(trgt % "/media"); + + if(isdir(srcd)) + { + if(isdir(trgd)) + for(cQStr &item : QDir(trgd).entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)) + { + if(! exist(srcd % '/' % item)) + { + QStr trgi(trgd % '/' % item); + if(! mcheck(trgi % '/')) recrmdir(trgi); + } + + if(ThrdKill) return false; + } + else + { + if(exist(trgd)) rmfile(trgd); + if(! (crtdir(trgd) || fspchk())) return false; + } + + QBA mediaitms; + mediaitms.reserve(10000); + if(! rodir(mediaitms, srcd)) return false; + + if(! mediaitms.isEmpty()) + { + QTS in(&mediaitms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()), trgi(trgd % '/' % item); + + if(exist(trgi)) + { + if(stype(trgi) != Isdir) + { + rmfile(trgi); + if(! (crtdir(trgi) || fspchk())) return false; + } + + cpertime(srcd % '/' % item, trgi); + } + else if(! (cpdir(srcd % '/' % item, trgi) || fspchk())) + return false; + + if(ThrdKill) return false; + } + } + + cpertime(srcd, trgd); + } + else if(exist(trgd)) + stype(trgd) == Isdir ? recrmdir(trgd) : rmfile(trgd); + } + + if(srcdir == "/.systembacklivepoint" && isdir("/.systembacklivepoint/.systemback")) + { + QBA sbitms; + QUCL sbitmst; + sbitms.reserve(10000), sbitmst.reserve(500); + if(! rodir(sbitms, sbitmst, "/.systembacklivepoint/.systemback")) return false; + lcnt = 0; + QTS in(&sbitms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + switch(sbitmst.at(lcnt++)) { + case Islink: + if(! ((sfstab && item == "etc/fstab") || cplink("/.systembacklivepoint/.systemback/" % item, trgt % '/' % item) || fspchk())) return false; + break; + case Isfile: + if(! ((sfstab && item == "etc/fstab") || cpfile("/.systembacklivepoint/.systemback/" % item, trgt % '/' % item) || fspchk())) return false; + break; + } + + if(ThrdKill) return false; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + if(sbitmst.at(lcnt++) == Isdir) cpertime("/.systembacklivepoint/.systemback/" % item, trgt % '/' % item); + if(ThrdKill) return false; + } + } + } + else + Progress = 0; + + if(mthd != 2) + { + QSL elst{".cache/gvfs", ".gvfs", ".local/share/Trash/files/", ".local/share/Trash/info/", ".Xauthority", ".ICEauthority"}; + + { + QFile file(srcdir % excfile); + if(! fopen(file)) return false; + + while(! file.atEnd()) + { + QStr cline(left(file.readLine(), -1)); + if(like(cline, {"_.*", "_snap_", "_snap/*"})) elst.append(cline); + if(ThrdKill) return false; + } + } + + bool skppd; + QSL excl[]{{"_lost+found_", "_lost+found/*", "*/lost+found_", "*/lost+found/*", "_Systemback_", "_Systemback/*", "*/Systemback_", "*/Systemback/*", "*~_", "*~/*"}, {"_lost+found_", "_Systemback_", "*~_"}}; + + for(schar a(usrs.count() - 1) ; a > -1 ; --a) + { + cQStr &cusr(usrs.at(a)); + + if(! cusr.isNull()) + { + QStr srcd(srcdir), trgd(trgt); + + if(cusr.isEmpty()) + for(QStr *dir : {&srcd, &trgd}) dir->append("/root"); + else + { + QStr hdir("/home/" % cusr); + for(QStr *dir : {&srcd, &trgd}) dir->append(hdir); + } + + { + if(! isdir(trgd)) + { + if(exist(trgd)) rmfile(trgd); + if(! (crtdir(trgd) || fspchk())) return false; + } + else if(! like(mthd, {3, 4})) + { + QBAL sdlst; + if(! odir(sdlst, trgd, True, ilst)) return false; + + for(cQStr &item : sdlst) + { + bool inc(! (ilst.isEmpty() || like(item, {"_.*", "_snap_"}))); + + if((inc || ! (item.endsWith('~') || exclcheck(elst, item))) && ! exist(srcd % '/' % item)) + { + QStr trgi(trgd % '/' % item); + + switch(stype(trgi)) { + case Isdir: + recrmdir(trgi, true); + break; + case Isfile: + if(! inc && fsize(trgi) > 8000000) break; + case Islink: + rmfile(trgi); + } + } + + if(ThrdKill) return false; + } + } + } + + if(! (cditmst = &homeitmst[a])->isEmpty() && anum) + { + lcnt = 0; + QTS in(cditms = &homeitms[a], QIODevice::ReadOnly); + + while(! in.atEnd()) + { + if(Progress < (cperc = (++cnum * 100 + 50) / anum)) Progress = cperc; + QStr item(in.readLine()); + bool inc; + + if(! like(item, excl[0]) && ((inc = ! (ilst.isEmpty() || like(item, {"_.*", "_snap_", "_snap/*"}))) || ! exclcheck(elst, item))) + { + QStr srci(srcd % '/' % item), trgi(trgd % '/' % item); + + switch(cditmst->at(lcnt)) { + case Islink: + switch(stype(trgi)) { + case Islink: + if(lcomp(srci, trgi)) goto nitem_2; + case Isfile: + rmfile(trgi); + break; + case Isdir: + recrmdir(trgi); + } + + if(! (cplink(srci, trgi) || fspchk())) return false; + break; + case Isdir: + switch(stype(trgi)) { + case Isdir: + if(! like(mthd, {3, 4})) + { + QBAL sdlst; + if(! (inc ? odir(sdlst, trgi, Include, ilst, item) : odir(sdlst, trgi))) return false; + + for(cQStr &sitem : sdlst) + { + if(! (like(sitem, excl[1]) || exclcheck(elst, item % '/' % sitem) || exist(srci % '/' % sitem))) + { + QStr strgi(trgi % '/' % sitem); + + switch(stype(strgi)) { + case Isdir: + recrmdir(strgi, true); + break; + case Isfile: + if(! inc && fsize(strgi) > 8000000) break; + case Islink: + rmfile(strgi); + } + } + + if(ThrdKill) return false; + } + } + + goto nitem_2; + case Islink: + case Isfile: + rmfile(trgi); + } + + if(! (crtdir(trgi) || fspchk())) return false; + break; + case Isfile: + skppd = ! inc && fsize(srci) > 8000000; + + switch(stype(trgi)) { + case Isfile: + switch(fcomp(trgi, srci)) { + case 1: + cpertime(srci, trgi); + case 2: + goto nitem_2; + } + + if(skppd) goto nitem_2; + case Islink: + rmfile(trgi); + break; + case Isdir: + recrmdir(trgi); + } + + if(! (skppd || cpfile(srci, trgi) || fspchk())) return false; + } + } + + nitem_2: + if(ThrdKill) return false; + ++lcnt; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(cditmst->at(lcnt++) == Isdir) + { + QStr trgi(trgd % '/' % item); + if(exist(trgi)) cpertime(srcd % '/' % item, trgi); + } + + if(ThrdKill) return false; + } + + cditms->clear(), cditmst->clear(); + } + + cpertime(srcd, trgd); + } + } + } + + return true; +} + +bool sb::thrdscopy(uchar mthd, cQStr &usr, cQStr &srcdir) +{ + uint lcnt; + + { + QBA sysitms[13]; + QUCL sysitmst[13]; + + { + QStr dirs[]{srcdir % "/bin", srcdir % "/boot", srcdir % "/etc", srcdir % "/lib", srcdir % "/lib32", srcdir % "/lib64", srcdir % "/opt", srcdir % "/sbin", srcdir % "/selinux", srcdir % "/srv", srcdir % "/usr", srcdir % "/var"}; + uint bbs[]{10000, 20000, 100000, 500000, 10000, 10000, 100000, 10000, 10000, 10000, 10000000, 1000000}, ibs[]{500, 1000, 10000, 20000, 500, 500, 5000, 1000, 500, 500, 500000, 50000}; + + for(uchar a(0) ; a < 12 ; ++a) + if(isdir(dirs[a])) + { + sysitms[a].reserve(bbs[a]), sysitmst[a].reserve(ibs[a]); + if(! rodir(sysitms[a], sysitmst[a], dirs[a])) return false; + } + } + + if(isdir(srcdir % "/snap")) + { + sysitms[12].reserve(10000), sysitmst[12].reserve(500); + if(! rodir("./snap", sysitms[12], sysitmst[12])) return false; + } + + uint anum(0), cnum(0); + for(uchar a(0) ; a < 12 ; ++a) anum += sysitmst[a].count(); + QStr macid; + QBA *cditms; + QUCL *cditmst; + uchar cperc; + + { + QSL usrs; + QBAL homeitms; + QUCLL homeitmst; + + if(mthd > 2) + { + if(isdir(srcdir % "/home/" % usr)) usrs.append(usr); + homeitms.append(nullptr), homeitmst.append(QUCL()); + } + else if(mthd && isdir(srcdir % "/home")) + { + if(srcdir.isEmpty()) + { + QFile file("/etc/passwd"); + if(! fopen(file)) return false; + + while(! file.atEnd()) + { + QStr cusr(file.readLine().trimmed()); + + if(cusr.contains(":/home/") && isdir("/home/" % (cusr = left(cusr, instr(cusr, ":") -1)))) usrs.append(cusr), + homeitms.append(nullptr), + homeitmst.append(QUCL()); + } + } + else + for(cQStr &cusr : QDir(srcdir % "/home").entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)) usrs.append(cusr), + homeitms.append(nullptr), + homeitmst.append(QUCL()); + + if(ThrdKill) return false; + } + + usrs.append(isdir(srcdir % "/root") ? "" : nullptr); + + if(mthd == 5) + { + homeitms[0].reserve(10000), homeitmst[0].reserve(500); + if(! rodir(homeitms[0], homeitmst[0], srcdir % "/etc/skel")) return false; + } + else + { + if(! usrs.last().isNull()) + { + homeitms.append(nullptr), homeitms.last().reserve(50000), + homeitmst.append(QUCL()), homeitmst.last().reserve(1000); + if(! rodir(homeitms.last(), homeitmst.last(), srcdir % "/root", like(mthd, {2, 3}) ? True : False)) return false; + } + + for(schar a(usrs.count() - 2) ; a > -1 ; --a) + { + homeitms[a].reserve(5000000), homeitmst[a].reserve(100000); + if(! rodir(homeitms[a], homeitmst[a], srcdir % "/home/" % usrs.at(a), like(mthd, {2, 3}) ? True : False)) return false; + } + } + + for(cQUCL &cucl : homeitmst) anum += cucl.count(); + Progress = 0; + + if(isdir(srcdir % "/home") && ! (isdir("/.sbsystemcopy/home") || crtdir("/.sbsystemcopy/home"))) + { + QFile::rename("/.sbsystemcopy/home", "/.sbsystemcopy/home_" % rndstr()); + if(! crtdir("/.sbsystemcopy/home")) return false; + } + + if(mthd > 2) + { + QStr mfile(isfile(srcdir % "/var/lib/dbus/machine-id") ? "/var/lib/dbus/machine-id" : isfile(srcdir % "/etc/machine-id") ? "/etc/machine-id" : nullptr); + + if(! mfile.isEmpty()) + { + QFile file(srcdir % mfile); + if(! fopen(file)) return false; + QStr cline(file.readLine().trimmed()); + if(cline.length() == 32) macid = cline; + } + } + + QSL elst{".cache/gvfs", ".gvfs", ".local/share/Trash/files/", ".local/share/Trash/info/", ".Xauthority", ".ICEauthority"}; + + { + QFile file(srcdir % excfile); + if(! fopen(file)) return false; + + while(! file.atEnd()) + { + QStr cline(left(file.readLine(), -1)); + if(like(cline, {"_.*", "_snap_", "_snap/*"})) elst.append(cline); + if(ThrdKill) return false; + } + } + + bool skppd; + QSL excl{"_lost+found_", "_lost+found/*", "*/lost+found_", "*/lost+found/*", "_Systemback_", "_Systemback/*", "*/Systemback_", "*/Systemback/*", "*~_", "*~/*"}; + + for(uchar a(0) ; a < usrs.count() ; ++a) + { + cQStr &cusr(usrs.at(a)); + + if(! cusr.isNull()) + { + QStr srcd[2], trgd; + cusr.isEmpty() ? (srcd[0] = srcdir % "/root", trgd = "/.sbsystemcopy/root") : (srcd[0] = srcdir % "/home/" % cusr, trgd = "/.sbsystemcopy/home/" % cusr); + srcd[1] = mthd == 5 ? srcdir % "/etc/skel" : srcd[0]; + + if(! isdir(trgd)) + { + if(exist(trgd)) rmfile(trgd); + if(! cpdir(srcd[0], trgd)) return false; + } + + if(! (cditmst = &homeitmst[mthd == 5 ? 0 : a])->isEmpty()) + { + lcnt = 0; + QTS in(cditms = &homeitms[mthd == 5 ? 0 : a], QIODevice::ReadOnly); + + while(! in.atEnd()) + { + if(Progress < (cperc = (++cnum * 100 + 50) / anum)) Progress = cperc; + QStr item(in.readLine()); + + if((mthd == 5 || (! (like(item, excl) || exclcheck(elst, item)) && (macid.isEmpty() || ! item.contains(macid)))) && (! srcdir.isEmpty() || exist(srcd[1] % '/' % item))) + { + QStr trgi(trgd % '/' % item); + + switch(cditmst->at(lcnt)) { + case Islink: + { + QStr srci(srcd[1] % '/' % item); + + switch(stype(trgi)) { + case Islink: + if(! lcomp(srci, trgi)) goto nitem_1; + case Isfile: + rmfile(trgi); + break; + case Isdir: + recrmdir(trgi); + } + + if(! cplink(srci, trgi)) return false; + break; + } + case Isdir: + switch(stype(trgi)) { + case Isdir: + goto nitem_1; + case Islink: + case Isfile: + rmfile(trgi); + } + + if(! crtdir(trgi)) return false; + break; + case Isfile: + QStr srci(srcd[1] % '/' % item); + skppd = like(mthd, {2, 3}) && fsize(srci) > 8000000; + + switch(stype(trgi)) { + case Isfile: + if(mthd == 5) + switch(fcomp(trgi, srci)) { + case 1: + if(! cpertime(srci, trgi, ! cusr.isEmpty())) return false; + case 2: + goto nitem_1; + } + else + { + switch(fcomp(trgi, srci)) { + case 1: + if(! cpertime(srci, trgi)) return false; + case 2: + goto nitem_1; + } + + if(skppd) goto nitem_1; + } + case Islink: + rmfile(trgi); + break; + case Isdir: + recrmdir(trgi); + } + + if(mthd == 5) + { + if(! cpfile(srci, trgi, ! cusr.isEmpty())) return false; + } + else if(! (skppd || cpfile(srci, trgi))) + return false; + } + } + + nitem_1: + if(ThrdKill) return false; + ++lcnt; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(cditmst->at(lcnt++) == Isdir) + { + QStr trgi(trgd % '/' % item); + if(exist(trgi) && ! cpertime(srcd[1] % '/' % item, trgi, mthd == 5 && ! cusr.isEmpty())) return false; + } + + if(ThrdKill) return false; + } + + if(mthd < 5) cditms->clear(), cditmst->clear(); + } + + if(! cusr.isEmpty()) + { + if(isfile(srcd[0] % "/.config/user-dirs.dirs")) + { + QFile file(srcd[0] % "/.config/user-dirs.dirs"); + if(! fopen(file)) return false; + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()), dir; + + if(! cline.startsWith('#') && cline.contains("$HOME") && (dir = left(right(cline, -instr(cline, "/")), -1)).length()) + { + QStr trgi(trgd % '/' % dir); + + if(! isdir(trgi)) + { + QStr srci(srcd[0] % '/' % dir); + + if(isdir(srci)) + { + if(! cpdir(srci, trgi)) return false; + } + else if(srcdir.startsWith(sdir[1]) && ! (crtdir(trgi) && cpertime(trgd, trgi))) + return false; + } + } + + if(ThrdKill) return false; + } + } + + if(! cpertime(srcd[0], trgd)) return false; + } + } + } + } + + { + QSL incl{"_initrd.img_", "_initrd.img.old_", "_vmlinuz_", "_vmlinuz.old_"}; + + for(cQStr &item : QDir("/.sbsystemcopy").entryList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Files | QDir::System)) + { + if(like(item, incl)) + { + QStr trgi("/.sbsystemcopy/" % item); + + switch(stype(trgi)) { + case Islink: + { + QStr srci(srcdir % '/' % item); + if(islink(srci) && lcomp(srci, trgi)) break; + } + case Isfile: + if(! rmfile(trgi)) return false; + break; + case Isdir: + if(! recrmdir(trgi)) return false; + } + } + + if(ThrdKill) return false; + } + + for(cQStr &item : QDir(srcdir.isEmpty() ? "/" : srcdir).entryList(QDir::Files | QDir::System)) + { + if(like(item, incl)) + { + QStr srci(srcdir % '/' % item); + + if(islink(srci)) + { + QStr trgi("/.sbsystemcopy/" % item); + if(! (exist(trgi) || cplink(srci, trgi))) return false; + } + } + + if(ThrdKill) return false; + } + } + + for(cQStr &cdir : {"/cdrom", "/dev", "/home", "/mnt", "/root", "/proc", "/run", "/sys", "/tmp"}) + { + QStr trgd("/.sbsystemcopy" % cdir); + + if(! isdir(srcdir % cdir)) + { + if(exist(trgd)) stype(trgd) == Isdir ? recrmdir(trgd) : rmfile(trgd); + } + else if(! isdir(trgd)) + { + if(exist(trgd)) rmfile(trgd); + if(! cpdir(srcdir % cdir, trgd)) return false; + } + else if(! cpertime(srcdir % cdir, trgd)) + return false; + + if(ThrdKill) return false; + } + + QSL elst{"/boot/efi", "/etc/crypttab", "/etc/mtab", "/snap/.sblvtmp", "/var/.sblvtmp", "/var/cache/fontconfig/", "/var/lib/dpkg/lock", "/var/lib/udisks2/", "/var/log", "/var/run/", "/var/tmp/"}; + if(mthd > 2) elst.append({"/etc/machine-id", "/var/lib/dbus/machine-id"}); + + if(srcdir.isEmpty()) + elst.append(cfgfile); + else + { + elst.append("/etc/systemback/"); + if(srcdir == "/.systembacklivepoint" && fload("/proc/cmdline").contains("noxconf")) elst.append({"/etc/X11/xorg.conf", "/etc/X11/xorg.conf.d/"}); + } + + edetect(elst); + + for(cQStr &cdir : {"/etc/rc0.d", "/etc/rc1.d", "/etc/rc2.d", "/etc/rc3.d", "/etc/rc4.d", "/etc/rc5.d", "/etc/rc6.d", "/etc/rcS.d"}) + { + QStr srcd(srcdir % cdir); + + if(isdir(srcd)) + for(cQStr &item : QDir(srcd).entryList(QDir::Files)) + if(item.contains("cryptdisks")) elst.append(cdir % '/' % item); + } + + QSL dlst{"/bin", "/boot", "/etc", "/lib", "/lib32", "/lib64", "/opt", "/sbin", "/selinux", "/srv", "/usr", "/var", "/snap"}, excl[]{{"_lost+found_", "_Systemback_"}, {"_lost+found_", "_lost+found/*", "*/lost+found_", "*/lost+found/*", "_Systemback_", "_Systemback/*", "*/Systemback_", "*/Systemback/*"}, {"_/etc/udev/rules.d*", "*-persistent-*"}}; + + for(uchar a(0) ; a < dlst.count() ; ++a) + { + cQStr &cdir(dlst.at(a)); + QStr srcd(srcdir % cdir), trgd("/.sbsystemcopy" % cdir); + + if(isdir(srcd)) + { + if(isdir(trgd)) + { + QBAL sdlst; + if(! odir(sdlst, trgd)) return false; + + for(cQStr &item : sdlst) + { + bool exc; + + if(! like(item, excl[0]) && ((exc = exclcheck(elst, cdir % '/' % item)) || ! exist(srcd % '/' % item))) + { + QStr trgi(trgd % '/' % item); + + switch(stype(trgi)) { + case Isdir: + if(! exc) recrmdir(trgi); + break; + default: + rmfile(trgi); + } + } + + if(ThrdKill) return false; + } + } + else + { + if(exist(trgd)) rmfile(trgd); + if(! crtdir(trgd)) return false; + } + + if(! (cditmst = &sysitmst[a])->isEmpty()) + { + lcnt = 0; + QTS in(cditms = &sysitms[a], QIODevice::ReadOnly); + + while(! in.atEnd()) + { + if(Progress < (cperc = (++cnum * 100 + 50) / anum)) Progress = cperc; + QStr item(in.readLine()); + + if(! like(item, excl[1])) + { + QStr pdi(cdir % '/' % item); + + if(! exclcheck(elst, pdi) && (macid.isEmpty() || ! item.contains(macid)) && (mthd < 3 || ! like(pdi, excl[2], All)) && (! srcdir.isEmpty() || exist(pdi))) + { + QStr srci(srcd % '/' % item), trgi(trgd % '/' % item); + + switch(cditmst->at(lcnt)) { + case Islink: + switch(stype(trgi)) { + case Islink: + if(lcomp(srci, trgi)) goto nitem_2; + case Isfile: + rmfile(trgi); + break; + case Isdir: + recrmdir(trgi); + } + + if(! cplink(srci, trgi)) return false; + break; + case Isdir: + switch(stype(trgi)) { + case Isdir: + { + QBAL sdlst; + if(! odir(sdlst, trgi)) return false; + + for(cQStr &sitem : sdlst) + { + bool exc; + + if(! like(sitem, excl[0]) && ((exc = exclcheck(elst, pdi % '/' % sitem)) || ! exist(srci % '/' % sitem))) + { + QStr strgi(trgi % '/' % sitem); + + switch(stype(strgi)) { + case Isdir: + if(! exc) recrmdir(strgi); + break; + default: + rmfile(strgi); + } + } + + if(ThrdKill) return false; + } + + goto nitem_2; + } + case Islink: + case Isfile: + rmfile(trgi); + } + + if(! crtdir(trgi)) return false; + break; + case Isfile: + switch(stype(trgi)) { + case Isfile: + switch(fcomp(trgi, srci)) { + case 1: + if(! cpertime(srci, trgi)) return false; + case 2: + goto nitem_2; + } + case Islink: + rmfile(trgi); + break; + case Isdir: + recrmdir(trgi); + } + + if(! cpfile(srci, trgi)) return false; + } + } + } + + nitem_2: + if(ThrdKill) return false; + ++lcnt; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(cditmst->at(lcnt++) == Isdir) + { + QStr trgi(trgd % '/' % item); + if(exist(trgi) && ! cpertime(srcd % '/' % item, trgi)) return false; + } + + if(ThrdKill) return false; + } + + cditms->clear(), cditmst->clear(); + } + + if(! cpertime(srcd, trgd)) return false; + } + else if(exist(trgd)) + stype(trgd) == Isdir ? recrmdir(trgd) : rmfile(trgd); + } + } + + { + QStr srcd(srcdir % "/media"), trgd("/.sbsystemcopy/media"); + + if(isdir(srcd)) + { + if(isdir(trgd)) + for(cQStr &item : QDir(trgd).entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)) + { + QStr trgi(trgd % '/' % item); + if(! (exist(srcdir % '/' % item) || mcheck(trgi % '/'))) recrmdir(trgi); + if(ThrdKill) return false; + } + else + { + if(exist(trgd)) rmfile(trgd); + if(! crtdir(trgd)) return false; + } + + if(! srcdir.isEmpty()) + { + QBA mediaitms; + mediaitms.reserve(10000); + if(! rodir(mediaitms, srcd)) return false; + + if(! mediaitms.isEmpty()) + { + QTS in(&mediaitms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()), trgi(trgd % '/' % item); + + if(exist(trgi)) + { + if(stype(trgi) != Isdir) + { + rmfile(trgi); + if(! crtdir(trgi)) return false; + } + + if(! cpertime(srcdir % "/media/" % item, trgi)) return false; + } + else if(! cpdir(srcdir % "/media/" % item, trgi)) + return false; + + if(ThrdKill) return false; + } + } + } + else if(isfile("/etc/fstab")) + { + QSL dlst(QDir(srcd).entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)); + QFile file("/etc/fstab"); + if(! fopen(file)) return false; + + for(uchar a(0) ; a < dlst.count() ; ++a) + { + cQStr &item(dlst.at(a)); + if(a && ! fopen(file)) return false; + QSL incl{"* /media/" % item % " *", "* /media/" % item % "/*"}; + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()), fdir; + + if(! cline.startsWith('#') && like(cline.replace('\t', ' ').contains("\\040") ? QStr(cline).replace("\\040", " ") : cline, incl)) + for(cQStr cdname : mid(cline, instr(cline, "/media/") + 7, instr(cline, " ", instr(cline, "/media/")) - instr(cline, "/media/") - 7).split('/')) + if(! cdname.isEmpty()) + { + QStr trgi(trgd % fdir.append('/' % (cdname.contains("\\040") ? QStr(cdname).replace("\\040", " ") : cdname))); + if(! (isdir(trgi) || cpdir("/media" % fdir, trgi))) return false; + } + + if(ThrdKill) return false; + } + + file.close(); + } + } + + if(! cpertime(srcd, trgd)) return false; + } + else if(exist(trgd)) + stype(trgd) == Isdir ? recrmdir(trgd) : rmfile(trgd); + } + + if(exist("/.sbsystemcopy/var/log")) stype("/.sbsystemcopy/var/log") == Isdir ? recrmdir("/.sbsystemcopy/var/log") : rmfile("/.sbsystemcopy/var/log"); + + if(isdir(srcdir % "/var/log")) + { + if(! crtdir("/.sbsystemcopy/var/log")) return false; + QBA logitms; + QUCL logitmst; + logitms.reserve(20000), logitmst.reserve(1000); + if(! rodir(logitms, logitmst, srcdir % "/var/log")) return false; + + if(! logitmst.isEmpty()) + { + QSL excl{"*.gz_", "*.old_"}; + lcnt = 0; + QTS in(&logitms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + switch(logitmst.at(lcnt++)) { + case Isdir: + if(! crtdir("/.sbsystemcopy/var/log/" % item)) return false; + break; + case Isfile: + if(! like(item, excl) && ! (item.contains('.') && isnum(right(item, -rinstr(item, "."))))) + { + QStr trgi("/.sbsystemcopy/var/log/" % item); + crtfile(trgi); + if(! cpertime(srcdir % "/var/log/" % item, trgi)) return false; + } + } + + if(ThrdKill) return false; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + if((logitmst.at(lcnt++) == Isdir && ! cpertime(srcdir % "/var/log/" % item, "/.sbsystemcopy/var/log/" % item)) || ThrdKill) return false; + } + } + + if(! (cpertime(srcdir % "/var/log", "/.sbsystemcopy/var/log") && cpertime(srcdir % "/var", "/.sbsystemcopy/var"))) return false; + } + + if(srcdir == "/.systembacklivepoint" && isdir("/.systembacklivepoint/.systemback")) + { + QBA sbitms; + QUCL sbitmst; + sbitms.reserve(10000), sbitmst.reserve(500); + if(! rodir(sbitms, sbitmst, "/.systembacklivepoint/.systemback")) return false; + lcnt = 0; + QTS in(&sbitms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + switch(sbitmst.at(lcnt++)) { + case Islink: + if(! (item == "etc/fstab" || cplink("/.systembacklivepoint/.systemback/" % item, "/.sbsystemcopy/" % item))) return false; + break; + case Isfile: + if(! (item == "etc/fstab" || cpfile("/.systembacklivepoint/.systemback/" % item, "/.sbsystemcopy/" % item))) return false; + } + + if(ThrdKill) return false; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + if((sbitmst.at(lcnt++) == Isdir && ! cpertime("/.systembacklivepoint/.systemback/" % item, "/.sbsystemcopy/" % item)) || ThrdKill) return false; + } + } + + return true; +} + +bool sb::thrdlvprpr(bool iudata) +{ + if(ThrdLng[0]) ThrdLng[0] = 0; + + { + QUCL sitmst; + sitmst.reserve(1000000); + + for(cQStr &item : {"/bin", "/boot", "/etc", "/lib", "/lib32", "/lib64", "/opt", "/sbin", "/selinux", "/usr", "/initrd.img", "/initrd.img.old", "/vmlinuz", "/vmlinuz.old"}) + if(isdir(item)) + { + if(! rodir(sitmst, item)) return false; + ++ThrdLng[0]; + } + else if(exist(item)) + ++ThrdLng[0]; + + ThrdLng[0] += sitmst.count(); + } + + if(! (crtdir(sdir[2] % "/.sblivesystemcreate/.systemback") && crtdir(sdir[2] % "/.sblivesystemcreate/.systemback/etc"))) return false; + + if(isdir("/etc/udev")) + { + if(! crtdir(sdir[2] % "/.sblivesystemcreate/.systemback/etc/udev")) return false; + + if(isdir("/etc/udev/rules.d") && (! crtdir(sdir[2] % "/.sblivesystemcreate/.systemback/etc/udev/rules.d") || + (isfile("/etc/udev/rules.d/70-persistent-cd.rules") && ! cpfile("/etc/udev/rules.d/70-persistent-cd.rules", sdir[2] % "/.sblivesystemcreate/.systemback/etc/udev/rules.d/70-persistent-cd.rules")) || + (isfile("/etc/udev/rules.d/70-persistent-net.rules") && ! cpfile("/etc/udev/rules.d/70-persistent-net.rules", sdir[2] % "/.sblivesystemcreate/.systemback/etc/udev/rules.d/70-persistent-net.rules")) || + ! cpertime("/etc/udev/rules.d", sdir[2] % "/.sblivesystemcreate/.systemback/etc/udev/rules.d"))) return false; + + if(! cpertime("/etc/udev", sdir[2] % "/.sblivesystemcreate/.systemback/etc/udev")) return false; + } + + if((isfile("/etc/fstab") && ! cpfile("/etc/fstab", sdir[2] % "/.sblivesystemcreate/.systemback/etc/fstab")) || ! cpertime("/etc", sdir[2] % "/.sblivesystemcreate/.systemback/etc")) return false; + if(exist("/.sblvtmp")) stype("/.sblvtmp") == Isdir ? recrmdir("/.sblvtmp") : rmfile("/.sblvtmp"); + if(! crtdir("/.sblvtmp")) return false; + + for(cQStr &cdir : {"/cdrom", "/dev", "/mnt", "/proc", "/run", "/srv", "/sys", "/tmp"}) + if(isdir(cdir)) + { + if(! cpdir(cdir, "/.sblvtmp" % cdir)) return false; + ++ThrdLng[0]; + } + + if(ThrdKill) return false; + + if(! isdir("/media")) + { + if(! crtdir("/media")) return false; + } + else if(exist("/media/.sblvtmp")) + stype("/media/.sblvtmp") == Isdir ? recrmdir("/media/.sblvtmp") : rmfile("/media/.sblvtmp"); + + if(! (crtdir("/media/.sblvtmp") && crtdir("/media/.sblvtmp/media"))) return false; + ++ThrdLng[0]; + if(ThrdKill) return false; + + if(isfile("/etc/fstab")) + { + QFile file("/etc/fstab"); + if(! fopen(file)) return false; + QSL dlst(QDir("/media").entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)); + + for(uchar a(0) ; a < dlst.count() ; ++a) + { + cQStr &item(dlst.at(a)); + if(a && ! fopen(file)) return false; + QSL incl{"* /media/" % item % " *", "* /media/" % item % "/*"}; + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()), fdir; + + if(! cline.startsWith('#') && like(cline.replace('\t', ' ').contains("\\040") ? QStr(cline).replace("\\040", " ") : cline, incl)) + for(cQStr cdname : mid(cline, instr(cline, "/media/") + 7, instr(cline, " ", instr(cline, "/media/")) - instr(cline, "/media/") - 7).split('/')) + if(! cdname.isEmpty()) + { + QStr sbli("/media/.sblvtmp/media" % fdir.append('/' % (cdname.contains("\\040") ? QStr(cdname).replace("\\040", " ") : cdname))); + + if(! isdir(sbli)) + { + if(! cpdir("/media" % fdir, sbli)) return false; + ++ThrdLng[0]; + } + } + + if(ThrdKill) return false; + } + + file.close(); + } + } + + if(exist("/var/.sblvtmp")) stype("/var/.sblvtmp") == Isdir ? recrmdir("/var/.sblvtmp") : rmfile("/var/.sblvtmp"); + if(ThrdKill) return false; + uint lcnt; + + { + QBA varitms; + QUCL varitmst; + varitms.reserve(1000000), varitmst.reserve(50000); + if(! rodir(varitms, varitmst, "/var")) return false; + if(! (crtdir("/var/.sblvtmp") && crtdir("/var/.sblvtmp/var"))) return false; + ++ThrdLng[0]; + QSL elst{"lib/dpkg/lock", "lib/udisks/mtab", "lib/ureadahead/", "log/", "run/", "tmp/"}; + edetect(elst, true); + + if(! varitmst.isEmpty()) + { + QSL excl[]{{"+_cache/apt/*", "-*.bin_", "-*.bin.*"}, {"_cache/apt/archives/*", "*.deb_"}, {"_lost+found_", "_lost+found/*", "*/lost+found_", "*/lost+found/*", "_Systemback_", "_Systemback/*", "*/Systemback_", "*/Systemback/*", "*.dpkg-old_", "*~_", "*~/*"}, {"*.gz_", "*.old_"}}; + lcnt = 0; + QTS in(&varitms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()), srci("/var/" % item); + + if(exist(srci)) + { + if(! (like(item, excl[0], Mixed) || like(item, excl[1], All) || like(item, excl[2]) || exclcheck(elst, item))) + switch(varitmst.at(lcnt)) { + case Islink: + if(! cplink(srci, "/var/.sblvtmp/var/" % item)) return false; + ++ThrdLng[0]; + break; + case Isdir: + if(! crtdir("/var/.sblvtmp/var/" % item)) return false; + ++ThrdLng[0]; + break; + case Isfile: + if(issmfs("/var/.sblvtmp", srci) && ! crthlnk(srci, "/var/.sblvtmp/var/" % item)) return false; + ++ThrdLng[0]; + } + else if(item.startsWith("log")) + switch(varitmst.at(lcnt)) { + case Isdir: + if(! crtdir("/var/.sblvtmp/var/" % item)) return false; + ++ThrdLng[0]; + break; + case Isfile: + if(! (like(item, excl[3]) || (item.contains('.') && isnum(right(item, -rinstr(item, ".")))))) + { + QStr sbli("/var/.sblvtmp/var/" % item); + crtfile(sbli); + if(! cpertime(srci, sbli)) return false; + ++ThrdLng[0]; + } + } + } + + if(ThrdKill) return false; + ++lcnt; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(varitmst.at(lcnt++) == Isdir) + { + QStr sbli("/var/.sblvtmp/var/" % item); + if(exist(sbli) && ! cpertime("/var/" % item, sbli)) return false; + } + + if(ThrdKill) return false; + } + } + } + + if(! cpertime("/var", "/var/.sblvtmp/var")) return false; + + if(isdir("/snap")) + { + if(exist("/snap/.sblvtmp")) stype("/snap/.sblvtmp") == Isdir ? recrmdir("/snap/.sblvtmp") : rmfile("/snap/.sblvtmp"); + if(ThrdKill) return false; + QBA snapitms; + QUCL snapitmst; + snapitms.reserve(10000), snapitmst.reserve(500); + if(! rodir("/snap", snapitms, snapitmst)) return false; + if(! (crtdir("/snap/.sblvtmp") && crtdir("/snap/.sblvtmp/snap"))) return false; + ++ThrdLng[0]; + + if(! snapitmst.isEmpty()) + { + QSL excl{"_lost+found_", "_lost+found/*", "*/lost+found_", "*/lost+found/*", "_Systemback_", "_Systemback/*", "*/Systemback_", "*/Systemback/*", "*.dpkg-old_", "*~_", "*~/*"}; + lcnt = 0; + QTS in(&snapitms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()), srci("/snap/" % item); + + if(exist(srci) && ! like(item, excl)) + switch(snapitmst.at(lcnt)) { + case Islink: + case Isfile: + if(! crthlnk(srci, "/snap/.sblvtmp/snap/" % item)) return false; + ++ThrdLng[0]; + break; + case Isdir: + if(! crtdir("/snap/.sblvtmp/snap/" % item)) return false; + ++ThrdLng[0]; + } + + if(ThrdKill) return false; + ++lcnt; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(snapitmst.at(lcnt++) == Isdir) + { + QStr sbli("/snap/.sblvtmp/snap/" % item); + if(exist(sbli) && ! cpertime("/snap/" % item, sbli)) return false; + } + + if(ThrdKill) return false; + } + } + + if(! cpertime("/snap", "/snap/.sblvtmp/snap")) return false; + } + + QSL usrs; + + { + QFile file("/etc/passwd"); + if(! fopen(file)) return false; + + while(! file.atEnd()) + { + QStr usr(file.readLine().trimmed()); + if(usr.contains(":/home/") && isdir("/home/" % (usr = left(usr, instr(usr, ":") -1)))) usrs.prepend(usr); + } + } + + usrs.prepend(isdir("/root") ? "" : nullptr); + if(ThrdKill) return false; + + bool uhl(dfree("/home") > 104857600 && dfree("/root") > 104857600 && [&usrs] { + QStr mnts(fload("/proc/self/mounts")); + + for(uchar a(1) ; a < usrs.count() ; ++a) + if(mnts.contains(" /home/" % usrs.at(a) % '/') || ! issmfs("/home", "/home/" % usrs.at(a))) return false; + + return true; + }()); + + if(ThrdKill) return false; + + if(uhl) + { + if(exist("/home/.sbuserdata")) stype("/home/.sbuserdata") == Isdir ? recrmdir("/home/.sbuserdata") : rmfile("/home/.sbuserdata"); + if(! (crtdir("/home/.sbuserdata") && cpdir("/home", "/home/.sbuserdata/home"))) return false; + } + else if(! (crtdir(sdir[2] % "/.sblivesystemcreate/userdata") && cpdir("/home", sdir[2] % "/.sblivesystemcreate/userdata/home"))) + return false; + + ++ThrdLng[0]; + if(ThrdKill) return false; + QSL elst{".sbuserdata", ".cache/gvfs", ".local/share/Trash/files/", ".local/share/Trash/info/", ".Xauthority", ".ICEauthority"}; + + { + QFile file(excfile); + if(! fopen(file)) return false; + + while(! file.atEnd()) + { + QStr cline(left(file.readLine(), -1)); + if(! cline.isEmpty()) elst.append(cline); + if(ThrdKill) return false; + } + } + + QSL excl{"_lost+found_", "_lost+found/*", "*/lost+found_", "*/lost+found/*", "_Systemback_", "_Systemback/*", "*/Systemback_", "*/Systemback/*", "*~_", "*~/*"}; + + for(cQStr &usr : usrs) + if(! usr.isNull()) + { + QStr usdir; + + if(uhl) + { + if(usr.isEmpty()) + { + usdir = "/root/.sbuserdata"; + if(exist(usdir)) stype(usdir) == Isdir ? recrmdir(usdir) : rmfile(usdir); + if(! (crtdir(usdir) && crtdir(usdir.append("/root")))) return false; + } + else + { + usdir = "/home/.sbuserdata/home/" % usr; + if(! crtdir(usdir)) return false; + } + } + else + { + usdir = sdir[2] % (usr.isEmpty() ? "/.sblivesystemcreate/userdata/root" : QStr("/.sblivesystemcreate/userdata/home/" % usr)); + if(! crtdir(usdir)) return false; + } + + ++ThrdLng[0]; + QStr srcd(usr.isEmpty() ? "/root" : QStr("/home/" % usr)); + QBA useritms; + QUCL useritmst; + useritms.reserve(usr.isEmpty() ? 50000 : 5000000), useritmst.reserve(usr.isEmpty() ? 1000 : 100000); + if(! rodir(useritms, useritmst, srcd, ! iudata ? True : False)) return false; + + if(! useritmst.isEmpty()) + { + lcnt = 0; + QTS in(&useritms, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(! (like(item, excl) || exclcheck(elst, item))) + { + QStr srci(srcd % '/' % item); + + if(exist(srci)) + { + switch(useritmst.at(lcnt)) { + case Islink: + if(uhl) + { + if(! crthlnk(srci, usdir % '/' % item)) return false; + } + else if(! cplink(srci, usdir % '/' % item)) + return false; + + ++ThrdLng[0]; + break; + case Isdir: + if(! crtdir(usdir % '/' % item)) return false; + ++ThrdLng[0]; + break; + case Isfile: + if(iudata || fsize(srci) <= 8000000) + { + if(uhl) + { + if(! crthlnk(srci, usdir % '/' % item)) return false; + } + else if(! cpfile(srci, usdir % '/' % item)) + return false; + + ++ThrdLng[0]; + } + } + } + } + + if(ThrdKill) return false; + ++lcnt; + } + + in.seek(0), lcnt = 0; + + while(! in.atEnd()) + { + QStr item(in.readLine()); + + if(useritmst.at(lcnt++) == Isdir) + { + QStr sbli(usdir % '/' % item); + if(exist(sbli) && ! cpertime(srcd % '/' % item, sbli)) return false; + } + + if(ThrdKill) return false; + } + } + + if(! (iudata || usr.isEmpty()) && isfile(srcd % "/.config/user-dirs.dirs")) + { + QFile file(srcd % "/.config/user-dirs.dirs"); + if(! fopen(file)) return false; + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()), dir; + + if(! cline.startsWith('#') && cline.contains("$HOME") && (dir = left(right(cline, -instr(cline, "/")), -1)).length()) + { + QStr srci(srcd % '/' % dir); + + if(isdir(srci)) + { + QStr sbld(usdir % '/' % dir); + + if(! isdir(sbld)) + { + if(! cpdir(srci, sbld)) return false; + ++ThrdLng[0]; + } + } + } + + if(ThrdKill) return false; + continue; + } + + file.close(); + } + + if(! cpertime(srcd, usdir)) return false; + } + + return true; +} diff --git a/libsystemback/sblib.hpp b/libsystemback/sblib.hpp new file mode 100644 index 0000000..3b70fd9 --- /dev/null +++ b/libsystemback/sblib.hpp @@ -0,0 +1,290 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef SBLIB_HPP +#define SBLIB_HPP + +#include "sblib_global.hpp" +#include "bstr.hpp" +#include +#include +#include +#include +#include +#include +#include +#include + +#define fnln __attribute__((always_inline)) +#define cfgfile "/etc/systemback/systemback.conf" +#define excfile "/etc/systemback/systemback.excludes" +#define incfile "/etc/systemback/systemback.includes" + +class SHARED_EXPORT_IMPORT sb : public QThread +{ + Q_DECLARE_TR_FUNCTIONS(systemback) + +public: + enum { Remove = 0, Copy = 1, Sync = 2, Mount = 3, Umount = 4, Readprttns = 5, Readlvdevs = 6, Ruuid = 7, Setpflag = 8, Mkptable = 9, Mkpart = 10, Delpart = 11, Crtrpoint = 12, Srestore = 13, Scopy = 14, Lvprpr = 15, + MSDOS = 0, GPT = 1, Clear = 2, Primary = 3, Extended = 4, Logical = 5, Freespace = 6, Emptyspace = 7, + Nodbg = 0, Errdbg = 1, Alldbg = 2, Extdbg = 3, Cextdbg = 4, Nulldbg = 5, Falsedbg = 6, + Notexist = 0, Isfile = 1, Isdir = 2, Islink = 3, Isblock = 4, Unknown = 5, + Noflag = 0, Silent = 1, Bckgrnd = 2, Prgrss = 4, Wait = 8, + Sblock = 0, Dpkglock = 1, Aptlock = 2, Schdlrlock = 3, + False = 0, True = 1, Empty = 2, Include = 3, + Crtdir = 0, Rmfile = 1, Crthlnk = 2, + Read = 0, Write = 1, Exec = 2, + Norm = 0, All = 1, Mixed = 2 }; + + static sb SBThrd; + static QStr ThrdStr[3], eout, sdir[3], schdlr[2], pnames[15], lang, style, wsclng; + static ullong ThrdLng[2]; + static uchar dbglev, pnumber, ismpnt, schdle[6], waot, incrmtl, xzcmpr, autoiso, ecache; + static schar Progress; + static bool ExecKill, ThrdKill; + + static fnln QStr hunit(ullong size); + + static QStr mid(cQStr &txt, ushort start, ushort len), + fload(cQStr &path, bool ascnt), + right(cQStr &txt, short len), + left(cQStr &txt, short len), + gdetect(cQStr rdir = "/"), + rndstr(uchar vlen = 10), + ruuid(cQStr &part), + appver(), + dbginf(); + + static QBA fload(cQStr &path); + template static ullong dfree(const T &path); + static fnln ullong fsize(cQStr &path); + + static fnln ushort instr(cQStr &txt, cQStr &stxt, ushort start = 1), + rinstr(cQStr &txt, cQStr &stxt); + + template static uchar stype(const T &path, bool flink = false); + + static uchar exec(cQStr &cmd, uchar flag = Noflag, cQStr &envv = nullptr), + exec(cQSL &cmds); + + template static bool issmfs(const T1 &item1, const T2 &item2); + template static fnln bool crtdir(const T &path); + template static fnln bool rmfile(const T &file); + template static bool exist(const T &path); + + static fnln bool islink(cQStr &path), + isfile(cQStr &path), + isdir(cQStr &path); + + static bool srestore(uchar mthd, cQStr &usr, cQStr &srcdir, cQStr &trgt, bool sfstab = false), + mkpart(cQStr &dev, ullong start = 0, ullong len = 0, uchar type = Primary), + mcheck(cQStr &item, cQStr &mnts = fload("/proc/self/mounts")), + mount(cQStr &dev, cQStr &mpoint, cQStr &moptns = nullptr), + like(cQStr &txt, cQSL &lst, uchar mode = Norm), + execsrch(cQStr &fname, cQStr &ppath = nullptr), + scopy(uchar mthd, cQStr &usr, cQStr &srcdir), + mkptable(cQStr &dev, cQStr &type = "msdos"), + crtfile(cQStr &path, cQStr &txt = nullptr), + like(int num, cSIL &lst, bool all = false), + access(cQStr &path, uchar mode = Read), + copy(cQStr &srcfile, cQStr &newfile), + setpflag(cQStr &part, cQStr &flags), + rename(cQStr &opath, cQStr &npath), + error(QStr txt, bool dbg = false), + cfgwrite(cQStr &file = cfgfile), + crtrpoint(cQStr &pname), + islnxfs(cQStr &path), + remove(cQStr &path), + lvprpr(bool iudata), + fopen(QFile &file), + umount(cQStr &dev), + isnum(cQStr &txt), + lock(uchar type); + + static void readprttns(QSL &strlst), + readlvdevs(QSL &strlst), + delpart(cQStr &part), + unlock(uchar type), + delay(ushort msec), + print(cQStr &txt), + supgrade(), + pupgrade(), + thrdelay(), + cfgread(), + fssync(), + ldtltr(); + +protected: + void run(); + +private: + sb(); + ~sb(); + + static QTrn *SBtr; + static QSL *ThrdSlst; + static int sblock[4]; + static uchar ThrdType, ThrdChr; + static bool ThrdBool, ThrdRslt; + + static QStr fdbg(cQStr &path1, cQStr &path2 = nullptr), + rlink(cQStr &path, ushort blen); + + static ullong devsize(cQStr &dev); + + static bool rodir(QBA &ba, QUCL &ucl, cQStr &path, uchar hidden = False, cQSL &ilist = QSL(), uchar oplen = 0), + rodir(cQStr &path, QBA &ba, QUCL &ucl, ullong id = 0, uchar oplen = 0), + cerr(uchar type, cQStr &str1, cQStr &str2 = nullptr), + rodir(QUCL &ucl, cQStr &path, uchar oplen = 0), + rodir(QBA &ba, cQStr &path, uchar oplen = 0), + inclcheck(cQSL &ilist, cQStr &item); + + uchar fcomp(cQStr &file1, cQStr &file2); + template fnln bool crthlnk(const T1 &srclnk, const T2 &newlnk); + + bool odir(QBAL &balst, cQStr &path, uchar hidden = False, cQSL &ilist = QSL(), cQStr &ppath = nullptr), + thrdsrestore(uchar mthd, cQStr &usr, cQStr &srcdir, cQStr &trgt, bool sfstab), + cpertime(cQStr &srcitem, cQStr &newitem, bool skel = false), + cpfile(cQStr &srcfile, cQStr &newfile, bool skel = false), + thrdscopy(uchar mthd, cQStr &usr, cQStr &srcdir), + recrmdir(cbstr &path, bool slimit = false), + cplink(cQStr &srclink, cQStr &newlink), + cpdir(cQStr &srcdir, cQStr &newdir), + exclcheck(cQSL &elist, cQStr &item), + lcomp(cQStr &link1, cQStr &link2), + thrdcrtrpoint(cQStr &trgt), + thrdlvprpr(bool iudata), + umnt(cbstr &dev); + + void edetect(QSL &elst, bool spath = false); +}; + +inline QStr sb::left(cQStr &txt, short len) +{ + return txt.length() > qAbs(len) ? txt.left(len > 0 ? len : txt.length() + len) : len > 0 ? txt : nullptr; +} + +inline QStr sb::right(cQStr &txt, short len) +{ + return txt.length() > qAbs(len) ? txt.right(len > 0 ? len : txt.length() + len) : len > 0 ? txt : nullptr; +} + +inline QStr sb::mid(cQStr &txt, ushort start, ushort len) +{ + return txt.length() >= start ? txt.length() - start + 1 > len ? txt.mid(start - 1, len) : txt.right(txt.length() - start + 1) : nullptr; +} + +inline ushort sb::instr(cQStr &txt, cQStr &stxt, ushort start) +{ + return txt.indexOf(stxt, start - 1) + 1; +} + +inline ushort sb::rinstr(cQStr &txt, cQStr &stxt) +{ + return txt.lastIndexOf(stxt) + 1; +} + +inline bool sb::like(int num, cSIL &lst, bool all) +{ + for(int val : lst) + if(all ? num != val : num == val) return ! all; + + return all; +} + +template inline bool sb::exist(const T &path) +{ + struct stat istat; + return ! lstat(bstr(path), &istat); +} + +inline bool sb::islink(cQStr &path) +{ + return QFileInfo(path).isSymLink(); +} + +inline bool sb::isfile(cQStr &path) +{ + return QFileInfo(path).isFile(); +} + +inline bool sb::isdir(cQStr &path) +{ + return QFileInfo(path).isDir(); +} + +template inline uchar sb::stype(const T &path, bool flink) +{ + struct stat istat; + if(flink ? stat(bstr(path), &istat) : lstat(bstr(path), &istat)) return Notexist; + + switch(istat.st_mode & S_IFMT) { + case S_IFREG: + return Isfile; + case S_IFDIR: + return Isdir; + case S_IFLNK: + return Islink; + case S_IFBLK: + return Isblock; + default: + return Unknown; + } +} + +inline ullong sb::fsize(cQStr &path) +{ + return QFileInfo(path).size(); +} + +template ullong sb::dfree(const T &path) +{ + struct statvfs dstat; + return statvfs(bstr(path), &dstat) ? 0 : dstat.f_bavail * dstat.f_bsize; +} + +inline QStr sb::hunit(ullong size) +{ + return size < 1024 ? QStr(QStr::number(size) % " B") : size < 1048576 ? QStr::number(qRound64(size * 100.0 / 1024.0) / 100.0) % " KiB" : size < 1073741824 ? QStr::number(qRound64(size * 100.0 / 1024.0 / 1024.0) / 100.0) % " MiB" : size < 1073741824000 ? QStr::number(qRound64(size * 100.0 / 1024.0 / 1024.0 / 1024.0) / 100.0) % " GiB" : QStr::number(qRound64(size * 100.0 / 1024.0 / 1024.0 / 1024.0 / 1024.0) / 100.0) % " TiB"; +} + +template inline bool sb::issmfs(const T1 &item1, const T2 &item2) +{ + struct stat istat[2]; + return ! (stat(bstr(item1), &istat[0]) || stat(bstr(item2), &istat[1])) && istat[0].st_dev == istat[1].st_dev; +} + +template inline bool sb::crtdir(const T &path) +{ + return mkdir(bstr(path), 0755) ? cerr(Crtdir, path) : true; +} + +template inline bool sb::rmfile(const T &file) +{ + return unlink(bstr(file)) ? cerr(Rmfile, file) : true; +} + +inline bool sb::isnum(cQStr &txt) +{ + for(uchar a(0) ; a < txt.length() ; ++a) + if(! txt.at(a).isDigit()) return false; + + return ! txt.isEmpty(); +} + +#endif diff --git a/libsystemback/sblib_global.hpp b/libsystemback/sblib_global.hpp new file mode 100644 index 0000000..10c6be5 --- /dev/null +++ b/libsystemback/sblib_global.hpp @@ -0,0 +1,30 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef SBLIB_GLOBAL_HPP +#define SBLIB_GLOBAL_HPP + +#include + +#ifdef SYSTEMBACK_LIBRARY +#define SHARED_EXPORT_IMPORT Q_DECL_EXPORT +#else +#define SHARED_EXPORT_IMPORT Q_DECL_IMPORT +#endif + +#endif diff --git a/libsystemback/sbtypedef.hpp b/libsystemback/sbtypedef.hpp new file mode 100644 index 0000000..7bbc86b --- /dev/null +++ b/libsystemback/sbtypedef.hpp @@ -0,0 +1,75 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef SBTYPEDEF_HPP +#define SBTYPEDEF_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class bstr; + +typedef QTranslator QTrn; +typedef QCursor *QCr; +typedef QDesktopWidget *QDW; +typedef QWidget *QWdt; +typedef QTableWidget *QTblW; +typedef QListWidget *QLW; +typedef QPushButton *QPB; +typedef QLineEdit *QLE; +typedef QComboBox *QCbB; +typedef QRadioButton *QRB; +typedef QCheckBox *QCB; +typedef QLabel *QLbl; +typedef QTextStream QTS; +typedef QList QWL; +typedef QList QCbBL; +typedef QList QLbL; +typedef const QStringList cQSL; +typedef QStringList QSL; +typedef QList QBAL; +typedef QList> QUCLL; +typedef QList QLIL; +typedef const QList cQUCL; +typedef QList QUCL; +typedef const std::initializer_list cSIL; +typedef const QString cQStr; +typedef QString QStr; +typedef const QByteArray cQBA; +typedef QByteArray QBA; +typedef const QChar cQChar; +typedef const QRect cQRect; +typedef const QSize cQSize; +typedef const QPoint cQPoint; +typedef const bstr cbstr; +typedef unsigned long long ullong; +typedef long long llong; +typedef const char cchar; +typedef signed char schar; + +#endif diff --git a/libsystemback/version b/libsystemback/version new file mode 100644 index 0000000..5321956 --- /dev/null +++ b/libsystemback/version @@ -0,0 +1 @@ +1.8.402_05.16.2016 diff --git a/libsystemback/version.qrc b/libsystemback/version.qrc new file mode 100644 index 0000000..eee6075 --- /dev/null +++ b/libsystemback/version.qrc @@ -0,0 +1,5 @@ + + + version + + diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..1a5a6b7 Binary files /dev/null and b/logo.png differ diff --git a/sbschedule-kde.desktop b/sbschedule-kde.desktop new file mode 100644 index 0000000..977803e --- /dev/null +++ b/sbschedule-kde.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Systemback scheduler daemon +Exec=/usr/lib/systemback/sbsustart scheduler +Type=Application +Icon=systemback +Terminal=false +OnlyShowIn=KDE; +NoDisplay=true diff --git a/sbschedule.desktop b/sbschedule.desktop new file mode 100644 index 0000000..1c5f5b7 --- /dev/null +++ b/sbschedule.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Systemback scheduler daemon +Exec=/usr/lib/systemback/sbsustart scheduler gtk+ +Type=Application +Icon=systemback +Terminal=false +NotShowIn=KDE; +NoDisplay=true diff --git a/sbscheduler/main.cpp b/sbscheduler/main.cpp new file mode 100644 index 0000000..d70050a --- /dev/null +++ b/sbscheduler/main.cpp @@ -0,0 +1,40 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "sbscheduler.hpp" +#include + +QDateTime scheduler::cfglmd; + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + sb::ldtltr(); + scheduler s; + + QTimer::singleShot(0, &s, +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) + SLOT(main()) +#else + &scheduler::main +#endif + ); + + uchar rv(a.exec()); + return rv; +} diff --git a/sbscheduler/sbscheduler.cpp b/sbscheduler/sbscheduler.cpp new file mode 100644 index 0000000..dbfc738 --- /dev/null +++ b/sbscheduler/sbscheduler.cpp @@ -0,0 +1,145 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "sbscheduler.hpp" +#include + +void scheduler::main() +{ + { + QSL args(qApp->arguments()); + + uchar rv(args.count() != 2 ? 1 + : sb::schdlr[1] != "false" && (sb::schdlr[1] == "everyone" || sb::right(sb::schdlr[1], -1).split(',').contains(args.at(1))) ? 2 + : getuid() + getgid() ? 3 + : sb::isfile("/cdrom/casper/filesystem.squashfs") || sb::isfile("/lib/live/mount/medium/live/filesystem.squashfs") ? 4 + : ! sb::lock(sb::Schdlrlock) ? 5 + : daemon(0, 0) ? 6 + : [&]() -> uchar { + sb::delay(100); + return sb::lock(sb::Schdlrlock) && sb::crtfile(*(pfile = new QStr(sb::isdir("/run") ? "/run/sbscheduler.pid" : "/var/run/sbscheduler.pid")), QStr::number(qApp->applicationPid())) ? 0 : 255; + }()); + + if(rv) + { + if(rv < 255) sb::error("\n " % sb::tr("Cannot start the Systemback scheduler daemon!") % "\n\n " % [rv] { + switch(rv) { + case 1: + return sb::tr("Missing, wrong or too much argument(s)."); + case 2: + return sb::tr("The process is disabled for this user."); + case 3: + return sb::tr("Root privileges are required."); + case 4: + return sb::tr("This system is a Live."); + case 5: + return sb::tr("Already running."); + default: + return sb::tr("Unable to daemonize."); + } + }() % "\n\n"); + + return qApp->exit(rv); + } + } + + QDateTime pflmd(QFileInfo(*pfile).lastModified()); + sleep(290); + + forever + { + sleep(10); + + if(! sb::isfile(*pfile) || (pflmd != QFileInfo(*pfile).lastModified() && sb::fload(*pfile) != QBA::number(qApp->applicationPid()))) + { + sb::unlock(sb::Schdlrlock), sb::exec("sbscheduler " % qApp->arguments().at(1), sb::Silent | sb::Bckgrnd); + break; + } + + if(! sb::isfile(cfgfile) || cfglmd != QFileInfo(cfgfile).lastModified()) sb::cfgread(), + cfglmd = QFileInfo(cfgfile).lastModified(); + + if(! (sb::isdir(sb::sdir[1]) && sb::access(sb::sdir[1], sb::Write))) + sleep(50); + else if(! sb::isfile(sb::sdir[1] % "/.sbschedule")) + sb::crtfile(sb::sdir[1] % "/.sbschedule"); + else if(! sb::schdle[0]) + sleep(1790); + else if(QFileInfo(sb::sdir[1] % "/.sbschedule").lastModified().secsTo(QDateTime::currentDateTime()) / 60 >= sb::schdle[1] * 1440 + sb::schdle[2] * 60 + sb::schdle[3] && sb::lock(sb::Sblock)) + { + if(! sb::lock(sb::Dpkglock) || [] { + if(! sb::lock(sb::Aptlock)) + { + sb::unlock(sb::Dpkglock); + return true; + } + + return false; + }()) + + sb::unlock(sb::Sblock); + else + { + if(sb::schdle[5] || ! sb::execsrch("systemback")) + newrpnt(); + else + { + QStr xauth("/tmp/sbXauthority-" % sb::rndstr()), usrhm(qgetenv("HOME")); + + if((qEnvironmentVariableIsSet("XAUTHORITY") && QFile(qgetenv("XAUTHORITY")).copy(xauth)) || [&] { + QStr path("/home/" % qApp->arguments().at(1) % "/.Xauthority"); + return (sb::isfile(path) && QFile(path).copy(xauth)) || (sb::isfile(path = usrhm % "/.Xauthority") && QFile(path).copy(xauth)); + }()) sb::exec("systemback schedule", sb::Wait, "XAUTHORITY=" % xauth), + sb::rmfile(xauth); + } + + sb::unlock(sb::Sblock), sb::unlock(sb::Dpkglock), sb::unlock(sb::Aptlock), sleep(50); + } + } + } + + qApp->quit(); +} + +void scheduler::newrpnt() +{ + sb::pupgrade(); + + for(cQStr &item : QDir(sb::sdir[1]).entryList(QDir::Dirs | QDir::Hidden | QDir::NoSymLinks | QDir::NoDotAndDotDot)) + if(sb::like(item, {"_.DELETED_*", "_.S00_*"}) && ! sb::remove(sb::sdir[1] % '/' % item)) return; + + for(uchar a(9) ; a > 1 ; --a) + if(! sb::pnames[a].isEmpty() && (a == 9 || a > 2 ? sb::pnumber < a + 2 : sb::pnumber == 3) && ! (QFile::rename(sb::sdir[1] % (a < 9 ? QStr("/S0" % QStr::number(a + 1)) : "/S10") % '_' % sb::pnames[a], sb::sdir[1] % "/.DELETED_" % sb::pnames[a]) && sb::remove(sb::sdir[1] % "/.DELETED_" % sb::pnames[a]))) return; + + QStr dtime(QDateTime().currentDateTime().toString("yyyy-MM-dd,hh.mm.ss")); + + if(sb::crtrpoint(dtime)) + { + for(uchar a(0) ; a < 9 && sb::isdir(sb::sdir[1] % "/S0" % QStr::number(a + 1) % '_' % sb::pnames[a]) ; ++a) + if(! QFile::rename(sb::sdir[1] % "/S0" % QStr::number(a + 1) % '_' % sb::pnames[a], sb::sdir[1] % (a < 8 ? "/S0" : "/S") % QStr::number(a + 2) % '_' % sb::pnames[a])) return; + + if(! QFile::rename(sb::sdir[1] % "/.S00_" % dtime, sb::sdir[1] % "/S01_" % dtime)) return; + } + else if(sb::dfree(sb::sdir[1]) < 104857600) + sb::remove(sb::sdir[1] % "/.S00_" % dtime); + else + return; + + sb::crtfile(sb::sdir[1] % "/.sbschedule"), sb::fssync(); + if(sb::ecache) sb::crtfile("/proc/sys/vm/drop_caches", "3"); +} diff --git a/sbscheduler/sbscheduler.hpp b/sbscheduler/sbscheduler.hpp new file mode 100644 index 0000000..b3b70c5 --- /dev/null +++ b/sbscheduler/sbscheduler.hpp @@ -0,0 +1,52 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef SBSCHEDULER_HPP +#define SBSCHEDULER_HPP + +#include "../libsystemback/sblib.hpp" +#include +#include + +class scheduler : public QObject +{ + Q_OBJECT + +public: + inline scheduler() : pfile(nullptr) {} + ~scheduler(); + + static QDateTime cfglmd; + +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) +public slots: +#endif + void main(); + +private: + QStr *pfile; + + void newrpnt(); +}; + +inline scheduler::~scheduler() +{ + if(pfile) delete pfile; +} + +#endif diff --git a/sbscheduler/sbscheduler.pro b/sbscheduler/sbscheduler.pro new file mode 100644 index 0000000..cfdbbaf --- /dev/null +++ b/sbscheduler/sbscheduler.pro @@ -0,0 +1,46 @@ +QT -= gui +QT += core + +TARGET = sbscheduler + +CONFIG -= app_bundle +CONFIG += console \ + c++11 \ + exceptions_off + +TEMPLATE = app + +DEFINES += _FILE_OFFSET_BITS=64 + +SOURCES += main.cpp \ + sbscheduler.cpp + +HEADERS += sbscheduler.hpp + +QMAKE_CXXFLAGS += -g \ + -fno-rtti \ + -fvisibility=hidden \ + -fvisibility-inlines-hidden \ + -fno-asynchronous-unwind-tables + +CONFIG(debug, debug|release) { + QMAKE_CXXFLAGS_WARN_ON += -Wextra \ + -Wshadow \ + -Werror +} + +QMAKE_LFLAGS += -g \ + -Wl,-rpath=/usr/lib/systemback \ + -Wl,--as-needed \ + -fuse-ld=gold \ + -Wl,-z,relro + +! equals(QMAKE_CXX, clang++) { + QMAKE_CXXFLAGS += -flto + QMAKE_LFLAGS += -flto +} + +LIBS += -L../libsystemback \ + -lsystemback + +INCLUDEPATH = ../libsystemback diff --git a/sbsustart/main.cpp b/sbsustart/main.cpp new file mode 100644 index 0000000..92e27f7 --- /dev/null +++ b/sbsustart/main.cpp @@ -0,0 +1,63 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "sbsustart.hpp" +#include + +uint sustart::uid(getuid()); + +int main(int argc, char *argv[]) +{ +#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0) + if(sustart::uid && setuid(0) && sustart::uid != geteuid()) + { + QStr arg1(argv[1]); + + if(! sb::like(arg1, {"_systemback_", "_scheduler_"})) + { + sb::error("\n Missing, wrong or too much argument(s).\n\n"); + return 2; + } + + QStr emsg("Cannot start Systemback " % QStr(arg1 == "systemback" ? "graphical user interface" : "scheduler daemon") % "!\n\nUnable to get root permissions."); + + if(seteuid(sustart::uid)) + sb::error("\n " % emsg.replace("\n\n", "\n\n ") % "\n\n"); + else + sb::exec((sb::execsrch("zenity") ? "zenity --title=Systemback --error --text=\"" : "kdialog --title=Systemback --error=\"") % emsg % '\"', sb::Bckgrnd); + + return 1; + } +#endif + + QCoreApplication a(argc, argv); + if(sb::dbglev) sb::dbglev = sb::Nodbg; + sb::ldtltr(); + sustart s; + + QTimer::singleShot(0, &s, +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) + SLOT(main()) +#else + &sustart::main +#endif + ); + + uchar rv(a.exec()); + return rv; +} diff --git a/sbsustart/sbsustart.cpp b/sbsustart/sbsustart.cpp new file mode 100644 index 0000000..8c5e1c4 --- /dev/null +++ b/sbsustart/sbsustart.cpp @@ -0,0 +1,140 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "sbsustart.hpp" +#include + +void sustart::main() +{ + bool silent; + + { + QSL args(qApp->arguments()); + + uchar mode([&] { + switch(args.count()) { + case 1: + if(args.at(0).endsWith("systemback-sustart")) + { + silent = false; + return Systemback; + } + + break; + case 2 ... 3: + silent = true; + + if(args.at(1) == "systemback") + return Systemback; + else if(args.at(1) == "finstall") + return Finstall; + else if(args.at(1) == "scheduler") + return Scheduler; + } + + return Unknown; + }()), rv(mode ? [&, mode] { + QStr uname, usrhm; + + if(! uid) + uname = "root", usrhm = "/root"; + else + { + QFile file("/etc/passwd"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr line(file.readLine().trimmed()); + + if(line.contains("x:" % QStr::number(uid) % ':')) + { + QSL uslst(line.split(':')); + uname = uslst.at(0), usrhm = uslst.at(5); + break; + } + } + + if(uname.isEmpty() || usrhm.isEmpty()) return 3; + } + + bool uidinr(getuid()), gidinr(getgid()); + + if(uidinr || gidinr) + { + if((uidinr && setuid(0)) || (gidinr && setgid(0))) return 3; + + auto clrenv([](cQBA &uhm, cQStr &xpath = nullptr) { + QSL excl{"_DISPLAY_", "_PATH_", "_LANG_", "_XAUTHORITY_", "_DBGLEV_"}; + + for(cQStr &cvar : QProcess::systemEnvironment()) + { + QStr var(sb::left(cvar, sb::instr(cvar, "=") - 1)); + if(! (sb::like(var, excl) || qunsetenv(bstr(var)))) return false; + } + + if(! (qputenv("USER", "root") && qputenv("HOME", uhm) && qputenv("LOGNAME", "root") && qputenv("SHELL", "/bin/bash") && (xpath.isEmpty() || qputenv("XAUTHORITY", xpath.toUtf8())))) return false; + return true; + }); + + if(mode == Scheduler) + { + if(! clrenv(usrhm.toUtf8())) return 3; + cmd = new QStr("sbscheduler " % uname); + } + else + { + QStr xauth("/tmp/sbXauthority-" % sb::rndstr()); + if((qEnvironmentVariableIsEmpty("XAUTHORITY") || ! QFile(qgetenv("XAUTHORITY")).copy(xauth)) && ! ((sb::isfile("/home/" % uname % "/.Xauthority") && QFile("/home/" % uname % "/.Xauthority").copy(xauth)) || (sb::isfile(usrhm % "/.Xauthority") && QFile(usrhm % "/.Xauthority").copy(xauth)))) return 4; + if(! clrenv("/root", xauth)) return 3; + cmd = new QStr("systemback " % (mode == Finstall ? QStr("finstall ") : "authorization " % uname)); + } + } + else + cmd = new QStr(mode == Scheduler ? [&]() -> QStr { + qputenv("HOME", usrhm.toUtf8()); + return "sbscheduler " % uname; + }() : "systemback" % QStr(mode == Finstall ? " finstall" : nullptr)); + + return 0; + }() : 2); + + if(rv) + { + if(rv == 2) + sb::error("\n " % sb::tr("Missing, wrong or too much argument(s).") % "\n\n"); + else + { + QStr emsg((mode == Scheduler ? sb::tr("Cannot start the Systemback scheduler daemon!") : sb::tr("Cannot start the Systemback graphical user interface!")) % "\n\n" % (rv == 3 ? sb::tr("Unable to get root permissions.") : sb::tr("Unable to connect to the X server."))); + +#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) + if(uid != geteuid() && seteuid(uid)) + sb::error("\n " % emsg.replace("\n\n", "\n\n ") % "\n\n"); + else +#endif + sb::exec((sb::execsrch("zenity") ? "zenity --title=Systemback --error --text=\"" : "kdialog --title=Systemback --error=\"") % emsg % '\"', sb::Bckgrnd); + } + + return qApp->exit(rv); + } + + if(args.count() == 3 && args.at(2) == "gtk+") qputenv("QT_STYLE_OVERRIDE", "gtk+"); + } + + qApp->exit(silent ? sb::exec(*cmd, sb::Silent | sb::Wait, "DBGLEV=0") : sb::exec(*cmd, sb::Wait)); +} diff --git a/sbsustart/sbsustart.hpp b/sbsustart/sbsustart.hpp new file mode 100644 index 0000000..1695c51 --- /dev/null +++ b/sbsustart/sbsustart.hpp @@ -0,0 +1,51 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef SBSUSTART_HPP +#define SBSUSTART_HPP + +#include "../libsystemback/sblib.hpp" +#include + +class sustart : public QObject +{ + Q_OBJECT + +public: + inline sustart() : cmd(nullptr) {} + ~sustart(); + + static uint uid; + +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) +public slots: +#endif + void main(); + +private: + enum { Unknown = 0, Systemback = 1, Finstall = 2, Scheduler = 3 }; + + QStr *cmd; +}; + +inline sustart::~sustart() +{ + if(cmd) delete cmd; +} + +#endif diff --git a/sbsustart/sbsustart.pro b/sbsustart/sbsustart.pro new file mode 100644 index 0000000..64d90ef --- /dev/null +++ b/sbsustart/sbsustart.pro @@ -0,0 +1,46 @@ +QT -= gui +QT += core + +TARGET = sbsustart + +CONFIG -= app_bundle +CONFIG += console \ + c++11 \ + exceptions_off + +TEMPLATE = app + +DEFINES += _FILE_OFFSET_BITS=64 + +SOURCES += main.cpp \ + sbsustart.cpp + +HEADERS += sbsustart.hpp + +QMAKE_CXXFLAGS += -g \ + -fno-rtti \ + -fvisibility=hidden \ + -fvisibility-inlines-hidden \ + -fno-asynchronous-unwind-tables + +CONFIG(debug, debug|release) { + QMAKE_CXXFLAGS_WARN_ON += -Wextra \ + -Wshadow \ + -Werror +} + +QMAKE_LFLAGS += -g \ + -Wl,-rpath=/usr/lib/systemback \ + -Wl,--as-needed \ + -fuse-ld=gold \ + -Wl,-z,relro + +! equals(QMAKE_CXX, clang++) { + QMAKE_CXXFLAGS += -flto + QMAKE_LFLAGS += -flto +} + +LIBS += -L../libsystemback \ + -lsystemback + +INCLUDEPATH = ../libsystemback diff --git a/sbsysupgrade/sbsysupgrade.cpp b/sbsysupgrade/sbsysupgrade.cpp new file mode 100644 index 0000000..90767a0 --- /dev/null +++ b/sbsysupgrade/sbsysupgrade.cpp @@ -0,0 +1,26 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "../libsystemback/sblib.hpp" + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + sb::ldtltr(), sb::supgrade(); + return 0; +} diff --git a/sbsysupgrade/sbsysupgrade.pro b/sbsysupgrade/sbsysupgrade.pro new file mode 100644 index 0000000..64e1a67 --- /dev/null +++ b/sbsysupgrade/sbsysupgrade.pro @@ -0,0 +1,41 @@ +QT -= gui +QT += core + +TARGET = sbsysupgrade + +CONFIG -= app_bundle +CONFIG += console \ + c++11 \ + exceptions_off + +TEMPLATE = app + +DEFINES += _FILE_OFFSET_BITS=64 + +SOURCES += sbsysupgrade.cpp + +QMAKE_CXXFLAGS += -g \ + -fno-rtti \ + -fvisibility=hidden \ + -fvisibility-inlines-hidden \ + -fno-asynchronous-unwind-tables + +CONFIG(debug, debug|release) { + QMAKE_CXXFLAGS_WARN_ON += -Wextra \ + -Wshadow \ + -Werror +} + +QMAKE_LFLAGS += -g \ + -Wl,-rpath=/usr/lib/systemback \ + -Wl,--as-needed \ + -fuse-ld=gold \ + -Wl,-z,relro + +! equals(QMAKE_CXX, clang++) { + QMAKE_CXXFLAGS += -flto + QMAKE_LFLAGS += -flto +} + +LIBS += -L../libsystemback \ + -lsystemback diff --git a/splash.png b/splash.png new file mode 100644 index 0000000..dea6243 Binary files /dev/null and b/splash.png differ diff --git a/systemback-cli/main.cpp b/systemback-cli/main.cpp new file mode 100644 index 0000000..96061a8 --- /dev/null +++ b/systemback-cli/main.cpp @@ -0,0 +1,45 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "systemback-cli.hpp" + +int main(int argc, char *argv[]) +{ + switch(sb::dbglev) { + case sb::Alldbg: + sb::dbglev = sb::Nulldbg; + break; + case sb::Extdbg: + sb::dbglev = sb::Cextdbg; + } + + QCoreApplication a(argc, argv); + sb::ldtltr(); + systemback c; + + QTimer::singleShot(0, &c, +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) + SLOT(main()) +#else + &systemback::main +#endif + ); + + uchar rv(a.exec()); + return rv; +} diff --git a/systemback-cli/systemback-cli.cpp b/systemback-cli/systemback-cli.cpp new file mode 100644 index 0000000..84334c4 --- /dev/null +++ b/systemback-cli/systemback-cli.cpp @@ -0,0 +1,664 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "systemback-cli.hpp" +#include +#include +#include +#include + +#ifdef timeout +#undef timeout +#endif + +#ifdef instr +#undef instr +#endif + +void systemback::main() +{ + auto help([] { + return tr("Usage: systemback-cli [option]\n\n" + " Options:\n\n" + " -n, --newbackup create a new restore point\n\n" + " -s, --storagedir get or set the restore points storage directory path\n\n" + " -u, --upgrade upgrade the current system\n" + " remove the unnecessary files and packages\n\n" + " -v, --version output the Systemback version number\n\n" + " -h, --help show this help"); + }); + + uchar rv([&] { + QSL args(qApp->arguments()); + + if(args.count() == 1 || [&] { + if(sb::like(args.at(1), {"_-h_", "_--help_"})) + sb::print("\n " % help() % "\n\n"); + else if(sb::like(args.at(1), {"_-v_", "_--version_"})) + sb::print("\n " % sb::appver() % "\n\n"); + else + return true; + + return false; + }()) return sb::isfile("/cdrom/casper/filesystem.squashfs") || sb::isfile("/lib/live/mount/medium/live/filesystem.squashfs") ? 2 + : getuid() + getgid() ? 3 + : ! sb::lock(sb::Sblock) ? 4 + : ! sb::lock(sb::Dpkglock) ? 5 + : ! sb::lock(sb::Aptlock) ? 6 + : [&] { + auto startui([this](bool crtrpt = false) -> uchar { + if(! (isatty(fileno(stdin)) && isatty(fileno(stdout)) && isatty(fileno(stderr)))) return 255; + initscr(); + + uchar crv(! has_colors() ? 7 + : LINES < 24 || COLS < 80 ? 8 + : [crtrpt, this]() -> uchar { + noecho(), + raw(), + curs_set(0), + attron(A_BOLD), + start_color(), + assume_default_colors(COLOR_BLUE, COLOR_BLACK), + init_pair(1, COLOR_WHITE, COLOR_BLACK), + init_pair(2, COLOR_BLUE, COLOR_BLACK), + init_pair(3, COLOR_GREEN, COLOR_BLACK), + init_pair(4, COLOR_YELLOW, COLOR_BLACK), + init_pair(5, COLOR_RED, COLOR_BLACK), + sbtxt = bstr("Systemback " % tr("basic restore UI")), blgn = COLS / 2 - 6 - tr("basic restore UI").length() / 2; + if(! crtrpt) return clistart(); + sb::pupgrade(); + return newrpnt() ? 0 : sb::dfree(sb::sdir[1]) < 104857600 ? 12 : 13; + }()); + + endwin(); + return crv; + }); + + return args.count() == 1 ? startui() + : sb::like(args.at(1), {"_-n_", "_--newrestorepoint_"}) ? sb::isdir(sb::sdir[1]) && sb::access(sb::sdir[1], sb::Write) ? startui(true) : 14 + : sb::like(args.at(1), {"_-s_", "_--storagedir_"}) ? storagedir(args) + : sb::like(args.at(1), {"_-u_", "_--upgrade_"}) ? [] { + sb::unlock(sb::Dpkglock), sb::unlock(sb::Aptlock), + sb::supgrade(); + return 0; + }() : 1; + }(); + + return 0; + }()); + + if(! sb::like(rv, {0, 255})) sb::error("\n " % [=]() -> QStr { + auto dbg([](cQStr &txt) { + if(! sb::eout.isEmpty()) sb::crtfile("/tmp/systemback-cli_stderr", QStr((sb::dbglev == sb::sb::Cextdbg ? sb::dbginf() : nullptr) % sb::eout).trimmed().replace("\n\n\n", "\n\n").replace("\n ", "\n") % '\n'); + return txt; + }); + + switch(rv) { + case 1: + return help(); + case 2: + return tr("The Systemback command line interface cannot be used on a Live system!"); + case 3: + return tr("Root privileges are required for running the Systemback!"); + case 4: + return tr("An another Systemback process is currently running, please wait until it finishes."); + case 5: + return tr("Unable to get exclusive lock!") % "\n\n " % tr("First, close all package manager."); + case 6: + return tr("The re-synchronization of package index files currently in progress, please wait until it finishes."); + case 7: + return tr("This stupid terminal does not support color!"); + case 8: + return tr("This terminal is too small!") % " (< 80x24)"; + case 9: + return tr("The specified storage directory path has not been set!"); + case 10: + return tr("The restoration is aborted!"); + case 11: + return dbg(tr("The restoration is completed, but an error occurred while reinstalling the GRUB!")); + case 12: + return dbg(tr("The restore point creation is aborted!") % "\n\n " % tr("Not enough free disk space to complete the process.")); + case 13: + return dbg(tr("The restore point creation is aborted!") % "\n\n " % tr("There has been critical changes in the file system during this operation.")); + case 14: + return dbg(tr("The restore points storage directory is not available or not writable!")); + default: + return dbg(tr("The restore point deletion is aborted!") % "\n\n " % tr("An error occurred while during the process.")); + } + }() % "\n\n"); + + qApp->exit(rv); +} + +uchar systemback::clistart() +{ + mvprintw(0, blgn, sbtxt), + attron(COLOR_PAIR(1)), + printw(bstr("\n\n " % tr("Available restore point(s):") % "\n\n")), + sb::pupgrade(), + attron(COLOR_PAIR(3)); + if(! sb::pnames[0].isEmpty()) printw(bstr(" 1 ─ " % sb::left(sb::pnames[0], COLS - 7) % '\n')); + if(! sb::pnames[1].isEmpty()) printw(bstr(" 2 ─ " % sb::left(sb::pnames[1], COLS - 7) % '\n')); + if(sb::pnumber == 3) attron(COLOR_PAIR(5)); + if(! sb::pnames[2].isEmpty()) printw(bstr(" 3 ─ " % sb::left(sb::pnames[2], COLS - 7) % '\n')); + if(sb::pnumber == 4) attron(COLOR_PAIR(5)); + if(! sb::pnames[3].isEmpty()) printw(bstr(" 4 ─ " % sb::left(sb::pnames[3], COLS - 7) % '\n')); + if(sb::pnumber == 5) attron(COLOR_PAIR(5)); + if(! sb::pnames[4].isEmpty()) printw(bstr(" 5 ─ " % sb::left(sb::pnames[4], COLS - 7) % '\n')); + if(sb::pnumber == 6) attron(COLOR_PAIR(5)); + if(! sb::pnames[5].isEmpty()) printw(bstr(" 6 ─ " % sb::left(sb::pnames[5], COLS - 7) % '\n')); + if(sb::pnumber == 7) attron(COLOR_PAIR(5)); + if(! sb::pnames[6].isEmpty()) printw(bstr(" 7 ─ " % sb::left(sb::pnames[6], COLS - 7) % '\n')); + if(sb::pnumber == 8) attron(COLOR_PAIR(5)); + if(! sb::pnames[7].isEmpty()) printw(bstr(" 8 ─ " % sb::left(sb::pnames[7], COLS - 7) % '\n')); + if(sb::pnumber == 9) attron(COLOR_PAIR(5)); + if(! sb::pnames[8].isEmpty()) printw(bstr(" 9 ─ " % sb::left(sb::pnames[8], COLS - 7) % '\n')); + if(sb::pnumber == 10) attron(COLOR_PAIR(5)); + if(! sb::pnames[9].isEmpty()) printw(bstr(" A ─ " % sb::left(sb::pnames[9], COLS - 7) % '\n')); + attron(COLOR_PAIR(3)); + if(! sb::pnames[10].isEmpty()) printw(bstr(" B ─ " % sb::left(sb::pnames[10], COLS - 7) % '\n')); + if(! sb::pnames[11].isEmpty()) printw(bstr(" C ─ " % sb::left(sb::pnames[11], COLS - 7) % '\n')); + if(! sb::pnames[12].isEmpty()) printw(bstr(" D ─ " % sb::left(sb::pnames[12], COLS - 7) % '\n')); + if(! sb::pnames[13].isEmpty()) printw(bstr(" E ─ " % sb::left(sb::pnames[13], COLS - 7) % '\n')); + if(! sb::pnames[14].isEmpty()) printw(bstr(" F ─ " % sb::left(sb::pnames[14], COLS - 7) % '\n')); + printw(bstr("\n G ─ " % tr("Create new") % "\n Q ─ " % tr("Quit") % '\n')), + attron(COLOR_PAIR(2)), + mvprintw(LINES - 1, COLS - 13, "Kendek, GPLv3"), + refresh(); + if(! sb::eout.isEmpty()) sb::eout.clear(); + if(! pname.isEmpty()) pname.clear(); + + do { + int gtch(getch()); + + switch(gtch) { + case '1' ... '9': + { + QStr cstr(gtch); + cpoint = "S0" % cstr; + uchar num(cstr.toUShort() - 1); + if(! sb::pnames[num].isEmpty()) pname = sb::pnames[num]; + break; + } + case 'a': + case 'A': + cpoint = "S10"; + if(! sb::pnames[9].isEmpty()) pname = sb::pnames[9]; + break; + case 'b': + case 'B': + cpoint = "H01"; + if(! sb::pnames[10].isEmpty()) pname = sb::pnames[10]; + break; + case 'c': + case 'C': + cpoint = "H02"; + if(! sb::pnames[11].isEmpty()) pname = sb::pnames[11]; + break; + case 'd': + case 'D': + cpoint = "H03"; + if(! sb::pnames[12].isEmpty()) pname = sb::pnames[12]; + break; + case 'e': + case 'E': + cpoint = "H04"; + if(! sb::pnames[13].isEmpty()) pname = sb::pnames[13]; + break; + case 'f': + case 'F': + cpoint = "H05"; + if(! sb::pnames[14].isEmpty()) pname = sb::pnames[14]; + break; + case 'g': + case 'G': + if(! newrpnt()) return sb::dfree(sb::sdir[1]) < 104857600 ? 12 : 13; + clear(); + return clistart(); + case 'q': + case 'Q': + return 0; + } + } while(pname.isEmpty()); + + clear(), + mvprintw(0, blgn, sbtxt), + attron(COLOR_PAIR(1)), + printw(bstr("\n\n " % tr("Selected restore point:"))), + attron(COLOR_PAIR(4)), + printw(bstr("\n\n " % sb::left(pname, COLS - 3))), + attron(COLOR_PAIR(3)), + printw(bstr("\n\n 1 ─ " % tr("Delete") % "\n 2 ─ " % tr("System restore") % " ▸\n B ─ ◂ " % tr("Back"))), + attron(COLOR_PAIR(2)), + mvprintw(LINES - 1, COLS - 13, "Kendek, GPLv3"), + refresh(); + + forever + switch(getch()) { + case '1': + pset(2), progress(Start); + + if(! (sb::rename(sb::sdir[1] % '/' % cpoint % '_' % pname, sb::sdir[1] % "/.DELETED_" % pname) && sb::remove(sb::sdir[1] % "/.DELETED_" % pname))) + { + progress(Stop); + return 15; + } + + emptycache(), + progress(Stop), + clear(); + return clistart(); + case '2': + clear(); + return restore(); + case 'b': + case 'B': + clear(); + return clistart(); + } +} + +uchar systemback::storagedir(cQSL &args) +{ + if(args.count() == 2) + sb::print("\n " % sb::sdir[0] % "\n\n"); + else + { + QStr ndir; + + { + QStr cpath, idir(args.at(2)); + + if(args.count() > 3) + for(uchar a(3) ; a < args.count() ; ++a) idir.append(' ' % args.at(a)); + + QSL excl{"*/Systemback_", "*/Systemback/*", "*/_", "_/bin_", "_/bin/*", "_/boot_", "_/boot/*", "_/cdrom_", "_/cdrom/*", "_/dev_", "_/dev/*", "_/etc_", "_/etc/*", "_/lib_", "_/lib/*", "_/lib32_", "_/lib32/*", "_/lib64_", "_/lib64/*", "_/opt_", "_/opt/*", "_/proc_", "_/proc/*", "_/root_", "_/root/*", "_/run_", "_/run/*", "_/sbin_", "_/sbin/*", "_/selinux_", "_/selinux/*", "_/snap_", "_/snap/*", "_/srv_", "_/srv/*_", "_/sys_", "_/sys/*", "_/tmp_", "_/tmp/*", "_/usr_", "_/usr/*", "_/var_", "_/var/*"}; + if(sb::like(ndir = QDir::cleanPath(idir), excl) || sb::like(cpath = QDir(idir).canonicalPath(), excl) || sb::like(sb::fload("/etc/passwd"), {"*:" % idir % ":*","*:" % ndir % ":*", "*:" % cpath % ":*"}) || ! sb::islnxfs(cpath)) return 9; + } + + if(sb::sdir[0] != ndir) + { + if(sb::isdir(sb::sdir[1])) + { + QSL dlst(QDir(sb::sdir[1]).entryList(QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot)); + + if(! dlst.count()) + rmdir(bstr(sb::sdir[1])); + else if(dlst.count() == 1 && sb::isfile(sb::sdir[1] % "/.sbschedule")) + sb::remove(sb::sdir[1]); + } + + sb::sdir[0] = ndir, sb::sdir[1] = sb::sdir[0] % "/Systemback", sb::ismpnt = ! sb::issmfs(sb::sdir[0], sb::sdir[0].count('/') == 1 ? "/" : sb::left(sb::sdir[0], sb::rinstr(sb::sdir[0], "/") - 1)); + if(! sb::cfgwrite()) return 9; + } + + if(! (sb::isdir(sb::sdir[1]) || sb::crtdir(sb::sdir[1]))) sb::rename(sb::sdir[1], sb::sdir[1] % '_' % sb::rndstr()), + sb::crtdir(sb::sdir[1]); + + if(! sb::isfile(sb::sdir[1] % "/.sbschedule")) sb::crtfile(sb::sdir[1] % "/.sbschedule"); + sb::print("\n " % twrp(tr("The specified storage directory path is set.")) % "\n\n"); + } + + return 0; +} + +void systemback::emptycache() +{ + pset(1), + sb::fssync(); + if(sb::ecache) sb::crtfile("/proc/sys/vm/drop_caches", "3"); +} + +bool systemback::newrpnt() +{ + auto end([this](bool rv = true) { + progress(Stop); + return rv; + }); + + progress(Start); + + for(cQStr &item : QDir(sb::sdir[1]).entryList(QDir::Dirs | QDir::Hidden | QDir::NoSymLinks | QDir::NoDotAndDotDot)) + if(sb::like(item, {"_.DELETED_*", "_.S00_*"})) + { + if(prun.type != 3) pset(3); + if(! sb::remove(sb::sdir[1] % '/' % item)) return end(false); + } + + for(uchar a(9) ; a > 1 ; --a) + if(! sb::pnames[a].isEmpty() && (a == 9 || a > 2 ? sb::pnumber < a + 2 : sb::pnumber == 3)) + { + if(prun.type != 4) pset(4); + if(! (sb::rename(sb::sdir[1] % (a < 9 ? QStr("/S0" % QStr::number(a + 1)) : "/S10") % '_' % sb::pnames[a], sb::sdir[1] % "/.DELETED_" % sb::pnames[a]) && sb::remove(sb::sdir[1] % "/.DELETED_" % sb::pnames[a]))) return end(false); + } + + pset(5); + QStr dtime(QDateTime().currentDateTime().toString("yyyy-MM-dd,hh.mm.ss")); + if(! sb::crtrpoint(dtime)) return end(false); + + for(uchar a(0) ; a < 9 && sb::isdir(sb::sdir[1] % "/S0" % QStr::number(a + 1) % '_' % sb::pnames[a]) ; ++a) + if(! sb::rename(sb::sdir[1] % "/S0" % QStr::number(a + 1) % '_' % sb::pnames[a], sb::sdir[1] % (a < 8 ? "/S0" : "/S") % QStr::number(a + 2) % '_' % sb::pnames[a])) return end(false); + + if(! sb::rename(sb::sdir[1] % "/.S00_" % dtime, sb::sdir[1] % "/S01_" % dtime)) return end(false); + sb::crtfile(sb::sdir[1] % "/.sbschedule"), + emptycache(); + return end(); +} + +uchar systemback::restore() +{ + mvprintw(0, blgn, sbtxt), + attron(COLOR_PAIR(1)); + uchar mthd(0), fsave(0), greinst(0); + + { + bstr rtxt[3]{bstr("\n\n " % tr("Restore with the following restore point:")), bstr("\n\n " % pname), bstr("\n\n " % tr("Restore with the following restore method:"))}; + printw(rtxt[0]), + attron(COLOR_PAIR(4)), + printw(rtxt[1]), + attron(COLOR_PAIR(1)), + printw(rtxt[2]), + attron(COLOR_PAIR(3)), + printw(bstr("\n\n 1 ─ " % tr("Full restore") % "\n 2 ─ " % tr("System files restore"))), + attron(COLOR_PAIR(1)), + printw(bstr("\n\n " % tr("Users configuration files restore"))), + attron(COLOR_PAIR(3)), + printw(bstr("\n\n 3 ─ " % tr("Complete configuration files restore") % "\n 4 ─ " % tr("Keep newly installed configuration files") % "\n\n C ─ " % tr("Cancel"))), + attron(COLOR_PAIR(2)), + mvprintw(LINES - 1, COLS - 13, "Kendek, GPLv3"), + refresh(); + + do { + int gtch(getch()); + + switch(gtch) { + case 'c': + case 'C': + clear(); + return clistart(); + case '1' ... '4': + mthd = QStr(gtch).toUShort(); + } + } while(! mthd); + + clear(), + mvprintw(0, blgn, sbtxt), + attron(COLOR_PAIR(1)), + printw(rtxt[0]), + attron(COLOR_PAIR(4)), + printw(rtxt[1]), + attron(COLOR_PAIR(1)), + printw(rtxt[2]), + attron(COLOR_PAIR(4)); + + printw(bstr("\n\n " % [mthd] { + switch(mthd) { + case 1: + return tr("Full restore"); + case 2: + return tr("System files restore"); + case 3: + return tr("Complete configuration files restore"); + default: + return tr("Configuration files restore"); + } + }())); + + attron(COLOR_PAIR(3)); + + if(mthd < 3) + { + if(sb::isfile("/etc/fstab")) + { + printw(bstr("\n\n " % tr("You want to keep the current fstab file?") % ' ' % tr("(Y/N)"))), + attron(COLOR_PAIR(2)), + mvprintw(LINES - 1, COLS - 13, "Kendek, GPLv3"), + refresh(); + + do { + QChar gtch(getch()); + + if(sb::like(gtch.toUpper(), {"_Y_", '_' % yn[0] % '_'})) + fsave = 1; + else if(sb::like(gtch.toUpper(), {"_N_", '_' % yn[1] % '_'})) + fsave = 2; + } while(! fsave); + + clear(), + mvprintw(0, blgn, sbtxt), + attron(COLOR_PAIR(1)), + printw(rtxt[0]), + attron(COLOR_PAIR(4)), + printw(rtxt[1]), + attron(COLOR_PAIR(1)), + printw(rtxt[2]), + attron(COLOR_PAIR(4)), + printw(bstr("\n\n " % (mthd == 1 ? tr("Full restore") : tr("System files restore")) % "\n\n " % tr("You want to keep the current fstab file?") % ' ' % tr("(Y/N)") % ' ' % yn[fsave == 1 ? 0 : 1])), + attron(COLOR_PAIR(3)); + + if(sb::execsrch("update-grub2", sb::sdir[1] % '/' % cpoint % '_' % pname)) + { + printw(bstr("\n\n " % tr("Reinstall the GRUB 2 bootloader?") % ' ' % tr("(Y/N)"))), + attron(COLOR_PAIR(2)), + mvprintw(LINES - 1, COLS - 13, "Kendek, GPLv3"), + refresh(); + + do { + QChar gtch(getch()); + + if(sb::like(gtch.toUpper(), {"_Y_", '_' % yn[0] % '_'})) + greinst = 1; + else if(sb::like(gtch.toUpper(), {"_N_", '_' % yn[1] % '_'})) + greinst = 2; + } while(! greinst); + + clear(), + mvprintw(0, blgn, sbtxt), + attron(COLOR_PAIR(1)), + printw(rtxt[0]), + attron(COLOR_PAIR(4)), + printw(rtxt[1]), + attron(COLOR_PAIR(1)), + printw(rtxt[2]), + attron(COLOR_PAIR(4)), + printw(bstr("\n\n " % (mthd == 1 ? tr("Full restore") : tr("System files restore")) % "\n\n " % tr("You want to keep the current fstab file?") % ' ' % tr("(Y/N)") % ' ' % yn[fsave == 1 ? 0 : 1] % "\n\n " % tr("Reinstall the GRUB 2 bootloader?") % ' ' % tr("(Y/N)") % ' ' % yn[greinst == 1 ? 0 : 1])); + } + } + else if(sb::execsrch("update-grub2", sb::sdir[1] % '/' % cpoint % '_' % pname)) + { + printw(bstr("\n\n " % tr("Reinstall the GRUB 2 bootloader?") % ' ' % tr("(Y/N)"))), + attron(COLOR_PAIR(2)), + mvprintw(LINES - 1, COLS - 13, "Kendek, GPLv3"), + refresh(); + + do { + QChar gtch(getch()); + + if(sb::like(gtch.toUpper(), {"_Y_", '_' % yn[0] % '_'})) + greinst = 1; + else if(sb::like(gtch.toUpper(), {"_N_", '_' % yn[1] % '_'})) + greinst = 2; + } while(! greinst); + + clear(), + mvprintw(0, blgn, sbtxt), + attron(COLOR_PAIR(1)), + printw(rtxt[0]), + attron(COLOR_PAIR(4)), + printw(rtxt[1]), + attron(COLOR_PAIR(1)), + printw(rtxt[2]), + attron(COLOR_PAIR(4)), + printw(bstr("\n\n " % (mthd == 1 ? tr("Full restore") : tr("System files restore")) % "\n\n " % tr("Reinstall the GRUB 2 bootloader?") % ' ' % tr("(Y/N)") % ' ' % yn[greinst == 1 ? 0 : 1])); + } + } + } + + attron(COLOR_PAIR(3)), + printw(bstr("\n\n " % tr("Start the restore?") % ' ' % tr("(Y/N)"))), + attron(COLOR_PAIR(2)), + mvprintw(LINES - 1, COLS - 13, "Kendek, GPLv3"), + refresh(); + bool rstart(false); + + do { + QChar gtch(getch()); + + if(sb::like(gtch.toUpper(), {"_Y_", '_' % yn[0] % '_'})) + rstart = true; + else if(sb::like(gtch.toUpper(), {"_N_", '_' % yn[1] % '_'})) + return 10; + } while(! rstart); + + pset(mthd + 5), + progress(Start); + bool sfstab(fsave == 1); + sb::srestore(mthd, nullptr, sb::sdir[1] % '/' % cpoint % '_' % pname, nullptr, sfstab); + { bool err(greinst == 1 && sb::exec("sh -c \"update-grub ; grub-install --force " % sb::gdetect() % '\"', sb::Silent)); + progress(Stop); + if(err) return 11; } + clear(), + mvprintw(0, blgn, sbtxt), + attron(COLOR_PAIR(1)); + + printw(bstr("\n\n " % twrp([mthd] { + switch(mthd) { + case 1: + return tr("The full system restoration is completed."); + case 2: + return tr("The system files restoration are completed."); + case 3: + return tr("The users configuration files full restoration are completed."); + default: + return tr("The users configuration files restoration are completed."); + } + }()))); + + attron(COLOR_PAIR(3)), + printw(bstr("\n\n " % twrp(mthd < 3 ? tr("Press 'ENTER' key to reboot the computer, or 'Q' to quit.") : tr("Press 'ENTER' key to quit.")))), + attron(COLOR_PAIR(2)), + mvprintw(LINES - 1, COLS - 13, "Kendek, GPLv3"), + refresh(); + + forever + switch(getch()) { + case '\n': + if(mthd < 3) sb::exec(sb::execsrch("reboot") ? "reboot" : "systemctl reboot", sb::Bckgrnd); + return 0; + case 'q': + case 'Q': + if(mthd < 3) return 0; + } +} + +void systemback::pset(uchar type) +{ + prun.txt = [type]() -> QStr { + switch(type) { + case 1: + return sb::ecache ? tr("Emptying cache") : tr("Flushing filesystem buffers"); + case 2: + return tr("Deleting restore point"); + case 3: + return tr("Deleting incomplete restore point"); + case 4: + return tr("Deleting old restore point(s)"); + case 5: + return tr("Creating restore point"); + case 6: + return tr("Restoring the full system"); + case 7: + return tr("Restoring the system files"); + default: + return tr("Restoring the users configuration files"); + } + }(); + + prun.type = type; +} + +void systemback::progress(uchar status) +{ + switch(status) { + case Start: + connect(ptimer = new QTimer, SIGNAL(timeout()), this, SLOT(progress())), + QTimer::singleShot(0, this, SLOT(progress())), + ptimer->start(2000); + if(sb::dbglev == sb::Nulldbg) sb::dbglev = sb::Errdbg; + return; + case Inprog: + for(uchar a(0) ; a < 4 ; ++a) + { + switch(prun.type) { + case 5 ... 9: + { + schar cperc(sb::Progress); + + if(cperc == -1) + prun.pbar = prun.pbar == " (?%)" ? " ( %)" : " (?%)"; + else if(cperc > 99) + { + if(prun.cperc < 100) prun.cperc = 100, prun.pbar = " (100%)"; + } + else if(prun.cperc < cperc) + prun.pbar = " (" % QStr::number(prun.cperc = cperc) % "%)"; + else if(! (prun.cperc || prun.pbar == " (0%)")) + prun.pbar = " (0%)"; + else if(sb::like(99, {cperc, prun.cperc}, true)) + prun.pbar = " (100%)", prun.cperc = 100; + + break; + } + default: + if(! prun.pbar.isEmpty()) prun.pbar.clear(); + } + + if(! ptimer) return; + clear(), + attron(COLOR_PAIR(2)), + mvprintw(0, blgn, sbtxt), + attron(COLOR_PAIR(1)); + + mvprintw(LINES / 2 - 1, COLS / 2 - (prun.txt.length() + prun.pbar.length() + 4) / 2, bstr(prun.txt % prun.pbar % [a] { + switch(a) { + case 0: + return " "; + case 1: + return " . "; + case 2: + return " .. "; + default: + return " ..."; + } + }())); + + attron(COLOR_PAIR(2)), + mvprintw(LINES - 1, COLS - 13, "Kendek, GPLv3"), + refresh(); + if(a < 3) sb::delay(500); + } + + break; + case Stop: + delete ptimer, ptimer = nullptr; + prun.txt.clear(); + if(! prun.pbar.isEmpty()) prun.pbar.clear(); + if(prun.cperc) prun.cperc = 0; + if(sb::Progress > -1) sb::Progress = -1; + } +} diff --git a/systemback-cli/systemback-cli.hpp b/systemback-cli/systemback-cli.hpp new file mode 100644 index 0000000..3bdb363 --- /dev/null +++ b/systemback-cli/systemback-cli.hpp @@ -0,0 +1,83 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef SYSTEMBACKCLI_HPP +#define SYSTEMBACKCLI_HPP + +#include "../libsystemback/sblib.hpp" +#include + +class systemback : public QObject +{ + Q_OBJECT + +public: + systemback(); + ~systemback(); + +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) +public slots: +#endif + void main(); + +private: + enum { Inprog = 0, Start = 1, Stop = 2 }; + + struct { + QStr txt, pbar; + uchar type, cperc; + } prun; + + QTimer *ptimer; + QStr pname, cpoint; + QChar yn[2]; + bstr sbtxt; + uchar blgn; + + QStr twrp(cQStr &txt); + uchar storagedir(cQSL &args); + + uchar clistart(), + restore(); + + bool newrpnt(); + + void pset(uchar type), + emptycache(); + +private slots: + void progress(uchar status = Inprog); +}; + +inline systemback::systemback() : ptimer(nullptr) +{ + QStr yns(tr("(Y/N)")); + yn[0] = yns.at(1), yn[1] = yns.at(3), prun.cperc = 0; +} + +inline systemback::~systemback() +{ + if(ptimer) delete ptimer; +} + +inline QStr systemback::twrp(cQStr &txt) +{ + return txt.length() > 78 ? QStr(txt).replace(txt.left(78).lastIndexOf(' '), 1, "\n ") : txt; +} + +#endif diff --git a/systemback-cli/systemback-cli.pro b/systemback-cli/systemback-cli.pro new file mode 100644 index 0000000..8053326 --- /dev/null +++ b/systemback-cli/systemback-cli.pro @@ -0,0 +1,45 @@ +QT -= gui +QT += core + +TARGET = systemback-cli + +CONFIG -= app_bundle +CONFIG += console \ + c++11 \ + exceptions_off + +TEMPLATE = app + +DEFINES += _FILE_OFFSET_BITS=64 + +SOURCES += main.cpp \ + systemback-cli.cpp + +HEADERS += systemback-cli.hpp + +QMAKE_CXXFLAGS += -g \ + -fno-rtti \ + -fvisibility=hidden \ + -fvisibility-inlines-hidden \ + -fno-asynchronous-unwind-tables + +CONFIG(debug, debug|release) { + QMAKE_CXXFLAGS_WARN_ON += -Wextra \ + -Wshadow \ + -Werror +} + +QMAKE_LFLAGS += -g \ + -Wl,-rpath=/usr/lib/systemback \ + -Wl,--as-needed \ + -fuse-ld=gold \ + -Wl,-z,relro + +! equals(QMAKE_CXX, clang++) { + QMAKE_CXXFLAGS += -flto + QMAKE_LFLAGS += -flto +} + +LIBS += -L../libsystemback \ + -lsystemback \ + -lncursesw diff --git a/systemback-kde.desktop b/systemback-kde.desktop new file mode 100644 index 0000000..5786e38 --- /dev/null +++ b/systemback-kde.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Systemback +Comment=Simple system backup and restore application with extra features +Comment[hu]=Egyszerű rendszermentő és visszaállító alkalmazás további extra funkciókkal +Exec=/usr/lib/systemback/sbsustart systemback +Type=Application +Icon=systemback +Terminal=false +OnlyShowIn=KDE; +Categories=System; diff --git a/systemback.desktop b/systemback.desktop new file mode 100644 index 0000000..e0b122e --- /dev/null +++ b/systemback.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Systemback +Comment=Simple system backup and restore application with extra features +Comment[hu]=Egyszerű rendszermentő és visszaállító alkalmazás további extra funkciókkal +Exec=/usr/lib/systemback/sbsustart systemback gtk+ +Type=Application +Icon=systemback +Terminal=false +NotShowIn=KDE; +Categories=System; diff --git a/systemback.pro b/systemback.pro new file mode 100644 index 0000000..48f725c --- /dev/null +++ b/systemback.pro @@ -0,0 +1,33 @@ +TEMPLATE = subdirs + +SUBDIRS += libsystemback \ + sbscheduler \ + sbsysupgrade \ + sbsustart \ + systemback \ + systemback-cli + +sbscheduler.depends = libsystemback +sbsysupgrade.depends = libsystemback +sbsustart.depends = libsystemback +systemback.depends = libsystemback +systemback-cli.depends = libsystemback + +TRANSLATIONS = lang/systemback_hu.ts \ + lang/systemback_ar_EG.ts \ + lang/systemback_ca_ES.ts \ + lang/systemback_cs.ts \ + lang/systemback_da_DK.ts \ + lang/systemback_de.ts \ + lang/systemback_en_GB.ts \ + lang/systemback_es.ts \ + lang/systemback_fi.ts \ + lang/systemback_fr.ts \ + lang/systemback_gl_ES.ts \ + lang/systemback_id.ts \ + lang/systemback_pt_BR.ts \ + lang/systemback_ro.ts \ + lang/systemback_ru.ts \ + lang/systemback_tr.ts \ + lang/systemback_uk.ts \ + lang/systemback_zh_CN.ts diff --git a/systemback/bttnevent.hpp b/systemback/bttnevent.hpp new file mode 100644 index 0000000..4e62fb8 --- /dev/null +++ b/systemback/bttnevent.hpp @@ -0,0 +1,43 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef BTTNEVENT_HPP +#define BTTNEVENT_HPP + +#include + +class bttnevent : public QPushButton +{ + Q_OBJECT + +public: + inline bttnevent(QWidget *prnt) : QPushButton(prnt) {} + +protected: + void leaveEvent(QEvent *); + +signals: + void Mouse_Leave(); +}; + +inline void bttnevent::leaveEvent(QEvent *) +{ + emit Mouse_Leave(); +} + +#endif diff --git a/systemback/chckbxevent.hpp b/systemback/chckbxevent.hpp new file mode 100644 index 0000000..a2082ea --- /dev/null +++ b/systemback/chckbxevent.hpp @@ -0,0 +1,50 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef CHCKBXEVENT_HPP +#define CHCKBXEVENT_HPP + +#include + +class chckbxevent : public QCheckBox +{ + Q_OBJECT + +public: + inline chckbxevent(QWidget *prnt) : QCheckBox(prnt) {} + +protected: + void enterEvent(QEvent *), + leaveEvent(QEvent *); + +signals: + void Mouse_Enter(); + void Mouse_Leave(); +}; + +inline void chckbxevent::enterEvent(QEvent *) +{ + emit Mouse_Enter(); +} + +inline void chckbxevent::leaveEvent(QEvent *) +{ + emit Mouse_Leave(); +} + +#endif diff --git a/systemback/lblevent.hpp b/systemback/lblevent.hpp new file mode 100644 index 0000000..67f63e5 --- /dev/null +++ b/systemback/lblevent.hpp @@ -0,0 +1,94 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef LBLEVENT_HPP +#define LBLEVENT_HPP + +#include +#include + +class lblevent : public QLabel +{ + Q_OBJECT + +public: + inline lblevent(QWidget *prnt) : QLabel(prnt) {} + static ushort MouseX, MouseY; + +protected: + void mouseDoubleClickEvent(QMouseEvent *ev), + mouseReleaseEvent(QMouseEvent *ev), + mousePressEvent(QMouseEvent *ev), + mouseMoveEvent(QMouseEvent *), + enterEvent(QEvent *), + leaveEvent(QEvent *); + +private: + bool MousePressed; + +signals: + void Mouse_Released(); + void Mouse_DblClick(); + void Mouse_Pressed(); + void Mouse_Click(); + void Mouse_Enter(); + void Mouse_Leave(); + void Mouse_Move(); +}; + +inline void lblevent::mousePressEvent(QMouseEvent *ev) +{ + if(ev->button() == Qt::LeftButton) + { + MouseX = ev->x(), MouseY = ev->y(), MousePressed = true; + emit Mouse_Pressed(); + } +} + +inline void lblevent::mouseMoveEvent(QMouseEvent *) +{ + if(MousePressed) emit Mouse_Move(); +} + +inline void lblevent::mouseReleaseEvent(QMouseEvent *ev) +{ + if(ev->button() == Qt::LeftButton) + { + MousePressed = false; + emit Mouse_Released(); + } + + emit Mouse_Click(); +} + +inline void lblevent::mouseDoubleClickEvent(QMouseEvent *ev) +{ + if(ev->button() == Qt::LeftButton) emit Mouse_DblClick(); +} + +inline void lblevent::enterEvent(QEvent *) +{ + emit Mouse_Enter(); +} + +inline void lblevent::leaveEvent(QEvent *) +{ + emit Mouse_Leave(); +} + +#endif diff --git a/systemback/lndtevent.hpp b/systemback/lndtevent.hpp new file mode 100644 index 0000000..253809c --- /dev/null +++ b/systemback/lndtevent.hpp @@ -0,0 +1,44 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef LNDTEVENT_HPP +#define LNDTEVENT_HPP + +#include + +class lndtevent : public QLineEdit +{ + Q_OBJECT + +public: + inline lndtevent(QWidget *prnt) : QLineEdit(prnt) {} + +protected: + void focusOutEvent(QFocusEvent *ev); + +signals: + void Focus_Out(); +}; + +inline void lndtevent::focusOutEvent(QFocusEvent *ev) +{ + QLineEdit::focusOutEvent(ev); + emit Focus_Out(); +} + +#endif diff --git a/systemback/main.cpp b/systemback/main.cpp new file mode 100644 index 0000000..0af8ddd --- /dev/null +++ b/systemback/main.cpp @@ -0,0 +1,40 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "systemback.hpp" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + sb::ldtltr(); + + uchar rv([&a] { + if(qgetenv("XAUTHORITY").startsWith("/home/") && ! getuid()) + { + sb::error("\n " % sb::tr("Unsafe X Window authorization!") % "\n\n " % sb::tr("Please do not use 'sudo' command.") % "\n\n"); + return 1; + } + + systemback w; + w.fscrn ? w.showFullScreen() : w.show(); + return a.exec(); + }()); + + return rv; +} diff --git a/systemback/pictures.qrc b/systemback/pictures.qrc new file mode 100644 index 0000000..4d26378 --- /dev/null +++ b/systemback/pictures.qrc @@ -0,0 +1,26 @@ + + + pictures/back.png + pictures/dialogerror.png + pictures/dialoginfo.png + pictures/dialogquestion.png + pictures/dir.png + pictures/dirx.png + pictures/down.png + pictures/error.png + pictures/isdir.png + pictures/leftarrow.png + pictures/leftgreenarrow.png + pictures/logo.png + pictures/menuback.png + pictures/menunext.png + pictures/next.png + pictures/ok.png + pictures/passwordlogo.png + pictures/refresh.png + pictures/resize.png + pictures/rightarrow.png + pictures/systemback.png + pictures/up.png + + diff --git a/systemback/pictures/back.png b/systemback/pictures/back.png new file mode 100644 index 0000000..718de09 Binary files /dev/null and b/systemback/pictures/back.png differ diff --git a/systemback/pictures/dialogerror.png b/systemback/pictures/dialogerror.png new file mode 100644 index 0000000..d960df4 Binary files /dev/null and b/systemback/pictures/dialogerror.png differ diff --git a/systemback/pictures/dialoginfo.png b/systemback/pictures/dialoginfo.png new file mode 100644 index 0000000..e7054a4 Binary files /dev/null and b/systemback/pictures/dialoginfo.png differ diff --git a/systemback/pictures/dialogquestion.png b/systemback/pictures/dialogquestion.png new file mode 100644 index 0000000..7101a88 Binary files /dev/null and b/systemback/pictures/dialogquestion.png differ diff --git a/systemback/pictures/dir.png b/systemback/pictures/dir.png new file mode 100644 index 0000000..6d6cf5b Binary files /dev/null and b/systemback/pictures/dir.png differ diff --git a/systemback/pictures/dirx.png b/systemback/pictures/dirx.png new file mode 100644 index 0000000..88abcd5 Binary files /dev/null and b/systemback/pictures/dirx.png differ diff --git a/systemback/pictures/down.png b/systemback/pictures/down.png new file mode 100644 index 0000000..d6ca6e3 Binary files /dev/null and b/systemback/pictures/down.png differ diff --git a/systemback/pictures/error.png b/systemback/pictures/error.png new file mode 100644 index 0000000..b986791 Binary files /dev/null and b/systemback/pictures/error.png differ diff --git a/systemback/pictures/isdir.png b/systemback/pictures/isdir.png new file mode 100644 index 0000000..9e9243b Binary files /dev/null and b/systemback/pictures/isdir.png differ diff --git a/systemback/pictures/leftarrow.png b/systemback/pictures/leftarrow.png new file mode 100644 index 0000000..aa2213e Binary files /dev/null and b/systemback/pictures/leftarrow.png differ diff --git a/systemback/pictures/leftgreenarrow.png b/systemback/pictures/leftgreenarrow.png new file mode 100644 index 0000000..454ccca Binary files /dev/null and b/systemback/pictures/leftgreenarrow.png differ diff --git a/systemback/pictures/logo.png b/systemback/pictures/logo.png new file mode 100644 index 0000000..2826816 Binary files /dev/null and b/systemback/pictures/logo.png differ diff --git a/systemback/pictures/menuback.png b/systemback/pictures/menuback.png new file mode 100644 index 0000000..9baabbf Binary files /dev/null and b/systemback/pictures/menuback.png differ diff --git a/systemback/pictures/menunext.png b/systemback/pictures/menunext.png new file mode 100644 index 0000000..ad87a7c Binary files /dev/null and b/systemback/pictures/menunext.png differ diff --git a/systemback/pictures/next.png b/systemback/pictures/next.png new file mode 100644 index 0000000..80462d2 Binary files /dev/null and b/systemback/pictures/next.png differ diff --git a/systemback/pictures/ok.png b/systemback/pictures/ok.png new file mode 100644 index 0000000..6ebaf2b Binary files /dev/null and b/systemback/pictures/ok.png differ diff --git a/systemback/pictures/passwordlogo.png b/systemback/pictures/passwordlogo.png new file mode 100644 index 0000000..3264074 Binary files /dev/null and b/systemback/pictures/passwordlogo.png differ diff --git a/systemback/pictures/refresh.png b/systemback/pictures/refresh.png new file mode 100644 index 0000000..be79c12 Binary files /dev/null and b/systemback/pictures/refresh.png differ diff --git a/systemback/pictures/resize.png b/systemback/pictures/resize.png new file mode 100644 index 0000000..faf4478 Binary files /dev/null and b/systemback/pictures/resize.png differ diff --git a/systemback/pictures/rightarrow.png b/systemback/pictures/rightarrow.png new file mode 100644 index 0000000..8499b89 Binary files /dev/null and b/systemback/pictures/rightarrow.png differ diff --git a/systemback/pictures/systemback.png b/systemback/pictures/systemback.png new file mode 100644 index 0000000..13e0613 Binary files /dev/null and b/systemback/pictures/systemback.png differ diff --git a/systemback/pictures/up.png b/systemback/pictures/up.png new file mode 100644 index 0000000..392b8e5 Binary files /dev/null and b/systemback/pictures/up.png differ diff --git a/systemback/pnlevent.hpp b/systemback/pnlevent.hpp new file mode 100644 index 0000000..009ae4f --- /dev/null +++ b/systemback/pnlevent.hpp @@ -0,0 +1,71 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef PNLEVENT_HPP +#define PNLEVENT_HPP + +#include + +class pnlevent : public QWidget +{ + Q_OBJECT + +public: + inline pnlevent(QWidget *prnt) : QWidget(prnt) {} + +protected: + void mouseMoveEvent(QMouseEvent *), + resizeEvent(QResizeEvent *), + moveEvent(QMoveEvent *), + hideEvent(QHideEvent *), + leaveEvent(QEvent *); + +signals: + void Mouse_Leave(); + void Mouse_Move(); + void Resize(); + void Move(); + void Hide(); +}; + +inline void pnlevent::mouseMoveEvent(QMouseEvent *) +{ + emit Mouse_Move(); +} + +inline void pnlevent::resizeEvent(QResizeEvent *) +{ + emit Resize(); +} + +inline void pnlevent::moveEvent(QMoveEvent *) +{ + emit Move(); +} + +inline void pnlevent::hideEvent(QHideEvent *) +{ + emit Hide(); +} + +inline void pnlevent::leaveEvent(QEvent *) +{ + emit Mouse_Leave(); +} + +#endif diff --git a/systemback/systemback.cpp b/systemback/systemback.cpp new file mode 100644 index 0000000..01277bb --- /dev/null +++ b/systemback/systemback.cpp @@ -0,0 +1,7735 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#include "ui_systemback.h" +#include "systemback.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef FontChange +#undef FontChange +#endif + +#ifdef KeyRelease +#undef KeyRelease +#endif + +#ifdef KeyPress +#undef KeyPress +#endif + +#ifdef False +#undef False +#endif + +#ifdef True +#undef True +#endif + +Display *dsply(XOpenDisplay(nullptr)); +ushort lblevent::MouseX, lblevent::MouseY; + +systemback::systemback() : QMainWindow(nullptr, Qt::FramelessWindowHint), ui(new Ui::systemback) +{ + ocfg = (sb::sdir[0] % sb::sdir[2] % sb::schdlr[0] % sb::schdlr[1] % sb::lang % sb::style % sb::wsclng).toUtf8() % char(sb::ismpnt) % char(sb::pnumber) % char(sb::incrmtl) % char(sb::xzcmpr) % char(sb::autoiso) % char(sb::schdle[0]) % char(sb::schdle[1]) % char(sb::schdle[2]) % char(sb::schdle[3]) % char(sb::schdle[4]) % char(sb::schdle[5]) % char(sb::waot) % char(sb::ecache), shdltimer = dlgtimer = intrptimer = nullptr, wmblck = wismax = fscrn = nrxth = false; + + if(sb::style != "auto") + { + if(QStyleFactory::keys().contains(sb::style)) + qApp->setStyle(QStyleFactory::create(sb::style)); + else + sb::style = "auto"; + } + + ui->setupUi(this), ui->dialogpanel->move(0, 0); + for(QWdt wdgt : QWL{ui->statuspanel, ui->scalingbuttonspanel, ui->buttonspanel, ui->resizepanel}) wdgt->hide(); + for(QWdt wdgt : QWL{ui->dialogpanel, ui->windowmaximize, ui->windowminimize, ui->windowclose}) wdgt->setBackgroundRole(QPalette::Foreground); + for(QWdt wdgt : QWL{ui->function3, ui->windowbutton3, ui->windowmaximize, ui->windowminimize, ui->windowclose}) wdgt->setForegroundRole(QPalette::Base); + ui->subdialogpanel->setBackgroundRole(QPalette::Background), + ui->buttonspanel->setBackgroundRole(QPalette::Highlight), + connect(ui->function3, &lblevent::Mouse_Pressed, this, &systemback::wpressed), + connect(ui->function3, &lblevent::Mouse_Move, this, &systemback::wmove), + connect(ui->function3, &lblevent::Mouse_Released, this, &systemback::wreleased), + connect(ui->windowbutton3, SIGNAL(Mouse_Enter()), this, SLOT(benter())), + connect(ui->windowbutton3, &lblevent::Mouse_Pressed, this, &systemback::bpressed), + connect(ui->windowbutton3, &lblevent::Mouse_Released, this, &systemback::wbreleased); + for(QWdt wdgt : QWL{ui->windowbutton3, ui->buttonspanel, ui->windowminimize, ui->windowclose}) connect(wdgt, SIGNAL(Mouse_Move()), this, SLOT(bmove())); + connect(ui->buttonspanel, &pnlevent::Mouse_Leave, [this] { if(ui->buttonspanel->isVisible() && ! ui->buttonspanel->y()) bttnshide(); }); + + for(QWdt wdgt : QWL{ui->windowminimize, ui->windowclose}) connect(wdgt, SIGNAL(Mouse_Enter()), this, SLOT(wbenter())), + connect(wdgt, SIGNAL(Mouse_Leave()), this, SLOT(wbleave())), + connect(wdgt, SIGNAL(Mouse_Pressed()), this, SLOT(mpressed())), + connect(wdgt, SIGNAL(Mouse_Released()), this, SLOT(wbreleased())); + + dialog = getuid() + getgid() ? 306 : [this] { + QSL args(qApp->arguments()); + + if(args.count() == 2 && args.at(1) == "schedule" && [] { + QStr ppath(sb::isdir("/run") ? "/run/sbscheduler.pid" : "/var/run/sbscheduler.pid"); + return sb::isfile(ppath) && getppid() == sb::fload(ppath).toUShort(); + }()) + + sstart = true; + else if(! sb::lock(sb::Sblock)) + return 300; + else + { + if(! (sislive = sb::isfile("/cdrom/casper/filesystem.squashfs") || sb::isfile("/lib/live/mount/medium/live/filesystem.squashfs"))) + { + if(! sb::lock(sb::Dpkglock)) + return 301; + else if(! sb::lock(sb::Aptlock)) + return 302; + } + + sstart = false; + } + + return 0; + }(); + + QRect sgm(sgeom()); + + { + QFont fnt; + if(! sb::like(fnt.family(), {"_Ubuntu_", "_FreeSans_"})) fnt.setFamily(QFontDatabase().families().contains("Ubuntu") ? "Ubuntu" : "FreeSans"); + if(fnt.weight() != QFont::Normal) fnt.setWeight(QFont::Normal); + if(fnt.bold()) fnt.setBold(false); + if(fnt.italic()) fnt.setItalic(false); + if(fnt.overline()) fnt.setOverline(false); + if(fnt.strikeOut()) fnt.setStrikeOut(false); + if(fnt.underline()) fnt.setUnderline(false); + + if(! (sb::like(sb::wsclng, {"_auto_", "_1_"}) && fontInfo().pixelSize() == 15)) + { + sfctr = sb::wsclng == "auto" ? fontInfo().pixelSize() > 28 ? Max : fontInfo().pixelSize() > 21 ? High : Normal : sb::wsclng == "2" ? Max : sb::wsclng == "1.5" ? High : Normal; + while(sfctr > Normal && (sgm.width() - ss(30) < ss(698) || sgm.height() - ss(30) < ss(465))) sfctr = sfctr == Max ? High : Normal; + fnt.setPixelSize(ss(15)); + for(QWdt wdgt : QWL{ui->storagedir, ui->liveworkdir, ui->interrupt, ui->partitiondelete}) wdgt->setFont(fnt); + qApp->setFont(fnt), + fnt.setPixelSize(ss(27)), + ui->buttonspanel->setFont(fnt), + fnt.setPixelSize(ss(17)), fnt.setBold(true), + ui->passwordtitletext->setFont(fnt); + + if(sfctr > Normal) + { + for(QWdt wdgt : findChildren()) wdgt->setGeometry(ss(wdgt->x()), ss(wdgt->y()), ss(wdgt->width()), ss(wdgt->height())); + for(QPB pbtn : findChildren()) pbtn->setIconSize(QSize(ss(pbtn->iconSize().width()), ss(pbtn->iconSize().height()))); + + if(! (sstart || dialog)) + { + { + ushort sz[]{ss(10), ss(20)}; + + for(QTblW tblw : findChildren()) tblw->horizontalHeader()->setMinimumSectionSize(sz[0]), + tblw->verticalHeader()->setDefaultSectionSize(sz[1]); + } + + { QSize nsize(ss(112), ss(32)); + for(QCbB cmbx : findChildren()) cmbx->setMinimumSize(nsize); } + ui->partitionsettings->verticalScrollBar()->adjustSize(); + QStr nsize(QStr::number(ss(ui->partitionsettings->verticalScrollBar()->width()))); + for(QWdt wdgt : QWL{ui->partitionsettings, ui->livelist, ui->livedevices, ui->excludeitemslist, ui->excludedlist, ui->includeitemslist, ui->includedlist, ui->license, ui->dirchoose}) wdgt->setStyleSheet("QScrollBar::vertical{width: " % nsize % "px}\nQScrollBar::horizontal{height: " % nsize % "px}"); + QStyleOption optn; + optn.init(ui->pointpipe1), + nsize = QStr::number(ss(ui->pointpipe1->style()->subElementRect(QStyle::SE_CheckBoxClickRect, &optn).width())); + for(QCB ckbx : findChildren()) ckbx->setStyleSheet("QCheckBox::indicator{width:" % nsize % "px; height:" % nsize % "px}"); + optn.init(ui->pnumber3), + nsize = QStr::number(ss(ui->pnumber3->style()->subElementRect(QStyle::SE_RadioButtonClickRect, &optn).width())); + for(QCbB rbtn : findChildren()) rbtn->setStyleSheet("QRadioButton::indicator{width:" % nsize % "px; height:" % nsize % "px}"); + } + } + } + else + { + sfctr = Normal; + + if(fnt != font()) + { + for(QWdt wdgt : QWL{ui->storagedir, ui->liveworkdir, ui->interrupt, ui->partitiondelete}) wdgt->setFont(fnt); + qApp->setFont(fnt); + } + } + } + + bfnt = font(); + + if(dialog) + { + wndw = this; + for(QWdt wdgt : QWL{ui->mainpanel, ui->passwordpanel, ui->schedulerpanel}) wdgt->hide(); + dialogopen(dialog); + } + else + { + intrrpt = irblck = utblck = false, prun.type = prun.pnts = ppipe = busycnt = 0, + ui->dialogpanel->hide(); + + for(QWdt wdgt : QWL{ui->statuspanel, ui->resizepanel}) wdgt->move(0, 0), + wdgt->setBackgroundRole(QPalette::Foreground); + + for(QWdt wdgt : QWL{ui->substatuspanel, ui->subpanel}) wdgt->setBackgroundRole(QPalette::Background); + for(QWdt wdgt : QWL{ui->function2, ui->function4, ui->windowbutton2, ui->windowbutton4}) wdgt->setForegroundRole(QPalette::Base); + + for(QWdt wdgt : QWL{ui->function2, ui->function4}) connect(wdgt, SIGNAL(Mouse_Pressed()), this, SLOT(wpressed())), + connect(wdgt, SIGNAL(Mouse_Move()), this, SLOT(wmove())), + connect(wdgt, SIGNAL(Mouse_Released()), this, SLOT(wreleased())); + + for(QWdt wdgt : QWL{ui->windowbutton2, ui->windowbutton4}) connect(wdgt, SIGNAL(Mouse_Enter()), this, SLOT(benter())), + connect(wdgt, SIGNAL(Mouse_Pressed()), this, SLOT(bpressed())); + + connect(ui->windowbutton4, &lblevent::Mouse_Released, this, &systemback::wbreleased), + connect(ui->windowbutton4, &lblevent::Mouse_Move, this, &systemback::bmove); + + connect(ui->statuspanel, &pnlevent::Hide, [this] { + if(! ui->statuspanel->isVisibleTo(ui->wpanel)) + { + prun.type = 0, prun.txt.clear(), + ui->processrun->clear(); + if(prun.pnts) prun.pnts = 0; + if(sb::Progress > -1) sb::Progress = -1; + if(! ui->progressbar->maximum()) ui->progressbar->setMaximum(100); + if(ui->progressbar->value()) ui->progressbar->setValue(0); + if(ui->interrupt->isEnabled()) ui->interrupt->setDisabled(true); + + if(sb::dbglev == sb::Errdbg) + { + if(! sb::eout.isEmpty()) sb::eout.clear(); + sb::dbglev = sb::Nulldbg; + } + } + }); + + if(! sstart) + { + icnt = 0, cpos = -1, nohmcpy[1] = uchkd = false; + for(QWdt wdgt : QWL{ui->restorepanel, ui->copypanel, ui->installpanel, ui->livepanel, ui->repairpanel, ui->excludepanel, ui->includepanel, ui->schedulepanel, ui->aboutpanel, ui->licensepanel, ui->settingspanel, ui->choosepanel, ui->storagedirbutton, ui->fullnamepipe, ui->usernamepipe, ui->usernameerror, ui->passwordpipe, ui->passworderror, ui->rootpasswordpipe, ui->rootpassworderror, ui->hostnamepipe, ui->hostnameerror}) wdgt->hide(); + ui->storagedir->resize(ss(236), ss(28)), + ui->installpanel->move(ui->sbpanel->pos()), + ui->mainpanel->setBackgroundRole(QPalette::Foreground); + for(QWdt wdgt : QWL{ui->sbpanel, ui->installpanel, ui->subscalingbuttonspanel}) wdgt->setBackgroundRole(QPalette::Background); + for(QWdt wdgt : QWL{ui->function1, ui->scalingbutton, ui->windowbutton1}) wdgt->setForegroundRole(QPalette::Base); + for(QWdt wdgt : QWL{ui->scalingfactor, ui->storagedirarea}) wdgt->setBackgroundRole(QPalette::Base); + ui->scalingbuttonspanel->setBackgroundRole(QPalette::Highlight); + + if(sb::wsclng == "auto") + ui->scalingdown->setDisabled(true); + else if(sb::wsclng == "2") + { + ui->scalingfactor->setText("x2"); + ui->scalingup->setDisabled(true); + } + else + ui->scalingfactor->setText('x' % sb::wsclng); + + connect(ui->windowmaximize, &lblevent::Mouse_Enter, this, &systemback::wbenter), + connect(ui->windowmaximize, &lblevent::Mouse_Leave, this, &systemback::wbleave); + for(QWdt wdgt : QWL{ui->windowmaximize, ui->scalingbutton, ui->homepage1, ui->homepage2, ui->email, ui->donate}) connect(wdgt, SIGNAL(Mouse_Pressed()), this, SLOT(mpressed())); + + for(QWdt wdgt : QWL{ui->windowmaximize, ui->windowbutton1}) connect(wdgt, SIGNAL(Mouse_Move()), this, SLOT(bmove())), + connect(wdgt, SIGNAL(Mouse_Released()), this, SLOT(wbreleased())); + + for(QWdt wdgt : QWL{ui->chooseresize, ui->copyresize, ui->excluderesize, ui->includeresize}) connect(wdgt, SIGNAL(Mouse_Enter()), this, SLOT(renter())), + connect(wdgt, SIGNAL(Mouse_Leave()), this, SLOT(rleave())), + connect(wdgt, SIGNAL(Mouse_Pressed()), this, SLOT(rpressed())), + connect(wdgt, SIGNAL(Mouse_Released()), this, SLOT(rreleased())), + connect(wdgt, SIGNAL(Mouse_Move()), this, SLOT(rmove())); + + connect(ui->function1, &lblevent::Mouse_Pressed, this, &systemback::wpressed), + connect(ui->function1, &lblevent::Mouse_Move, this, &systemback::wmove), + connect(ui->function1, &lblevent::Mouse_Released, this, &systemback::wreleased), + connect(ui->function1, &lblevent::Mouse_DblClick, [this] { if(ui->copypanel->isVisible() || ui->excludepanel->isVisible() || ui->includepanel->isVisible() || ui->choosepanel->isVisible()) stschange(); }), + connect(ui->windowbutton1, SIGNAL(Mouse_Enter()), this, SLOT(benter())), + connect(ui->windowbutton1, &lblevent::Mouse_Pressed, this, &systemback::bpressed); + + connect(ui->scalingbutton, &lblevent::Mouse_Released, [this] { + if(ui->scalingbutton->foregroundRole() == QPalette::Highlight) + { + uchar a(ss(24)); + ui->scalingbuttonspanel->move(-ui->scalingbuttonspanel->width() + a, -ui->scalingbuttonspanel->height() + a), + ui->scalingbuttonspanel->show(), + a = ss(1); + short px(ui->scalingbuttonspanel->x()); + do ui->scalingbuttonspanel->move(px += a, ui->scalingbuttonspanel->y() < -a ? ui->scalingbuttonspanel->y() + a : 0), qApp->processEvents(); + while(px < 0 && px == ui->scalingbuttonspanel->x()); + } + }); + + connect(ui->scalingbutton, &lblevent::Mouse_Move, [this] { + if(minside(ui->scalingbutton)) + { + if(ui->scalingbutton->foregroundRole() == QPalette::Base) ui->scalingbutton->setForegroundRole(QPalette::Highlight); + } + else if(ui->scalingbutton->foregroundRole() == QPalette::Highlight) + ui->scalingbutton->setForegroundRole(QPalette::Base); + }); + + connect(ui->scalingbuttonspanel, &pnlevent::Mouse_Leave, [this] { + QStr nsclng(ui->scalingfactor->text() == "auto" ? "auto" : sb::right(ui->scalingfactor->text(), -1)); + + if(sb::wsclng == nsclng) + { + ui->scalingbutton->setForegroundRole(QPalette::Base); + uchar a(ss(1)); + do ui->scalingbuttonspanel->move(ui->scalingbuttonspanel->x() - a, ui->scalingbuttonspanel->y() - a), qApp->processEvents(); + while(ui->scalingbuttonspanel->y() > -ui->scalingbuttonspanel->height()); + ui->scalingbuttonspanel->hide(); + } + else + { + sb::wsclng = nsclng, + sb::cfgwrite(), ocfg.clear(), + sb::unlock(sb::Sblock), sb::unlock(sb::Dpkglock), sb::unlock(sb::Aptlock); + + if(fscrn) + utimer.stop(), hide(), + sb::exec("systemback finstall", sb::Wait); + else + sb::exec("systemback", sb::Bckgrnd); + + close(); + } + }); + + connect(ui->homepage1, &lblevent::Mouse_Move, [this] { + if(minside(ui->homepage1)) + { + if(ui->homepage1->foregroundRole() == QPalette::Text) ui->homepage1->setForegroundRole(QPalette::Highlight); + } + else if(ui->homepage1->foregroundRole() == QPalette::Highlight) + ui->homepage1->setForegroundRole(QPalette::Text); + }); + + connect(ui->homepage2, &lblevent::Mouse_Move, [this] { + if(minside(ui->homepage2)) + { + if(ui->homepage2->foregroundRole() == QPalette::Text) ui->homepage2->setForegroundRole(QPalette::Highlight); + } + else if(ui->homepage2->foregroundRole() == QPalette::Highlight) + ui->homepage2->setForegroundRole(QPalette::Text); + }); + + connect(ui->email, &lblevent::Mouse_Move, [this] { + if(minside(ui->email)) + { + if(ui->email->foregroundRole() == QPalette::Text) ui->email->setForegroundRole(QPalette::Highlight); + } + else if(ui->email->foregroundRole() == QPalette::Highlight) + ui->email->setForegroundRole(QPalette::Text); + }); + + connect(ui->donate, &lblevent::Mouse_Move, [this] { + if(minside(ui->donate)) + { + if(ui->donate->foregroundRole() == QPalette::Text) ui->donate->setForegroundRole(QPalette::Highlight); + } + else if(ui->donate->foregroundRole() == QPalette::Highlight) + ui->donate->setForegroundRole(QPalette::Text); + }); + + connect(ui->partitionsettings, &tblwdgtevent::Focus_In, [this] { + if(ui->partitionsettingspanel2->isVisible()) + for(ushort a(ui->partitionsettings->currentRow() + 1) ; a < ui->partitionsettings->rowCount() && ui->partitionsettings->item(a, 0)->background() == QPalette().color(QPalette::Inactive, QPalette::Highlight) ; ++a) ui->partitionsettings->item(a, 0)->setBackground(QPalette().highlight()), + ui->partitionsettings->item(a, 0)->setForeground(QPalette().highlightedText()); + }); + + connect(ui->partitionsettings, &tblwdgtevent::Focus_Out, [this] { + if(ui->partitionsettingspanel2->isVisibleTo(ui->copypanel)) + for(ushort a(ui->partitionsettings->currentRow() + 1) ; a < ui->partitionsettings->rowCount() && ui->partitionsettings->item(a, 0)->background() == QPalette().highlight() ; ++a) ui->partitionsettings->item(a, 0)->setBackground(QPalette().color(QPalette::Inactive, QPalette::Highlight)), + ui->partitionsettings->item(a, 0)->setForeground(QPalette().color(QPalette::Inactive, QPalette::HighlightedText)); + }); + + for(QWdt wdgt : QWL{ui->homepage1, ui->homepage2, ui->email, ui->donate}) connect(wdgt, SIGNAL(Mouse_Released()), this, SLOT(abtreleased())); + for(QLE ldt : ui->points->findChildren()) connect(ldt, SIGNAL(Focus_Out()), this, SLOT(foutpnt())); + connect(ui->usersettingscopy, &chckbxevent::Mouse_Enter, [this] { if(ui->usersettingscopy->checkState() == Qt::PartiallyChecked) ui->usersettingscopy->setText(tr("Transfer user configuration and data files")); }), + connect(ui->usersettingscopy, &chckbxevent::Mouse_Leave, [this] { if(ui->usersettingscopy->checkState() == Qt::PartiallyChecked && ui->usersettingscopy->text() == tr("Transfer user configuration and data files")) ui->usersettingscopy->setText(tr("Transfer user configuration files")); }), + connect(ui->unmountdelete, &bttnevent::Mouse_Leave, [this] { if(! ui->unmountdelete->isEnabled() && ui->unmountdelete->text() == tr("! Delete !") && (ui->partitionsettings->item(ui->partitionsettings->currentRow(), 4)->text().isEmpty() || ui->partitionsettings->item(ui->partitionsettings->currentRow(), 5)->text() != "btrfs")) ui->unmountdelete->setEnabled(true); }); + } + + wndw = [&]() -> QWdt { + QSL args(qApp->arguments()); + + if([&args] { + switch(args.count()) { + case 2: + return args.at(1) == "finstall"; + case 3: + return args.at(1) == "authorization"; + default: + return false; + } + }() && ! (sislive && sb::like(sb::fload("/proc/self/mounts"), {"* / overlay *","* / overlayfs *", "* / aufs *", "* / unionfs *", "* / fuse.unionfs-fuse *"}))) + { + for(QWdt wdgt : QWL{ui->mainpanel, ui->schedulerpanel, ui->adminpasswordpipe, ui->adminpassworderror}) wdgt->hide(); + ui->passwordpanel->move(0, 0); + for(QLbl lbl : QLbL{ui->adminstext, ui->adminpasswordtext}) lbl->resize(fontMetrics().width(lbl->text() + ss(7)), lbl->height()); + ui->admins->move(ui->adminstext->x() + ui->adminstext->width(), ui->admins->y()), + ui->admins->setMaximumWidth(ui->passwordpanel->width() - ui->admins->x() - ss(8)), + ui->adminpassword->move(ui->adminpasswordtext->x() + ui->adminpasswordtext->width(), ui->adminpassword->y()), + ui->adminpassword->resize(ss(336) - ui->adminpassword->x(), ui->adminpassword->height()); + + { + QFile file("/etc/group"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + + if(cline.startsWith("sudo:")) + for(cQStr &usr : sb::right(cline, -sb::rinstr(cline, ":")).split(',')) + if(! usr.isEmpty() && ui->admins->findText(usr) == -1) ui->admins->addItem(usr); + } + } + + if(! ui->admins->count()) + ui->admins->addItem("root"); + else if(ui->admins->count() > 1) + { + schar i(ui->admins->findText(args.at(2))); + if(i > 0) ui->admins->setCurrentIndex(i); + } + + setFixedSize(wgeom[2] = ss(376), wgeom[3] = ss(224)), + move(wgeom[0] = sgm.x() + sgm.width() / 2 - ss(188), wgeom[1] = sgm.y() + sgm.height() / 2 - ss(112)), + setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); + } + else + { + ui->passwordpanel->hide(), busy(); + + QTimer::singleShot(0, this, +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) + SLOT(unitimer()) +#else + &systemback::unitimer +#endif + ); + + if(sstart) + { + ui->mainpanel->hide(), + ui->schedulerpanel->move(0, 0), + ui->schedulerpanel->setBackgroundRole(QPalette::Foreground), + ui->subschedulerpanel->setBackgroundRole(QPalette::Background), + ui->function4->setText("Systemback " % tr("scheduler")); + + if(sb::schdlr[0] == "topleft") + { + ushort sz(ss(30)); + wgeom[0] = sgm.x() + sz, wgeom[1] = sgm.y() + sz; + } + else if(sb::schdlr[0] == "center") + wgeom[0] = sgm.x() + sgm.width() / 2 - ss(201), wgeom[1] = sgm.y() + sgm.height() / 2 - ss(80); + else if(sb::schdlr[0] == "bottomleft") + wgeom[0] = sgm.x() + ss(30), wgeom[1] = sgm.y() + sgm.height() - ss(191); + else if(sb::schdlr[0] == "bottomright") + wgeom[0] = sgm.x() + sgm.width() - ss(432), wgeom[1] = sgm.y() + sgm.height() - ss(191); + else + wgeom[0] = sgm.x() + sgm.width() - ss(432), wgeom[1] = sgm.y() + ss(30); + + setFixedSize(wgeom[2] = ss(402), wgeom[3] = ss(161)), + move(wgeom[0], wgeom[1]); + + QTimer::singleShot(0, this, +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) + SLOT(schedulertimer()) +#else + &systemback::schedulertimer +#endif + ); + + setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); + } + else + { + ui->schedulerpanel->hide(); + + if(sislive && args.count() == 2 && args.at(1) == "finstall") + { + resize(sgm.size()); + for(QWdt wdgt : QWL{ui->wallpaper, ui->logo}) wdgt->move(0, 0); + fscrn = true, wgeom[2] = ss(698), wgeom[3] = ss(465), + ui->wpanel->setGeometry(wgeom[0] = sgm.width() < wgeom[2] ? 0 : sgm.x() + width() / 2 - ss(349), wgeom[1] = sgm.height() < wgeom[3] ? 0 : sgm.y() + height() / 2 - ss(232), wgeom[2], wgeom[3]); + + connect(ui->wpanel, &pnlevent::Move, [this] { + if(fscrn && ! (wismax || wmblck)) + { + if(wgeom[0] != ui->wpanel->x()) wgeom[0] = ui->wpanel->x(); + if(wgeom[1] != ui->wpanel->y()) wgeom[1] = ui->wpanel->y(); + } + }); + + connect(ui->logo, &lblevent::Mouse_Click, [this] { + if(ui->wpanel->isHidden()) ui->wpanel->show(), + fwdgt->setFocus(), + ui->logo->setFocusPolicy(Qt::NoFocus); + }); + + on_installmenu_clicked(), + ui->installback->hide(), + setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); + return ui->wpanel; + } + else + setFixedSize(wgeom[2] = ss(698), wgeom[3] = ss(465)), + move(wgeom[0] = sgm.x() + sgm.width() / 2 - ss(349), wgeom[1] = sgm.y() + sgm.height() / 2 - ss(232)); + } + } + + return this; + }(); + } + + connect(ui->wpanel, &pnlevent::Resize, [this] { + for(QWdt wdgt : QWL{ui->mainpanel, ui->resizepanel}) wdgt->resize(wndw->size()); + for(QWdt wdgt : QWL{ui->function1, ui->border, ui->resizeborder}) wdgt->resize(wndw->width(), wdgt->height()); + ui->windowbutton1->move(wndw->width() - ui->windowbutton1->height(), 0), + ui->subpanel->resize(wndw->width() - ui->subpanel->x(), wndw->height() - ss(24)); + + if(ui->copypanel->isVisibleTo(ui->wpanel)) + { + ui->copypanel->resize(wndw->width() - ui->copypanel->x() * 2, wndw->height() - ss(25)), + ui->partitionsettingstext->resize(ui->copypanel->width(), ui->partitionsettingstext->height()), + ui->partitionsettings->resize(ui->copypanel->width() - ss(152), ui->copypanel->height() - ss(200)), + ui->partitionsettingspanel1->move(ui->partitionsettings->x() + ui->partitionsettings->width(), ui->partitionsettingspanel1->y()); + for(QWdt wdgt : QWL{ui->partitionsettingspanel2, ui->partitionsettingspanel3}) wdgt->move(ui->partitionsettingspanel1->pos()); + ui->partitionoptionstext->setGeometry(0, ui->copypanel->height() - ss(160), ui->copypanel->width(), ui->partitionoptionstext->height()), + ui->userdatafilescopy->move(ui->userdatafilescopy->x(), ui->copypanel->height() - ss(122) - (sfctr == High ? 1 : 2)), + ui->usersettingscopy->move(ui->usersettingscopy->x(), ui->userdatafilescopy->y()), + ui->grubinstalltext->move(ui->grubinstalltext->x(), ui->copypanel->height() - ss(96)), + ui->grubinstallcopy->move(ui->grubinstallcopy->x(), ui->grubinstalltext->y()), + ui->grubinstallcopydisable->move(ui->grubinstallcopy->pos()), + ui->efiwarning->setGeometry(ui->efiwarning->x(), ui->grubinstalltext->y() - ss(4), ui->copypanel->width() - ui->efiwarning->x() - ss(8), ui->efiwarning->height()), + ui->copyback->move(ui->copyback->x(), ui->copypanel->height() - ss(48)), + ui->copynext->move(ui->partitionsettings->width(), ui->copyback->y()), + ui->copyresize->move(ui->copypanel->width() - ui->copyresize->width(), ui->copypanel->height() - ui->copyresize->height()), + ui->copycover->resize(ui->copypanel->width() - ss(10), ui->copypanel->height() - ss(10)); + } + + if(fscrn && ! (wismax || wmblck)) + { + if(wgeom[2] != wndw->width()) wgeom[2] = wndw->width(); + if(wgeom[3] != wndw->height()) wgeom[3] = wndw->height(); + } + }); + + if(! fscrn) + { + for(QWdt wdgt : QWL{ui->wallpaper, ui->logo}) wdgt->hide(); + if(sb::waot && ! windowFlags().testFlag(Qt::WindowStaysOnTopHint)) setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); + Atom atm(XInternAtom(dsply, "_MOTIF_WM_HINTS", 0)); + ulong hnts[]{3, 44, 0, 0, 0}; + XChangeProperty(dsply, winId(), atm, atm, 32, PropModeReplace, (uchar *)&hnts, 5); + } + + XFlush(dsply), installEventFilter(this); +} + +systemback::~systemback() +{ + if(! ocfg.isEmpty()) + { + if(ocfg != (sb::sdir[0] % sb::sdir[2] % sb::schdlr[0] % sb::schdlr[1] % sb::lang % sb::style % sb::wsclng).toUtf8() % char(sb::ismpnt) % char(sb::pnumber) % char(sb::incrmtl) % char(sb::xzcmpr) % char(sb::autoiso) % char(sb::schdle[0]) % char(sb::schdle[1]) % char(sb::schdle[2]) % char(sb::schdle[3]) % char(sb::schdle[4]) % char(sb::schdle[5]) % char(sb::waot) % char(sb::ecache)) sb::cfgwrite(); + + if(fscrn && sb::isfile("/usr/bin/ksplashqml")) + { + for(cQStr &item : QDir("/usr/bin").entryList(QDir::Files)) + if(sb::like(item, {"_ksplash*", "_plasma*"})) cfmod(bstr("/usr/bin/" % item), 0755); + + if(sb::isfile("/usr/share/autostart/plasma-desktop.desktop_")) sb::rename("/usr/share/autostart/plasma-desktop.desktop_", "/usr/share/autostart/plasma-desktop.desktop"); + if(sb::isfile("/usr/share/autostart/plasma-netbook.desktop_")) sb::rename("/usr/share/autostart/plasma-netbook.desktop_", "/usr/share/autostart/plasma-netbook.desktop"); + } + + if(! nrxth) + { + QBA xauth(qgetenv("XAUTHORITY")); + if(xauth.startsWith("/tmp/sbXauthority-")) sb::rmfile(xauth); + } + } + + for(QTimer *tmr : {shdltimer, dlgtimer, intrptimer}) + if(tmr) delete tmr; + + delete ui, XCloseDisplay(dsply); +} + +void systemback::closeEvent(QCloseEvent *ev) +{ + ui->statuspanel->isVisible() && ! (sstart && sb::ThrdKill) && prun.type != 11 ? ev->ignore() : removeEventFilter(this); +} + +void systemback::unitimer() +{ + if(! utblck) + { + utblck = true; + + if(! utimer.isActive()) + { + switch(sb::pnumber) { + case 3: + ui->pnumber3->setChecked(true), + on_pnumber3_clicked(); + break; + case 4: + ui->pnumber4->setChecked(true), + on_pnumber4_clicked(); + break; + case 6: + ui->pnumber6->setChecked(true), + on_pnumber6_clicked(); + break; + case 7: + ui->pnumber7->setChecked(true), + on_pnumber7_clicked(); + break; + case 8: + ui->pnumber8->setChecked(true), + on_pnumber8_clicked(); + break; + case 9: + ui->pnumber9->setChecked(true), + on_pnumber9_clicked(); + break; + case 10: + ui->pnumber10->setChecked(true), + on_pnumber10_clicked(); + } + + if(! sstart) + { + ui->storagedir->setText(sb::sdir[0]), + ui->storagedir->setToolTip(sb::sdir[0]), + ui->liveworkdir->setText(sb::sdir[2]), + ui->liveworkdir->setToolTip(sb::sdir[2]); + for(QLE ldt : QList{ui->storagedir, ui->liveworkdir}) ldt->setCursorPosition(0); + + for(QWdt wdgt : QWL{ui->restorepanel, ui->copypanel, ui->livepanel, ui->repairpanel, ui->excludepanel, ui->includepanel, ui->schedulepanel, ui->aboutpanel, ui->licensepanel, ui->settingspanel, ui->choosepanel}) wdgt->move(ui->sbpanel->pos()), + wdgt->setBackgroundRole(QPalette::Background); + + for(QWdt wdgt : QWL{ui->liveworkdirarea, ui->schedulerday, ui->schedulerhour, ui->schedulerminute, ui->schedulersecond}) wdgt->setBackgroundRole(QPalette::Base); + { QPalette pal(ui->license->palette()); + pal.setBrush(QPalette::Base, pal.background()), + ui->license->setPalette(pal); } + ui->partitionsettings->setHorizontalHeaderLabels({tr("Partition"), tr("Size"), tr("Label"), tr("Current mount point"), tr("New mount point"), tr("Filesystem"), tr("Format")}); + for(uchar a(7) ; a < 11 ; ++a) ui->partitionsettings->setColumnHidden(a, true); + { QFont fnt; + fnt.setPixelSize(ss(14)); + for(QTblW wdgt : QList{ui->partitionsettings, ui->livedevices}) wdgt->horizontalHeader()->setFont(fnt); } + for(uchar a : {0, 1, 5, 6}) ui->partitionsettings->horizontalHeader()->setSectionResizeMode(a, QHeaderView::Fixed); + ui->livedevices->setHorizontalHeaderLabels({tr("Partition"), tr("Size"), tr("Device"), tr("Format")}); + for(uchar a : {0, 1, 3}) ui->livedevices->horizontalHeader()->setSectionResizeMode(a, QHeaderView::Fixed); + for(QWdt wdgt : QWL{ui->livenamepipe, ui->livenameerror, ui->partitionsettingspanel2, ui->partitionsettingspanel3, ui->grubreinstallrestoredisable, ui->grubreinstallrepairdisable, ui->usersettingscopy, ui->repaircover}) wdgt->hide(); + for(QCbB cmbx : QCbBL{ui->grubreinstallrestoredisable, ui->grubinstallcopydisable, ui->grubreinstallrepairdisable}) cmbx->addItem(tr("Disabled")); + if(sb::schdle[0]) ui->schedulerstate->click(); + if(sb::schdle[5]) ui->silentmode->setChecked(true); + ui->windowposition->addItems({tr("Top left"), tr("Top right"), tr("Center"), tr("Bottom left"), tr("Bottom right")}); + if(sb::schdlr[0] != "topleft") ui->windowposition->setCurrentIndex(ui->windowposition->findText(sb::schdlr[0] == "topright" ? tr("Top right") : sb::schdlr[0] == "center" ? tr("Center") : sb::schdlr[0] == "bottomleft" ? tr("Bottom left") : tr("Bottom right"))); + ui->schedulerday->setText(QStr::number(sb::schdle[1]) % ' ' % tr("day(s)")), + ui->schedulerhour->setText(QStr::number(sb::schdle[2]) % ' ' % tr("hour(s)")), + ui->schedulerminute->setText(QStr::number(sb::schdle[3]) % ' ' % tr("minute(s)")), + ui->schedulersecond->setText(QStr::number(sb::schdle[4]) % ' ' % tr("seconds")); + + auto lodsbl([this](bool chkd = false) { + ui->languageoverride->setDisabled(true); + if(chkd || sb::lang != "auto") sb::lang = "auto"; + }); + + if(sb::isdir("/usr/share/systemback/lang")) + { + { + QSL lst("English (common)"); + lst.reserve(13); + + for(cQStr &item : QDir("/usr/share/systemback/lang").entryList(QDir::Files)) + { + QStr lcode(sb::left(sb::right(item, -11), -3)); + + cchar *lname(lcode == "ar_EG" ? "المصرية العربية" + : lcode == "ca_ES" ? "Català" + : lcode == "cs" ? "Čeština" + : lcode == "da_DK" ? "Dansk" + : lcode == "de" ? "Deutsch" + : lcode == "en_GB" ? "English (United Kingdom)" + : lcode == "es" ? "Español" + : lcode == "fi" ? "Suomi" + : lcode == "fr" ? "Français" + : lcode == "gl_ES" ? "Galego" + : lcode == "hu" ? "Magyar" + : lcode == "id" ? "Bahasa Indonesia" + : lcode == "pt_BR" ? "Português (Brasil)" + : lcode == "ro" ? "Română" + : lcode == "ru" ? "Русский" + : lcode == "tr" ? "Türkçe" + : lcode == "uk" ? "Українськa" + : lcode == "zh_CN" ? "中文(简体)" : nullptr); + + if(lname) lst.append(lname); + } + + if(lst.count() == 1) + lodsbl(); + else + { + lst.sort(); + + if(sb::lang == "auto") + ui->languages->addItems(lst); + else + { + schar indx(sb::lang == "id_ID" ? 0 + : sb::lang == "ar_EG" ? lst.indexOf("المصرية العربية") + : sb::lang == "ca_ES" ? lst.indexOf("Català") + : sb::lang == "cs_CS" ? lst.indexOf("Čeština") + : sb::lang == "da_DK" ? lst.indexOf("Dansk") + : sb::lang == "de_DE" ? lst.indexOf("Deutsch") + : sb::lang == "en_EN" ? lst.indexOf("English (common)") + : sb::lang == "en_GB" ? lst.indexOf("English (United Kingdom)") + : sb::lang == "es_ES" ? lst.indexOf("Español") + : sb::lang == "fi_FI" ? lst.indexOf("Suomi") + : sb::lang == "fr_FR" ? lst.indexOf("Français") + : sb::lang == "gl_ES" ? lst.indexOf("Galego") + : sb::lang == "hu_HU" ? lst.indexOf("Magyar") + : sb::lang == "pt_BR" ? lst.indexOf("Português (Brasil)") + : sb::lang == "ro_RO" ? lst.indexOf("Română") + : sb::lang == "ru_RU" ? lst.indexOf("Русский") + : sb::lang == "tr_TR" ? lst.indexOf("Türkçe") + : sb::lang == "uk_UK" ? lst.indexOf("Українськa") + : sb::lang == "zh_CN" ? lst.indexOf("中文(简体)") : -1); + + if(indx == -1) + lodsbl(true); + else + { + ui->languageoverride->setChecked(true), + ui->languages->addItems(lst); + if(indx) ui->languages->setCurrentIndex(indx); + ui->languages->setEnabled(true); + } + } + } + } + + for(QLbl lbl : findChildren()) + if(lbl->alignment() == (Qt::AlignLeft | Qt::AlignVCenter) && lbl->text().isRightToLeft()) lbl->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + } + else + lodsbl(); + + { QSL kys(QStyleFactory::keys()); + kys.sort(), ui->styles->addItems(kys); } + + if(sb::style != "auto") ui->styleoverride->setChecked(true), + ui->styles->setCurrentIndex(ui->styles->findText(sb::style)), + ui->styles->setEnabled(true); + + if(sb::waot) ui->alwaysontop->setChecked(true); + if(! sb::incrmtl) ui->incrementaldisable->setChecked(true); + if(! sb::ecache) ui->cachemptydisable->setChecked(true); + if(sb::xzcmpr) ui->usexzcompressor->setChecked(true); + if(sb::autoiso) ui->autoisocreate->setChecked(true); + + if(sb::schdlr[1] != "false") + { + if(sb::schdlr[1] == "everyone") + ui->schedulerdisable->click(), + ui->schedulerusers->setText(tr("Everyone")); + else + { + ui->schedulerdisable->setChecked(true); + QSL susr(sb::right(sb::schdlr[1], -1).split(',')); + if(! susr.contains("root")) ui->users->addItem("root"); + QFile file("/etc/passwd"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr usr(file.readLine().trimmed()); + if(usr.contains(":/home/") && ! susr.contains(usr = sb::left(usr, sb::instr(usr, ":") -1)) && sb::isdir("/home/" % usr)) ui->users->addItem(usr); + } + + if(ui->users->count()) + for(QWdt wdgt : QWL{ui->users, ui->adduser}) wdgt->setEnabled(true); + + ui->schedulerusers->setText(sb::right(sb::schdlr[1], -1)), + ui->schedulerrefresh->setEnabled(true); + } + + ui->schedulerusers->setCursorPosition(0); + } + + ui->version->setText(sb::appver()); + ushort sz[]{ss(7), ss(8), ss(28), ss(3)}; + for(QLbl lbl : QLbL{ui->includeuserstext, ui->grubreinstallrestoretext, ui->grubinstalltext, ui->grubreinstallrepairtext, ui->schedulerstatetext, ui->schedulersecondtext, ui->windowpositiontext, ui->homepage1, ui->homepage2, ui->email, ui->donate, ui->version, ui->filesystemwarning}) lbl->resize(lbl->fontMetrics().width(lbl->text()) + sz[0], lbl->height()); + ui->includeusers->move(ui->includeuserstext->x() + ui->includeuserstext->width(), ui->includeusers->y()), + ui->includeusers->setMaximumWidth(width() - ui->includeusers->x() - sz[1]), + ui->grubreinstallrestore->move(ui->grubreinstallrestoretext->x() + ui->grubreinstallrestoretext->width(), ui->grubreinstallrestore->y()), + ui->grubreinstallrestoredisable->move(ui->grubreinstallrestore->pos()), + ui->grubinstallcopy->move(ui->grubinstalltext->x() + ui->grubinstalltext->width(), ui->grubinstallcopy->y()), + ui->grubinstallcopydisable->move(ui->grubinstallcopy->pos()), + ui->grubreinstallrepair->move(ui->grubreinstallrepairtext->x() + ui->grubreinstallrepairtext->width(), ui->grubreinstallrepair->y()), + ui->grubreinstallrepairdisable->move(ui->grubreinstallrepair->pos()), + ui->schedulerstate->move(ui->schedulerstatetext->x() + ui->schedulerstatetext->width(), ui->schedulerstate->y()), + ui->schedulersecondpanel->move(ui->schedulersecondtext->x() + ui->schedulersecondtext->width(), ui->schedulersecondpanel->y()), + ui->windowposition->move(ui->windowpositiontext->x() + ui->windowpositiontext->width(), ui->windowposition->y()); + for(QCB ckbx : QList{ui->format, ui->keepfiles, ui->autorestoreoptions, ui->skipfstabrestore, ui->autorepairoptions, ui->skipfstabrepair, ui->userdatafilescopy, ui->userdatainclude, ui->silentmode, ui->languageoverride, ui->styleoverride, ui->alwaysontop, ui->incrementaldisable, ui->cachemptydisable, ui->usexzcompressor, ui->autoisocreate, ui->schedulerdisable}) ckbx->resize(fontMetrics().width(ckbx->text()) + sz[2], ckbx->height()); + ui->usersettingscopy->resize(fontMetrics().width(tr("Transfer user configuration and data files")) + sz[2], ui->usersettingscopy->height()), + ui->usersettingscopy->setCheckState(Qt::PartiallyChecked), + ui->format->move((ui->partitionsettingspanel1->width() - ui->format->width()) / 2, ui->format->y()); + for(QRB rbtn : QList{ui->fullrestore, ui->systemrestore, ui->configurationfilesrestore, ui->systemrepair, ui->fullrepair, ui->grubrepair, ui->pointexclude, ui->liveexclude}) rbtn->resize(fontMetrics().width(rbtn->text()) + sz[2], rbtn->height()); + ui->languages->move(ui->languageoverride->x() + ui->languageoverride->width() + sz[3], ui->languages->y()), + ui->languages->setMaximumWidth(width() - ui->languages->x() - sz[1]), + ui->styles->move(ui->styleoverride->x() + ui->styleoverride->width() + sz[3], ui->styles->y()), + ui->styles->setMaximumWidth(width() - ui->styles->x() - sz[1]), + ui->filesystem->addItems({"ext4", "ext3", "ext2"}); + + for(cQStr &fs : {"btrfs", "reiserfs", "jfs", "xfs"}) + if(sb::execsrch("mkfs." % fs)) ui->filesystem->addItem(fs); + + ui->repairmountpoint->addItems({nullptr, "/mnt", "/mnt/home", "/mnt/boot"}); +#ifdef __amd64__ + if(sb::isdir("/sys/firmware/efi")) goto isefi; + + { + QStr ckernel(ckname()); + + if(sb::isfile("/lib/modules/" % ckernel % "/modules.builtin")) + { + QFile file("/lib/modules/" % ckernel % "/modules.builtin"); + + if(sb::fopen(file)) + while(! file.atEnd()) + if(file.readLine().trimmed().endsWith("efivars.ko")) goto noefi; + } + + if(sb::isfile("/proc/modules") && ! sb::fload("/proc/modules").contains("efivars ") && sb::isfile("/lib/modules/" % ckernel % "/modules.order")) + { + QFile file("/lib/modules/" % ckernel % "/modules.order"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QBA cline(file.readLine().trimmed()); + if(cline.endsWith("efivars.ko") && sb::isfile("/lib/modules/" % ckernel % '/' % cline) && ! sb::exec("modprobe efivars", sb::Silent) && sb::isdir("/sys/firmware/efi")) goto isefi; + } + } + } + + goto noefi; + isefi: + grub.name = "efi-amd64-bin", grub.isEFI = true, + ui->repairmountpoint->addItem("/mnt/boot/efi"), + ui->grubinstallcopy->hide(); + for(QCbB cmbx : QCbBL{ui->grubinstallcopy, ui->grubreinstallrestore, ui->grubreinstallrepair}) cmbx->addItems({"EFI", tr("Disabled")}); + ui->grubinstallcopydisable->adjustSize(), + ui->efiwarning->move(ui->grubinstallcopydisable->x() + ui->grubinstallcopydisable->width() + ss(5), ui->grubinstallcopydisable->y() - ss(4)), + ui->efiwarning->resize(ui->copypanel->width() - ui->efiwarning->x() - sz[1], ui->efiwarning->height()), + ui->efiwarning->setForegroundRole(QPalette::Highlight); + goto next_1; + noefi: +#endif + grub.name = "pc-bin", grub.isEFI = false; + for(QWdt wdgt : QWL{ui->grubinstallcopydisable, ui->efiwarning}) wdgt->hide(); +#ifdef __amd64__ + next_1: +#endif + ui->repairmountpoint->addItems({"/mnt/usr", "/mnt/var", "/mnt/opt", "/mnt/usr/local"}), + ui->repairmountpoint->setCurrentIndex(1); + + nohmcpy[0] = sb::isfile("/etc/fstab") && [] { + QFile file("/etc/fstab"); + + if(sb::fopen(file)) + { + QSL incl{"* /home *", "* /home/ *"}; + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + if(! cline.startsWith('#') && sb::like(cline.replace('\t', ' '), incl)) return true; + } + } + + return false; + }(); + + on_partitionrefresh_clicked(), + on_livedevicesrefresh_clicked(), + on_pointexclude_clicked(); + + { + QFile file(incfile); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr cline(sb::left(file.readLine(), -1)); + if(! cline.isEmpty()) ui->includedlist->addItem(cline); + } + } + + ilstupdt(true), + ui->storagedir->resize(ss(210), sz[2]), + ui->storagedirbutton->show(); + for(QWdt wdgt : QWL{ui->repairmenu, ui->aboutmenu, ui->settingsmenu, ui->pnumber3, ui->pnumber4, ui->pnumber5, ui->pnumber6, ui->pnumber7, ui->pnumber8, ui->pnumber9, ui->pnumber10}) wdgt->setEnabled(true); + + if(! sislive) + { + ickernel = [this] { + QStr ckernel(ckname()), fend[]{"order", "builtin"}; + + for(uchar a(0) ; a < 2 ; ++a) + if(sb::isfile("/lib/modules/" % ckernel % "/modules." % fend[a])) + { + QFile file("/lib/modules/" % ckernel % "/modules." % fend[a]); + + if(sb::fopen(file)) + { + QSL incl{"*aufs.ko_", "*overlay.ko_", "*overlayfs.ko_", "*unionfs.ko_"}; + + while(! file.atEnd()) + if(sb::like(file.readLine().trimmed(), incl)) return true; + } + } + + return sb::execsrch("unionfs-fuse"); + }(); + + for(QWdt wdgt : QWL{ui->copymenu, ui->installmenu, ui->systemupgrade, ui->excludemenu, ui->includemenu, ui->schedulemenu}) wdgt->setEnabled(true); + pname = tr("Currently running system"); + } + } + + pntupgrade(), + busy(false); + + connect(&utimer, +#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) + SIGNAL(timeout()), this, SLOT(unitimer()) +#else + &QTimer::timeout, this, &systemback::unitimer +#endif + ); + + utimer.start(500); + + if(sstart) + ui->schedulerstart->setEnabled(true); + else if(sislive && sb::exist("/etc/xdg/autostart/sbfinstall.desktop")) + for(cchar *file : {"/etc/xdg/autostart/sbfinstall.desktop", "/etc/xdg/autostart/sbfinstall-kde.desktop"}) sb::remove(file); + } + else if(ui->statuspanel->isVisibleTo(ui->wpanel)) + { + if(prun.type) + { + ui->processrun->setText(prun.txt % [this] { + switch(++prun.pnts) { + case 1: + return " . "; + case 2: + return " .. "; + case 3: + return " ..."; + default: + prun.pnts = 0; + return " "; + } + }()); + + switch(prun.type) { + case 2 ... 6: + case 8 ... 10: + case 15: + case 19 ... 21: + { + if(irblck) + { + if(ui->interrupt->isEnabled()) ui->interrupt->setDisabled(true); + } + else if(! ui->interrupt->isEnabled()) + ui->interrupt->setEnabled(true); + + schar cperc(sb::Progress); + + if(cperc > -1) + { + if(! ui->progressbar->maximum()) ui->progressbar->setMaximum(100); + + if(cperc > 99) + { + if(ui->progressbar->value() < 100) ui->progressbar->setValue(100); + } + else if(ui->progressbar->value() < cperc) + ui->progressbar->setValue(cperc); + else if(sb::like(99, {cperc, ui->progressbar->value()}, true)) + ui->progressbar->setValue(100); + } + else if(ui->progressbar->maximum() == 100) + ui->progressbar->setMaximum(0); + + break; + } + case 18: + { + if(! ui->interrupt->isEnabled()) ui->interrupt->setEnabled(true); + schar cperc(sb::Progress); + + if(cperc > -1) + { + if(! ui->progressbar->maximum()) ui->progressbar->setMaximum(100); + if(cperc < 101 && ui->progressbar->value() < cperc) ui->progressbar->setValue(cperc); + } + else if(ui->progressbar->maximum() == 100) + ui->progressbar->setMaximum(0); + + break; + } + default: + if(! irblck && sb::like(prun.type, {12, 14, 16, 17})) + { + if(! ui->interrupt->isEnabled()) ui->interrupt->setEnabled(true); + } + else if(ui->interrupt->isEnabled()) + ui->interrupt->setDisabled(true); + + if(ui->progressbar->maximum() == 100) ui->progressbar->setMaximum(0); + } + } + } + else if(! sstart) + { + if(! fscrn) + { + auto acserr([this] { + pntupgrade(); + + if(ui->dialogquestion->isVisible()) + on_dialogcancel_clicked(); + else if(ui->restorepanel->isVisible()) + on_restoreback_clicked(); + else if(ui->copypanel->isVisible()) + { + on_copyback_clicked(); + if(ui->function1->text() != "Systemback") on_installback_clicked(); + } + else if(ui->installpanel->isVisible()) + on_installback_clicked(); + else if(ui->repairpanel->isVisible()) + on_repairback_clicked(); + }); + + if(sb::isdir(sb::sdir[1]) && sb::access(sb::sdir[1], sb::Write)) + { + if(! ui->storagedirarea->styleSheet().isEmpty()) ui->storagedirarea->setStyleSheet(nullptr), + pntupgrade(); + + if(! (ppipe || ui->newrestorepoint->isEnabled()) && pname == tr("Currently running system")) ui->newrestorepoint->setEnabled(true); + schar num(-1); + + for(QLE ldt : ui->points->findChildren()) + { + ++num; + + if(ldt->isEnabled() && ! sb::isdir(sb::sdir[1] % [num]() -> QStr { + switch(num) { + case 9: + return "/S10_"; + case 10 ... 14: + return "/H0" % QStr::number(num - 9) % '_'; + default: + return "/S0" % QStr::number(num + 1) % '_'; + } + }() % sb::pnames[num])) + { + acserr(); + break; + } + } + } + else + { + if(ui->point1->isEnabled() || ui->pointpipe11->isEnabled()) acserr(); + if(ui->newrestorepoint->isEnabled()) ui->newrestorepoint->setDisabled(true); + if(ui->storagedirarea->styleSheet().isEmpty()) ui->storagedirarea->setStyleSheet("background-color: rgb(255, 103, 103)"); + } + } + + if(ui->installpanel->isVisible()) + { + if(ui->installmenu->isEnabled() && ui->fullnamepipe->isVisible() && ui->usernamepipe->isVisible() && ui->hostnamepipe->isVisible() && ui->passwordpipe->isVisible() && (ui->rootpassword1->text().isEmpty() || ui->rootpasswordpipe->isVisible()) && ! ui->installnext->isEnabled()) ui->installnext->setEnabled(true); + } + else if(ui->livepanel->isVisible()) + { + if(ui->livenameerror->isVisible() || ui->liveworkdir->text().isEmpty()) + { + if(ui->livenew->isEnabled()) ui->livenew->setDisabled(true); + } + else if(ui->livenamepipe->isVisible() || ui->livename->text() == "auto") + { + if(sb::isdir(sb::sdir[2]) && sb::access(sb::sdir[2], sb::Write)) + { + if(! ui->liveworkdirarea->styleSheet().isEmpty()) ui->liveworkdirarea->setStyleSheet(nullptr); + if(ickernel && ! ui->livenew->isEnabled()) ui->livenew->setEnabled(true); + + if(! ui->livelist->isEnabled()) ui->livelist->setEnabled(true), + on_livemenu_clicked(); + } + else + { + if(ui->liveworkdirarea->styleSheet().isEmpty()) ui->liveworkdirarea->setStyleSheet("background-color: rgb(255, 103, 103)"); + + for(QWdt wdgt : QWL{ui->livenew, ui->livedelete, ui->liveconvert, ui->livewritestart}) + if(wdgt->isEnabled()) wdgt->setDisabled(true); + + if(ui->livelist->isEnabled()) + { + if(ui->livelist->count()) ui->livelist->clear(); + ui->livelist->setDisabled(true); + } + } + } + } + else if(ui->repairpanel->isVisible()) + rmntcheck(); + } + + if(ui->buttonspanel->isVisible() && ! (ui->buttonspanel->y() || minside(ui->buttonspanel))) bttnshide(); + utblck = false; + } +} + +QRect systemback::sgeom(bool rdc, QDW dtp) +{ + if(fscrn) return {QPoint(), size()}; + if(! dtp) dtp = qApp->desktop(); + return rdc ? dtp->availableGeometry(dtp->screenNumber(this)) : dtp->screenGeometry(dtp->screenNumber(this)); +} + +inline ushort systemback::ss(ushort dsize) +{ + switch(sfctr) { + case Max: + return dsize * 2; + case High: + switch(dsize) { + case 0: + return 0; + case 1: + return 2; + default: + ushort ssize((dsize * High + 50) / 100); + + switch(dsize) { + case 154: + case 201: + case 402: + case 506: + case 698: + return ssize + 1; + default: + return ssize; + } + } + default: + return dsize; + } +} + +QLE systemback::getpoint(uchar num) +{ + schar cnum(-1); + + for(QLE ldt : ui->points->findChildren()) + if(++cnum == num) return ldt; + + return nullptr; +} + +QCB systemback::getppipe(uchar num) +{ + schar cnum(-1); + + for(QCB ckbx : ui->sbpanel->findChildren()) + if(++cnum == num) return ckbx; + + return nullptr; +} + +void systemback::busy(bool state) +{ + state ? ++busycnt : --busycnt; + + switch(busycnt) { + case 0: + if(qApp->overrideCursor()->shape() == Qt::WaitCursor) qApp->restoreOverrideCursor(); + break; + case 1: + if(! qApp->overrideCursor()) qApp->setOverrideCursor(Qt::WaitCursor); + } +} + +inline bool systemback::minside(QWdt wgt) +{ + return wgt->rect().contains(wgt->mapFromGlobal(QCursor::pos())); +} + +inline bool systemback::minside(cQRect &rct) +{ + return rct.contains(mapFromGlobal(QCursor::pos())); +} + +QStr systemback::guname() +{ + if(! uchkd && (! ui->admins->count() || ui->admins->currentText() == "root")) + { + uchkd = true; + QSL usrs; + + { + QFile file("/etc/passwd"); + + if(sb::fopen(file)) + { + QSL incl{"*:x:1000:10*", "*:x:1001:10*", "*:x:1002:10*", "*:x:1003:10*", "*:x:1004:10*", "*:x:1005:10*", "*:x:1006:10*", "*:x:1007:10*", "*:x:1008:10*", "*:x:1009:10*", "*:x:1010:10*", "*:x:1011:10*", "*:x:1012:10*", "*:x:1013:10*", "*:x:1014:10*", "*:x:1015:10*"}; + + while(! file.atEnd()) + { + QStr usr(file.readLine().trimmed()); + if(sb::like(usr, incl)) usrs.append(sb::left(usr, sb::instr(usr, ":") -1)); + } + } + } + + if(usrs.count()) + { + QStr uname; + + for(cQStr &usr : usrs) + if(sb::isdir("/home/" % usr)) + { + uname = usr; + break; + } + + if(uname.isEmpty()) uname = usrs.at(0); + if(ui->admins->findText(uname) == -1) ui->admins->addItem(uname); + if(ui->admins->count() > 1) ui->admins->setCurrentIndex(ui->admins->findText(uname)); + } + else if(ui->admins->currentText().isNull()) + ui->admins->addItem("root"); + } + + return ui->admins->currentText(); +} + +QStr systemback::ckname() +{ + utsname snfo; + uname(&snfo); + return snfo.release; +} + +void systemback::pset(uchar type, cbstr &tend) +{ + prun.txt = [type, &tend]() -> QStr { + switch(type) { + case 1: + return sb::ecache ? tr("Emptying cache") : tr("Flushing filesystem buffers"); + case 2: + return tr("Restoring the full system"); + case 3: + return tr("Restoring the system files"); + case 4: + return tr("Restoring the user(s) configuration files"); + case 5: + return tr("Repairing the system files"); + case 6: + return tr("Repairing the full system"); + case 7: + return tr("Repairing the GRUB 2"); + case 8: + return tr("Copying the system"); + case 9: + return tr("Installing the system"); + case 10: + return tr("Writing Live image to the target device"); + case 11: + return tr("Upgrading the system"); + case 12: + return tr("Deleting incomplete restore point"); + case 13: + return tr("Interrupting the current process"); + case 14: + return tr("Deleting old restore point") % ' ' % tend.data; + case 15: + return tr("Creating restore point"); + case 16: + return tr("Deleting restore point") % ' ' % tend.data; + case 21: + return tr("Converting Live system image") % '\n' % tr("process") % tend.data; + default: + return tr("Creating Live system") % '\n' % tr("process") % tend.data % (type < 20 && sb::autoiso ? "+1" : nullptr); + } + }(); + + prun.type = type; +} + +void systemback::emptycache() +{ + pset(1), sb::fssync(); + if(sb::ecache) sb::crtfile("/proc/sys/vm/drop_caches", "3"); +} + +void systemback::stschange() +{ + QRect agm(sgeom(true)), rct([&]() -> QRect { + if(wismax) + { + wismax = false; + return {wgeom[0], wgeom[1], wgeom[2], wgeom[3]}; + } + + wismax = true, + wndw->setMaximumSize(agm.size()); + return agm; + }()); + + wmblck = true; + int vls[]{qAbs(rct.x() - wndw->x()) / 6, qAbs(rct.y() - wndw->y()) / 6, qAbs(rct.width() - wndw->width()) / 6, qAbs(rct.height() - wndw->height()) / 6}; + ui->resizepanel->show(); + + for(uchar a(0) ; a < 6 ; ++a) wndw->setGeometry(qAbs(rct.x() - wndw->x()) > vls[0] ? wndw->x() - (rct.x() < wndw->x() ? vls[0] : -vls[0]) : rct.x(), qAbs(rct.y() - wndw->y()) > vls[1] ? wndw->y() - (rct.y() < wndw->y() ? vls[1] : -vls[1]) : rct.y(), qAbs(rct.width() - wndw->width()) > vls[2] ? wndw->width() - (rct.width() < wndw->width() ? vls[2] : -vls[2]) : rct.width(), qAbs(rct.height() - wndw->height()) > vls[3] ? wndw->height() - (rct.height() < wndw->height() ? vls[3] : -vls[3]) : rct.height()), + QThread::msleep(1), + repaint(); + + wndw->setGeometry(rct.x(), rct.y(), rct.width(), rct.height()), + ui->resizepanel->hide(), + wmblck = false; + + if(! wismax) + { + ushort sz(ss(60)); + wndw->setMaximumSize(agm.width() - sz, agm.height() - sz); + } + else if(ui->copypanel->isVisible()) + for(uchar a(2) ; a < 5 ; ++a) ui->partitionsettings->resizeColumnToContents(a); +} + +void systemback::schedulertimer() +{ + if(ui->schedulernumber->text().isEmpty()) + { + ui->schedulernumber->setText(QStr::number(sb::schdle[4]) % 's'); + + connect(shdltimer = new QTimer, +#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) + SIGNAL(timeout()), this, SLOT(schedulertimer()) +#else + &QTimer::timeout, this, &systemback::schedulertimer +#endif + ); + + shdltimer->start(1000); + } + else if(ui->schedulernumber->text() == "1s") + on_schedulerstart_clicked(); + else + ui->schedulernumber->setText(QStr::number(sb::left(ui->schedulernumber->text(), -1).toUShort() - 1) % 's'); +} + +void systemback::dialogtimer() +{ + ui->dialognumber->setText(QStr::number(sb::left(ui->dialognumber->text(), -1).toUShort() - 1) % "s"); + if(ui->dialognumber->text() == "0s" && sb::like(ui->dialogok->text(), {'_' % tr("Reboot") % '_', '_' % tr("X restart") % '_'})) on_dialogok_clicked(); +} + +void systemback::wpressed() +{ + if(! wismax) + { + if(qApp->overrideCursor()) qApp->restoreOverrideCursor(); + qApp->setOverrideCursor(Qt::SizeAllCursor); + } +} + +void systemback::wreleased() +{ + if([] { + QCr csr(qApp->overrideCursor()); + return csr && csr->shape() == Qt::SizeAllCursor; + }()) + { + qApp->restoreOverrideCursor(); + if(busycnt) qApp->setOverrideCursor(Qt::WaitCursor); + } + + if(! (fscrn || wismax)) + { + QDW dtp(qApp->desktop()); + QRect agm(sgeom(true, dtp)), sgm; + ushort frm(ss(30)); + + if(agm.width() >= wgeom[2] + frm) + { + sgm = sgeom(false, dtp); + + if(x() < sgm.x()) + { + short val(sgm.x() + frm); + wgeom[0] = val < agm.x() ? agm.x() : val; + } + else if(x() < agm.x()) + wgeom[0] = agm.x(); + else + { + short bnd[2]; + + if(x() > (bnd[0] = sgm.x() + sgm.width() - wgeom[2])) + { + short val(bnd[0] - frm); + wgeom[0] = val < (bnd[1] = agm.x() + agm.width() - wgeom[2]) ? val : bnd[1]; + } + else if(x() > (bnd[0] = agm.x() + agm.width() - wgeom[2])) + wgeom[0] = bnd[0]; + } + } + else if(wgeom[0] != agm.x()) + wgeom[0] = agm.x(); + + if(agm.height() >= wgeom[3] + frm) + { + if(sgm.isEmpty()) sgm = sgeom(false, dtp); + + if(y() < sgm.y()) + { + short val(sgm.y() + frm); + wgeom[1] = val < agm.y() ? agm.y() : val; + } + else if(y() < agm.y()) + wgeom[1] = agm.y(); + else + { + short bnd[2]; + + if(y() > (bnd[0] = sgm.y() + sgm.height() - wgeom[3])) + { + short val(bnd[0] - frm); + wgeom[1] = val < (bnd[1] = agm.y() + agm.height() - wgeom[3]) ? val : bnd[1]; + } + else if(y() > (bnd[0] = agm.y() + agm.height() - wgeom[3])) + wgeom[1] = bnd[0]; + } + } + else if(wgeom[1] != agm.y()) + wgeom[1] = agm.y(); + + if(pos() != QPoint(wgeom[0], wgeom[1])) move(wgeom[0], wgeom[1]); + } +} + +void systemback::benter(bool click) +{ + if(click || (qApp->mouseButtons() == Qt::NoButton && ui->function3->foregroundRole() == QPalette::Base)) + { + if(ui->statuspanel->isVisible()) + { + if(ui->windowmaximize->isVisibleTo(ui->buttonspanel)) + { + ui->windowmaximize->hide(); + ushort sz(ss(2)); + ui->windowminimize->move(sz, sz); + } + + if(ui->windowclose->isVisibleTo(ui->buttonspanel)) ui->windowclose->hide(); + if(ui->buttonspanel->width() != ui->buttonspanel->height()) ui->buttonspanel->resize(ui->buttonspanel->height(), ui->buttonspanel->height()); + } + else if(ui->copypanel->isVisible() || ui->excludepanel->isVisible() || ui->includepanel->isVisible() || ui->choosepanel->isVisible()) + { + if(! ui->windowmaximize->isVisibleTo(ui->buttonspanel)) ui->windowmaximize->show(), + ui->windowminimize->move(ss(47), ss(2)); + + if(wismax) + { + if(ui->windowmaximize->text() == "□") ui->windowmaximize->setText("▭"); + } + else if(ui->windowmaximize->text() == "▭") + ui->windowmaximize->setText("□"); + + ushort sz(ss(92)); + if(ui->windowclose->x() != sz) ui->windowclose->move(sz, ss(2)); + if(! ui->windowclose->isVisibleTo(ui->buttonspanel)) ui->windowclose->show(); + if(ui->buttonspanel->width() != (sz = ss(138))) ui->buttonspanel->resize(sz, ui->buttonspanel->height()); + } + else + { + if(ui->windowmaximize->isVisibleTo(ui->buttonspanel)) + { + ui->windowmaximize->hide(); + ushort sz(ss(2)); + ui->windowminimize->move(sz, sz); + } + + ushort sz(ss(47)); + if(ui->windowclose->x() != sz) ui->windowclose->move(sz, ss(2)); + if(! ui->windowclose->isVisibleTo(ui->buttonspanel)) ui->windowclose->show(); + if(ui->buttonspanel->width() != (sz = ss(93))) ui->buttonspanel->resize(sz, ui->buttonspanel->height()); + } + + wbleave(), bttnsshow(); + } +} + +void systemback::bpressed() +{ + benter(true); + if(ui->windowclose->isVisible() && qApp->mouseButtons() == Qt::LeftButton && minside(ui->windowclose)) ui->windowclose->setForegroundRole(QPalette::Highlight); +} + +void systemback::bttnsshow() +{ + ui->buttonspanel->move(wndw->width() - ui->buttonspanel->width(), -ui->buttonspanel->height() + ss(27)), + ui->buttonspanel->show(); + uchar a(ss(1)); + QRect rct({(fscrn ? ui->wpanel->x() : 0) + wndw->width() - ui->buttonspanel->width(), fscrn ? ui->wpanel->y() : 0, ui->buttonspanel->width(), ui->buttonspanel->height()}); + + do { + ui->buttonspanel->move(ui->buttonspanel->x(), ui->buttonspanel->y() + a), + QThread::msleep(1), + qApp->processEvents(); + if(! minside(rct)) return bttnshide(); + } while(ui->buttonspanel->y() < -a); + + ui->buttonspanel->move(ui->buttonspanel->x(), 0); +} + +void systemback::bttnshide() +{ + schar a(ss(1)), b(-ui->buttonspanel->height() + ss(24) + a); + QRect rct({(fscrn ? ui->wpanel->x() : 0) + wndw->width() - ui->buttonspanel->width(), fscrn ? ui->wpanel->y() : 0, ui->buttonspanel->width(), ui->buttonspanel->height()}); + + do { + ui->buttonspanel->move(ui->buttonspanel->x(), ui->buttonspanel->y() - a), + QThread::msleep(1), + qApp->processEvents(); + if(minside(rct)) return bttnsshow(); + } while(ui->buttonspanel->y() > b); + + ui->buttonspanel->hide(); +} + +void systemback::bmove() +{ + if(minside({(fscrn ? ui->wpanel->x() : 0) + wndw->width() - ui->buttonspanel->width(), fscrn ? ui->wpanel->y() : 0, ui->buttonspanel->width(), ui->buttonspanel->height()})) + { + if(ui->windowmaximize->isVisibleTo(ui->buttonspanel)) + { + if(minside(ui->windowmaximize)) + { + if(ui->windowmaximize->backgroundRole() == QPalette::Foreground) ui->windowmaximize->setBackgroundRole(QPalette::Background), + ui->windowmaximize->setForegroundRole(QPalette::Text); + } + else if(ui->windowmaximize->backgroundRole() == QPalette::Background) + ui->windowmaximize->setBackgroundRole(QPalette::Foreground), + ui->windowmaximize->setForegroundRole(QPalette::Base); + } + + if(minside(ui->windowminimize)) + { + if(ui->windowminimize->backgroundRole() == QPalette::Foreground) ui->windowminimize->setBackgroundRole(QPalette::Background), + ui->windowminimize->setForegroundRole(QPalette::Text); + } + else if(ui->windowminimize->backgroundRole() == QPalette::Background) + ui->windowminimize->setBackgroundRole(QPalette::Foreground), + ui->windowminimize->setForegroundRole(QPalette::Base); + + if(ui->windowclose->isVisibleTo(ui->buttonspanel)) + { + if(minside(ui->windowclose)) + { + if(ui->windowclose->backgroundRole() == QPalette::Foreground) ui->windowclose->setBackgroundRole(QPalette::Background), + ui->windowclose->setForegroundRole(QPalette::Text); + } + else if(ui->windowclose->backgroundRole() == QPalette::Background) + ui->windowclose->setBackgroundRole(QPalette::Foreground), + ui->windowclose->setForegroundRole(QPalette::Base); + } + + if(ui->buttonspanel->isHidden() && minside(ui->windowbutton1)) bttnsshow(); + } + else if(ui->buttonspanel->isVisible() && ! ui->buttonspanel->y()) + bttnshide(); +} + +void systemback::wbenter() +{ + QWdt wdgt(minside(ui->windowminimize) ? ui->windowminimize : ui->windowclose->isVisible() && minside(ui->windowclose) ? ui->windowclose : ui->windowmaximize); + wdgt->setBackgroundRole(QPalette::Background), + wdgt->setForegroundRole(QPalette::Text); +} + +void systemback::wbleave() +{ + for(QWdt wdgt : QWL{ui->windowminimize, ui->windowclose, ui->windowmaximize}) + if(wdgt->backgroundRole() == QPalette::Background) + { + wdgt->setBackgroundRole(QPalette::Foreground), + wdgt->setForegroundRole(QPalette::Base); + break; + } +} + +void systemback::wbreleased() +{ + if(ui->buttonspanel->isVisible()) + { + if(ui->buttonspanel->y() < 0) + { + if(ui->windowclose->foregroundRole() == QPalette::Highlight) ui->windowclose->setForegroundRole(ui->windowclose->backgroundRole() == QPalette::Background ? QPalette::Text : QPalette::Base); + } + else if(ui->windowclose->isVisible() && minside(ui->windowclose)) + { + if(ui->windowclose->foregroundRole() == QPalette::Highlight) close(); + } + else if(ui->windowmaximize->isVisible() && minside(ui->windowmaximize)) + { + if(ui->windowmaximize->foregroundRole() == QPalette::Highlight) ui->buttonspanel->hide(), + stschange(); + } + else if(ui->windowminimize->foregroundRole() == QPalette::Highlight) + { + if(fscrn) + { + for(QWdt wdgt : QWL{ui->wpanel, ui->buttonspanel}) wdgt->hide(); + fwdgt = qApp->focusWidget(), + ui->logo->setFocusPolicy(Qt::ClickFocus), ui->logo->setFocus(); + } + else + { + XWindowAttributes attr; + XGetWindowAttributes(dsply, winId(), &attr), + XIconifyWindow(dsply, winId(), XScreenNumberOfScreen(attr.screen)), + XFlush(dsply); + } + } + } +} + +void systemback::renter() +{ + QWdt wdgt(ui->copypanel->isVisible() ? ui->copyresize : ui->choosepanel->isVisible() ? ui->chooseresize : ui->excludepanel->isVisible() ? ui->excluderesize : ui->includeresize); + + if(! wismax) + { + if(wdgt->cursor().shape() == Qt::ArrowCursor) wdgt->setCursor(Qt::PointingHandCursor); + + if(wdgt->width() == ss(10)) + { + ushort sz[]{ss(20), ss(30)}; + wdgt->setGeometry(wdgt->x() - sz[0], wdgt->y() - sz[0], sz[1], sz[1]); + } + } + else if(wdgt->cursor().shape() == Qt::PointingHandCursor) + wdgt->setCursor(Qt::ArrowCursor); +} + +void systemback::rleave() +{ + QWdt wdgt(ui->copypanel->isVisible() ? ui->copyresize : ui->choosepanel->isVisible() ? ui->chooseresize : ui->excludepanel->isVisible() ? ui->excluderesize : ui->includeresize); + + if(wdgt->width() == ss(30) && [] { + QCr csr(qApp->overrideCursor()); + return ! (csr && csr->shape() == Qt::SizeFDiagCursor); + }()) + { + ushort sz[]{ss(20), ss(10)}; + wdgt->setGeometry(wdgt->x() + sz[0], wdgt->y() + sz[0], sz[1], sz[1]); + } +} + +void systemback::rpressed() +{ + if(! wismax) + { + if(qApp->overrideCursor()) qApp->restoreOverrideCursor(); + qApp->setOverrideCursor(Qt::SizeFDiagCursor); + } +} + +void systemback::rreleased() +{ + QCr csr(qApp->overrideCursor()); + + if(csr && csr->shape() == Qt::SizeFDiagCursor) + { + qApp->restoreOverrideCursor(); + if(busycnt) qApp->setOverrideCursor(Qt::WaitCursor); + QRect sgm(sgeom()); + + bool algn[]{[&] { + ushort wdth(sgm.width() - wndw->x()); + + if(wndw->width() > wdth) + { + wgeom[2] = wdth; + return true; + } + + return false; + }(), [&] { + ushort hght(sgm.height() - wndw->y()); + + if(wndw->height() > hght) + { + wgeom[3] = hght; + return true; + } + + return false; + }()}; + + if(algn[0] || algn[1]) wndw->resize(wgeom[2], wgeom[3]); + } +} + +void systemback::mpressed() +{ + (ui->buttonspanel->isVisible() ? minside(ui->windowminimize) ? ui->windowminimize : ui->windowclose->isVisible() && minside(ui->windowclose) ? ui->windowclose : ui->windowmaximize : ui->scalingbutton->isVisible() && minside(ui->scalingbutton) ? ui->scalingbutton : minside(ui->homepage1) ? ui->homepage1 : minside(ui->homepage2) ? ui->homepage2 : minside(ui->email) ? ui->email : ui->donate)->setForegroundRole(QPalette::Highlight); +} + +void systemback::abtreleased() +{ + if(ui->homepage1->foregroundRole() == QPalette::Highlight) + ui->homepage1->setForegroundRole(QPalette::Text), + sb::exec("su -c \"xdg-open https://sourceforge.net/projects/systemback &\" " % guname(), sb::Bckgrnd); + else if(ui->homepage2->foregroundRole() == QPalette::Highlight) + ui->homepage2->setForegroundRole(QPalette::Text), + sb::exec("su -c \"xdg-open https://launchpad.net/systemback &\" " % guname(), sb::Bckgrnd); + else if(ui->email->foregroundRole() == QPalette::Highlight) + ui->email->setForegroundRole(QPalette::Text), + sb::exec("su -c \"xdg-email nemh@freemail.hu &\" " % guname(), sb::Bckgrnd); + else if(ui->donate->foregroundRole() == QPalette::Highlight) + ui->donate->setForegroundRole(QPalette::Text), + sb::exec("su -c \"xdg-open 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZQ668BBR7UCEQ' &\" " % guname(), sb::Bckgrnd); +} + +void systemback::foutpnt() +{ + schar num(-1); + + for(QLE ldt : ui->points->findChildren()) + { + ++num; + + if(ldt->isEnabled() && ldt->text().isEmpty()) + { + ldt->setText(sb::pnames[num]); + break; + } + } +} + +void systemback::on_usersettingscopy_stateChanged(int arg1) +{ + if(! ppipe && ui->copypanel->isVisible()) ui->usersettingscopy->setText(arg1 == 1 ? tr("Transfer user configuration files") : tr("Transfer user configuration and data files")); +} + +void systemback::pntupgrade() +{ + sb::pupgrade(); + schar num(-1); + + for(QLE ldt : ui->points->findChildren()) + if(! sb::pnames[++num].isEmpty()) + { + if(! ldt->isEnabled()) + { + ldt->setEnabled(true); + + switch(num) { + case 2: + if(sb::pnumber == 3 && ldt->styleSheet().isEmpty()) ldt->setStyleSheet("background-color: rgb(255, 103, 103)"); + break; + case 3 ... 8: + if(sb::pnumber < num + 2 && ldt->styleSheet().isEmpty()) ldt->setStyleSheet("background-color: rgb(255, 103, 103)"); + break; + case 9: + if(ldt->styleSheet().isEmpty()) ldt->setStyleSheet("background-color: rgb(255, 103, 103)"); + } + + ldt->setText(sb::pnames[num]); + } + else if(ldt->text() != sb::pnames[num]) + ldt->setText(sb::pnames[num]); + } + else if(ldt->isEnabled()) + { + ldt->setDisabled(true); + if(! ldt->styleSheet().isEmpty()) ldt->setStyleSheet(nullptr); + + switch(num) { + case 3 ... 9: + if(sb::pnumber < num + 1) + { + if(ldt->text() != tr("not used")) ldt->setText(tr("not used")); + } + else if(ldt->text() != tr("empty")) + ldt->setText(tr("empty")); + + break; + default: + if(ldt->text() != tr("empty")) ldt->setText(tr("empty")); + } + } + + if(! sstart) on_pointpipe1_clicked(); +} + +void systemback::statustart() +{ + if(sstart && dialog != 305) + ui->schedulerpanel->hide(), + ui->statuspanel->show(), + setwontop(false); + else + { + if(ui->mainpanel->isVisible()) + ui->mainpanel->hide(); + else if(ui->dialogpanel->isVisible()) + ui->dialogpanel->hide(), + setwontop(false); + + ui->statuspanel->show(), + windowmove(ui->statuspanel->width(), ui->statuspanel->height()); + if(sb::dbglev == sb::Nulldbg) sb::dbglev = sb::Errdbg; + } + + ui->progressbar->setMaximum(0), + ui->focusfix->setFocus(); +} + +void systemback::restore() +{ + statustart(); + uchar mthd(ui->fullrestore->isChecked() ? 1 : ui->systemrestore->isChecked() ? 2 : ui->keepfiles->isChecked() ? ui->includeusers->currentIndex() == 0 ? 3 : 4 : ui->includeusers->currentIndex() == 0 ? 5 : 6); + pset(mthd > 2 ? 4 : mthd + 1); + uchar fcmp(sb::isfile("/etc/fstab") && sb::isfile(sb::sdir[1] % '/' % cpoint % '_' % pname % "/etc/fstab") ? sb::fload("/etc/fstab") == sb::fload(sb::sdir[1] % '/' % cpoint % '_' % pname % "/etc/fstab") ? 2 : 1 : 0); + auto exit([this] { intrrpt = false; }); + if(intrrpt) return exit(); + + if(sb::srestore(mthd, ui->includeusers->currentText(), sb::sdir[1] % '/' % cpoint % '_' % pname, nullptr, ui->autorestoreoptions->isChecked() ? fcmp : ui->skipfstabrestore->isChecked())) + { + if(intrrpt) return exit(); + sb::Progress = -1; + + if(mthd < 3) + { + if(ui->grubreinstallrestore->isVisibleTo(ui->restorepanel) && ! (ui->grubreinstallrestore->isEnabled() && ui->grubreinstallrestore->currentText() == tr("Disabled"))) + { + sb::exec("update-grub"); + if(intrrpt) return exit(); + + if(fcmp < 2 || ! (ui->autorestoreoptions->isChecked() || ui->grubreinstallrestore->currentText() == "Auto")) + { + if(sb::exec("grub-install --force " % (grub.isEFI ? nullptr : ui->autorestoreoptions->isChecked() || ui->grubreinstallrestore->currentText() == "Auto" ? sb::gdetect() : ui->grubreinstallrestore->currentText()))) dialog = 309; + if(intrrpt) return exit(); + } + } + + sb::crtfile(sb::sdir[1] % "/.sbschedule"); + } + + if(dialog != 309) dialog = [mthd, this] { + switch(mthd) { + case 1: + return 205; + case 2: + return 204; + default: + return ui->keepfiles->isChecked() ? 201 : 200; + } + }(); + } + else + dialog = 339; + + if(intrrpt) return exit(); + dialogopen(); +} + +void systemback::repair() +{ + statustart(); + uchar mthd(ui->systemrepair->isChecked() ? 2 : ui->fullrepair->isChecked() ? 1 : 0); + pset(7 - mthd); + auto exit([this] { intrrpt = false; }); + + if(! mthd) + { + QSL mlst{"dev", "dev/pts", "proc", "sys"}; + for(cQStr &bpath : (sb::mcheck("/run") ? mlst << "/run" : mlst)) sb::mount('/' % bpath, "/mnt/" % bpath); + dialog = sb::exec("chroot /mnt sh -c \"update-grub ; grub-install --force " % (grub.isEFI ? nullptr : ui->grubreinstallrepair->currentText() == "Auto" ? sb::gdetect("/mnt") : ui->grubreinstallrepair->currentText()) % '\"') ? 318 : 208, + mlst.move(0, 1); + for(cQStr &pend : mlst) sb::umount("/mnt/" % pend); + if(intrrpt) return exit(); + } + else + { + uchar fcmp(sb::isfile("/mnt/etc/fstab") ? 1 : 0); + bool rv; + + if(! ppipe) + { + if(! (sb::isdir("/.systembacklivepoint") || sb::crtdir("/.systembacklivepoint"))) sb::rename("/.systembacklivepoint", "/.systembacklivepoint_" % sb::rndstr()), + sb::crtdir("/.systembacklivepoint"); + + if(! sb::mount(sb::isfile("/cdrom/casper/filesystem.squashfs") ? "/cdrom/casper/filesystem.squashfs" : "/lib/live/mount/medium/live/filesystem.squashfs", "/.systembacklivepoint", "loop")) return dialogopen(334); + + if(fcmp == 1) + { + if(! sb::isfile("/.systembacklivepoint/etc/fstab")) + --fcmp; + else if(sb::fload("/mnt/etc/fstab") == sb::fload("/.systembacklivepoint/etc/fstab")) + ++fcmp; + } + + if(intrrpt) return exit(); + rv = sb::srestore(mthd, nullptr, "/.systembacklivepoint", "/mnt", ui->autorepairoptions->isChecked() ? fcmp : ui->skipfstabrepair->isChecked()), + sb::umount("/.systembacklivepoint"), + rmdir("/.systembacklivepoint"); + } + else + { + if(fcmp == 1) + { + if(! sb::isfile(sb::sdir[1] % '/' % cpoint % '_' % pname % "/etc/fstab")) + --fcmp; + else if(sb::fload("/mnt/etc/fstab") == sb::fload(sb::sdir[1] % '/' % cpoint % '_' % pname % "/etc/fstab")) + ++fcmp; + } + + rv = sb::srestore(mthd, nullptr, sb::sdir[1] % '/' % cpoint % '_' % pname, "/mnt", ui->autorepairoptions->isChecked() ? fcmp : ui->skipfstabrepair->isChecked()); + } + + if(intrrpt) return exit(); + + if(rv) + { + if(ui->grubreinstallrepair->isVisibleTo(ui->repairpanel) && ! (ui->grubreinstallrepair->isEnabled() && ui->grubreinstallrepair->currentText() == tr("Disabled"))) + { + QSL mlst{"dev", "dev/pts", "proc", "sys"}; + for(cQStr &bpath : (sb::mcheck("/run") ? mlst << "/run" : mlst)) sb::mount('/' % bpath, "/mnt/" % bpath); + sb::exec("chroot /mnt update-grub"); + if(intrrpt) return exit(); + if((fcmp < 2 || ! (ui->autorepairoptions->isChecked() || ui->grubreinstallrepair->currentText() == "Auto")) && sb::exec("chroot /mnt grub-install --force " % (grub.isEFI ? nullptr : ui->autorepairoptions->isChecked() || ui->grubreinstallrepair->currentText() == "Auto" ? sb::gdetect("/mnt") : ui->grubreinstallrepair->currentText()))) dialog = ui->fullrepair->isChecked() ? 310 : 304; + mlst.move(0, 1); + for(cQStr &pend : mlst) sb::umount("/mnt/" % pend); + if(intrrpt) return exit(); + } + + emptycache(); + + if(sb::like(dialog, {101, 102})) + { + if(ppipe && sb::isdir(sb::sdir[1]) && sb::access(sb::sdir[1], sb::Write)) sb::crtfile(sb::sdir[1] % "/.sbschedule"); + dialog = ui->fullrepair->isChecked() ? 202 : 203; + } + } + else + dialog = 339; + } + + dialogopen(); +} + +void systemback::systemcopy() +{ + statustart(), pset(ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 8 : 9); + + auto err([this](ushort dlg = 0, cbstr &dev = nullptr) { + if(! (intrrpt || (dlg && sb::like(dlg, {308, 314, 315, 317, 330, 331, 332, 333})))) dlg = [this] { + if(sb::dfree("/.sbsystemcopy") > 104857600 && (! sb::isdir("/.sbsystemcopy/home") || sb::dfree("/.sbsystemcopy/home") > 104857600) && (! sb::isdir("/.sbsystemcopy/boot") || sb::dfree("/.sbsystemcopy/boot") > 52428800) && (! sb::isdir("/.sbsystemcopy/boot/efi") || sb::dfree("/.sbsystemcopy/boot/efi") > 10485760)) + { + irblck = true; + return ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 320 : 321; + } + else + return ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 307 : 316; + }(); + + { + QStr mnts(sb::fload("/proc/self/mounts", true)); + QTS in(&mnts, QIODevice::ReadOnly); + QSL incl{"* /.sbsystemcopy*", "* /.sbmountpoints*", "* /.systembacklivepoint *"}; + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + if(sb::like(cline, incl)) sb::umount(cline.split(' ').at(1)); + } + } + + if(sb::isdir("/.sbmountpoints")) + { + for(cQStr &item : QDir("/.sbmountpoints").entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)) rmdir(bstr("/.sbmountpoints/" % item)); + rmdir("/.sbmountpoints"); + } + + rmdir("/.sbsystemcopy"); + if(sb::isdir("/.systembacklivepoint")) rmdir("/.systembacklivepoint"); + + if(intrrpt) + intrrpt = false; + else + { + if(irblck) irblck = false; + dialogopen(dlg, dev); + } + }); + + if(! (sb::isdir("/.sbsystemcopy") || sb::crtdir("/.sbsystemcopy"))) return err(); + + { + QSL msort; + msort.reserve(ui->partitionsettings->rowCount() - 1); + + for(ushort a(0) ; a < ui->partitionsettings->rowCount() ; ++a) + { + QStr nmpt(ui->partitionsettings->item(a, 4)->text()); + + if(! (nmpt.isEmpty() || (nohmcpy[1] && nmpt == "/home"))) + msort.append(nmpt % '\n' % (ui->partitionsettings->item(a, 6)->text() == "x" ? ui->partitionsettings->item(a, 5)->text() : ui->partitionsettings->item(a, 5)->text() == "btrfs" ? "-b" : "-") % '\n' % ui->partitionsettings->item(a, 0)->text()); + } + + msort.sort(); + QSL ckd; + ckd.reserve(msort.count()); + + for(cQStr &vals : msort) + { + QSL cval(vals.split('\n')); + cQStr &mpoint(cval.at(0)), &fstype(cval.at(1)), &part(cval.at(2)); + if(! ckd.contains(part) && sb::mcheck(part) && (! (grub.isEFI && mpoint == "/boot/efi") || fstype.length() > 2)) sb::umount(part); + if(intrrpt) return err(); + sb::fssync(); + if(intrrpt) return err(); + + if(fstype.length() > 2) + { + QStr lbl("SB@" % (mpoint.startsWith('/') ? sb::right(mpoint, -1) : mpoint)); + + uchar rv(fstype == "swap" ? sb::exec("mkswap -L " % lbl % ' ' % part) + : fstype == "jfs" ? sb::exec("mkfs.jfs -qL " % lbl % ' ' % part) + : fstype == "reiserfs" ? sb::exec("mkfs.reiserfs -ql " % lbl % ' ' % part) + : fstype == "xfs" ? sb::exec("mkfs.xfs -fL " % lbl % ' ' % part) + : fstype == "vfat" ? sb::setpflag(part, "boot") ? sb::exec("mkfs.vfat -F 32 -n " % lbl.toUpper() % ' ' % part) : 255 + : fstype == "btrfs" ? (ckd.contains(part) ? 0 : sb::exec("mkfs.btrfs -fL " % lbl % ' ' % part)) ? sb::exec("mkfs.btrfs -L " % lbl % ' ' % part) : 0 + : sb::exec("mkfs." % fstype % " -FL " % lbl % ' ' % part)); + + if(intrrpt) return err(); + if(rv) return err(ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 317 : 331, part); + } + + if(mpoint != "SWAP") + { + if(! sb::isdir("/.sbsystemcopy" % mpoint)) + { + QStr path("/.sbsystemcopy"); + + for(cQStr &cpath : mpoint.split('/')) + if(! (sb::isdir(path.append('/' % cpath)) || sb::crtdir(path))) + { + sb::rename(path, path % '_' % sb::rndstr()); + if(! sb::crtdir(path)) return err(); + } + } + + if(intrrpt) return err(); + + if(fstype.length() == 2 || fstype == "btrfs") + { + QStr mpt("/.sbmountpoints"), sv('@' % sb::right(mpoint, -1).replace('/', '_')); + + for(uchar a(0) ; a < 4 ; ++a) + switch(a) { + case 0 ... 1: + if(! sb::isdir(mpt)) + { + if(sb::exist(mpt)) sb::remove(mpt); + if(! sb::crtdir(mpt)) return err(); + } + + if(! a) + mpt.append('/' % sb::right(part, -sb::rinstr(part, "/"))); + else if(! ckd.contains(part)) + { + if(sb::mount(part, mpt)) + ckd.append(part); + else + return err(ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 314 : 330, part); + } + + break; + case 2 ... 3: + sb::exec("btrfs subvolume create " % mpt % '/' % sv); + if(intrrpt) return err(); + + if(sb::mount(part, "/.sbsystemcopy" % mpoint, "noatime,subvol=" % sv)) + ++a; + else if(a == 3 || ! sb::rename(mpt % '/' % sv, mpt % '/' % sv % '_' % sb::rndstr())) + return err(ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 314 : 330, part); + } + } + else if(! sb::mount(part, "/.sbsystemcopy" % mpoint)) + return err(ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 314 : 330, part); + } + + if(intrrpt) return err(); + } + } + + auto cfgwrt([](bool rpnt = true) { + if(rpnt && ! (sb::copy(excfile, "/.sbsystemcopy" excfile) && sb::copy(incfile, "/.sbsystemcopy" incfile))) return false; + return sb::cfgwrite("/.sbsystemcopy" cfgfile); + }); + + if(! ppipe) + { + if(pname == tr("Live image")) + { + if(! (sb::isdir("/.systembacklivepoint") || sb::crtdir("/.systembacklivepoint"))) + { + sb::rename("/.systembacklivepoint", "/.systembacklivepoint_" % sb::rndstr()); + if(! sb::crtdir("/.systembacklivepoint") || intrrpt) return err(); + } + + if(! sb::mount(sb::isfile("/cdrom/casper/filesystem.squashfs") ? "/cdrom/casper/filesystem.squashfs" : "/lib/live/mount/medium/live/filesystem.squashfs", "/.systembacklivepoint", "loop")) return err(ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 332 : 333); + if(intrrpt) return err(); + + if(ui->usersettingscopy->isVisibleTo(ui->copypanel)) + { + if(! sb::scopy([this] { + switch(ui->usersettingscopy->checkState()) { + case Qt::Unchecked: + return 5; + case Qt::PartiallyChecked: + return 3; + default: + return 4; + } + }(), guname(), "/.systembacklivepoint")) return err(); + } + else if(! (sb::scopy(nohmcpy[1] ? 0 : ui->userdatafilescopy->isChecked() ? 1 : 2, nullptr, "/.systembacklivepoint") && cfgwrt())) + return err(); + + sb::umount("/.systembacklivepoint"), + rmdir("/.systembacklivepoint"); + } + else if(ui->usersettingscopy->isVisibleTo(ui->copypanel)) + { + if(! sb::scopy([this] { + switch(ui->usersettingscopy->checkState()) { + case Qt::Unchecked: + return 5; + case Qt::PartiallyChecked: + return 3; + default: + return 4; + } + }(), guname(), nullptr)) return err(); + } + else if(! (sb::scopy(nohmcpy[1] ? 0 : ui->userdatafilescopy->isChecked() ? 1 : 2, nullptr, nullptr) && cfgwrt(false))) + return err(); + } + else if(ui->usersettingscopy->isVisibleTo(ui->copypanel)) + { + if(! sb::scopy(ui->usersettingscopy->isChecked() ? 4 : 5, guname(), sb::sdir[1] % '/' % cpoint % '_' % pname)) return err(); + } + else if(! (sb::scopy(nohmcpy[1] ? 0 : ui->userdatafilescopy->isChecked() ? 1 : 2, nullptr, sb::sdir[1] % '/' % cpoint % '_' % pname) && cfgwrt())) + return err(); + + if(intrrpt) return err(); + sb::Progress = -1; + + if(ui->usersettingscopy->isVisibleTo(ui->copypanel)) + { + if(sb::exec("chroot /.sbsystemcopy sh -c \"for rmuser in $(grep :\\$6\\$* /etc/shadow | cut -d : -f 1) ; do [ $rmuser = " % guname() % " ] || [ $rmuser = root ] || userdel $rmuser ; done\"")) return err(); + QStr nfile; + + if(guname() != "root") + { + QStr nuname(ui->username->text()); + + if(guname() != nuname) + { + if(sb::isdir("/.sbsystemcopy/home/" % guname()) && ((sb::exist("/.sbsystemcopy/home/" % nuname) && ! sb::rename("/.sbsystemcopy/home/" % nuname, "/.sbsystemcopy/home/" % nuname % '_' % sb::rndstr())) || ! sb::rename("/.sbsystemcopy/home/" % guname(), "/.sbsystemcopy/home/" % nuname))) return err(); + + if(sb::isfile("/.sbsystemcopy/home/" % nuname % "/.config/gtk-3.0/bookmarks")) + { + QStr cnt(sb::fload("/.sbsystemcopy/home/" % nuname % "/.config/gtk-3.0/bookmarks")); + if(cnt.contains("file:///home/" % guname() % '/') && ! sb::crtfile("/.sbsystemcopy/home/" % nuname % "/.config/gtk-3.0/bookmarks", cnt.replace("file:///home/" % guname() % '/', "file:///home/" % nuname % '/'))) return err(); + } + + if(sb::isfile("/.sbsystemcopy/etc/subuid") && sb::isfile("/.sbsystemcopy/etc/subgid")) + { + { + QFile file("/.sbsystemcopy/etc/subuid"); + if(! sb::fopen(file)) return err(); + + while(! file.atEnd()) + { + QStr nline(file.readLine().trimmed()); + if(nline.startsWith(guname() % ':')) nline.replace(0, guname().length(), nuname); + nfile.append(nline % '\n'); + if(intrrpt) return err(); + } + } + + if(! sb::crtfile("/.sbsystemcopy/etc/subuid", nfile)) return err(); + nfile.clear(); + + { + QFile file("/.sbsystemcopy/etc/subgid"); + if(! sb::fopen(file)) return err(); + + while(! file.atEnd()) + { + QStr nline(file.readLine().trimmed()); + if(nline.startsWith(guname() % ':')) nline.replace(0, guname().length(), nuname); + nfile.append(nline % '\n'); + if(intrrpt) return err(); + } + } + + if(! sb::crtfile("/.sbsystemcopy/etc/subgid", nfile)) return err(); + nfile.clear(); + } + } + + for(cQStr &cfname : {"/.sbsystemcopy/etc/group", "/.sbsystemcopy/etc/gshadow"}) + { + QFile file(cfname); + if(! sb::fopen(file)) return err(); + + while(! file.atEnd()) + { + QStr nline(file.readLine().trimmed()); + + if(nline.startsWith("sudo:") && ui->rootpassword1->text().isEmpty() && ! sb::right(nline, -sb::rinstr(nline, ":")).split(',').contains(guname())) + nline.append((nline.endsWith(':') ? nullptr : ",") % nuname); + else if(guname() != nuname) + { + if(nline.startsWith(guname() % ':')) nline.replace(0, guname().length(), nuname); + nline.replace(':' % guname() % ',', ':' % nuname % ','), nline.replace(',' % guname() % ',', ',' % nuname % ','); + if(sb::like(nline, {"*:" % guname() % '_', "*," % guname() % '_'})) nline.replace(nline.length() - guname().length(), guname().length(), nuname); + } + + nfile.append(nline % '\n'); + if(intrrpt) return err(); + } + + if(! sb::crtfile(cfname , nfile)) return err(); + nfile.clear(), qApp->processEvents(); + } + + QFile file("/.sbsystemcopy/etc/passwd"); + if(! sb::fopen(file)) return err(); + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + + nfile.append((! cline.startsWith(guname() % ':') ? cline : [&] { + QSL uslst(cline.split(':')); + QStr nline; + + for(uchar a(0) ; a < uslst.count() ; ++a) + nline.append([&, a]() -> QStr { + switch(a) { + case 0: + return nuname; + case 4: + return ui->fullname->text() % ",,,"; + case 5: + return "/home/" % nuname; + default: + return uslst.at(a); + } + }() % ':'); + + return sb::left(nline, -1); + }()) % '\n'); + + if(intrrpt) return err(); + } + + if(! sb::crtfile("/.sbsystemcopy/etc/passwd", nfile)) return err(); + nfile.clear(); + } + + { + QFile file("/.sbsystemcopy/etc/shadow"); + if(! sb::fopen(file)) return err(); + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + + nfile.append((cline.startsWith(guname() % ':') ? [&] { + QSL uslst(cline.split(':')); + QStr nline; + + for(uchar a(0) ; a < uslst.count() ; ++a) + nline.append([&, a]() -> QStr { + switch(a) { + case 0: + return guname() == "root" ? "root" : ui->username->text(); + case 1: + return QStr(crypt(bstr(ui->password1->text()), bstr("$6$" % sb::rndstr(16)))); + default: + return uslst.at(a); + } + }() % ':'); + + return sb::left(nline, -1); + }() : cline.startsWith("root:") ? [&] { + QSL uslst(cline.split(':')); + QStr nline; + + for(uchar a(0) ; a < uslst.count() ; ++a) + nline.append([&, a]() -> QStr { + switch(a) { + case 1: + return ui->rootpassword1->text().isEmpty() ? "!" : QStr(crypt(bstr(ui->rootpassword1->text()), bstr("$6$" % sb::rndstr(16)))); + default: + return uslst.at(a); + } + }() % ':'); + + return sb::left(nline, -1); + }() : cline) % '\n'); + + if(intrrpt) return err(); + } + } + + if(! sb::crtfile("/.sbsystemcopy/etc/shadow", nfile)) return err(); + nfile.clear(); + + { + QFile file("/.sbsystemcopy/etc/hostname"); + if(! sb::fopen(file)) return err(); + QStr ohname(file.readLine().trimmed()), nhname(ui->hostname->text()); + file.close(); + + if(ohname != nhname) + { + if(! sb::crtfile("/.sbsystemcopy/etc/hostname", nhname % '\n')) return err(); + file.setFileName("/.sbsystemcopy/etc/hosts"); + if(! sb::fopen(file)) return err(); + + while(! file.atEnd()) + { + QStr nline(file.readLine().trimmed()); + nline.replace('\t' % ohname % '\t', '\t' % nhname % '\t'); + if(nline.endsWith('\t' % ohname)) nline.replace(nline.length() - ohname.length(), ohname.length(), nhname); + nfile.append(nline % '\n'); + if(intrrpt) return err(); + } + + if(! sb::crtfile("/.sbsystemcopy/etc/hosts", nfile)) return err(); + nfile.clear(); + } + } + + for(uchar a(0) ; a < 5 ; ++a) + { + QStr fpath("/.sbsystemcopy/etc/" % [a]() -> QStr { + switch(a) { + case 0: + return "lightdm/lightdm.conf"; + case 1: + return "kde4/kdm/kdmrc"; + case 2: + return "sddm.conf"; + case 3: + return "gdm/custom.conf"; + case 4: + return "gdm3/daemon.conf"; + default: + return "mdm/mdm.conf"; + } + }()); + + if(sb::isfile(fpath)) + { + QFile file(fpath); + if(! sb::fopen(file)) return err(); + uchar mdfd(0); + + QSL incl([a]() -> QSL { + switch(a) { + case 0: + return {"_autologin-user=*"}; + case 1: + return {"_AutoLoginUser=*"}; + case 2: + return {"_User=*", "_HideUsers=*"}; + default: + return {"_AutomaticLogin=*", "_TimedLogin=*"}; + } + }()); + + while(! file.atEnd()) + { + QStr nline(file.readLine().trimmed()); + + if(sb::like(nline, incl)) + if(! nline.endsWith('=')) + { + bool algn(nline.endsWith('=' % guname()) && ! (a == 2 && nline.startsWith("HideUsers="))); + nline = sb::left(nline, sb::instr(nline, "=")); + + if(algn) + { + nline.append(ui->username->text()); + if(! mdfd) ++mdfd; + } + else + switch(a) { + case 1: + if(mdfd < 2) mdfd = 2; + break; + case 3 ... 5: + if(mdfd < 4) mdfd = nline.at(0) == 'A' ? mdfd == 3 ? 4 : 2 : mdfd == 2 ? 4 : 3; + break; + default: + if(! mdfd) ++mdfd; + } + } + + nfile.append(nline % '\n'); + if(intrrpt) return err(); + } + + if(mdfd) + { + switch(a) { + case 1: + if(mdfd == 2) nfile.replace("AutoLoginEnabled=true", "AutoLoginEnabled=false"); + break; + case 3 ... 5: + if(mdfd > 1) + { + if(sb::like(mdfd, {2, 4})) nfile.replace("AutomaticLoginEnable=true", "AutomaticLoginEnable=false"); + if(sb::like(mdfd, {3, 4})) nfile.replace("TimedLoginEnable=true", "TimedLoginEnable=false"); + } + } + + if(! sb::crtfile(fpath, nfile)) return err(); + } + + nfile.clear(), qApp->processEvents(); + } + } + + QBA mid(sb::rndstr(16).toUtf8().toHex() % '\n'); + if(intrrpt || ! (sb::crtfile("/.sbsystemcopy/etc/machine-id", mid) && cfmod("/.sbsystemcopy/etc/machine-id", 0444)) || (sb::isdir("/.sbsystemcopy/var/lib/dbus") && ! sb::crtfile("/.sbsystemcopy/var/lib/dbus/machine-id", mid))) return err(); + } + + { + QStr fstabtxt("# /etc/fstab: static file system information.\n#\n# Use 'blkid' to print the universally unique identifier for a\n# device; this may be used with UUID= as a more robust way to name devices\n# that works even if disks are added and removed. See fstab(5).\n#\n# \n"); + + for(ushort a(0) ; a < ui->partitionsettings->rowCount() ; ++a) + { + QStr nmpt(ui->partitionsettings->item(a, 4)->text()); + + if(! nmpt.isEmpty()) + { + if(nohmcpy[1] && nmpt == "/home") + { + QFile file("/etc/fstab"); + if(! sb::fopen(file)) return err(); + QSL incl{"* /home *", "* /home/ *"}; + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + + if(! cline.startsWith('#') && sb::like(cline.replace('\t', ' '), incl)) + { + fstabtxt.append("# /home\n" % cline % '\n'); + break; + } + } + } + else + { + QStr uuid(sb::ruuid(ui->partitionsettings->item(a, 0)->text())), nfs(ui->partitionsettings->item(a, 5)->text()); + + fstabtxt.append("# " % (nmpt == "SWAP" ? QStr("SWAP\nUUID=" % uuid % " none swap sw 0 0") + : nmpt % "\nUUID=" % uuid % " " % nmpt % " " % nfs % " noatime" + % (nmpt == "/" ? QStr(nfs == "reiserfs" ? ",notail" : nfs == "btrfs" ? ",subvol=@" : ",errors=remount-ro") % " 0 1" + : nmpt == "/boot/efi" ? QStr(",umask=0077 0 1") + : (nfs == "reiserfs" ? ",notail" : nfs == "btrfs" ? QStr(",subvol=@" % sb::right(nmpt, -1).replace('/', '_')) : nullptr) % " 0 2")) % '\n'); + } + } + + if(intrrpt) return err(); + } + + if(sb::isfile("/etc/fstab")) + { + QFile file("/etc/fstab"); + if(! sb::fopen(file)) return err(); + QSL incl{"*/dev/cdrom*", "*/dev/sr*"}; + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + if(! cline.startsWith('#') && sb::like(cline, incl)) fstabtxt.append("# cdrom\n" % cline % '\n'); + if(intrrpt) return err(); + } + } + + if(! sb::crtfile("/.sbsystemcopy/etc/fstab", fstabtxt)) return err(); + } + + { + QStr cfpath(ppipe ? QStr(sb::sdir[1] % '/' % cpoint % '_' % pname % "/etc/crypttab") : "/etc/crypttab"); + + if(sb::isfile(cfpath)) + { + QFile file(cfpath); + if(! sb::fopen(file)) return err(); + + while(! file.atEnd()) + { + QBA cline(file.readLine().trimmed()); + + if(! cline.startsWith('#') && cline.contains("UUID=")) + { + if(intrrpt || ! sb::crtfile("/.sbsystemcopy/etc/mtab") || sb::exec("chroot /.sbsystemcopy update-initramfs -tck all")) return err(); + break; + } + } + } + } + + if(ui->grubinstallcopy->isVisibleTo(ui->copypanel)) + { + if(intrrpt) return err(); + { QSL mlst{"dev", "dev/pts", "proc", "sys"}; + for(cQStr &bpath : (sb::mcheck("/run") ? mlst << "/run" : mlst)) sb::mount('/' % bpath, "/.sbsystemcopy/" % bpath); } + + if(ui->grubinstallcopy->currentText() == tr("Disabled")) + sb::exec("chroot /.sbsystemcopy update-grub"); + else if(sb::exec("chroot /.sbsystemcopy sh -c \"update-grub ; grub-install --force " % (grub.isEFI ? nullptr : ui->grubinstallcopy->currentText() == "Auto" ? sb::gdetect("/.sbsystemcopy") : ui->grubinstallcopy->currentText()) % '\"')) + return err(ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 308 : 315); + } + + if(intrrpt) return err(); + pset(1); + + { + QStr mnts(sb::fload("/proc/self/mounts", true)); + QTS in(&mnts, QIODevice::ReadOnly); + QSL incl{"* /.sbsystemcopy*", "* /.sbmountpoints*"}; + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + if(sb::like(cline, incl)) sb::umount(cline.split(' ').at(1)); + } + } + + if(sb::isdir("/.sbmountpoints")) + { + for(cQStr &item : QDir("/.sbmountpoints").entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot)) rmdir(bstr("/.sbmountpoints/" % item)); + rmdir("/.sbmountpoints"); + } + + rmdir("/.sbsystemcopy"), + sb::fssync(); + if(sb::ecache) sb::crtfile("/proc/sys/vm/drop_caches", "3"); + dialogopen(ui->userdatafilescopy->isVisibleTo(ui->copypanel) ? 206 : 209); +} + +void systemback::livewrite() +{ + statustart(), pset(10); + QStr ldev(ui->livedevices->item(ui->livedevices->currentRow(), 0)->text()); + bool ismmc(ldev.contains("mmc")); + + auto err([&, ismmc](ushort dlg = 336) { + if(sb::isdir("/.sblivesystemwrite")) + { + if(sb::mcheck("/.sblivesystemwrite/sblive")) sb::umount("/.sblivesystemwrite/sblive"); + rmdir("/.sblivesystemwrite/sblive"); + + if(sb::isdir("/.sblivesystemwrite/sbroot")) + { + if(sb::mcheck("/.sblivesystemwrite/sbroot")) sb::umount("/.sblivesystemwrite/sbroot"); + rmdir("/.sblivesystemwrite/sbroot"); + } + + rmdir("/.sblivesystemwrite"); + } + + if(intrrpt) + intrrpt = false; + else + dialogopen(dlg, sb::like(dlg, {337, 338}) ? bstr(ldev % (ismmc ? "p" : nullptr) % '1') : nullptr); + }); + + if(! sb::exist(ldev)) + return err(338); + else if(sb::mcheck(ldev)) + { + for(cQStr &sitem : QDir("/dev").entryList(QDir::System)) + { + QStr item("/dev/" % sitem); + + if(item.length() > (ismmc ? 12 : 8) && item.startsWith(ldev)) + while(sb::mcheck(item)) sb::umount(item); + + if(intrrpt) return err(); + } + + if(sb::mcheck(ldev)) sb::umount(ldev); + sb::fssync(); + if(intrrpt) return err(); + } + + if(! sb::mkptable(ldev) || intrrpt) return err(338); + sb::delay(100); + QStr lrdir; + + { + ullong isize(sb::fsize(sb::sdir[2] % '/' % sb::left(ui->livelist->currentItem()->text(), sb::instr(ui->livelist->currentItem()->text(), " ") - 1) % ".sblive")); + + if(isize < 4294967295) + { + if(! sb::mkpart(ldev) || intrrpt) return err(338); + sb::delay(100), + lrdir = "sblive"; + } + else + { + if(! (sb::mkpart(ldev, 1048576, 104857600) && sb::mkpart(ldev)) || intrrpt) return err(338); + sb::delay(100); + if(sb::exec("mkfs.ext2 -FL SBROOT " % ldev % (ismmc ? "p" : nullptr) % '2') || intrrpt) return err(338); + lrdir = "sbroot"; + } + + if(sb::exec("mkfs.vfat -F 32 -n SBLIVE " % ldev % (ismmc ? "p" : nullptr) % '1') || intrrpt) return err(338); + + if(sb::exec("dd if=/usr/lib/syslinux/" % QStr(sb::isfile("/usr/lib/syslinux/mbr.bin") ? nullptr : "mbr/") % "mbr.bin of=" % ldev % " conv=notrunc bs=440 count=1") || ! sb::setpflag(ldev % (ismmc ? "p" : nullptr) % '1', "boot lba") + || intrrpt || (sb::exist("/.sblivesystemwrite") && (((sb::mcheck("/.sblivesystemwrite/sblive") && ! sb::umount("/.sblivesystemwrite/sblive")) || (sb::mcheck("/.sblivesystemwrite/sbroot") && ! sb::umount("/.sblivesystemwrite/sbroot"))) || ! sb::remove("/.sblivesystemwrite"))) + || intrrpt || ! (sb::crtdir("/.sblivesystemwrite") && sb::crtdir("/.sblivesystemwrite/sblive")) + || intrrpt) return err(); + + sb::delay(100); + if(! sb::mount(ldev % (ismmc ? "p" : nullptr) % '1', "/.sblivesystemwrite/sblive") || intrrpt) return err(337); + + if(lrdir == "sbroot") + { + if(! sb::crtdir("/.sblivesystemwrite/sbroot")) return err(); + if(! sb::mount(ldev % (ismmc ? "p" : nullptr) % '2', "/.sblivesystemwrite/sbroot") || intrrpt) return err(337); + } + + if(sb::dfree("/.sblivesystemwrite/" % lrdir) < isize + 52428800) return err(322); + sb::ThrdStr[0] = "/.sblivesystemwrite", sb::ThrdLng[0] = isize; + } + + if(lrdir == "sblive") + { + if(sb::exec("tar -xf \"" % sb::sdir[2] % "\"/" % sb::left(ui->livelist->currentItem()->text(), sb::instr(ui->livelist->currentItem()->text(), " ") - 1) % ".sblive -C /.sblivesystemwrite/sblive --no-same-owner --no-same-permissions", sb::Prgrss)) return err(323); + } + else if(sb::exec("tar -xf \"" % sb::sdir[2] % "\"/" % sb::left(ui->livelist->currentItem()->text(), sb::instr(ui->livelist->currentItem()->text(), " ") - 1) % ".sblive -C /.sblivesystemwrite/sblive --exclude=casper/filesystem.squashfs --exclude=live/filesystem.squashfs --no-same-owner --no-same-permissions") || sb::exec("tar -xf \"" % sb::sdir[2] % "\"/" % sb::left(ui->livelist->currentItem()->text(), sb::instr(ui->livelist->currentItem()->text(), " ") - 1) % ".sblive -C /.sblivesystemwrite/sbroot --exclude=.disk --exclude=boot --exclude=EFI --exclude=syslinux --exclude=casper/initrd.gz --exclude=casper/vmlinuz --exclude=live/initrd.gz --exclude=live/vmlinuz --no-same-owner --no-same-permissions", sb::Prgrss)) + return err(323); + + pset(1); + if(sb::exec("syslinux -ifd syslinux " % ldev % (ismmc ? "p" : nullptr) % '1')) return err(); + sb::fssync(); + if(sb::ecache) sb::crtfile("/proc/sys/vm/drop_caches", "3"); + sb::umount("/.sblivesystemwrite/sblive"), + rmdir("/.sblivesystemwrite/sblive"); + + if(lrdir == "sbroot") + { + sb::umount("/.sblivesystemwrite/sbroot"); + rmdir("/.sblivesystemwrite/sbroot"); + } + + rmdir("/.sblivesystemwrite"), + dialogopen(210); +} + +void systemback::dialogopen(ushort dlg, cbstr &dev) +{ + if(ui->dialognumber->isVisibleTo(ui->dialogpanel)) ui->dialognumber->hide(); + + if(! dlg) + dlg = dialog; + else if(dialog != dlg) + dialog = dlg; + + if(dlg < 200) + { + for(QWdt wdgt : QWL{ui->dialoginfo, ui->dialogerror}) + if(wdgt->isVisibleTo(ui->dialogpanel)) wdgt->hide(); + + for(QWdt wdgt : QWL{ui->dialogquestion, ui->dialogcancel}) + if(! wdgt->isVisibleTo(ui->dialogpanel)) wdgt->show(); + + if(ui->dialogok->text() != tr("Start")) ui->dialogok->setText(tr("Start")); + + ui->dialogtext->setText([this, dlg]() -> QStr { + switch(dlg) { + case 100: + return tr("Restore the system files to the following restore point:") % "

" % pname; + case 101: + return tr("Repair the system files with the following restore point:") % "

" % pname; + case 102: + return tr("Repair the complete system with the following restore point:") % "

" % pname; + case 103: + return tr("Restore the complete user(s) configuration files to the following restore point:") % "

" % pname; + case 104: + return tr("Restore the user(s) configuration files to the following restore point:") % "

" % pname; + case 105: + return tr("Copy the system, using the following restore point:") % "

" % pname; + case 106: + return tr("Install the system, using the following restore point:") % "

" % pname; + case 107: + return tr("Restore the complete system to the following restore point:") % "

" % pname; + case 108: + return tr("Format the %1, and write the following Live system image:").arg(" " % ui->livedevices->item(ui->livedevices->currentRow(), 0)->text() % "") % "

" % sb::left(ui->livelist->currentItem()->text(), sb::instr(ui->livelist->currentItem()->text(), " ") - 1) % ""; + default: + return tr("Repair the GRUB 2 bootloader."); + } + }()); + } + else + { + for(QWdt wdgt : QWL{ui->dialogquestion, ui->dialogcancel}) + if(wdgt->isVisibleTo(ui->dialogpanel)) wdgt->hide(); + + if(dlg < 300) + { + if(ui->dialogerror->isVisibleTo(ui->dialogpanel)) ui->dialogerror->hide(); + if(! ui->dialoginfo->isVisibleTo(ui->dialogpanel)) ui->dialoginfo->show(); + bool cntd(false); + + ui->dialogtext->setText([&, dlg]() -> QStr { + switch(dlg) { + case 200: + if(ui->dialogok->text() != tr("X restart")) ui->dialogok->setText(tr("X restart")); + for(QWdt wdgt : QWL{ui->dialogcancel, ui->dialognumber}) wdgt->show(); + cntd = true; + return tr("The user(s) configuration files full restoration are completed.") % "

" % tr("The X server will restart automatically within 30 seconds."); + case 201: + if(ui->dialogok->text() != tr("X restart")) ui->dialogok->setText(tr("X restart")); + for(QWdt wdgt : QWL{ui->dialogcancel, ui->dialognumber}) wdgt->show(); + cntd = true; + return tr("The user(s) configuration files restoration are completed.") % "

" % tr("The X server will restart automatically within 30 seconds."); + case 202: + if(ui->dialogok->text() != "OK") ui->dialogok->setText("OK"); + return tr("The full system repair is completed."); + case 203: + if(ui->dialogok->text() != "OK") ui->dialogok->setText("OK"); + return tr("The system repair is completed."); + case 204: + if(ui->dialogok->text() != tr("Reboot")) ui->dialogok->setText(tr("Reboot")); + for(QWdt wdgt : QWL{ui->dialogcancel, ui->dialognumber}) wdgt->show(); + cntd = true; + return tr("The system files restoration are completed.") % "

" % tr("The computer will restart automatically within 30 seconds."); + case 205: + if(ui->dialogok->text() != tr("Reboot")) ui->dialogok->setText(tr("Reboot")); + for(QWdt wdgt : QWL{ui->dialogcancel, ui->dialognumber}) wdgt->show(); + cntd = true; + return tr("The full system restoration is completed.") % "

" % tr("The computer will restart automatically within 30 seconds."); + case 206: + if(ui->dialogok->text() != "OK") ui->dialogok->setText("OK"); + return tr("The system copy is completed."); + case 207: + if(ui->dialogok->text() != "OK") ui->dialogok->setText("OK"); + return tr("The Live system creation is completed.") % "

" % tr("The created .sblive file can be written to pendrive."); + case 208: + if(ui->dialogok->text() != "OK") ui->dialogok->setText("OK"); + return tr("The GRUB 2 repair is completed."); + case 209: + if(ui->dialogok->text() != "OK") ui->dialogok->setText("OK"); + return tr("The system install is completed."); + case 210: + if(ui->dialogok->text() != "OK") ui->dialogok->setText("OK"); + return tr("The Live system image write is completed."); + default: + ui->dialogok->setText(tr("Reboot")); + for(QWdt wdgt : QWL{ui->dialogcancel, ui->dialognumber}) wdgt->show(); + cntd = true; + return tr("The computer will restart automatically within 30 seconds."); + } + }()); + + if(cntd) + { + connect(dlgtimer = new QTimer, +#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) + SIGNAL(timeout()), this, SLOT(dialogtimer()) +#else + &QTimer::timeout, this, &systemback::dialogtimer +#endif + ); + + dlgtimer->start(1000); + } + } + else + { + if(! sb::eout.isEmpty()) sb::error(sb::eout); + if(ui->dialoginfo->isVisibleTo(ui->dialogpanel)) ui->dialoginfo->hide(); + if(! ui->dialogerror->isVisibleTo(ui->dialogpanel)) ui->dialogerror->show(); + if(ui->dialogok->text() != "OK") ui->dialogok->setText("OK"); + + ui->dialogtext->setText([&, dlg]() -> QStr { + switch(dlg) { + case 300: + return tr("An another Systemback process is currently running, please wait until it finishes."); + case 301: + return tr("Unable to get exclusive lock!") % "

" % tr("First, close all package manager."); + case 302: + return tr("The re-synchronization of package index files currently in progress, please wait until it finishes."); + case 303: + return tr("The specified name contain(s) unsupported character(s)!") % "

" % tr("Please enter a new name."); + case 304: + return tr("The system files repair are completed, but an error occurred while reinstalling the GRUB!") % ' ' % tr("The system may not bootable! (In general, the different architecture is causing the problem.)"); + case 305: + return tr("The restore point creation is aborted!") % "

" % tr("Not enough free disk space to complete the process."); + case 306: + return tr("Root privileges are required for running the Systemback!"); + case 307: + return tr("The system copy is aborted!") % "

" % tr("The specified partition(s) does not have enough free space to copy the system. The copied system will not function properly."); + case 308: + return tr("The system copy is completed, but an error occurred while installing the GRUB!") % ' ' % tr("You need to manually install a bootloader."); + case 309: + return tr("The system restoration is aborted!") % "

" % tr("An error occurred while reinstalling the GRUB."); + case 310: + return tr("The full system repair is completed, but an error occurred while reinstalling the GRUB!") % ' ' % tr("The system may not bootable! (In general, the different architecture is causing the problem.)"); + case 311: + return tr("The Live system creation is aborted!") % "

" % tr("An error occurred while creating the file system image."); + case 312: + return tr("The Live system creation is aborted!") % "

" % tr("An error occurred while creating the container file."); + case 313: + return tr("The Live system creation is aborted!") % "

" % tr("Not enough free disk space to complete the process."); + case 314: + return tr("The system copy is aborted!") % "

" % tr("The specified partition could not be mounted.") % "

" % dev.data; + case 315: + return tr("The system install is completed, but an error occurred while installing the GRUB!") % ' ' % tr("You need to manually install a bootloader."); + case 316: + return tr("The system installation is aborted!") % "

" % tr("The specified partition(s) does not have enough free space to install the system. The installed system will not function properly."); + case 317: + return tr("The system copy is aborted!") % "

" % tr("The specified partition could not be formatted (in use or unavailable).") % "

" % dev.data; + case 318: + return tr("An error occurred while reinstalling the GRUB!") % ' ' % tr("The system may not bootable! (In general, the different architecture is causing the problem.)"); + case 319: + return tr("The restore point creation is aborted!") % "

" % tr("There has been critical changes in the file system during this operation."); + case 320: + return tr("The system copy is aborted!") % "

" % tr("There has been critical changes in the file system during this operation."); + case 321: + return tr("The system installation is aborted!") % "

" % tr("There has been critical changes in the file system during this operation."); + case 322: + return tr("The Live write is aborted!") % "

" % tr("The selected device does not have enough space to write the Live system."); + case 323: + return tr("The Live write is aborted!") % "

" % tr("An error occurred while unpacking the Live system files."); + case 324: + return tr("The Live conversion is aborted!") % "

" % tr("An error occurred while renaming the essential Live files."); + case 325: + return tr("The Live conversion is aborted!") % "

" % tr("An error occurred while creating the .iso image."); + case 326: + return tr("The Live conversion is aborted!") % "

" % tr("An error occurred while reading the .sblive image."); + case 327: + return tr("The Live system creation is aborted!") % "

" % tr("An error occurred while creating the new initramfs image."); + case 328: + return tr("The Live system creation is aborted!") % "

" % tr("There has been critical changes in the file system during this operation."); + case 329: + return tr("The restore point deletion is aborted!") % "

" % tr("An error occurred while during the process."); + case 330: + return tr("The system installation is aborted!") % "

" % tr("The specified partition could not be mounted.") % "

" % dev.data; + case 331: + return tr("The system installation is aborted!") % "

" % tr("The specified partition could not be formatted (in use or unavailable).") % "

" % dev.data; + case 332: + return tr("The system copy is aborted!") % "

" % tr("The Live image could not be mounted."); + case 333: + return tr("The system installation is aborted!") % "

" % tr("The Live image could not be mounted."); + case 334: + return tr("The system repair is aborted!") % "

" % tr("The Live image could not be mounted."); + case 335: + return tr("The Live conversion is aborted!") % "

" % tr("There has been critical changes in the file system during this operation."); + case 336: + return tr("The Live write is aborted!") % "

" % tr("There has been critical changes in the file system during this operation."); + case 337: + return tr("The Live write is aborted!") % "

" % tr("The specified partition could not be mounted.") % "

" % dev.data; + case 338: + return tr("The Live write is aborted!") % "

" % tr("The specified partition could not be formatted (in use or unavailable).") % "

" % dev.data; + case 339: + return tr("The system restoration is aborted!") % "

" % tr("There is not enough free space."); + default: + return tr("The system repair is aborted!") % "

" % tr("There is not enough free space."); + } + }()); + } + } + + for(QWdt wdgt : QWL{ui->mainpanel, ui->statuspanel, ui->schedulerpanel}) + if(wdgt->isVisibleTo(ui->wpanel)) wdgt->hide(); + + if(ui->dialogpanel->isHidden()) ui->dialogpanel->show(); + ui->dialogok->setFocus(); + + if(width() != ui->dialogpanel->width()) + { + if(utimer.isActive() && ! sstart) + windowmove(ui->dialogpanel->width(), ui->dialogpanel->height()); + else + { + if(sstart && ! (sb::like(dialog, {300, 301, 306}) || ui->function3->text().contains(' '))) ui->function3->setText("Systemback " % tr("scheduler")); + setFixedSize(wgeom[2] = ui->dialogpanel->width(), wgeom[3] = ui->dialogpanel->height()); + QRect sgm(sgeom()); + move(wgeom[0] = sgm.x() + sgm.width() / 2 - ss(253), wgeom[1] = sgm.y() + sgm.height() / 2 - ss(100)); + } + } + + if(ui->wpanel->isHidden()) ui->wpanel->show(), + ui->logo->setFocusPolicy(Qt::NoFocus); + + setwontop(); +} + +void systemback::setwontop(bool state) +{ + if(! (fscrn || sb::waot)) + { + XEvent ev; + ev.xclient.type = ClientMessage, + ev.xclient.message_type = XInternAtom(dsply, "_NET_WM_STATE", 0), + ev.xclient.display = dsply, + ev.xclient.window = winId(), + ev.xclient.format = 32, + ev.xclient.data.l[0] = state ? 1 : 0, + ev.xclient.data.l[1] = XInternAtom(dsply, "_NET_WM_STATE_ABOVE", 0); + Window win(XDefaultRootWindow(dsply)); + XSendEvent(dsply, win, 0, SubstructureRedirectMask | SubstructureNotifyMask, &ev), + ev.xclient.data.l[1] = XInternAtom(dsply, "_NET_WM_STATE_STAYS_ON_TOP", 0), + XSendEvent(dsply, win, 0, SubstructureRedirectMask | SubstructureNotifyMask, &ev), + XFlush(dsply); + } +} + +void systemback::windowmove(ushort nwidth, ushort nheight, bool fxdw) +{ + if(wismax) stschange(); + + if(wndw->size() != QSize(wgeom[2] = nwidth, wgeom[3] = nheight)) + { + { + QDW dtp(fscrn ? nullptr : qApp->desktop()); + QRect agm(sgeom(true, dtp)), sgm; + ushort frm(ss(30)); + + if(agm.width() >= wgeom[2] + frm) + { + sgm = sgeom(false, dtp); + short bnd(sgm.x() + frm); + + if((wgeom[0] = wndw->x() + (wndw->width() - wgeom[2]) / 2) < bnd) + wgeom[0] = bnd < agm.x() ? agm.x() : bnd; + else if(wgeom[0] < agm.x()) + wgeom[0] = agm.x(); + else + { + short bnd1; + + if(wgeom[0] > (bnd = sgm.x() + sgm.width() - wgeom[2] - frm)) + wgeom[0] = bnd > (bnd1 = agm.x() + agm.width() - wgeom[2]) ? bnd1 : bnd; + else if(wgeom[0] > (bnd1 = agm.x() + agm.width() - wgeom[2])) + wgeom[0] = bnd1; + } + } + else if(wgeom[0] != agm.x()) + wgeom[0] = agm.x(); + + if(agm.height() >= wgeom[3] + frm) + { + if(sgm.isEmpty()) sgm = sgeom(false, dtp); + short bnd(sgm.y() + frm); + + if((wgeom[1] = wndw->y() + (wndw->height() - wgeom[3]) / 2) < bnd) + wgeom[1] = bnd < agm.y() ? agm.y() : bnd; + else if(wgeom[1] < agm.y()) + wgeom[1] = agm.y(); + else + { + short bnd1; + + if(wgeom[1] > (bnd = sgm.y() + sgm.height() - wgeom[3] - frm)) + wgeom[1] = bnd > (bnd1 = agm.y() + agm.height() - wgeom[3]) ? bnd1 : bnd; + else if(wgeom[1] > (bnd1 = agm.y() + agm.height() - wgeom[3])) + wgeom[1] = bnd1; + } + } + else if(wgeom[1] != agm.y()) + wgeom[1] = agm.y(); + + wndw->setMinimumSize(0, 0), wndw->setMaximumSize(agm.width() < wndw->width() ? wndw->width() : agm.width(), agm.height() < wndw->height() ? wndw->height() : agm.height()); + } + + wmblck = true; + int vls[]{qAbs(wgeom[0] - wndw->x()) / 6, qAbs(wgeom[1] - wndw->y()) / 6, qAbs(wgeom[2] - wndw->width()) / 6, qAbs(wgeom[3] - wndw->height()) / 6}; + ui->resizepanel->show(); + + for(uchar a(0) ; a < 6 ; ++a) wndw->setGeometry(qAbs(wgeom[0] - wndw->x()) > vls[0] ? wndw->x() - (wgeom[0] < wndw->x() ? vls[0] : -vls[0]) : wgeom[0], qAbs(wgeom[1] - wndw->y()) > vls[1] ? wndw->y() - (wgeom[1] < wndw->y() ? vls[1] : -vls[1]) : wgeom[1], qAbs(wgeom[2] - wndw->width()) > vls[2] ? wndw->width() - (wgeom[2] < wndw->width() ? vls[2] : -vls[2]) : wgeom[2], qAbs(wgeom[3] - wndw->height()) > vls[3] ? wndw->height() - (wgeom[3] < wndw->height() ? vls[3] : -vls[3]) : wgeom[3]), + QThread::msleep(1), + repaint(); + + wndw->setGeometry(wgeom[0], wgeom[1], wgeom[2], wgeom[3]), + wmblck = false; + if(fxdw) wndw->setFixedSize(wgeom[2], wgeom[3]); + ui->resizepanel->hide(); + } + else if(fxdw && minimumSize() != maximumSize()) + wndw->setFixedSize(wgeom[2], wgeom[3]); +} + +void systemback::wmove() +{ + if(! wismax) + { + QPoint npos{QCursor::pos().x() - lblevent::MouseX, QCursor::pos().y() - lblevent::MouseY}; + + wndw->move(fscrn ? [&] { + QRect agm(sgeom(true)); + + return QPoint{agm.width() < wgeom[2] || npos.x() < 0 ? 0 : [&] { + short bpos; + return npos.x() > (bpos = width() - wgeom[2]) ? bpos : npos.x(); + }(), agm.height() < wgeom[3] || npos.y() < 0 ? 0 : [&] { + short bpos; + return npos.y() > (bpos = height() - wgeom[3]) ? bpos : npos.y(); + }()}; + }() : npos); + } +} + +void systemback::rmove() +{ + if(! wismax) + { + ushort sz(ss(31)); + wndw->resize(QCursor::pos().x() - wndw->x() + sz - lblevent::MouseX, QCursor::pos().y() - wndw->y() + sz - lblevent::MouseY); + } +} + +void systemback::on_functionmenunext_clicked() +{ + ui->functionmenunext->setDisabled(true); + uchar a(ss(7)); + short b(-ss(217)); + do ui->functionmenu->move(ui->functionmenu->x() - a, 0), qApp->processEvents(); + while(ui->functionmenu->x() > b); + ui->functionmenu->move(-ss(224), 0), + ui->functionmenuback->setEnabled(true), + ui->functionmenuback->setFocus(); +} + +void systemback::on_functionmenuback_clicked() +{ + ui->functionmenuback->setDisabled(true); + uchar a(ss(7)); + do ui->functionmenu->move(ui->functionmenu->x() + a, 0), qApp->processEvents(); + while(ui->functionmenu->x() < -a); + ui->functionmenu->move(0, 0), + ui->functionmenunext->setEnabled(true), + ui->functionmenunext->setFocus(); +} + +bool systemback::eventFilter(QObject *, QEvent *ev) +{ + if(fscrn) + switch(ev->type()) { + case QEvent::FontChange: + if(font() != bfnt) qApp->setFont(bfnt); + return true; + case QEvent::Resize: + for(QWdt wdgt : QWL{ui->wallpaper, ui->logo}) wdgt->resize(size()); + ui->logo->setPixmap(QPixmap("/usr/share/systemback/logo.png").scaledToWidth((ui->wallpaper->width() > ui->wallpaper->height() ? ui->wallpaper->height() : ui->wallpaper->width()) / 2)); + + if(wismax) + { + ui->wpanel->setMaximumSize(size()); + if(ui->wpanel->size() != size()) ui->wpanel->resize(size()); + } + else + { + if(ui->copypanel->isVisibleTo(ui->wpanel)) + { + ushort sz(ss(60)); + ui->wpanel->setMaximumSize(width() - sz, height() - sz); + } + + bool algn[]{wgeom[0] > 0 && [this] { + if(wgeom[0] + wgeom[2] > width()) + { + short nx(width() - wgeom[2]); + wgeom[0] = nx < 0 ? 0 : nx; + return true; + } + + return false; + }(), wgeom[1] > 0 && [this] { + if(wgeom[1] + wgeom[3] > height()) + { + short ny(height() - wgeom[3]); + wgeom[1] = ny < 0 ? 0 : ny; + return true; + } + + return false; + }()}; + + if(algn[0] || algn[1]) ui->wpanel->move(wgeom[0], wgeom[1]); + } + default:; + } + else + { + switch(ev->type()) { + case QEvent::WindowActivate: + if(ui->function3->foregroundRole() == QPalette::Dark) + { + for(QWdt wdgt : QWL{ui->scalingbutton, ui->function1, ui->windowbutton1, ui->function2, ui->windowbutton2, ui->function3, ui->windowbutton3, ui->function4, ui->windowbutton4}) wdgt->setForegroundRole(QPalette::Base); + goto gcheck; + } + + return false; + case QEvent::WindowDeactivate: + if(ui->function3->foregroundRole() == QPalette::Base) + { + for(QWdt wdgt : QWL{ui->scalingbutton, ui->function1, ui->windowbutton1, ui->function2, ui->windowbutton2, ui->function3, ui->windowbutton3, ui->function4, ui->windowbutton4}) wdgt->setForegroundRole(QPalette::Dark); + + if(ui->copypanel->isVisible()) + { + if(ui->partitionsettings->hasFocus() && ui->partitionsettings->currentRow() == -1) ui->copyback->setFocus(); + } + else if(ui->livepanel->isVisible()) + { + if((ui->livelist->hasFocus() && ui->livelist->currentRow() == -1) || (ui->livedevices->hasFocus() && ui->livedevices->currentRow() == -1)) ui->liveback->setFocus(); + } + else if(ui->excludepanel->isVisible()) + { + if((ui->excludeitemslist->hasFocus() && ! ui->excludeitemslist->currentItem()) || (ui->excludedlist->hasFocus() && ui->excludedlist->currentRow() == -1)) ui->excludeback->setFocus(); + } + else if(ui->includepanel->isVisible()) + { + if((ui->includeitemslist->hasFocus() && ! ui->includeitemslist->currentItem()) || (ui->includedlist->hasFocus() && ui->includedlist->currentRow() == -1)) ui->includeback->setFocus(); + } + else if(ui->choosepanel->isVisible() && ui->dirchoose->hasFocus() && ! ui->dirchoose->currentItem()) + ui->dirchoosecancel->setFocus(); + + goto gcheck; + } + + return false; + case QEvent::Resize: + if(wismax && ! wmblck) + { + QRect agm(sgeom(true)); + + if(geometry() != agm) + { + setGeometry(agm); + return true; + } + } + + ui->wpanel->resize(size()); + + if(ui->choosepanel->isVisible()) + { + ui->choosepanel->resize(width() - ui->choosepanel->x() * 2, height() - ss(25)); + ushort sz(ss(40)); + ui->dirpath->resize(ui->choosepanel->width() - sz, ui->dirpath->height()), + ui->dirrefresh->move(ui->choosepanel->width() - ui->dirrefresh->width(), 0), + ui->dirchoose->resize(ui->choosepanel->width(), ui->choosepanel->height() - ss(80)), + ui->dirchooseok->move(ui->choosepanel->width() - ss(120), ui->choosepanel->height() - sz), + ui->dirchoosecancel->move(ui->choosepanel->width() - ss(240), ui->choosepanel->height() - sz), + ui->filesystemwarning->move(ui->filesystemwarning->x(), ui->choosepanel->height() - ss(41)), + ui->chooseresize->move(ui->choosepanel->width() - ui->chooseresize->width(), ui->choosepanel->height() - ui->chooseresize->height()); + } + else if(ui->excludepanel->isVisible()) + { + ui->excludepanel->resize(width() - ui->excludepanel->x() * 2, height() - ss(25)), + ui->excludeitemstext->resize(ui->excludepanel->width() / 2 - ss(44) + (sfctr == High ? 1 : 0), ui->excludeitemstext->height()); + ushort sz[]{ss(36), ss(24)}; + ui->excludedtext->setGeometry(ui->excludepanel->width() / 2 + sz[0], ui->excludedtext->y(), ui->excludeitemstext->width(), ui->excludedtext->height()), + ui->excludeitemslist->resize(ui->excludeitemstext->width(), ui->excludepanel->height() - ss(160)), + ui->excludedlist->setGeometry(ui->excludepanel->width() / 2 + sz[0], ui->excludedlist->y(), ui->excludeitemslist->width(), ui->excludeitemslist->height()), + ui->excludeadditem->move(ui->excludepanel->width() / 2 - sz[1], ui->excludeitemslist->height() / 2 + sz[0]), + ui->excluderemoveitem->move(ui->excludeadditem->x(), ui->excludeitemslist->height() / 2 + ss(108)), + ui->excludeback->move(ui->excludeback->x(), ui->excludepanel->height() - ss(48)), + ui->excludekendektext->move(ui->excludepanel->width() - ss(306), ui->excludepanel->height() - sz[1]), + ui->excluderesize->move(ui->excludepanel->width() - ui->excluderesize->width(), ui->excludepanel->height() - ui->excluderesize->height()); + } + else if(ui->includepanel->isVisible()) + { + ui->includepanel->resize(width() - ui->includepanel->x() * 2, height() - ss(25)), + ui->includetext->resize(ui->includepanel->width(), ui->includetext->height()), + ui->includeitemstext->resize(ui->includepanel->width() / 2 - ss(44) + (sfctr == High ? 1 : 0), ui->includeitemstext->height()); + ushort sz[]{ss(36), ss(24)}; + ui->includedtext->setGeometry(ui->includepanel->width() / 2 + sz[0], ui->includedtext->y(), ui->includeitemstext->width(), ui->includedtext->height()), + ui->includeitemslist->resize(ui->includeitemstext->width(), ui->includepanel->height() - ss(144)), + ui->includedlist->setGeometry(ui->includepanel->width() / 2 + sz[0], ui->includedlist->y(), ui->includeitemslist->width(), ui->includeitemslist->height()), + ui->includeadditem->move(ui->includepanel->width() / 2 - sz[1], ui->includeitemslist->height() / 2 + ss(19)), + ui->includeremoveitem->move(ui->includeadditem->x(), ui->includeitemslist->height() / 2 + ss(91)), + ui->includeback->move(ui->includeback->x(), ui->includepanel->height() - ss(48)), + ui->includekendektext->move(ui->includepanel->width() - ss(306), ui->includepanel->height() - sz[1]), + ui->includeresize->move(ui->includepanel->width() - ui->includeresize->width(), ui->includepanel->height() - ui->includeresize->height()); + } + + if(! wismax) + { + if(! wmblck) + { + if(wgeom[2] != width()) wgeom[2] = width(); + if(wgeom[3] != height()) wgeom[3] = height(); + } + + goto bcheck; + } + + return false; + case QEvent::Move: + if(! wismax) + { + if(! wmblck) + { + if(wgeom[0] != x()) wgeom[0] = x(); + if(wgeom[1] != y()) wgeom[1] = y(); + } + + goto bcheck; + } + else if(! wmblck) + { + QRect agm(sgeom(true)); + + if(geometry() != agm) + { + setGeometry(agm); + return true; + } + } + + return false; + case QEvent::FontChange: + if(font() != bfnt) qApp->setFont(bfnt); + return true; + case QEvent::WindowStateChange: + { + QEvent nev(isMinimized() ? QEvent::WindowDeactivate : QEvent::WindowActivate); + qApp->sendEvent(this, &nev); + } + default: + return false; + } + +gcheck: + if(! (wismax || wmblck)) + { + QDW dtp(qApp->desktop()); + QRect agm(sgeom(true, dtp)), sgm; + ushort frm(ss(30)); + + if(agm.width() >= wgeom[2] + frm) + { + sgm = sgeom(false, dtp); + + if(x() < sgm.x()) + { + if(x() > sgm.x() - wgeom[2]) + { + short val(sgm.x() + frm); + wgeom[0] = val < agm.x() ? agm.x() : val; + } + } + else if(x() < agm.x()) + wgeom[0] = agm.x(); + else + { + short bnd[2]; + + if(x() <= (bnd[0] = (bnd[1] = sgm.x() + sgm.width()) - wgeom[2])) + { + if(x() > (bnd[0] = agm.x() + agm.width() - wgeom[2])) wgeom[0] = bnd[0]; + } + else if(x() < bnd[1] + wgeom[2]) + { + short val(bnd[0] - frm); + wgeom[0] = val < (bnd[1] = agm.x() + agm.width() - wgeom[2]) ? val : bnd[1]; + } + } + } + else if(wgeom[0] != agm.x()) + wgeom[0] = agm.x(); + + if(agm.height() >= wgeom[3] + frm) + { + if(sgm.isEmpty()) sgm = sgeom(false, dtp); + + if(y() < sgm.y()) + { + if(y() > sgm.y() - wgeom[3]) + { + short val(sgm.y() + frm); + wgeom[1] = val < agm.y() ? agm.y() : val; + } + } + else if(y() < agm.y()) + wgeom[1] = agm.y(); + else + { + short bnd[2]; + + if(y() <= (bnd[0] = (bnd[1] = sgm.y() + sgm.height()) - wgeom[3])) + { + if(y() > (bnd[0] = agm.y() + agm.height() - wgeom[3])) wgeom[1] = bnd[0]; + } + else if(y() < bnd[1] + wgeom[3]) + { + short val(bnd[0] - frm); + wgeom[1] = val < (bnd[1] = agm.y() + agm.height() - wgeom[3]) ? val : bnd[1]; + } + } + } + else if(wgeom[1] != agm.y()) + wgeom[1] = agm.y(); + + if(pos() != QPoint(wgeom[0], wgeom[1])) + { + move(wgeom[0], wgeom[1]); + return false; + } + } + +bcheck: + if(ui->buttonspanel->isVisible() && ! ui->buttonspanel->y()) ui->buttonspanel->hide(); + } + + return false; +} + +void systemback::keyPressEvent(QKeyEvent *ev) +{ + if(! qApp->overrideCursor()) + switch(ev->key()) { + case Qt::Key_Escape: + if(ui->passwordpanel->isVisible()) close(); + break; + case Qt::Key_Enter: + case Qt::Key_Return: + { QKeyEvent press(QEvent::KeyPress, Qt::Key_Space, Qt::NoModifier); + qApp->sendEvent(qApp->focusObject(), &press); } + + if(ui->sbpanel->isVisible()) + { + if(ui->pointrename->isEnabled()) + { + schar num(-1); + + for(QLE ldt : ui->points->findChildren()) + { + ++num; + + if(ldt->hasFocus() && getppipe(num)->isChecked()) + { + on_pointrename_clicked(); + break; + } + } + } + } + else if(ui->dirchoose->hasFocus()) + ui->dirchoose->currentItem()->setExpanded(! ui->dirchoose->currentItem()->isExpanded()); + else if(ui->repairmountpoint->hasFocus()) + { + if(ui->repairmount->isEnabled()) + { + on_repairmount_clicked(); + if(! ui->repairmountpoint->hasFocus()) ui->repairmountpoint->setFocus(); + } + } + else if(ui->excludeitemslist->hasFocus()) + { + if(ui->excludeadditem->isEnabled()) + { + if(! ui->excludeitemslist->currentItem()->childCount()) + on_excludeadditem_clicked(); + else if(ui->excludeitemslist->currentItem()->isExpanded()) + ui->excludeitemslist->currentItem()->setExpanded(false); + else + ui->excludeitemslist->currentItem()->setExpanded(true); + } + } + else if(ui->excludedlist->hasFocus()) + { + if(ui->excluderemoveitem->isEnabled()) on_excluderemoveitem_clicked(); + } + else if(ui->includeitemslist->hasFocus()) + { + if(ui->includeadditem->isEnabled()) + { + if(! ui->includeitemslist->currentItem()->childCount()) + on_includeadditem_clicked(); + else if(ui->includeitemslist->currentItem()->isExpanded()) + ui->includeitemslist->currentItem()->setExpanded(false); + else + ui->includeitemslist->currentItem()->setExpanded(true); + } + } + else if(ui->includedlist->hasFocus()) + { + if(ui->includeremoveitem->isEnabled()) on_includeremoveitem_clicked(); + } + else if(ui->copypanel->isVisible()) + { + if(ui->mountpoint->hasFocus()) + { + if(ui->changepartition->isEnabled()) on_changepartition_clicked(); + } + else if(ui->partitionsize->hasFocus() && ui->newpartition->isEnabled()) + on_newpartition_clicked(); + } + else if(ui->installpanel->isVisible()) + { + if(ui->fullname->hasFocus()) + { + if(ui->fullnamepipe->isVisible()) ui->username->setFocus(); + } + else if(ui->username->hasFocus()) + { + if(ui->usernamepipe->isVisible()) ui->password1->setFocus(); + } + else if(ui->password1->hasFocus()) + { + if(ui->password2->isEnabled()) ui->password2->setFocus(); + } + else if(ui->password2->hasFocus()) + { + if(ui->passwordpipe->isVisible()) ui->rootpassword1->setFocus(); + } + else if(ui->rootpassword1->hasFocus()) + ui->rootpassword2->isEnabled() ? ui->rootpassword2->setFocus() : ui->hostname->setFocus(); + else if(ui->rootpassword2->hasFocus()) + { + if(ui->rootpasswordpipe->isVisible()) ui->hostname->setFocus(); + } + else if(ui->hostname->hasFocus() && ui->installnext->isEnabled()) + ui->installnext->setFocus(); + } + + break; + case Qt::Key_F5: + if(ui->sbpanel->isVisible()) + { + schar num(-1); + + for(QLE ldt : ui->points->findChildren()) + { + ++num; + + if(ldt->hasFocus()) + { + if(ldt->text() != sb::pnames[num]) ldt->setText(sb::pnames[num]); + break; + } + } + } + else if(ui->partitionsettings->hasFocus() || ui->mountpoint->hasFocus() || ui->partitionsize->hasFocus()) + on_partitionrefresh2_clicked(); + else if(ui->livepanel->isVisible()) + { + if(ui->livename->hasFocus()) + { + if(ui->livename->text() != "auto") ui->livename->setText("auto"); + } + else if(ui->livedevices->hasFocus()) + on_livedevicesrefresh_clicked(); + else if(ui->livelist->hasFocus()) + on_livemenu_clicked(), ui->liveback->setFocus(); + } + else if(ui->dirchoose->hasFocus()) + on_dirrefresh_clicked(); + else if(ui->repairmountpoint->hasFocus()) + on_repairpartitionrefresh_clicked(); + else if(ui->excludeitemslist->hasFocus()) + ilstupdt(); + else if(ui->includeitemslist->hasFocus()) + ilstupdt(true); + + break; + case Qt::Key_Delete: + if(ui->partitionsettings->hasFocus()) + { + if(ui->unmountdelete->isEnabled() && ui->unmountdelete->text() == tr("Unmount")) on_unmountdelete_clicked(); + } + else if(ui->livelist->hasFocus()) + { + if(ui->livedelete->isEnabled()) on_livedelete_clicked(); + } + else if(ui->excludeitemslist->hasFocus()) + { + if(ui->excludeadditem->isEnabled()) on_excludeadditem_clicked(); + } + else if(ui->excludedlist->hasFocus()) + { + if(ui->excluderemoveitem->isEnabled()) on_excluderemoveitem_clicked(); + } + else if(ui->includeitemslist->hasFocus()) + { + if(ui->includeadditem->isEnabled()) on_includeadditem_clicked(); + } + else if(ui->includedlist->hasFocus() && ui->includeremoveitem->isEnabled()) + on_includeremoveitem_clicked(); + } +} + +void systemback::keyReleaseEvent(QKeyEvent *ev) +{ + if(fscrn && ui->wpanel->isHidden()) + { + ui->wpanel->show(); + fwdgt->setFocus(); + ui->logo->setFocusPolicy(Qt::NoFocus); + } + else if(! qApp->overrideCursor()) + switch(ev->key()) { + case Qt::Key_Enter: + case Qt::Key_Return: + QKeyEvent release(QEvent::KeyRelease, Qt::Key_Space, Qt::NoModifier); + qApp->sendEvent(qApp->focusObject(), &release); + } +} + +void systemback::on_admins_currentIndexChanged(cQStr &arg1) +{ + ui->admins->resize(fontMetrics().width(arg1) + ss(30), ui->admins->height()); + if(! hash.isEmpty()) hash.clear(); + + { + QFile file("/etc/shadow"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + + if(cline.startsWith(arg1 % ':')) + { + hash = sb::mid(cline, arg1.length() + 2, sb::instr(cline, ":", arg1.length() + 2) - arg1.length() - 2); + break; + } + } + } + + if(ui->adminpassword->text().length()) ui->adminpassword->clear(); + + if(! hash.isEmpty() && QStr(crypt("", bstr(hash))) == hash) + { + ui->adminpasswordpipe->show(); + for(QWdt wdgt : QWL{ui->adminpassword, ui->admins}) wdgt->setDisabled(true); + ui->passwordinputok->setEnabled(true); + } +} + +void systemback::on_adminpassword_textChanged(cQStr &arg1) +{ + uchar ccnt(icnt == 100 ? icnt = 0 : ++icnt); + + if(arg1.isEmpty()) + { + if(ui->adminpassworderror->isVisible()) ui->adminpassworderror->hide(); + } + else if(! hash.isEmpty() && QStr(crypt(bstr(arg1), bstr(hash))) == hash) + { + sb::delay(300); + + if(ccnt == icnt) + { + if(ui->adminpassworderror->isVisible()) ui->adminpassworderror->hide(); + ui->adminpasswordpipe->show(); + for(QWdt wdgt : QWL{ui->adminpassword, ui->admins}) wdgt->setDisabled(true); + ui->passwordinputok->setEnabled(true), ui->passwordinputok->setFocus(); + } + } + else if(ui->adminpassworderror->isHidden()) + ui->adminpassworderror->show(); +} + +void systemback::on_startcancel_clicked() +{ + close(); +} + +void systemback::on_passwordinputok_clicked() +{ + busy(); + + QTimer::singleShot(0, this, +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) + SLOT(unitimer()) +#else + &systemback::unitimer +#endif + ); + + ui->passwordpanel->hide(), + ui->mainpanel->show(), + ui->sbpanel->isVisible() ? ui->functionmenunext->setFocus() : ui->fullname->setFocus(), + windowmove(ss(698), ss(465)), + setwontop(false); +} + +void systemback::on_schedulerstart_clicked() +{ + delete shdltimer, shdltimer = nullptr, + ui->function2->setText("Systemback " % tr("scheduler")), + on_newrestorepoint_clicked(); +} + +void systemback::on_dialogcancel_clicked() +{ + if(! fscrn) + { + if(dialog != 108) + { + if(dlgtimer) + { + if(dialog == 211) return void(close()); + delete dlgtimer, dlgtimer = nullptr; + if(ui->dialognumber->text() != "30s") ui->dialognumber->setText("30s"); + } + + if(! ui->sbpanel->isVisibleTo(ui->mainpanel)) + { + if(ui->restorepanel->isVisibleTo(ui->mainpanel)) + ui->restorepanel->hide(); + else if(ui->copypanel->isVisibleTo(ui->mainpanel)) + ui->copypanel->hide(); + else if(ui->livepanel->isVisibleTo(ui->mainpanel)) + ui->livepanel->hide(); + else if(ui->repairpanel->isVisibleTo(ui->mainpanel)) + ui->repairpanel->hide(); + + ui->sbpanel->show(), + ui->function1->setText("Systemback"); + } + + for(QCB ckbx : ui->sbpanel->findChildren()) + if(ckbx->isChecked()) + { + ckbx->click(); + break; + } + } + + ui->dialogpanel->hide(), + ui->mainpanel->show(), + ui->functionmenunext->setFocus(), + windowmove(ss(698), ss(465)), + setwontop(false); + } + else if(ui->dialogok->text() == tr("Reboot")) + close(); + else + { + ui->dialogpanel->hide(), + ui->mainpanel->show(); + short nwidth(ss(154) + ui->partitionsettings->width() - ui->partitionsettings->contentsRect().width() + ui->partitionsettings->columnWidth(0) + ui->partitionsettings->columnWidth(1) + ui->partitionsettings->columnWidth(2) + ui->partitionsettings->columnWidth(3) + ui->partitionsettings->columnWidth(4) + ui->partitionsettings->columnWidth(5) + ui->partitionsettings->columnWidth(6)); + ushort sz[]{ss(850), ss(465), ss(60)}; + windowmove(nwidth < sz[0] ? nwidth : sz[0], sz[1], false), + ui->wpanel->setMinimumSize(ss(698), sz[1]), ui->wpanel->setMaximumSize(width() - sz[2], height() - sz[2]); + } +} + +void systemback::pnmchange(uchar num) +{ + if(sb::pnumber != num) sb::pnumber = num; + uchar cnum(0); + + for(QLE ldt : ui->points->findChildren()) + switch(++cnum) { + case 1 ... 2: + break; + case 3: + if(ldt->isEnabled()) + switch(num) { + case 3: + if(ldt->styleSheet().isEmpty()) ldt->setStyleSheet("background-color: rgb(255, 103, 103)"); + break; + default: + if(! ldt->styleSheet().isEmpty()) ldt->setStyleSheet(nullptr); + } + + break; + case 11: + return; + default: + if(ldt->isEnabled()) + { + if(cnum < num) + { + if(! ldt->styleSheet().isEmpty()) ldt->setStyleSheet(nullptr); + } + else if(ldt->styleSheet().isEmpty()) + ldt->setStyleSheet("background-color: rgb(255, 103, 103)"); + } + else if(cnum <= num) + { + if(ldt->text() == tr("not used")) ldt->setText(tr("empty")); + } + else if(ldt->text() == tr("empty")) + ldt->setText(tr("not used")); + } +} + +void systemback::on_pnumber3_clicked() +{ + pnmchange(3); +} + +void systemback::on_pnumber4_clicked() +{ + pnmchange(4); +} + +void systemback::on_pnumber5_clicked() +{ + pnmchange(5); +} + +void systemback::on_pnumber6_clicked() +{ + pnmchange(6); +} + +void systemback::on_pnumber7_clicked() +{ + pnmchange(7); +} + +void systemback::on_pnumber8_clicked() +{ + pnmchange(8); +} + +void systemback::on_pnumber9_clicked() +{ + pnmchange(9); +} + +void systemback::on_pnumber10_clicked() +{ + pnmchange(10); +} + +void systemback::ptxtchange(uchar num, cQStr &txt) +{ + QLE ldt(getpoint(num)); + QCB ckbx(getppipe(num)); + + if(ldt->isEnabled()) + { + if(txt.isEmpty()) + { + if(ckbx->isChecked()) ckbx->click(); + ckbx->setDisabled(true); + } + else if(sb::like(txt, {"* *", "*/*"})) + { + uchar cps(ldt->cursorPosition() - 1); + ldt->setText(QStr(txt).replace(cps, 1, nullptr)), + ldt->setCursorPosition(cps); + } + else + { + if(! ckbx->isEnabled()) ckbx->setEnabled(true); + if(! ldt->hasFocus()) ldt->setCursorPosition(0); + + if(txt != sb::pnames[num]) + { + if(! ckbx->isChecked()) ckbx->click(); + if(! ui->pointrename->isEnabled()) ui->pointrename->setEnabled(true); + } + else if(ckbx->isChecked()) + ckbx->click(); + } + } + else if(ckbx->isEnabled()) + { + if(ckbx->isChecked()) ckbx->click(); + ckbx->setDisabled(true); + } +} + +void systemback::on_point1_textChanged(cQStr &arg1) +{ + ptxtchange(0, arg1); +} + +void systemback::on_point2_textChanged(cQStr &arg1) +{ + ptxtchange(1, arg1); +} + +void systemback::on_point3_textChanged(cQStr &arg1) +{ + ptxtchange(2, arg1); +} + +void systemback::on_point4_textChanged(cQStr &arg1) +{ + ptxtchange(3, arg1); +} + +void systemback::on_point5_textChanged(cQStr &arg1) +{ + ptxtchange(4, arg1); +} + +void systemback::on_point6_textChanged(cQStr &arg1) +{ + ptxtchange(5, arg1); +} + +void systemback::on_point7_textChanged(cQStr &arg1) +{ + ptxtchange(6, arg1); +} + +void systemback::on_point8_textChanged(cQStr &arg1) +{ + ptxtchange(7, arg1); +} + +void systemback::on_point9_textChanged(cQStr &arg1) +{ + ptxtchange(8, arg1); +} + +void systemback::on_point10_textChanged(cQStr &arg1) +{ + ptxtchange(9, arg1); +} + +void systemback::on_point11_textChanged(cQStr &arg1) +{ + ptxtchange(10, arg1); +} + +void systemback::on_point12_textChanged(cQStr &arg1) +{ + ptxtchange(11, arg1); +} + +void systemback::on_point13_textChanged(cQStr &arg1) +{ + ptxtchange(12, arg1); +} + +void systemback::on_point14_textChanged(cQStr &arg1) +{ + ptxtchange(13, arg1); +} + +void systemback::on_point15_textChanged(cQStr &arg1) +{ + ptxtchange(14, arg1); +} + +void systemback::on_restoremenu_clicked() +{ + if(sb::execsrch("update-grub2", sb::sdir[1] % '/' % cpoint % '_' % pname) && sb::isfile(sb::sdir[1] % '/' % cpoint % '_' % pname % "/var/lib/dpkg/info/grub-" % grub.name % ".list")) + { + if(ui->grubreinstallrestoredisable->isVisibleTo(ui->restorepanel)) ui->grubreinstallrestoredisable->hide(), + ui->grubreinstallrestore->show(); + } + else if(ui->grubreinstallrestore->isVisibleTo(ui->restorepanel)) + ui->grubreinstallrestore->hide(), + ui->grubreinstallrestoredisable->show(); + + if(ui->includeusers->count()) ui->includeusers->clear(); + ui->includeusers->addItems({tr("Everyone"), "root"}); + if(! ui->restorenext->isEnabled()) ui->restorenext->setEnabled(true); + ui->sbpanel->hide(), + ui->restorepanel->show(), + ui->function1->setText(tr("System restore")), + ui->restoreback->setFocus(); + QFile file("/etc/passwd"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr usr(file.readLine().trimmed()); + if(usr.contains(":/home/") && sb::isdir("/home/" % (usr = sb::left(usr, sb::instr(usr, ":") -1)))) ui->includeusers->addItem(usr); + } +} + +void systemback::on_copymenu_clicked() +{ + if(! grub.isEFI || ui->grubinstallcopy->isVisibleTo(ui->copypanel)) + { + if(ppipe ? sb::execsrch("update-grub2", sb::sdir[1] % '/' % cpoint % '_' % pname) && sb::isfile(sb::sdir[1] % '/' % cpoint % '_' % pname % "/var/lib/dpkg/info/grub-" % grub.name % ".list") : sb::execsrch("update-grub2") && sb::isfile("/var/lib/dpkg/info/grub-" % grub.name % ".list")) + { + if(ui->grubinstallcopydisable->isVisibleTo(ui->copypanel)) ui->grubinstallcopydisable->hide(), + ui->grubinstallcopy->show(); + } + else if(ui->grubinstallcopy->isVisibleTo(ui->copypanel)) + ui->grubinstallcopy->hide(), + ui->grubinstallcopydisable->show(); + } + + if(ui->usersettingscopy->isVisibleTo(ui->copypanel)) ui->usersettingscopy->hide(), + ui->userdatafilescopy->show(); + + if(! ppipe) + { + if(! ui->userdatafilescopy->isEnabled()) ui->userdatafilescopy->setEnabled(true); + } + else if(ui->userdatafilescopy->isEnabled()) + { + ui->userdatafilescopy->setDisabled(true); + if(ui->userdatafilescopy->isChecked()) ui->userdatafilescopy->setChecked(false); + } + + ui->sbpanel->hide(), + ui->copypanel->show(), + ui->function1->setText(tr("System copy")), + ui->copyback->setFocus(); + + { + short nwidth(ss(154) + ui->partitionsettings->width() - ui->partitionsettings->contentsRect().width() + ui->partitionsettings->columnWidth(0) + ui->partitionsettings->columnWidth(1) + ui->partitionsettings->columnWidth(2) + ui->partitionsettings->columnWidth(3) + ui->partitionsettings->columnWidth(4) + ui->partitionsettings->columnWidth(5) + ui->partitionsettings->columnWidth(6)); + ushort sz[]{ss(698), ss(465), ss(60)}; + + if(nwidth > sz[0]) + { + ushort sz1(ss(850)); + windowmove(nwidth < sz1 ? nwidth : sz1, sz[1], false); + } + + setMinimumSize(sz[0], sz[1]); + QRect agm(sgeom(true)); + setMaximumSize(agm.width() - sz[2], agm.height() - sz[2]); + } + + if(ui->partitionsettings->currentItem()) + { + if(sb::mcheck("/.sbsystemcopy/") || sb::mcheck("/.sblivesystemwrite/")) + on_partitionrefresh_clicked(); + else if(ui->mountpoint->isEnabled()) + { + if(! ui->mountpoint->currentText().isEmpty()) on_mountpoint_currentTextChanged(ui->mountpoint->currentText()); + } + else if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 3)->text() == "/home") + ui->mountpoint->setEnabled(true); + } +} + +void systemback::on_installmenu_clicked() +{ + ui->sbpanel->hide(), + ui->installpanel->show(), + ui->function1->setText(tr("System install")), + ui->fullname->setFocus(); +} + +void systemback::on_livemenu_clicked() +{ + if(ui->livelist->count()) ui->livelist->clear(); + + for(QWdt wdgt : QWL{ui->livedelete, ui->liveconvert, ui->livewritestart}) + if(wdgt->isEnabled()) wdgt->setDisabled(true); + + if(ui->sbpanel->isVisible()) + { + ui->sbpanel->hide(), + ui->livepanel->show(), + ui->function1->setText(tr("Live system create")), + ui->liveback->setFocus(); + } + + if(sb::isdir(sb::sdir[2])) + for(cQStr &item : QDir(sb::sdir[2]).entryList(QDir::Files | QDir::Hidden)) + if(item.endsWith(".sblive") && ! (item.contains(' ') || sb::islink(sb::sdir[2] % '/' % item)) && sb::fsize(sb::sdir[2] % '/' % item)) + { + QLWI *lwi(new QLWI(sb::left(item, -7) % " (" % QStr::number(qRound64(sb::fsize(sb::sdir[2] % '/' % item) * 100.0 / 1024.0 / 1024.0 / 1024.0) / 100.0) % " GiB, " % (sb::stype(sb::sdir[2] % '/' % sb::left(item, -6) % "iso") == sb::Isfile && sb::fsize(sb::sdir[2] % '/' % sb::left(item, -6) % "iso") ? "sblive+iso" : "sblive") % ')')); + ui->livelist->addItem(lwi); + } +} + +void systemback::on_repairmenu_clicked() +{ + if(ppipe || pname == tr("Live image")) + { + if(! ui->systemrepair->isEnabled()) + for(QWdt wdgt : QWL{ui->systemrepair, ui->fullrepair}) wdgt->setEnabled(true); + + rmntcheck(); + } + else if(ui->systemrepair->isEnabled()) + { + for(QWdt wdgt : QWL{ui->systemrepair, ui->fullrepair}) wdgt->setDisabled(true); + if(! ui->grubrepair->isChecked()) ui->grubrepair->click(); + } + + on_repairmountpoint_currentTextChanged(ui->repairmountpoint->currentText()), + ui->sbpanel->hide(), + ui->repairpanel->show(), + ui->function1->setText(tr("System repair")), + ui->repairback->setFocus(); +} + +void systemback::on_systemupgrade_clicked() +{ + statustart(), pset(11); + QDateTime ofdate(QFileInfo("/usr/bin/systemback").lastModified()); + sb::unlock(sb::Dpkglock), sb::unlock(sb::Aptlock), + sb::exec("xterm +sb -bg grey85 -fg grey25 -fa a -fs 9 -geometry 80x24+" % QStr::number(ss(80)) % '+' % QStr::number(ss(70)) % " -n \"System upgrade\" -T \"System upgrade\" -cr grey40 -selbg grey86 -bw 0 -bc -bcf 500 -bcn 500 -e sbsysupgrade", sb::Noflag, "DBGLEV=0"); + + if(isVisible()) + { + if(ofdate != QFileInfo("/usr/bin/systemback").lastModified()) + nrxth = true, + sb::unlock(sb::Sblock), + sb::exec("systemback", sb::Bckgrnd), + close(); + else if(sb::lock(sb::Dpkglock) && sb::lock(sb::Aptlock)) + ui->statuspanel->hide(), + ui->mainpanel->show(), + ui->functionmenunext->setFocus(), + windowmove(ss(698), ss(465)); + else + utimer.stop(), + dialogopen(301); + } +} + +void systemback::on_excludemenu_clicked() +{ + ui->sbpanel->hide(), + ui->excludepanel->show(), + ui->function1->setText(tr("Exclude")), + ui->excludeback->setFocus(); + QRect agm(sgeom(true)); + ushort sz(ss(60)); + setMaximumSize(agm.width() - sz, agm.height() - sz); +} + +void systemback::on_includemenu_clicked() +{ + ui->sbpanel->hide(), + ui->includepanel->show(), + ui->function1->setText(tr("Include")), + ui->includeback->setFocus(); + QRect agm(sgeom(true)); + ushort sz(ss(60)); + setMaximumSize(agm.width() - sz, agm.height() - sz); +} + +void systemback::on_schedulemenu_clicked() +{ + ui->sbpanel->hide(), + ui->schedulepanel->show(), + ui->function1->setText(tr("Schedule")), + ui->schedulerback->setFocus(); +} + +void systemback::on_aboutmenu_clicked() +{ + ui->sbpanel->hide(), + ui->aboutpanel->show(), + ui->function1->setText(tr("About")), + ui->aboutback->setFocus(); +} + +void systemback::on_settingsmenu_clicked() +{ + ui->sbpanel->hide(), + ui->settingspanel->show(), + ui->function1->setText(tr("Settings")), + ui->settingsback->setFocus(); +} + +void systemback::on_partitionrefresh_clicked() +{ + busy(); + if(! ui->copycover->isVisibleTo(ui->copypanel)) ui->copycover->show(); + if(ui->copynext->isEnabled()) ui->copynext->setDisabled(true); + if(ui->mountpoint->count()) ui->mountpoint->clear(); + ui->mountpoint->addItems({nullptr, "/", "/home", "/boot"}); + + if(grub.isEFI) + { + ui->mountpoint->addItem("/boot/efi"); + if(! ui->efiwarning->isVisibleTo(ui->copypanel)) ui->efiwarning->show(); + + if(ui->grubinstallcopy->isVisibleTo(ui->copypanel)) ui->grubinstallcopy->hide(), + ui->grubinstallcopydisable->show(); + } + + ui->mountpoint->addItems({"/tmp", "/usr", "/var", "/srv", "/opt", "/usr/local", "SWAP"}); + + if(ui->mountpoint->isEnabled()) + { + ui->mountpoint->setDisabled(true); + if(ui->changepartition->isEnabled()) ui->changepartition->setDisabled(true); + } + + if(ui->format->isEnabled()) + { + ui->format->setDisabled(true); + if(ui->filesystem->isEnabled()) ui->filesystem->setDisabled(true); + } + + if(ui->unmountdelete->text() == tr("! Delete !")) ui->unmountdelete->setText(tr("Unmount")), + ui->unmountdelete->setStyleSheet(nullptr); + + if(ui->unmountdelete->isEnabled()) ui->unmountdelete->setDisabled(true); + + if(nohmcpy[1]) + { + nohmcpy[1] = false; + + if(! ppipe) + ui->userdatafilescopy->setEnabled(true); + else if(ui->userdatafilescopy->isChecked()) + ui->userdatafilescopy->setChecked(false); + } + + if(ui->partitionsettings->rowCount()) ui->partitionsettings->clearContents(); + if(ui->repairpartition->count()) ui->repairpartition->clear(); + + if(! wismax) + for(uchar a(2) ; a < 5 ; ++a) ui->partitionsettings->resizeColumnToContents(a); + + QSL plst; + sb::readprttns(plst); + + if(! grub.isEFI) + { + if(ui->grubinstallcopy->count()) + for(QCbB cmbx : QCbBL{ui->grubinstallcopy, ui->grubreinstallrestore, ui->grubreinstallrepair}) cmbx->clear(); + + for(QCbB cmbx : QCbBL{ui->grubinstallcopy, ui->grubreinstallrestore, ui->grubreinstallrepair}) cmbx->addItems({"Auto", tr("Disabled")}); + + for(cQStr &dts : plst) + { + QStr path(dts.split('\n').at(0)); + + if(sb::like(path.length(), {8, 12})) + for(QCbB cmbx : QCbBL{ui->grubinstallcopy, ui->grubreinstallrestore, ui->grubreinstallrepair}) cmbx->addItem(path); + } + } + + schar sn(-1); + QBA mnts[]{sb::fload("/proc/self/mounts"), sb::fload("/proc/swaps")}; + + for(cQStr &cdts : plst) + { + QSL dts(cdts.split('\n')); + cQStr &path(dts.at(0)), &type(dts.at(2)); + ullong bsize(dts.at(1).toULongLong()); + + if(sb::like(path.length(), {8, 12})) + { + ui->partitionsettings->setRowCount(++sn + 1); + if(sn) ui->partitionsettings->setRowHeight(sn, ss(25)); + { QTblWI *dev(new QTblWI(path)); + dev->setTextAlignment(Qt::AlignBottom), + ui->partitionsettings->setItem(sn, 0, dev); + QTblWI *rsize(new QTblWI(sb::hunit(bsize))); + rsize->setTextAlignment(Qt::AlignRight | Qt::AlignBottom), + ui->partitionsettings->setItem(sn, 1, rsize); + QFont fnt; + fnt.setWeight(QFont::DemiBold); + for(QTblWI *twi : {dev, rsize}) twi->setFont(fnt); } + for(uchar a(2) ; a < 7 ; ++a) ui->partitionsettings->setItem(sn, a, new QTblWI); + QTblWI *tp(new QTblWI(type)); + ui->partitionsettings->setItem(sn, 8, tp); + QTblWI *lngth(new QTblWI(QStr::number(bsize))); + ui->partitionsettings->setItem(sn, 10, lngth); + } + else + { + switch(type.toUShort()) { + case sb::Extended: + ui->partitionsettings->setRowCount(++sn + 1); + { QTblWI *dev(new QTblWI(path)); + ui->partitionsettings->setItem(sn, 0, dev); + QTblWI *rsize(new QTblWI(sb::hunit(bsize))); + rsize->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter), + ui->partitionsettings->setItem(sn, 1, rsize); + QFont fnt; + fnt.setWeight(QFont::DemiBold), fnt.setItalic(true); + for(QTblWI *twi : {dev, rsize}) twi->setFont(fnt); } + for(uchar a(2) ; a < 7 ; ++a) ui->partitionsettings->setItem(sn, a, new QTblWI); + break; + case sb::Primary: + case sb::Logical: + if(! grub.isEFI) + for(QCbB cmbx : QCbBL{ui->grubinstallcopy, ui->grubreinstallrestore, ui->grubreinstallrepair}) cmbx->addItem(path); + + ui->partitionsettings->setRowCount(++sn + 1); + { QTblWI *dev(new QTblWI(path)); + ui->partitionsettings->setItem(sn, 0, dev); + QTblWI *rsize(new QTblWI(sb::hunit(bsize))); + rsize->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter), + ui->partitionsettings->setItem(sn, 1, rsize); + QTblWI *lbl(new QTblWI(dts.at(5))); + lbl->setTextAlignment(Qt::AlignCenter); + if(! dts.at(5).isEmpty()) lbl->setToolTip(dts.at(5)); + ui->partitionsettings->setItem(sn, 2, lbl); } + + { + QTblWI *mpt(new QTblWI([&]() -> QStr { + cQStr &uuid(dts.at(6)); + + if(uuid.isEmpty()) + { + if(QStr('\n' % mnts[0]).contains('\n' % path % ' ')) + { + QStr mnt(sb::right(mnts[0], -sb::instr(mnts[0], path % ' '))); + short spc(sb::instr(mnt, " ")); + return sb::mid(mnt, spc + 1, sb::instr(mnt, " ", spc + 1) - spc - 1).replace("\\040", " "); + } + } + else if(QStr('\n' % mnts[0]).contains('\n' % path % ' ')) + return QStr('\n' % mnts[0]).count('\n' % path % ' ') > 1 || QStr('\n' % mnts[0]).contains("\n/dev/disk/by-uuid/" % uuid % ' ') ? tr("Multiple mount points") : [&] { + QStr mnt(sb::right(mnts[0], -sb::instr(mnts[0], path % ' '))); + short spc(sb::instr(mnt, " ")); + return sb::mid(mnt, spc + 1, sb::instr(mnt, " ", spc + 1) - spc - 1).replace("\\040", " "); + }(); + else if(QStr('\n' % mnts[0]).contains("\n/dev/disk/by-uuid/" % uuid % ' ')) + return QStr('\n' % mnts[0]).count("\n/dev/disk/by-uuid/" % uuid % ' ') > 1 ? tr("Multiple mount points") : [&] { + QStr mnt(sb::right(mnts[0], -sb::instr(mnts[0], "/dev/disk/by-uuid/" % uuid % ' '))); + short spc(sb::instr(mnt, " ")); + return sb::mid(mnt, spc + 1, sb::instr(mnt, " ", spc + 1) - spc - 1).replace("\\040", " "); + }(); + else if(QStr('\n' % mnts[1]).contains('\n' % path % ' ')) + return "SWAP"; + + ui->repairpartition->addItem(path); + return nullptr; + }())); + + if(! mpt->text().isEmpty()) mpt->setToolTip(mpt->text()); + ui->partitionsettings->setItem(sn, 3, mpt); + QTblWI *empty(new QTblWI); + ui->partitionsettings->setItem(sn, 4, empty); + QTblWI *fs(new QTblWI(dts.at(4))); + ui->partitionsettings->setItem(sn, 5, fs); + QTblWI *frmt(new QTblWI("-")); + ui->partitionsettings->setItem(sn, 6, frmt), + ui->partitionsettings->setItem(sn, 7, fs->clone()); + for(QTblWI *wdi : QList{mpt, empty, fs, frmt}) wdi->setTextAlignment(Qt::AlignCenter); + } + + break; + case sb::Freespace: + case sb::Emptyspace: + ui->partitionsettings->setRowCount(++sn + 1); + { QTblWI *dev(new QTblWI(path)); + ui->partitionsettings->setItem(sn, 0, dev); + QTblWI *rsize(new QTblWI(sb::hunit(bsize))); + rsize->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter), + ui->partitionsettings->setItem(sn, 1, rsize); + QFont fnt; + fnt.setItalic(true); + for(QTblWI *twi : {dev, rsize}) twi->setFont(fnt); } + for(uchar a(2) ; a < 7 ; ++a) ui->partitionsettings->setItem(sn, a, new QTblWI); + break; + } + + QTblWI *tp(new QTblWI(type)); + ui->partitionsettings->setItem(sn, 8, tp); + QTblWI *start(new QTblWI(dts.at(3))); + ui->partitionsettings->setItem(sn, 9, start); + QTblWI *lngth(new QTblWI(QStr::number(bsize))); + ui->partitionsettings->setItem(sn, 10, lngth); + } + } + + for(uchar a(0) ; a < 7 ; ++a) + if(wismax || a < 2 || a > 4) ui->partitionsettings->resizeColumnToContents(a); + + if(ui->copypanel->isVisible() && ! ui->copyback->hasFocus()) ui->copyback->setFocus(); + ui->copycover->hide(), busy(false); +} + +void systemback::on_partitionrefresh2_clicked() +{ + on_partitionrefresh_clicked(); + + if(! ui->partitionsettingspanel1->isVisibleTo(ui->copypanel)) ui->partitionsettingspanel2->isVisibleTo(ui->copypanel) ? ui->partitionsettingspanel2->hide() : ui->partitionsettingspanel3->hide(), + ui->partitionsettingspanel1->show(); +} + +void systemback::on_partitionrefresh3_clicked() +{ + on_partitionrefresh2_clicked(); +} + +void systemback::on_unmountdelete_clicked() +{ + busy(), ui->copycover->show(); + + if(ui->unmountdelete->text() == tr("Unmount")) + { + if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 3)->text() != "SWAP") + { + QStr mnts(sb::fload("/proc/self/mounts", true)); + QTS in(&mnts, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr cline(in.readLine()), mpt(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 3)->text().replace(" ", "\\040")); + if(sb::like(cline, {"* " % mpt % " *", "* " % mpt % "/*"})) sb::umount(cline.split(' ').value(1).replace("\\040", " ")); + } + + mnts = sb::fload("/proc/self/mounts"); + + for(ushort a(0) ; a < ui->partitionsettings->rowCount() ; ++a) + { + QStr mpt(ui->partitionsettings->item(a, 3)->text()); + + if(! (mpt.isEmpty() || sb::like(mpt, {"_SWAP_", '_' % tr("Multiple mount points") % '_'}) || mnts.contains(' ' % mpt.replace(" ", "\\040") % ' '))) ui->partitionsettings->item(a, 3)->setText(nullptr), + ui->partitionsettings->item(a, 3)->setToolTip(nullptr); + } + + sb::fssync(); + } + else if(! (QStr('\n' % sb::fload("/proc/swaps")).contains('\n' % ui->partitionsettings->item(ui->partitionsettings->currentRow(), 0)->text() % ' ') && swapoff(bstr(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 0)->text())))) + ui->partitionsettings->item(ui->partitionsettings->currentRow(), 3)->setText(nullptr), + ui->partitionsettings->item(ui->partitionsettings->currentRow(), 3)->setToolTip(nullptr); + + if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 3)->text().isEmpty()) + { + ui->unmountdelete->setText(tr("! Delete !")), + ui->unmountdelete->setStyleSheet("QPushButton:enabled{color: red}"); + if(minside(ui->unmountdelete)) ui->unmountdelete->setDisabled(true); + if(! ui->mountpoint->isEnabled()) ui->mountpoint->setEnabled(true); + for(QWdt wdgt : QWL{ui->filesystem, ui->format}) wdgt->setEnabled(true); + } + + ui->copycover->hide(); + } + else + sb::delpart(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 0)->text()), + on_partitionrefresh2_clicked(); + + busy(false); +} + +void systemback::on_unmount_clicked() +{ + busy(), ui->copycover->show(); + bool umntd(true); + + { + QStr mnts[2]{sb::fload("/proc/self/mounts", true)}; + + { + QSL umlst; + umlst.reserve(ui->partitionsettings->rowCount() - 1); + + for(ushort a(ui->partitionsettings->currentRow() + 1) ; a < ui->partitionsettings->rowCount() && ui->partitionsettings->item(a, 0)->background() != QBrush() ; ++a) + { + QStr mpt(ui->partitionsettings->item(a, 3)->text()); + + if(! mpt.isEmpty()) + { + if(mpt == "SWAP") + swapoff(bstr(ui->partitionsettings->item(a, 0)->text())); + else + { + QTS in(&mnts[0], QIODevice::ReadOnly); + QSL incl{"* " % mpt.replace(" ", "\\040") % " *", "* " % mpt % "/*"}; + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + + if(sb::like(cline, incl)) + { + QSL pslst(cline.split(' ')); + + if(! umlst.contains(pslst.at(0))) sb::umount(pslst.value(1).replace("\\040", " ")), + umlst.append(pslst.at(0)); + } + } + } + } + } + } + + mnts[0] = sb::fload("/proc/self/mounts"), mnts[1] = sb::fload("/proc/swaps"); + + for(ushort a(ui->partitionsettings->currentRow() + 1) ; a < ui->partitionsettings->rowCount() && ui->partitionsettings->item(a, 0)->background() != QBrush() ; ++a) + { + QStr mpt(ui->partitionsettings->item(a, 3)->text()); + + if(! mpt.isEmpty()) + { + if((mpt == "SWAP" && ! QStr('\n' % mnts[1]).contains('\n' % ui->partitionsettings->item(a, 0)->text() % ' ')) || ! (mpt == "SWAP" || mnts[0].contains(' ' % mpt.replace(" ", "\\040") % ' '))) + ui->partitionsettings->item(a, 3)->setText(nullptr), + ui->partitionsettings->item(a, 3)->setToolTip(nullptr); + else if(umntd) + umntd = false; + } + } + } + + sb::fssync(); + + if(umntd) ui->unmount->setDisabled(true), + ui->partitiondelete->setEnabled(true); + + ui->copycover->hide(), busy(false); +} + +void systemback::on_restoreback_clicked() +{ + ui->restorepanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenunext->setFocus(); +} + +void systemback::on_copyback_clicked() +{ + if(ui->copycover->isHidden()) + { + windowmove(ss(698), ss(465)), + ui->copypanel->hide(); + + if(ui->function1->text() == tr("System copy")) + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenunext->setFocus(); + else + ui->installpanel->show(), + ui->fullname->setFocus(); + + ui->partitionsettings->resizeColumnToContents(6); + } +} + +void systemback::on_installback_clicked() +{ + ui->installpanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenunext->setFocus(); +} + +void systemback::on_liveback_clicked() +{ + if(ui->livecover->isHidden()) ui->livepanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenunext->setFocus(); +} + +void systemback::on_repairback_clicked() +{ + if(ui->repaircover->isHidden()) ui->repairpanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenunext->setFocus(); +} + +void systemback::on_excludeback_clicked() +{ + if(ui->excludecover->isHidden()) windowmove(ss(698), ss(465)), + ui->excludepanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenunext->setFocus(); +} + +void systemback::on_includeback_clicked() +{ + if(ui->includecover->isHidden()) windowmove(ss(698), ss(465)), + ui->includepanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenunext->setFocus(); +} + +void systemback::on_schedulerback_clicked() +{ + ui->schedulepanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenuback->setFocus(); +} + +void systemback::on_aboutback_clicked() +{ + ui->aboutpanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenuback->setFocus(); +} + +void systemback::on_licenseback_clicked() +{ + ui->licensepanel->hide(), + ui->aboutpanel->show(), + ui->function1->setText(tr("About")), + ui->aboutback->setFocus(); +} + +void systemback::on_licensemenu_clicked() +{ + ui->aboutpanel->hide(), + ui->licensepanel->show(), + ui->function1->setText(tr("License")), + ui->licenseback->setFocus(); + + if(! ui->license->isEnabled()) + { + busy(), + ui->license->setText(sb::fload("/usr/share/common-licenses/GPL-3")), + ui->license->setEnabled(true), + busy(false); + } +} + +void systemback::on_settingsback_clicked() +{ + ui->settingspanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenuback->setFocus(); +} + +void systemback::on_pointpipe1_clicked() +{ + if(ppipe) ppipe = 0; + bool rnmenbl(false); + schar num(-1); + + for(QCB ckbx : ui->sbpanel->findChildren()) + { + ++num; + + if(ckbx->isChecked()) + { + if(++ppipe == 1) cpoint = [num]() -> QStr { + switch(num) { + case 9: + return "S10"; + case 10 ... 14: + return "H0" % QStr::number(num - 9); + default: + return "S0" % QStr::number(num + 1); + } + }(), pname = sb::pnames[num]; + + if(! (rnmenbl || getpoint(num)->text() == sb::pnames[num])) rnmenbl = true; + } + else + { + QLE ldt(getpoint(num)); + if(ldt->isEnabled() && ! (ldt->text() == sb::pnames[num] || ldt->text().isEmpty())) ldt->setText(sb::pnames[num]); + } + } + + if(! ppipe) + { + if(ui->restoremenu->isEnabled()) ui->restoremenu->setDisabled(true); + + if(ui->storagedirbutton->isHidden()) + { + ui->storagedir->resize(ss(210), ui->storagedir->height()), + ui->storagedirbutton->show(); + for(QWdt wdgt : QWL{ui->pointrename, ui->pointdelete}) wdgt->setDisabled(true); + } + + if(ui->pointhighlight->isEnabled()) ui->pointhighlight->setDisabled(true); + if(! ui->repairmenu->isEnabled()) ui->repairmenu->setEnabled(true); + + pname = [this]() -> QStr { + if(! sislive) + { + for(QWdt wdgt : QWL{ui->newrestorepoint, ui->livemenu}) + if(! wdgt->isEnabled()) wdgt->setEnabled(true); + + return tr("Currently running system"); + } + else if(sb::isdir("/.systemback")) + { + if(! ui->copymenu->isEnabled()) + for(QWdt wdgt : QWL{ui->copymenu, ui->installmenu}) wdgt->setEnabled(true); + + return tr("Live image"); + } + + return nullptr; + }(); + } + else + { + if(! rnmenbl && ui->pointrename->isEnabled()) ui->pointrename->setDisabled(true); + + if(ppipe == 1) + { + if(ui->newrestorepoint->isEnabled()) ui->newrestorepoint->setDisabled(true); + + if(ui->storagedirbutton->isVisible()) ui->storagedirbutton->hide(), + ui->storagedir->resize(ss(236), ui->storagedir->height()), + ui->pointdelete->setEnabled(true); + + if(ui->pointpipe11->isChecked() || ui->pointpipe12->isChecked() || ui->pointpipe13->isChecked() || ui->pointpipe14->isChecked() || ui->pointpipe15->isChecked()) + { + if(ui->pointhighlight->isEnabled()) ui->pointhighlight->setDisabled(true); + } + else if(! (ui->point15->isEnabled() || ui->pointhighlight->isEnabled())) + ui->pointhighlight->setEnabled(true); + + if(! ui->copymenu->isEnabled()) + for(QWdt wdgt : QWL{ui->copymenu, ui->installmenu}) wdgt->setEnabled(true); + + if(! (sislive || ui->restoremenu->isEnabled())) ui->restoremenu->setEnabled(true); + if(ui->livemenu->isEnabled()) ui->livemenu->setDisabled(true); + if(! ui->repairmenu->isEnabled()) ui->repairmenu->setEnabled(true); + } + else + { + if(ui->restoremenu->isEnabled()) ui->restoremenu->setDisabled(true); + for(QWdt wdgt : QWL{ui->copymenu, ui->installmenu, ui->repairmenu}) wdgt->setDisabled(true); + if(ui->pointhighlight->isEnabled()) ui->pointhighlight->setDisabled(true); + } + } +} + +void systemback::on_pointpipe2_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe3_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe4_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe5_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe6_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe7_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe8_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe9_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe10_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe11_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe12_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe13_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe14_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_pointpipe15_clicked() +{ + on_pointpipe1_clicked(); +} + +void systemback::on_livedevicesrefresh_clicked() +{ + busy(); + if(! ui->livecover->isVisibleTo(ui->livepanel)) ui->livecover->show(); + if(ui->livedevices->rowCount()) ui->livedevices->clearContents(); + QSL dlst; + sb::readlvdevs(dlst); + schar sn(-1); + + for(cQStr &cdts : dlst) + { + ui->livedevices->setRowCount(++sn + 1); + QSL dts(cdts.split('\n')); + QTblWI *dev(new QTblWI(dts.at(0))); + ui->livedevices->setItem(sn, 0, dev); + ullong bsize(dts.at(2).toULongLong()); + QTblWI *rsize(new QTblWI(sb::hunit(bsize))); + rsize->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter), + ui->livedevices->setItem(sn, 1, rsize); + QTblWI *name(new QTblWI(dts.at(1))); + name->setToolTip(dts.at(1)), + ui->livedevices->setItem(sn, 2, name); + QTblWI *format(new QTblWI("-")); + for(QTblWI *wdi : QList{name, format}) wdi->setTextAlignment(Qt::AlignCenter); + ui->livedevices->setItem(sn, 3, format); + } + + for(uchar a(0) ; a < 4 ; ++a) ui->livedevices->resizeColumnToContents(a); + if(ui->livedevices->columnWidth(0) + ui->livedevices->columnWidth(1) + ui->livedevices->columnWidth(2) + ui->livedevices->columnWidth(3) > ui->livedevices->contentsRect().width()) ui->livedevices->setColumnWidth(2, ui->livedevices->contentsRect().width() - ui->livedevices->columnWidth(0) - ui->livedevices->columnWidth(1) - ui->livedevices->columnWidth(3)); + if(ui->livewritestart->isEnabled()) ui->livewritestart->setDisabled(true); + if(ui->livepanel->isVisible() && ! ui->liveback->hasFocus()) ui->liveback->setFocus(); + ui->livecover->hide(), busy(false); +} + +void systemback::ilstupdt(bool inc, cQStr &dir) +{ + if(dir.isEmpty()) + { + busy(); + + if(inc) + { + if(! ui->includecover->isVisibleTo(ui->includepanel)) + { + ui->includecover->show(); + if(ui->includeadditem->isEnabled()) ui->includeadditem->setDisabled(true); + } + + if(ui->includeitemslist->topLevelItemCount()) ui->includeitemslist->clear(); + } + else + { + if(! ui->excludecover->isVisibleTo(ui->excludepanel)) + { + ui->excludecover->show(); + if(ui->excludeadditem->isEnabled()) ui->excludeadditem->setDisabled(true); + } + + if(ui->excludeitemslist->topLevelItemCount()) ui->excludeitemslist->clear(); + } + + ilstupdt(inc, "/root"); + QFile file("/etc/passwd"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr usr(file.readLine().trimmed()); + if(usr.contains(":/home/") && sb::isdir("/home/" % (usr = sb::left(usr, sb::instr(usr, ":") -1)))) ilstupdt(inc, "/home/" % usr); + } + + if(inc) + { + ui->includeitemslist->sortItems(0, Qt::AscendingOrder); + if(ui->includepanel->isVisible() && ! ui->includeback->hasFocus()) ui->includeback->setFocus(); + ui->includecover->hide(); + } + else + { + ui->excludeitemslist->sortItems(0, Qt::AscendingOrder); + if(ui->excludepanel->isVisible() && ! ui->excludeback->hasFocus()) ui->excludeback->setFocus(); + ui->excludecover->hide(); + } + + busy(false); + } + else + { + QTreeWidget *ilst; + QLW dlst; + inc ? (ilst = ui->includeitemslist, dlst = ui->includedlist) : (ilst = ui->excludeitemslist, dlst = ui->excludedlist); + + for(cQStr &item : QDir(dir).entryList(QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot)) + if((inc || ui->liveexclude->isChecked() ? ! sb::like(item, {"_.*", "_snap_"}) : item.startsWith('.') ? ! sb::like(item, {"_.gvfs_", "_.Xauthority_", "_.ICEauthority_"}) : item == "snap") && dlst->findItems(item, Qt::MatchExactly).isEmpty()) + { + QList flst(ilst->findItems(item, Qt::MatchExactly)); + + if(flst.isEmpty()) + { + QTrWI *twi(new QTrWI); + twi->setText(0, item); + + if(sb::access(dir % '/' % item) && sb::stype(dir % '/' % item) == sb::Isdir) + { + twi->setIcon(0, QIcon(QPixmap(":pictures/dir.png").scaled(ss(12), ss(9), Qt::IgnoreAspectRatio, Qt::SmoothTransformation))), + ilst->addTopLevelItem(twi); + + if(dlst->findItems(item % '/', Qt::MatchExactly).isEmpty()) + { + QSL sdlst(QDir(dir % '/' % item).entryList(QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot)); + + for(cQStr &sitem : sdlst) + if(dlst->findItems(item % '/' % sitem, Qt::MatchExactly).isEmpty() && item % '/' % sitem != ".cache/gvfs") + { + QTrWI *ctwi(new QTrWI); + ctwi->setText(0, sitem), + twi->addChild(ctwi); + } + } + } + else + ilst->addTopLevelItem(twi); + } + else if(sb::access(dir % '/' % item) && sb::stype(dir % '/' % item) == sb::Isdir) + { + QTrWI *ctwi(flst.at(0)); + if(ctwi->icon(0).isNull()) ctwi->setIcon(0, QIcon(":pictures/dir.png")); + + if(dlst->findItems(item % '/', Qt::MatchExactly).isEmpty()) + { + QSL sdlst(QDir(dir % '/' % item).entryList(QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot)), itmlst; + for(ushort a(0) ; a < ctwi->childCount() ; ++a) itmlst.append(ctwi->child(a)->text(0)); + + for(cQStr &sitem : sdlst) + { + if(dlst->findItems(item % '/' % sitem, Qt::MatchExactly).isEmpty() && item % '/' % sitem != ".cache/gvfs") + { + for(cQStr &citem : itmlst) + if(citem == sitem) goto next; + + QTrWI *sctwi(new QTrWI); + sctwi->setText(0, sitem), + ctwi->addChild(sctwi); + } + + next:; + } + } + } + } + } +} + +void systemback::on_pointexclude_clicked() +{ + busy(); + if(! ui->excludecover->isVisibleTo(ui->excludepanel)) ui->excludecover->show(); + if(ui->excludedlist->count()) ui->excludedlist->clear(); + + if(ui->excludeadditem->isEnabled()) + ui->excludeadditem->setDisabled(true); + else if(ui->excluderemoveitem->isEnabled()) + ui->excluderemoveitem->setDisabled(true); + + { + QFile file(excfile); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr cline(sb::left(file.readLine(), -1)); + + if(sb::like(cline, {"_.*", "_snap_", "_snap/*"})) + { + if(ui->pointexclude->isChecked()) ui->excludedlist->addItem(cline); + } + else if(ui->liveexclude->isChecked() && ! cline.isEmpty()) + ui->excludedlist->addItem(cline); + } + } + + ilstupdt(), + busy(false); +} + +void systemback::on_liveexclude_clicked() +{ + on_pointexclude_clicked(); +} + +void systemback::on_dialogok_clicked() +{ + if(ui->dialogok->text() == "OK") + { + if(dialog == 309) + dialogopen(ui->fullrestore->isChecked() ? 205 : 204); + else if(dialog == 305) + { + statustart(); + + for(cQStr &item : QDir(sb::sdir[1]).entryList(QDir::Dirs | QDir::Hidden | QDir::NoSymLinks | QDir::NoDotAndDotDot)) + if(item.startsWith(".S00_")) + { + pset(12); + + if(sb::remove(sb::sdir[1] % '/' % item)) + { + emptycache(); + + if(sstart) + { + sb::crtfile(sb::sdir[1] % "/.sbschedule"); + sb::ThrdKill = true; + close(); + } + else + { + ui->statuspanel->hide(); + ui->mainpanel->show(); + ui->functionmenunext->isEnabled() ? ui->functionmenunext->setFocus() : ui->functionmenuback->setFocus(); + windowmove(ss(698), ss(465)); + } + } + else + { + if(sstart) sb::crtfile(sb::sdir[1] % "/.sbschedule"); + + if(intrrpt) + intrrpt = false; + else + dialogopen(329); + } + + return; + } + + if(sstart) + { + sb::crtfile(sb::sdir[1] % "/.sbschedule"); + sb::ThrdKill = true; + close(); + } + else + on_dialogcancel_clicked(); + } + else if(! utimer.isActive() || sstart) + close(); + else if(sb::like(dialog, {207, 210, 303, 307, 311, 312, 313, 314, 316, 317, 320, 321, 322, 323, 324, 325, 326, 327, 328, 330, 331, 332, 333, 334, 335, 336, 337, 338})) + { + ui->dialogpanel->hide(); + ui->mainpanel->show(); + + if(ui->copypanel->isVisible()) + { + ui->copyback->setFocus(); + short nwidth(ss(154) + ui->partitionsettings->width() - ui->partitionsettings->contentsRect().width() + ui->partitionsettings->columnWidth(0) + ui->partitionsettings->columnWidth(1) + ui->partitionsettings->columnWidth(2) + ui->partitionsettings->columnWidth(3) + ui->partitionsettings->columnWidth(4) + ui->partitionsettings->columnWidth(5) + ui->partitionsettings->columnWidth(6)); + + if(nwidth > ss(698)) + { + ushort sz(ss(850)); + windowmove(nwidth < sz ? nwidth : sz, ss(465), false); + } + } + else + { + if(ui->sbpanel->isVisible()) + ui->functionmenunext->isEnabled() ? ui->functionmenunext->setFocus() : ui->functionmenuback->setFocus(); + else if(ui->livepanel->isVisible()) + ui->liveback->setFocus(); + + windowmove(ss(698), ss(465)); + } + + setwontop(false); + } + else if(sislive && sb::like(dialog, {206, 209})) + fscrn ? dialogopen(211) : void(close()); + else + on_dialogcancel_clicked(); + } + else if(ui->dialogok->text() == tr("Start")) + switch(dialog) { + case 100: + case 103 ... 104: + case 107: + return restore(); + case 101 ... 102: + case 109: + return repair(); + case 105 ... 106: + return systemcopy(); + case 108: + livewrite(); + } + else if(ui->dialogok->text() == tr("Reboot")) + { + sb::exec(sb::execsrch("reboot") ? "reboot" : "systemctl reboot", sb::Bckgrnd); + + if(fscrn) + { + fscrn = false; + qApp->exit(1); + } + else + close(); + } + else if(ui->dialogok->text() == tr("X restart")) + { + DIR *dir(opendir("/proc")); + dirent *ent; + QSL dd{"_._", "_.._"}; + + while((ent = readdir(dir))) + { + QStr iname(ent->d_name); + + if(! sb::like(iname, dd) && ent->d_type == DT_DIR && sb::isnum(iname) && sb::islink("/proc/" % iname % "/exe") && QFile::readLink("/proc/" % iname % "/exe").endsWith("/Xorg")) + { + closedir(dir); + kill(iname.toInt(), SIGTERM); + } + } + + close(); + } +} + +void systemback::on_pointhighlight_clicked() +{ + busy(), + sb::rename(sb::sdir[1] % '/' % cpoint % '_' % pname, sb::sdir[1] % "/H05_" % pname), + pntupgrade(), + busy(false); +} + +void systemback::on_pointrename_clicked() +{ + busy(); + if(dialog == 303) dialog = 0; + schar num(-1); + + for(QCB ckbx : ui->sbpanel->findChildren()) + { + ++num; + + if(ckbx->isChecked()) + { + QLE ldt(getpoint(num)); + + if(ldt->text() != sb::pnames[num]) + { + QStr ppath([num]() -> QStr { + switch(num) { + case 9: + return "/S10_"; + case 10 ... 14: + return "/H0" % QStr::number(num - 9) % '_'; + default: + return "/S0" % QStr::number(num + 1) % '_'; + } + }()); + + if(sb::rename(sb::sdir[1] % ppath % sb::pnames[num], sb::sdir[1] % ppath % ldt->text())) + ckbx->click(); + else if(dialog != 303) + dialog = 303; + } + } + } + + pntupgrade(), + busy(false); + if(dialog == 303) dialogopen(); +} + +void systemback::on_autorestoreoptions_clicked(bool chckd) +{ + for(QWdt wdgt : QWL{ui->skipfstabrestore, ui->grubreinstallrestore, ui->grubreinstallrestoredisable}) wdgt->setDisabled(chckd); +} + +void systemback::on_autorepairoptions_clicked(bool chckd) +{ + if(chckd) + { + if(ui->skipfstabrepair->isEnabled()) ui->skipfstabrepair->setDisabled(true); + + if(ui->grubreinstallrepair->isEnabled()) + for(QWdt wdgt : QWL{ui->grubreinstallrepair, ui->grubreinstallrepairdisable}) wdgt->setDisabled(true); + } + else + { + if(! ui->skipfstabrepair->isEnabled()) ui->skipfstabrepair->setEnabled(true); + + if(! ui->grubreinstallrepair->isEnabled()) + for(QWdt wdgt : QWL{ui->grubreinstallrepair, ui->grubreinstallrepairdisable}) wdgt->setEnabled(true); + } +} + +void systemback::on_storagedirbutton_clicked() +{ + for(QWdt wdgt : QWL{ui->sbpanel, ui->scalingbutton}) wdgt->hide(); + ui->choosepanel->show(), + ui->function1->setText(tr("Storage directory")), + ui->dirchooseok->setFocus(); + { ushort sz[]{ss(642), ss(481), ss(60)}; + windowmove(sz[0], sz[1], false), + setMinimumSize(sz[0], sz[1]); + QRect agm(sgeom(true)); + setMaximumSize(agm.width() - sz[2], agm.height() - sz[2]); } + on_dirrefresh_clicked(); +} + +void systemback::on_liveworkdirbutton_clicked() +{ + for(QWdt wdgt : QWL{ui->livepanel, ui->scalingbutton}) wdgt->hide(); + ui->choosepanel->show(), + ui->function1->setText(tr("Working directory")), + ui->dirchooseok->setFocus(); + { ushort sz[]{ss(642), ss(481), ss(60)}; + windowmove(sz[0], sz[1], false), + setMinimumSize(sz[0], sz[1]); + QRect agm(sgeom(true)); + setMaximumSize(agm.width() - sz[2], agm.height() - sz[2]); } + on_dirrefresh_clicked(); +} + +void systemback::on_dirrefresh_clicked() +{ + busy(); + if(ui->dirchoose->topLevelItemCount()) ui->dirchoose->clear(); + QStr pwdrs(sb::fload("/etc/passwd")); + QSL excl{"bin", "boot", "cdrom", "dev", "etc", "lib", "lib32", "lib64", "opt", "proc", "root", "run", "sbin", "selinux", "snap", "srv", "sys", "tmp", "usr", "var"}; + ushort sz(ss(12)); + + for(cQStr &item : QDir("/").entryList(QDir::Dirs | QDir::Hidden | QDir::NoDotAndDotDot)) + { + QTrWI *twi(new QTrWI); + twi->setText(0, item); + QStr cpath(QDir('/' % item).canonicalPath()); + + if(excl.contains(item) || excl.contains(sb::right(cpath, -1)) || pwdrs.contains(':' % cpath % ':') || ! sb::islnxfs('/' % item)) + twi->setTextColor(0, Qt::red), + twi->setIcon(0, QIcon(QPixmap(":pictures/dirx.png").scaled(sz, sz, Qt::IgnoreAspectRatio, Qt::SmoothTransformation))), + ui->dirchoose->addTopLevelItem(twi); + else + { + if(ui->function1->text() == tr("Storage directory") && sb::isfile('/' % item % "/Systemback/.sbschedule")) twi->setTextColor(0, Qt::green), + twi->setIcon(0, QIcon(QPixmap(":pictures/isdir.png").scaled(sz, sz, Qt::IgnoreAspectRatio, Qt::SmoothTransformation))); + + ui->dirchoose->addTopLevelItem(twi); + + if(item == "home") ui->dirchoose->setCurrentItem(twi), + twi->setSelected(true); + + for(cQStr &sitem : QDir('/' % item).entryList(QDir::Dirs | QDir::Hidden | QDir::NoDotAndDotDot)) + { + QTrWI *ctwi(new QTrWI); + ctwi->setText(0, sitem); + + if(excl.contains(sb::right(cpath = QDir('/' % item % '/' % sitem).canonicalPath(), -1)) || pwdrs.contains(':' % cpath % ':') || (item == "home" && pwdrs.contains(":/home/" % sitem % ":"))) ctwi->setTextColor(0, Qt::red), + ctwi->setIcon(0, QIcon(QPixmap(":pictures/dirx.png").scaled(sz, sz, Qt::IgnoreAspectRatio, Qt::SmoothTransformation))); + + twi->addChild(ctwi); + } + } + } + + if(! (ui->dirchoose->currentItem() || ui->dirpath->text() == "/")) + { + ui->dirpath->setText("/"); + + if(ui->dirpath->styleSheet().isEmpty()) ui->dirpath->setStyleSheet("color: red"), + ui->dirchooseok->setDisabled(true); + + ui->dirchoosecancel->setFocus(); + } + + busy(false); +} + +void systemback::on_dirchoose_currentItemChanged(QTrWI *crrnt) +{ + if(crrnt) + { + cQTrWI *twi(crrnt); + QStr path('/' % crrnt->text(0)); + while(twi->parent()) path.prepend('/' % (twi = twi->parent())->text(0)); + + if(sb::isdir(path)) + { + ui->dirpath->setText(path); + + if(crrnt->textColor(0) == Qt::red) + { + if(ui->dirpath->styleSheet().isEmpty()) ui->dirpath->setStyleSheet("color: red"), + ui->dirchooseok->setDisabled(true); + } + else if(! ui->dirpath->styleSheet().isEmpty()) + ui->dirpath->setStyleSheet(nullptr), + ui->dirchooseok->setEnabled(true); + } + else + { + crrnt->setDisabled(true); + + if(crrnt->isSelected()) + { + crrnt->setSelected(false); + ui->dirchoosecancel->setFocus(); + + if(ui->dirpath->text() != "/") + { + ui->dirpath->setText("/"); + + if(ui->dirpath->styleSheet().isEmpty()) ui->dirpath->setStyleSheet("color: red"), + ui->dirchooseok->setDisabled(true); + } + } + } + } +} + +void systemback::on_dirchoose_itemExpanded(QTrWI *item) +{ + if(item->backgroundColor(0) != Qt::transparent) + { + item->setBackgroundColor(0, Qt::transparent), + busy(); + cQTrWI *twi(item); + QStr path('/' % twi->text(0)); + while(twi->parent()) path.prepend('/' % (twi = twi->parent())->text(0)); + + if(sb::isdir(path)) + { + QStr pwdrs(sb::fload("/etc/passwd")); + ushort sz(ss(12)); + + for(ushort a(0) ; a < item->childCount() ; ++a) + { + QTrWI *ctwi(item->child(a)); + + if(ctwi->textColor(0) != Qt::red) + { + QStr iname(ctwi->text(0)); + + if(! sb::isdir(path % '/' % iname)) + ctwi->setDisabled(true); + else if(iname == "Systemback" || pwdrs.contains(':' % QDir(path % '/' % iname).canonicalPath() % ':') || ! sb::islnxfs(path % '/' % iname)) + ctwi->setTextColor(0, Qt::red), + ctwi->setIcon(0, QIcon(QPixmap(":pictures/dirx.png").scaled(sz, sz, Qt::IgnoreAspectRatio, Qt::SmoothTransformation))); + else + { + if(ui->function1->text() == tr("Storage directory") && sb::isfile(path % '/' % iname % '/' % "/Systemback/.sbschedule")) ctwi->setTextColor(0, Qt::green), + ctwi->setIcon(0, QIcon(QPixmap(":pictures/isdir.png").scaled(sz, sz, Qt::IgnoreAspectRatio, Qt::SmoothTransformation))); + + for(cQStr &cdir : QDir(path % '/' % iname).entryList(QDir::Dirs | QDir::Hidden | QDir::NoDotAndDotDot)) + { + QTrWI *sctwi(new QTrWI); + sctwi->setText(0, cdir), + ctwi->addChild(sctwi); + } + } + } + } + } + else + { + item->setDisabled(true); + + if(item->isSelected()) + { + item->setSelected(false), + ui->dirchoosecancel->setFocus(); + + if(ui->dirpath->text() != "/") + { + ui->dirpath->setText("/"); + + if(ui->dirpath->styleSheet().isEmpty()) ui->dirpath->setStyleSheet("color: red"), + ui->dirchooseok->setDisabled(true); + } + } + } + + busy(false); + } +} + +void systemback::on_dirchoosecancel_clicked() +{ + ui->choosepanel->hide(), + ui->scalingbutton->show(); + + if(ui->function1->text() == tr("Storage directory")) + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenunext->isEnabled() ? ui->functionmenunext->setFocus() : ui->functionmenuback->setFocus(); + else + ui->livepanel->show(), + ui->function1->setText(tr("Live system create")), + ui->liveback->setFocus(); + + windowmove(ss(698), ss(465)), + ui->dirchoose->clear(); +} + +void systemback::on_dirchooseok_clicked() +{ + if(sb::isdir(ui->dirpath->text())) + { + if(ui->function1->text() == tr("Storage directory")) + { + if(sb::sdir[0] != ui->dirpath->text()) + { + QSL dlst(QDir(sb::sdir[1]).entryList(QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot)); + + if(! dlst.count()) + rmdir(bstr(sb::sdir[1])); + else if(dlst.count() == 1 && sb::isfile(sb::sdir[1] % "/.sbschedule")) + sb::remove(sb::sdir[1]); + + sb::sdir[0] = ui->dirpath->text(), sb::sdir[1] = sb::sdir[0] % "/Systemback", + ui->storagedir->setText(sb::sdir[0]), + ui->storagedir->setToolTip(sb::sdir[0]), + ui->storagedir->setCursorPosition(0), + pntupgrade(); + } + + if(! (sb::isdir(sb::sdir[1]) || sb::crtdir(sb::sdir[1]))) sb::rename(sb::sdir[1], sb::sdir[1] % '_' % sb::rndstr()), + sb::crtdir(sb::sdir[1]); + + sb::ismpnt = ! sb::issmfs(sb::sdir[0], sb::sdir[0].count('/') == 1 ? "/" : sb::left(sb::sdir[0], sb::rinstr(sb::sdir[0], "/") - 1)); + if(! sb::isfile(sb::sdir[1] % "/.sbschedule")) sb::crtfile(sb::sdir[1] % "/.sbschedule"); + ui->choosepanel->hide(), + ui->sbpanel->show(), + ui->function1->setText("Systemback"), + ui->functionmenunext->isEnabled() ? ui->functionmenunext->setFocus() : ui->functionmenuback->setFocus(); + } + else + { + ui->choosepanel->hide(), + ui->livepanel->show(), + ui->function1->setText(tr("Live system create")), + ui->liveback->setFocus(); + + if(sb::sdir[2] != ui->dirpath->text()) sb::sdir[2] = ui->dirpath->text(), + ui->liveworkdir->setText(sb::sdir[2]), + ui->liveworkdir->setToolTip(sb::sdir[2]), + ui->liveworkdir->setCursorPosition(0), + on_livemenu_clicked(); + } + + ui->scalingbutton->show(), + windowmove(ss(698), ss(465)), + ui->dirchoose->clear(); + } + else + delete ui->dirchoose->currentItem(), + ui->dirchoose->setCurrentItem(nullptr), + ui->dirchoosecancel->setFocus(), + ui->dirpath->setText("/"), + ui->dirpath->setStyleSheet("color: red"), + ui->dirchooseok->setDisabled(true); +} + +void systemback::on_fullrestore_clicked() +{ + if(ui->keepfiles->isEnabled()) + { + for(QWdt wdgt : QWL{ui->keepfiles, ui->includeusers}) wdgt->setDisabled(true); + ui->autorestoreoptions->setEnabled(true); + + if(! ui->autorestoreoptions->isChecked()) + for(QWdt wdgt : QWL{ui->skipfstabrestore, ui->grubreinstallrestore, ui->grubreinstallrestoredisable}) wdgt->setEnabled(true); + } + + if(! ui->restorenext->isEnabled()) ui->restorenext->setEnabled(true); +} + +void systemback::on_systemrestore_clicked() +{ + on_fullrestore_clicked(); +} + +void systemback::on_configurationfilesrestore_clicked() +{ + if(! ui->keepfiles->isEnabled()) + { + for(QWdt wdgt : QWL{ui->keepfiles, ui->includeusers}) wdgt->setEnabled(true); + ui->autorestoreoptions->setDisabled(true); + + if(! ui->autorestoreoptions->isChecked()) + for(QWdt wdgt : QWL{ui->skipfstabrestore, ui->grubreinstallrestore, ui->grubreinstallrestoredisable}) wdgt->setDisabled(true); + } + + on_includeusers_currentIndexChanged(ui->includeusers->currentText()); +} + +void systemback::on_includeusers_currentIndexChanged(cQStr &arg1) +{ + if(! arg1.isEmpty()) + { + ui->includeusers->resize(fontMetrics().width(arg1) + ss(30), ui->includeusers->height()); + + if(ui->includeusers->currentIndex() < 2 || (ui->includeusers->currentIndex() > 1 && sb::isdir(sb::sdir[1] % '/' % cpoint % '_' % pname % "/home/" % arg1))) + { + if(! ui->restorenext->isEnabled()) ui->restorenext->setEnabled(true); + } + else if(ui->restorenext->isEnabled()) + ui->restorenext->setDisabled(true); + } +} + +void systemback::on_restorenext_clicked() +{ + dialogopen(ui->fullrestore->isChecked() ? 107 : ui->systemrestore->isChecked() ? 100 : ui->keepfiles->isChecked() ? 104 : 103); +} + +void systemback::on_livelist_currentItemChanged(QLWI *crrnt) +{ + if(crrnt) + { + if(sb::isfile(sb::sdir[2] % '/' % sb::left(crrnt->text(), sb::instr(crrnt->text(), " ") - 1) % ".sblive")) + { + if(! ui->livedelete->isEnabled()) ui->livedelete->setEnabled(true); + ullong isize(sb::fsize(sb::sdir[2] % '/' % sb::left(crrnt->text(), sb::instr(crrnt->text(), " ") - 1) % ".sblive")); + + if(isize && isize < 4294967295 && isize * 2 + 104857600 < sb::dfree(sb::sdir[2]) && ! sb::exist(sb::sdir[2] % '/' % sb::left(crrnt->text(), sb::instr(crrnt->text(), " ") - 1) % ".iso")) + { + if(! ui->liveconvert->isEnabled()) ui->liveconvert->setEnabled(true); + } + else if(ui->liveconvert->isEnabled()) + ui->liveconvert->setDisabled(true); + + if(ui->livedevices->currentItem() && isize) + { + if(! ui->livewritestart->isEnabled()) ui->livewritestart->setEnabled(true); + } + else if(ui->livewritestart->isEnabled()) + ui->livewritestart->setDisabled(true); + } + else + { + delete crrnt, ui->livelist->setCurrentItem(nullptr); + + for(QWdt wdgt : QWL{ui->livedelete, ui->liveconvert, ui->livewritestart}) + if(wdgt->isEnabled()) wdgt->setDisabled(true); + + ui->liveback->setFocus(); + } + } +} + +void systemback::on_livedelete_clicked() +{ + busy(), ui->livecover->show(); + QStr path(sb::sdir[2] % '/' % sb::left(ui->livelist->currentItem()->text(), sb::instr(ui->livelist->currentItem()->text(), " ") - 1)); + sb::remove(path % ".sblive"); + if(sb::exist(path % ".iso")) sb::remove(path % ".iso"); + on_livemenu_clicked(), + ui->liveback->setFocus(), + ui->livecover->hide(), busy(false); +} + +void systemback::on_livedevices_currentItemChanged(QTblWI *crrnt, QTblWI *prvs) +{ + if(crrnt && ! (prvs && crrnt->row() == prvs->row())) + { + ui->livedevices->item(crrnt->row(), 3)->setText("x"); + if(prvs) ui->livedevices->item(prvs->row(), 3)->setText("-"); + if(ui->livelist->currentItem() && ! ui->livewritestart->isEnabled()) ui->livewritestart->setEnabled(true); + } +} + +void systemback::rmntcheck() +{ + auto grnst([this](bool enable = true) { + if(enable) + { + if(ui->grubreinstallrepairdisable->isVisibleTo(ui->repairpanel)) ui->grubreinstallrepairdisable->hide(), + ui->grubreinstallrepair->show(); + } + else if(ui->grubreinstallrepair->isVisibleTo(ui->repairpanel)) + ui->grubreinstallrepair->hide(), + ui->grubreinstallrepairdisable->show(); + }); + + if(sb::issmfs("/", "/mnt")) + { + grnst(false); + if(ui->repairnext->isEnabled()) ui->repairnext->setDisabled(true); + } + else if(! ui->grubrepair->isChecked()) + { + grnst(! (grub.isEFI && sb::issmfs("/mnt/boot", "/mnt/boot/efi")) && [this] { + switch(ppipe) { + case 0: + if(sb::execsrch("update-grub2") && sb::isfile("/var/lib/dpkg/info/grub-" % grub.name % ".list")) return true; + break; + case 1: + if(sb::execsrch("update-grub2", sb::sdir[1] % '/' % cpoint % '_' % pname) && sb::isfile(sb::sdir[1] % '/' % cpoint % '_' % pname % "/var/lib/dpkg/info/grub-" % grub.name % ".list")) return true; + } + + return false; + }()); + + if(! ui->repairnext->isEnabled()) ui->repairnext->setEnabled(true); + } + else if(! (grub.isEFI && sb::issmfs("/mnt/boot", "/mnt/boot/efi")) && sb::execsrch("update-grub2", "/mnt") && sb::isfile("/mnt/var/lib/dpkg/info/grub-" % grub.name % ".list")) + { + grnst(); + if(! ui->repairnext->isEnabled()) ui->repairnext->setEnabled(true); + } + else + { + grnst(false); + if(ui->repairnext->isEnabled()) ui->repairnext->setDisabled(true); + } +} + +void systemback::on_systemrepair_clicked() +{ + if(ui->grubrepair->isChecked()) + { + if(ui->skipfstabrepair->isEnabled()) ui->skipfstabrepair->setDisabled(true); + + if(ui->autorepairoptions->isEnabled()) + { + ui->autorepairoptions->setDisabled(true); + for(QWdt wdgt : QWL{ui->grubreinstallrepair, ui->grubreinstallrepairdisable}) wdgt->setEnabled(true); + } + } + else + { + if(! ui->autorepairoptions->isEnabled()) ui->autorepairoptions->setEnabled(true), + on_autorepairoptions_clicked(ui->autorepairoptions->isChecked()); + + if(ui->grubreinstallrepair->findText(tr("Disabled")) == -1) ui->grubreinstallrepair->addItem(tr("Disabled")); + } + + rmntcheck(); +} + +void systemback::on_fullrepair_clicked() +{ + on_systemrepair_clicked(); +} + +void systemback::on_grubrepair_clicked() +{ + on_systemrepair_clicked(); + if(ui->grubreinstallrepair->currentText() == tr("Disabled")) ui->grubreinstallrepair->setCurrentIndex(0); + ui->grubreinstallrepair->removeItem(ui->grubreinstallrepair->findText(tr("Disabled"))); +} + +void systemback::on_repairnext_clicked() +{ + dialogopen(ui->systemrepair->isChecked() ? 101 : ui->fullrepair->isChecked() ? 102 : 109); +} + +void systemback::on_skipfstabrestore_clicked(bool chckd) +{ + if(chckd && ! sb::isfile("/etc/fstab")) ui->skipfstabrestore->setChecked(false); +} + +void systemback::on_skipfstabrepair_clicked(bool chckd) +{ + if(chckd && ! sb::isfile("/mnt/etc/fstab")) ui->skipfstabrepair->setChecked(false); +} + +void systemback::on_installnext_clicked() +{ + if(! grub.isEFI || ui->grubinstallcopy->isVisibleTo(ui->copypanel)) + { + if(ppipe ? sb::execsrch("update-grub2", sb::sdir[1] % '/' % cpoint % '_' % pname) && sb::isfile(sb::sdir[1] % '/' % cpoint % '_' % pname % "/var/lib/dpkg/info/grub-" % grub.name % ".list") : sb::execsrch("update-grub2") && sb::isfile("/var/lib/dpkg/info/grub-" % grub.name % ".list")) + { + if(ui->grubinstallcopydisable->isVisibleTo(ui->copypanel)) ui->grubinstallcopydisable->hide(), + ui->grubinstallcopy->show(); + } + else if(ui->grubinstallcopy->isVisibleTo(ui->copypanel)) + ui->grubinstallcopy->hide(), + ui->grubinstallcopydisable->show(); + } + + if(ppipe) + { + if(ui->usersettingscopy->isTristate()) + { + ui->usersettingscopy->setTristate(false); + if(! ui->usersettingscopy->isChecked()) ui->usersettingscopy->setChecked(true); + if(ui->usersettingscopy->text() == tr("Transfer user configuration and data files")) ui->usersettingscopy->setText(tr("Transfer user configuration files")); + ui->usersettingscopy->resize(fontMetrics().width(tr("Transfer user configuration files")) + ss(28), ui->usersettingscopy->height()); + } + } + else if(! ui->usersettingscopy->isTristate()) + ui->usersettingscopy->setTristate(true), + ui->usersettingscopy->setCheckState(Qt::PartiallyChecked), + ui->usersettingscopy->resize(fontMetrics().width(tr("Transfer user configuration and data files")) + ss(28), ui->usersettingscopy->height()); + + if(ui->userdatafilescopy->isVisibleTo(ui->copypanel)) ui->userdatafilescopy->hide(), + ui->usersettingscopy->show(); + + ui->installpanel->hide(), + ui->copypanel->show(), + ui->copyback->setFocus(); + + { + short nwidth(ss(154) + ui->partitionsettings->width() - ui->partitionsettings->contentsRect().width() + ui->partitionsettings->columnWidth(0) + ui->partitionsettings->columnWidth(1) + ui->partitionsettings->columnWidth(2) + ui->partitionsettings->columnWidth(3) + ui->partitionsettings->columnWidth(4) + ui->partitionsettings->columnWidth(5) + ui->partitionsettings->columnWidth(6)); + ushort sz[]{ss(698), ss(465), ss(60)}; + + if(nwidth > sz[0]) + { + ushort sz1(ss(850)); + windowmove(nwidth < sz1 ? nwidth : sz1, sz[1], false); + } + + wndw->setMinimumSize(sz[0], sz[1]); + QRect agm(sgeom(true)); + wndw->setMaximumSize(agm.width() - sz[2], agm.height() - sz[2]); + } + + if(ui->mountpoint->currentText().startsWith("/home/")) ui->mountpoint->setCurrentText(nullptr); + + if(ui->partitionsettings->currentItem()) + { + if(sb::mcheck("/.sbsystemcopy/") || sb::mcheck("/.sblivesystemwrite/")) + ui->copyback->setDisabled(true), + on_partitionrefresh_clicked(), + ui->copyback->setEnabled(true); + else + { + if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 3)->text() == "/home" && ui->mountpoint->isEnabled()) + { + if(ui->mountpoint->currentIndex()) ui->mountpoint->setCurrentIndex(0); + ui->mountpoint->setDisabled(true); + } + + if(nohmcpy[1]) + { + nohmcpy[1] = false; + + for(ushort a(0) ; a < ui->partitionsettings->rowCount() ; ++a) + if(ui->partitionsettings->item(a, 3)->text() == "/home" && ! ui->partitionsettings->item(a, 4)->text().isEmpty()) + { + ui->partitionsettings->item(a, 4)->setText(nullptr); + return ui->mountpoint->addItem("/home"); + } + } + } + } +} + +void systemback::on_partitionsettings_currentItemChanged(QTblWI *crrnt, QTblWI *prvs) +{ + if(crrnt && ! (prvs && crrnt->row() == prvs->row())) + { + if(ui->partitionsettingspanel2->isVisible()) + for(ushort a(prvs->row() + 1) ; a < ui->partitionsettings->rowCount() && ui->partitionsettings->item(a, 0)->background() != QBrush() ; ++a) ui->partitionsettings->item(a, 0)->setBackground(QBrush()), + ui->partitionsettings->item(a, 0)->setForeground(QBrush()); + + uchar type(ui->partitionsettings->item(crrnt->row(), 8)->text().toUShort()), pcnt(0); + + switch(type) { + case sb::MSDOS: + case sb::GPT: + case sb::Clear: + case sb::Extended: + { + if(ui->partitionsettingspanel2->isHidden()) ui->partitionsettingspanel1->isVisible() ? ui->partitionsettingspanel1->hide() : ui->partitionsettingspanel3->hide(), + ui->partitionsettingspanel2->show(); + + bool mntd(false), mntcheck(false); + QStr dev(ui->partitionsettings->item(crrnt->row(), 0)->text()); + + for(ushort a(crrnt->row() + 1) ; a < ui->partitionsettings->rowCount() && ((type == sb::Extended && ui->partitionsettings->item(a, 0)->text().startsWith(sb::left(dev, dev.contains("mmc") ? 12 : 8)) && sb::like(ui->partitionsettings->item(a, 8)->text().toInt(), {sb::Logical, sb::Emptyspace})) || (type != sb::Extended && ui->partitionsettings->item(a, 0)->text().startsWith(dev))) ; ++a) + { + ui->partitionsettings->item(a, 0)->setBackground(QPalette().highlight()), + ui->partitionsettings->item(a, 0)->setForeground(QPalette().highlightedText()); + + if(! mntcheck) + { + QStr mpt(ui->partitionsettings->item(a, 3)->text()); + + if(! mpt.isEmpty()) + { + if(! mntd) mntd = true; + + if(((ui->point1->isEnabled() || ui->pointpipe11->isEnabled()) && sb::sdir[0].startsWith(mpt)) || sb::like(mpt, {'_' % tr("Multiple mount points") % '_', "_/cdrom_", "_/live/image_", "_/lib/live/mount/medium_"})) + mntcheck = true; + else if(sb::isfile("/etc/fstab")) + { + QFile file("/etc/fstab"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QBA cline(file.readLine().trimmed()); + + if(! cline.startsWith('#') && sb::like(cline.replace('\t', ' ').replace("\\040", " "), {"* " % mpt % " *", "* " % mpt % "/ *"})) + { + mntcheck = true; + break; + } + } + } + } + } + } + + if(mntd) + { + if(ui->partitiondelete->isEnabled()) ui->partitiondelete->setDisabled(true); + + if(mntcheck) + { + if(ui->unmount->isEnabled()) ui->unmount->setDisabled(true); + } + else if(! ui->unmount->isEnabled()) + ui->unmount->setEnabled(true); + } + else + { + if(! ui->partitiondelete->isEnabled()) ui->partitiondelete->setEnabled(true); + if(ui->unmount->isEnabled()) ui->unmount->setDisabled(true); + } + + break; + } + case sb::Freespace: + { + QStr dev(sb::left(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 0)->text(), ui->partitionsettings->item(ui->partitionsettings->currentRow(), 0)->text().contains("mmc") ? 12 : 8)); + + for(ushort a(0) ; a < ui->partitionsettings->rowCount() && pcnt < 4 ; ++a) + if(ui->partitionsettings->item(a, 0)->text().startsWith(dev)) + switch(ui->partitionsettings->item(a, 8)->text().toUShort()) { + case sb::GPT: + pcnt = 5; + break; + case sb::Primary: + case sb::Extended: + ++pcnt; + } + } + case sb::Emptyspace: + if(ui->partitionsettingspanel3->isHidden()) ui->partitionsettingspanel1->isVisible() ? ui->partitionsettingspanel1->hide() : ui->partitionsettingspanel2->hide(), + ui->partitionsettingspanel3->show(); + + if(pcnt == 4) + { + if(ui->newpartition->isEnabled()) ui->newpartition->setDisabled(true); + } + else if(! ui->newpartition->isEnabled()) + ui->newpartition->setEnabled(true); + + ui->partitionsize->setMaximum((ui->partitionsettings->item(crrnt->row(), 10)->text().toULongLong() * 10 / 1048576 + 5) / 10), + ui->partitionsize->setValue(ui->partitionsize->maximum()); + break; + default: + if(ui->partitionsettingspanel1->isHidden()) ui->partitionsettingspanel2->isVisible() ? ui->partitionsettingspanel2->hide() : ui->partitionsettingspanel3->hide(), + ui->partitionsettingspanel1->show(); + + if(ui->partitionsettings->item(crrnt->row(), 3)->text().isEmpty()) + { + if(! ui->mountpoint->isEnabled()) ui->mountpoint->setEnabled(true); + + if(ui->unmountdelete->text() == tr("Unmount")) ui->unmountdelete->setText(tr("! Delete !")), + ui->unmountdelete->setStyleSheet("QPushButton:enabled{color: red}"); + + if(! ui->partitionsettings->item(crrnt->row(), 4)->text().isEmpty() && ui->partitionsettings->item(crrnt->row(), 5)->text() == "btrfs") + { + if(ui->format->isEnabled()) + { + ui->format->setDisabled(true); + if(ui->filesystem->isEnabled()) ui->filesystem->setDisabled(true); + } + + if(ui->filesystem->currentText() != "btrfs") ui->filesystem->setCurrentIndex(ui->filesystem->findText("btrfs")); + if(ui->unmountdelete->isEnabled()) ui->unmountdelete->setDisabled(true); + + if(ui->partitionsettings->item(crrnt->row(), 6)->text() == "-") + { + if(ui->format->isChecked()) ui->format->setChecked(false); + } + else if(! ui->format->isChecked()) + ui->format->setChecked(true); + } + else + { + if(! ui->filesystem->isEnabled()) + { + ui->filesystem->setEnabled(true); + if(! ui->format->isEnabled()) ui->format->setEnabled(true); + } + + if(! ui->format->isChecked()) ui->format->setChecked(true); + if(! ui->unmountdelete->isEnabled()) ui->unmountdelete->setEnabled(true); + schar indx(ui->filesystem->findText(ui->partitionsettings->item(crrnt->row(), 7)->text())); + if(indx != -1 && ui->filesystem->currentIndex() != indx) ui->filesystem->setCurrentIndex(indx); + } + + if(ui->mountpoint->currentIndex()) + ui->mountpoint->setCurrentIndex(0); + else if(! ui->mountpoint->currentText().isEmpty()) + ui->mountpoint->setCurrentText(nullptr); + } + else + { + if(ui->format->isEnabled()) + { + ui->format->setDisabled(true); + if(ui->filesystem->isEnabled()) ui->filesystem->setDisabled(true); + } + + if(ui->unmountdelete->text() == tr("! Delete !")) ui->unmountdelete->setText(tr("Unmount")), + ui->unmountdelete->setStyleSheet(nullptr); + + QStr mpt(ui->partitionsettings->item(crrnt->row(), 3)->text()); + + if(grub.isEFI && mpt == "/boot/efi") + { + if(! ui->mountpoint->isEnabled()) ui->mountpoint->setEnabled(true); + if(ui->unmountdelete->isEnabled()) ui->unmountdelete->setDisabled(true); + + if(ui->mountpoint->currentText() != "/boot/efi") + { + if(ui->mountpoint->currentIndex()) + ui->mountpoint->setCurrentIndex(0); + else if(! ui->mountpoint->currentText().isEmpty()) + ui->mountpoint->setCurrentText(nullptr); + } + } + else if(mpt == "SWAP") + { + for(QWdt wdgt : QWL{ui->mountpoint, ui->unmountdelete}) + if(! wdgt->isEnabled()) wdgt->setEnabled(true); + + if(ui->mountpoint->currentText() != "SWAP") + { + if(ui->mountpoint->currentIndex()) + ui->mountpoint->setCurrentIndex(0); + else if(! ui->mountpoint->currentText().isEmpty()) + ui->mountpoint->setCurrentText(nullptr); + } + else if(ui->partitionsettings->item(crrnt->row(), 4)->text() == "SWAP") + { + if(ui->changepartition->isEnabled()) ui->changepartition->setDisabled(true); + } + else if(! ui->changepartition->isEnabled()) + ui->changepartition->setEnabled(true); + } + else if(nohmcpy[0] && ui->userdatafilescopy->isVisible() && mpt == "/home") + { + if(! ui->mountpoint->isEnabled()) ui->mountpoint->setEnabled(true); + if(ui->unmountdelete->isEnabled()) ui->unmountdelete->setDisabled(true); + + if(ui->mountpoint->currentText() != "/home") + { + if(ui->mountpoint->currentIndex()) + ui->mountpoint->setCurrentIndex(0); + else if(! ui->mountpoint->currentText().isEmpty()) + ui->mountpoint->setCurrentText(nullptr); + } + } + else + { + if(ui->mountpoint->isEnabled()) ui->mountpoint->setDisabled(true); + + if(ui->mountpoint->currentIndex()) + { + ui->mountpoint->setCurrentIndex(0); + if(ui->changepartition->isEnabled()) ui->changepartition->setDisabled(true); + } + else if(! ui->mountpoint->currentText().isEmpty()) + ui->mountpoint->setCurrentText(nullptr); + + if(sb::sdir[0].startsWith(mpt) || sb::like(mpt, {'_' % tr("Multiple mount points") % '_', "_/cdrom_", "_/live/image_", "_/lib/live/mount/medium_"}) || [&mpt] { + if(sb::isfile("/etc/fstab")) + { + QFile file("/etc/fstab"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QBA cline(file.readLine().trimmed()); + if(! cline.startsWith('#') && sb::like(cline.replace('\t', ' ').replace("\\040", " "), {"* " % mpt % " *", "* " % mpt % "/ *"})) return true; + } + } + + return false; + }()) + { + if(ui->unmountdelete->isEnabled()) ui->unmountdelete->setDisabled(true); + } + else if(! ui->unmountdelete->isEnabled()) + ui->unmountdelete->setEnabled(true); + } + + if(! ui->format->isChecked()) ui->format->setChecked(true); + } + } + } +} + +void systemback::on_changepartition_clicked() +{ + busy(); + QStr ompt(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 4)->text()), mpt(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 3)->text()); + + if(! ompt.isEmpty()) + { + if(mpt.isEmpty() && ui->partitionsettings->item(ui->partitionsettings->currentRow(), 5)->text() == "btrfs") + { + ui->partitionsettings->setRowCount(ui->partitionsettings->rowCount() + 1); + + for(short a(ui->partitionsettings->rowCount() - 1) ; a > ui->partitionsettings->currentRow() - 1 ; --a) + for(uchar b(0) ; b < 11 ; ++b) + { + QTblWI *item(ui->partitionsettings->item(a, b)); + ui->partitionsettings->setItem(a + 1, b, item ? item->clone() : nullptr); + } + } + else if(ompt == "/") + ui->copynext->setDisabled(true), + ui->mountpoint->addItem("/"); + else if(grub.isEFI && ompt == "/boot/efi") + { + if(ui->grubinstallcopy->isVisible()) ui->grubinstallcopy->hide(), + ui->grubinstallcopydisable->show(); + + ui->mountpoint->addItem("/boot/efi"), + ui->efiwarning->show(); + } + else if(sb::like(ompt, {"_/home_", "_/boot_", "_/tmp_", "_/usr_", "_/usr/local_", "_/var_", "_/srv_", "_/opt_"})) + ui->mountpoint->addItem(ompt); + } + + if(mpt.isEmpty()) + { + ui->partitionsettings->item(ui->partitionsettings->currentRow(), 4)->setText(ui->mountpoint->currentText()); + + if(ui->mountpoint->currentText() == "/boot/efi") + { + if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 5)->text() != "vfat") ui->partitionsettings->item(ui->partitionsettings->currentRow(), 5)->setText("vfat"); + + if(grub.isEFI) + { + if(ppipe ? sb::execsrch("update-grub2", sb::sdir[1] % '/' % cpoint % '_' % pname) && sb::isfile(sb::sdir[1] % '/' % cpoint % '_' % pname % "/var/lib/dpkg/info/grub-" % grub.name % ".list") : sb::execsrch("update-grub2") && sb::isfile("/var/lib/dpkg/info/grub-" % grub.name % ".list")) + { + if(ui->grubinstallcopydisable->isVisible()) ui->grubinstallcopydisable->hide(), + ui->grubinstallcopy->show(); + } + else if(ui->grubinstallcopy->isVisible()) + ui->grubinstallcopy->hide(), + ui->grubinstallcopydisable->show(); + + ui->efiwarning->hide(); + } + } + else if(ui->mountpoint->currentText() != "SWAP") + { + if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 5)->text() != ui->filesystem->currentText()) ui->partitionsettings->item(ui->partitionsettings->currentRow(), 5)->setText(ui->filesystem->currentText()); + if(ui->mountpoint->currentText() == "/") ui->copynext->setEnabled(true); + } + else if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 5)->text() != "swap") + ui->partitionsettings->item(ui->partitionsettings->currentRow(), 5)->setText("swap"); + + if(ui->format->isChecked()) + { + if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 6)->text() == "-") ui->partitionsettings->item(ui->partitionsettings->currentRow(), 6)->setText("x"); + } + else if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 6)->text() == "x") + ui->partitionsettings->item(ui->partitionsettings->currentRow(), 6)->setText("-"); + + if(ui->filesystem->isEnabled() && ui->filesystem->currentText() == "btrfs") ui->filesystem->setDisabled(true), + ui->format->setDisabled(true); + } + else if(grub.isEFI && mpt == "/boot/efi") + { + ui->partitionsettings->item(ui->partitionsettings->currentRow(), 4)->setText("/boot/efi"), + ui->efiwarning->hide(); + + if(ppipe ? sb::execsrch("update-grub2", sb::sdir[1] % '/' % cpoint % '_' % pname) && sb::isfile(sb::sdir[1] % '/' % cpoint % '_' % pname % "/var/lib/dpkg/info/grub-" % grub.name % ".list") : sb::execsrch("update-grub2") && sb::isfile("/var/lib/dpkg/info/grub-" % grub.name % ".list")) + { + if(ui->grubinstallcopydisable->isVisible()) ui->grubinstallcopydisable->hide(), + ui->grubinstallcopy->show(); + } + else if(ui->grubinstallcopy->isVisible()) + ui->grubinstallcopy->hide(), + ui->grubinstallcopydisable->show(); + } + else if(nohmcpy[0] && mpt == "/home") + ui->partitionsettings->item(ui->partitionsettings->currentRow(), 4)->setText("/home"), + ui->userdatafilescopy->setDisabled(true), + nohmcpy[1] = true; + else + ui->partitionsettings->item(ui->partitionsettings->currentRow(), 4)->setText("SWAP"); + + if(ui->mountpoint->currentIndex() && ui->mountpoint->currentText() != "SWAP") ui->mountpoint->removeItem(ui->mountpoint->currentIndex()); + + if(ui->mountpoint->currentIndex()) + ui->mountpoint->setCurrentIndex(0); + else if(! ui->mountpoint->currentText().isEmpty()) + ui->mountpoint->setCurrentText(nullptr); + + ui->partitionsettings->item(ui->partitionsettings->currentRow(), 4)->setToolTip(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 4)->text()), + busy(false); +} + +void systemback::on_filesystem_currentIndexChanged(cQStr &arg1) +{ + if(! (ui->format->isChecked() || ui->partitionsettings->item(ui->partitionsettings->currentRow(), 7)->text() == arg1)) ui->format->setChecked(true); +} + +void systemback::on_format_clicked(bool chckd) +{ + if(! chckd) + { + if(ui->mountpoint->currentText() == "/boot/efi") + { + if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 7)->text() != "vfat") ui->format->setChecked(true); + } + else if(ui->mountpoint->currentText() == "SWAP") + { + if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 7)->text() != "swap") ui->format->setChecked(true); + } + else if(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 7)->text() != ui->filesystem->currentText()) + ui->format->setChecked(true); + } +} + +void systemback::on_mountpoint_currentTextChanged(cQStr &arg1) +{ + uchar ccnt(icnt == 100 ? icnt = 0 : ++icnt); + + if(ui->mountpoint->isEnabled()) + { + if(! arg1.isEmpty() && (! sb::like(arg1, {"_/*", "_S_", "_SW_", "_SWA_", "_SWAP_"}) || sb::like(arg1, {"* *", "*//*"}))) + ui->mountpoint->setCurrentText(sb::left(arg1, -1)); + else + { + QStr mpt(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 3)->text()), ompt(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 4)->text()); + + if(sb::like(mpt, {"_/boot/efi_", "_/home_", "_SWAP_"})) + { + if(ui->format->isEnabled()) + { + ui->format->setDisabled(true); + if(ui->filesystem->isEnabled()) ui->filesystem->setDisabled(true); + } + } + else if(ompt.isEmpty() || ui->partitionsettings->item(ui->partitionsettings->currentRow(), 5)->text() != "btrfs") + { + if(sb::like(arg1, {"_/boot/efi_", "_SWAP_"})) + { + if(ui->filesystem->isEnabled()) ui->filesystem->setDisabled(true); + } + else if(! ui->filesystem->isEnabled()) + ui->filesystem->setEnabled(true); + + if(! ui->format->isEnabled()) ui->format->setEnabled(true); + if(! ui->format->isChecked()) ui->format->setChecked(true); + } + else if(sb::like(arg1, {"_/boot/efi_", "_SWAP_"})) + return ui->changepartition->isEnabled() ? ui->changepartition->setDisabled(true) : void(); + + if(arg1.isEmpty() || (arg1.length() > 1 && arg1.endsWith('/')) || sb::like(arg1, {'_' % ompt % '_', "_/bin_", "_/sbin_", "_/etc_", "_/lib_", "_/lib32_", "_/lib64_", "_/media_"}) || (ui->usersettingscopy->isVisible() && arg1.startsWith("/home/")) || (arg1 != "/boot/efi" && ui->partitionsettings->item(ui->partitionsettings->currentRow(), 10)->text().toULongLong() < 268435456) || (grub.isEFI && mpt == "/boot/efi" && arg1 != "/boot/efi") || (nohmcpy[0] && mpt == "/home" && arg1 != "/home") || (mpt == "SWAP" && arg1 != "SWAP") + || (arg1 != "SWAP" && [&] { + for(ushort a(0) ; a < ui->partitionsettings->rowCount() ; ++a) + if(ui->partitionsettings->item(a, 4)->text() == arg1) return true; + + return false; + }())) + { + if(ui->changepartition->isEnabled()) ui->changepartition->setDisabled(true); + } + else if(! sb::like(arg1, {"_/_", "_/home_", "_/boot_", "_/boot/efi_", "_/tmp_", "_/usr_", "_/usr/local_", "_/var_", "_/srv_", "_/opt_", "_SWAP_"})) + { + if(ui->changepartition->isEnabled()) ui->changepartition->setDisabled(true); + sb::delay(300); + + if(ccnt == icnt && [&] { + switch(sb::stype(ppipe ? sb::sdir[1] % '/' % cpoint % '_' % pname % arg1 : arg1)) { + case sb::Notexist: + case sb::Isdir: + return true; + } + + return false; + }() && QTemporaryDir("/tmp/" % QStr(arg1).replace('/', '_') % '_' % sb::rndstr()).isValid()) ui->changepartition->setEnabled(true); + } + else if(! ui->changepartition->isEnabled()) + ui->changepartition->setEnabled(true); + } + } +} + +void systemback::on_copynext_clicked() +{ + dialogopen(ui->function1->text() == tr("System copy") ? 105 : 106); +} + +void systemback::on_repairpartitionrefresh_clicked() +{ + busy(), ui->repaircover->show(); + + { + QStr mnts(sb::fload("/proc/self/mounts", true)); + QTS in(&mnts, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + if(cline.contains(" /mnt")) sb::umount(cline.split(' ').at(1)); + } + } + + sb::fssync(), + ui->repairmountpoint->clear(), + ui->repairmountpoint->addItems({nullptr, "/mnt", "/mnt/home", "/mnt/boot"}); + if(grub.isEFI) ui->repairmountpoint->addItem("/mnt/boot/efi"); + ui->repairmountpoint->addItems({"/mnt/usr", "/mnt/var", "/mnt/opt", "/mnt/usr/local"}), + ui->repairmountpoint->setCurrentIndex(1), + rmntcheck(), + on_partitionrefresh2_clicked(), + on_repairmountpoint_currentTextChanged("/mnt"); + if(ui->repairpanel->isVisible() && ! ui->repairback->hasFocus()) ui->repairback->setFocus(); + ui->repaircover->hide(), busy(false); +} + +void systemback::on_repairpartition_currentIndexChanged(cQStr &arg1) +{ + ui->repairpartition->resize(fontMetrics().width(arg1) + ss(30), ui->repairpartition->height()), + ui->repairpartition->move(ui->repairmountpoint->x() - ui->repairpartition->width() - ss(8), ui->repairpartition->y()); +} + +void systemback::on_repairmountpoint_currentTextChanged(cQStr &arg1) +{ + uchar ccnt(icnt == 100 ? icnt = 0 : ++icnt); + + if(! arg1.isEmpty() && (! sb::like(arg1, {"_/_", "_/m_", "_/mn_", "_/mnt_", "_/mnt/*"}) || sb::like(arg1, {"* *", "*//*"}))) + ui->repairmountpoint->setCurrentText(sb::left(arg1, -1)); + else if(! arg1.startsWith("/mnt") || sb::like(arg1, {"*/_", "_/mnt/bin_", "_/mnt/sbin_", "_/mnt/etc_", "_/mnt/lib_", "_/mnt/lib32_", "_/mnt/lib64_", "_/mnt/media_"}) || (arg1.length() > 5 && sb::issmfs("/", "/mnt")) || sb::mcheck(arg1 % '/')) + { + if(ui->repairmount->isEnabled()) ui->repairmount->setDisabled(true); + } + else if(! sb::like(arg1, {"_/mnt_", "_/mnt/home_", "_/mnt/boot_", "_/mnt/boot/efi_", "_/mnt/usr_", "_/mnt/usr/local_", "_/mnt/var_", "_/mnt/opt_"})) + { + if(ui->repairmount->isEnabled()) ui->repairmount->setDisabled(true); + sb::delay(300); + if(ccnt == icnt && QTemporaryDir("/tmp/" % QStr(arg1).replace('/', '_') % '_' % sb::rndstr()).isValid()) ui->repairmount->setEnabled(true); + } + else if(! ui->repairmount->isEnabled()) + ui->repairmount->setEnabled(true); +} + +void systemback::on_repairmount_clicked() +{ + if(! ui->repairmount->text().isEmpty()) + { + busy(), ui->repaircover->show(); + + { + QStr path; + + for(cQStr &cpath : sb::right(ui->repairmountpoint->currentText(), -5).split('/')) + if(! (sb::isdir("/mnt/" % path.append('/' % cpath)) || sb::crtdir("/mnt" % path))) sb::rename("/mnt" % path, "/mnt" % path % '_' % sb::rndstr()), + sb::crtdir("/mnt" % path); + } + + if(sb::mount(ui->repairpartition->currentText(), ui->repairmountpoint->currentText())) + { + on_partitionrefresh2_clicked(); + + if(ui->repairmountpoint->currentIndex()) + { + ui->repairmountpoint->removeItem(ui->repairmountpoint->currentIndex()); + if(ui->repairmountpoint->currentIndex()) ui->repairmountpoint->setCurrentIndex(0); + } + else if(! ui->repairmountpoint->currentText().isEmpty()) + ui->repairmountpoint->setCurrentText(nullptr); + } + else + ui->repairmount->setText(nullptr), + ui->repairmount->setIcon(QIcon(":pictures/error.png")); + + ui->repaircover->hide(), busy(false); + + if(ui->repairmount->text().isEmpty()) ui->repairmount->setEnabled(true), + sb::delay(500), + ui->repairmount->setIcon(QIcon()), + ui->repairmount->setText(tr("Mount")); + } + + if(! (ui->repairback->hasFocus() || ui->repairmountpoint->hasFocus())) ui->repairback->setFocus(); +} + +void systemback::on_livename_textChanged(cQStr &arg1) +{ + uchar ccnt(icnt == 100 ? icnt = 0 : ++icnt); + + if(cpos > -1) ui->livename->setCursorPosition(cpos), + cpos = -1; + + if([&arg1] { + for(uchar a(0) ; a < arg1.length() ; ++a) + { + cQChar &ctr(arg1.at(a)); + if(ctr == '/' || ((ctr < 'a' || ctr > 'z') && (ctr < 'A' || ctr > 'Z') && ! (ctr.isDigit() || ctr.isPunct()))) return true; + } + + return false; + }() || arg1.toUtf8().length() > 32 || arg1.toLower().endsWith(".iso")) + + ui->livename->setText(QStr(arg1).replace(cpos = ui->livename->cursorPosition() - 1, 1, nullptr)); + else + { + if(ui->livenamepipe->isVisible()) ui->livenamepipe->hide(); + + if(arg1 == "auto") + { + QFont fnt; + fnt.setItalic(true), + ui->livename->setFont(fnt); + if(ui->livenameerror->isVisible()) ui->livenameerror->hide(); + } + else + { + if(ui->livenew->isEnabled()) ui->livenew->setDisabled(true); + if(ui->livename->fontInfo().italic()) ui->livename->setFont(font()); + + if(! arg1.isEmpty()) + { + sb::delay(300); + + if(ccnt == icnt) + { + if(QTemporaryDir("/tmp/" % arg1 % '_' % sb::rndstr()).isValid()) + { + if(ui->livenameerror->isVisible()) ui->livenameerror->hide(); + ui->livenamepipe->show(); + } + else if(ui->livenameerror->isHidden()) + ui->livenameerror->show(); + } + } + else if(ui->livenameerror->isHidden()) + ui->livenameerror->show(); + } + } +} + +void systemback::dirxpnd(QTrWI *item, bool inc) +{ + item->setBackgroundColor(0, Qt::transparent), + busy(); + cQTrWI *twi(item); + QStr path('/' % twi->text(0)); + while(twi->parent()) path.prepend('/' % (inc ? (twi = twi->parent())->text(0) : sb::left((twi = twi->parent())->text(0), -1))); + QLW clw(inc ? ui->includedlist : ui->excludedlist); + + auto itmxpnd([&](cQStr &pdir) { + QStr fpath(pdir % path); + + for(ushort a(0) ; a < item->childCount() ; ++a) + { + QTrWI *ctwi(item->child(a)); + QStr iname(ctwi->text(0)), ipath(fpath % '/' % iname); + + if(sb::stype(ipath) == sb::Isdir) + { + if(ctwi->icon(0).isNull()) ctwi->setIcon(0, QIcon(QPixmap(":pictures/dir.png").scaled(ss(12), ss(9), Qt::IgnoreAspectRatio, Qt::SmoothTransformation))); + QStr epath(sb::right(path, -1) % '/' % iname % '/'); + + if(clw->findItems(epath, Qt::MatchExactly).isEmpty()) + { + QSL itmlst; + itmlst.reserve(ctwi->childCount()); + for(ushort b(0) ; b < ctwi->childCount() ; ++b) itmlst.append(ctwi->child(b)->text(0)); + + for(cQStr &siname : QDir(ipath).entryList(QDir::AllEntries | QDir::Hidden | QDir::NoDotAndDotDot)) + { + if(clw->findItems(epath % siname, Qt::MatchExactly).isEmpty()) + { + for(ushort b(0) ; b < itmlst.count() ; ++b) + if(itmlst.at(b) == siname) + { + itmlst.removeAt(b); + goto next; + } + + QTrWI *sctwi(new QTrWI); + sctwi->setText(0, siname), + ctwi->addChild(sctwi); + } + + next:; + } + } + } + + ctwi->sortChildren(0, Qt::AscendingOrder); + } + }); + + if(sb::stype("/root" % path) == sb::Isdir) itmxpnd("/root"); + QFile file("/etc/passwd"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr usr(file.readLine().trimmed()); + if(usr.contains(":/home/") && sb::stype("/home/" % (usr = sb::left(usr, sb::instr(usr, ":") -1)) % path) == sb::Isdir) itmxpnd("/home/" % usr); + } + + busy(false); +} + +void systemback::on_excludeitemslist_itemExpanded(QTrWI *item) +{ + if(item->backgroundColor(0) != Qt::transparent) dirxpnd(item); + item->setText(0, item->text(0) % '/'); +} + +void systemback::on_includeitemslist_itemExpanded(QTrWI *item) +{ + if(item->backgroundColor(0) != Qt::transparent) dirxpnd(item, true); +} + +void systemback::on_excludeitemslist_itemCollapsed(QTrWI *item) +{ + item->setText(0, sb::left(item->text(0), -1)); +} + +void systemback::on_excludeitemslist_currentItemChanged(QTrWI *crrnt) +{ + if(crrnt && ! ui->excludeadditem->isEnabled()) + { + ui->excludeadditem->setEnabled(true); + + if(ui->excluderemoveitem->isEnabled()) ui->excludedlist->setCurrentItem(nullptr), + ui->excluderemoveitem->setDisabled(true); + } +} + +void systemback::on_includeitemslist_currentItemChanged(QTrWI *crrnt) +{ + if(crrnt && ! ui->includeadditem->isEnabled()) + { + ui->includeadditem->setEnabled(true); + + if(ui->includeremoveitem->isEnabled()) ui->includedlist->setCurrentItem(nullptr), + ui->includeremoveitem->setDisabled(true); + } +} + +void systemback::on_excludedlist_currentItemChanged(QLWI *crrnt) +{ + if(crrnt && ! ui->excluderemoveitem->isEnabled()) + { + ui->excluderemoveitem->setEnabled(true); + + if(ui->excludeadditem->isEnabled()) ui->excludeitemslist->setCurrentItem(nullptr), + ui->excludeadditem->setDisabled(true); + } +} + +void systemback::on_includedlist_currentItemChanged(QLWI *crrnt) +{ + if(crrnt && ! ui->includeremoveitem->isEnabled()) + { + ui->includeremoveitem->setEnabled(true); + + if(ui->includeadditem->isEnabled()) ui->includeitemslist->setCurrentItem(nullptr), + ui->includeadditem->setDisabled(true); + } +} + +void systemback::on_excludeadditem_clicked() +{ + busy(), ui->excludecover->show(); + cQTrWI *twi(ui->excludeitemslist->currentItem()); + QStr path(twi->text(0)); + while(twi->parent()) path.prepend((twi = twi->parent())->text(0)); + QStr elst; + QFile file(excfile); + + if(sb::fopen(file)) + { + while(! file.atEnd()) + { + QStr cline(sb::left(file.readLine(), -1)); + if(! (cline.isEmpty() || cline.startsWith(path))) elst.append(cline % '\n'); + } + + file.close(); + + if(sb::crtfile(excfile, elst.append(path % '\n'))) + { + if(ui->excludedlist->count()) ui->excludedlist->clear(); + QTS in(&elst, QIODevice::ReadOnly); + + while(! in.atEnd()) + { + QStr cline(in.readLine()); + + if(sb::like(cline, {"_.*", "_snap_", "_snap/*"})) + { + if(ui->pointexclude->isChecked()) ui->excludedlist->addItem(cline); + } + else if(ui->liveexclude->isChecked()) + ui->excludedlist->addItem(cline); + } + + if(path.endsWith('/')) + { + ui->excludeitemslist->currentItem()->setExpanded(false); + QList ilst; + ilst.reserve((twi = ui->excludeitemslist->currentItem())->childCount()); + for(ushort a(0) ; a < twi->childCount() ; ++a) ilst.append(twi->child(a)); + for(cQTrWI *ctwi : ilst) delete ctwi; + } + else + { + QTrWI *ptwi(ui->excludeitemslist->currentItem()->parent()); + delete ui->excludeitemslist->currentItem(); + if(ptwi && ! ptwi->childCount()) ptwi->setText(0, sb::left(ptwi->text(0), -1)); + } + + ui->excludeitemslist->setCurrentItem(nullptr), + ui->excludeadditem->setDisabled(true), + ui->excludeback->setFocus(); + } + } + + ui->excludecover->hide(), busy(false); +} + +void systemback::on_includeadditem_clicked() +{ + busy(), ui->includecover->show(); + cQTrWI *twi(ui->includeitemslist->currentItem()); + QStr path(twi->text(0)); + while(twi->parent()) path.prepend((twi = twi->parent())->text(0) % '/'); + QStr ilst; + QFile file(incfile); + + if(sb::fopen(file)) + { + while(! file.atEnd()) + { + QStr cline(sb::left(file.readLine(), -1)); + if(! (cline.isEmpty() || cline.startsWith(path))) ilst.append(cline % '\n'); + } + + file.close(); + + if(sb::crtfile(incfile, ilst.append(path % '\n'))) + { + if(ui->includedlist->count()) ui->includedlist->clear(); + QTS in(&ilst, QIODevice::ReadOnly); + while(! in.atEnd()) ui->includedlist->addItem(in.readLine()); + QTrWI *ptwi(ui->includeitemslist->currentItem()->parent()); + delete ui->includeitemslist->currentItem(); + if(ptwi && ! ptwi->childCount()) ptwi->setText(0, sb::left(ptwi->text(0), -1)); + ui->includeitemslist->setCurrentItem(nullptr), + ui->includeadditem->setDisabled(true), + ui->includeback->setFocus(); + } + } + + ui->includecover->hide(), busy(false); +} + +void systemback::on_excluderemoveitem_clicked() +{ + busy(), ui->excludecover->show(); + QFile file(excfile); + + if(sb::fopen(file)) + { + QStr ctxt(ui->excludedlist->currentItem()->text()), elst; + + while(! file.atEnd()) + { + QStr cline(sb::left(file.readLine(), -1)); + if(! (cline.isEmpty() || cline == ctxt)) elst.append(cline % '\n'); + } + + file.close(); + + if(sb::crtfile(excfile, elst)) delete ui->excludedlist->currentItem(), + ui->excludedlist->setCurrentItem(nullptr), + ui->excluderemoveitem->setDisabled(true), + ilstupdt(), + ui->excludeback->setFocus(); + } + + ui->excludecover->hide(), busy(false); +} + +void systemback::on_includeremoveitem_clicked() +{ + busy(), ui->includecover->show(); + QFile file(incfile); + + if(sb::fopen(file)) + { + QStr ctxt(ui->includedlist->currentItem()->text()), ilst; + + while(! file.atEnd()) + { + QStr cline(sb::left(file.readLine(), -1)); + if(! (cline.isEmpty() || cline == ctxt)) ilst.append(cline % '\n'); + } + + file.close(); + + if(sb::crtfile(incfile, ilst)) delete ui->includedlist->currentItem(), + ui->includedlist->setCurrentItem(nullptr), + ui->includeremoveitem->setDisabled(true), + ilstupdt(true), + ui->includeback->setFocus(); + } + + ui->includecover->hide(), busy(false); +} + +void systemback::on_fullname_textChanged(cQStr &arg1) +{ + if(cpos > -1) ui->fullname->setCursorPosition(cpos), + cpos = -1; + + if(arg1.isEmpty()) + { + if(ui->fullnamepipe->isVisible()) + ui->fullnamepipe->hide(); + else if(ui->installnext->isEnabled()) + ui->installnext->setDisabled(true); + } + else if([&arg1] { + for(uchar a(0) ; a < arg1.length() ; ++a) + { + cQChar &ctr(arg1.at(a)); + if(ctr == ':' || ctr == ',' || ctr == '=' || ! (ctr.isLetterOrNumber() || ctr.isPrint())) return true; + } + + return false; + }() || sb::like(arg1, {"_ *", "* *", "*ß*"})) + + ui->fullname->setText(QStr(arg1).replace(cpos = ui->fullname->cursorPosition() - 1, 1, nullptr)); + else if(arg1.at(0).isLower()) + cpos = ui->fullname->cursorPosition(), + ui->fullname->setText(arg1.at(0).toUpper() % sb::right(arg1, -1)); + else + { + for(cQStr &word : arg1.split(' ')) + if(! word.isEmpty() && word.at(0).isLower()) + { + cpos = ui->fullname->cursorPosition(); + return ui->fullname->setText(QStr(arg1).replace(' ' % word.at(0) % sb::right(word, -1), ' ' % word.at(0).toUpper() % sb::right(word, -1))); + } + + if(ui->fullnamepipe->isHidden()) ui->fullnamepipe->show(); + } +} + +void systemback::on_fullname_editingFinished() +{ + if(ui->fullname->text().endsWith(' ')) ui->fullname->setText(ui->fullname->text().trimmed()); +} + +void systemback::on_username_textChanged(cQStr &arg1) +{ + if(cpos > -1) ui->username->setCursorPosition(cpos), + cpos = -1; + + if(arg1.isEmpty()) + { + if(ui->usernameerror->isVisible()) + ui->usernameerror->hide(); + else if(ui->usernamepipe->isVisible()) + { + ui->usernamepipe->hide(); + if(ui->installnext->isEnabled()) ui->installnext->setDisabled(true); + } + } + else if(arg1 == "root") + { + if(ui->usernameerror->isHidden()) + { + if(ui->usernamepipe->isVisible()) + { + ui->usernamepipe->hide(); + if(ui->installnext->isEnabled()) ui->installnext->setDisabled(true); + } + + ui->usernameerror->show(); + } + } + else if(arg1 != arg1.toLower()) + ui->username->setText(arg1.toLower()); + else if([&arg1] { + for(uchar a(0) ; a < arg1.length() ; ++a) + { + cQChar &ctr(arg1.at(a)); + if((ctr < 'a' || ctr > 'z') && ! (ctr == '.' || ctr == '_' || ctr == '@' || (a && (ctr.isDigit() || ctr == '-' || ctr == '$')))) return true; + } + + return false; + }() || (arg1.contains('$') && (arg1.count('$') > 1 || ! arg1.endsWith('$')))) + + ui->username->setText(QStr(arg1).replace(cpos = ui->username->cursorPosition() - 1, 1, nullptr)); + else if(ui->usernamepipe->isHidden()) + { + if(ui->usernameerror->isVisible()) ui->usernameerror->hide(); + ui->usernamepipe->show(); + } +} + +void systemback::on_hostname_textChanged(cQStr &arg1) +{ + if(cpos > -1) ui->hostname->setCursorPosition(cpos), + cpos = -1; + + if(arg1.isEmpty()) + { + if(ui->hostnameerror ->isVisible()) + ui->hostnameerror->hide(); + else if(ui->hostnamepipe->isVisible()) + { + ui->hostnamepipe->hide(); + if(ui->installnext->isEnabled()) ui->installnext->setDisabled(true); + } + } + else if(arg1.length() > 1 && sb::like(arg1, {"*._", "*-_"}) && ! sb::like(arg1, {"*..*", "*--*", "*.-*", "*-.*"})) + { + if(ui->hostnameerror->isHidden()) + { + if(ui->hostnamepipe->isVisible()) + { + ui->hostnamepipe->hide(); + if(ui->installnext->isEnabled()) ui->installnext->setDisabled(true); + } + + ui->hostnameerror->show(); + } + } + else if([&arg1] { + for(uchar a(0) ; a < arg1.length() ; ++a) + { + cQChar &ctr(arg1.at(a)); + if((ctr < 'a' || ctr > 'z') && (ctr < 'A' || ctr > 'Z') && ! (ctr.isDigit() || (a && (ctr == '-' || ctr == '.')))) return true; + } + + return false; + }() || (arg1.length() > 1 && sb::like(arg1, {"*..*", "*--*", "*.-*", "*-.*"}))) + + ui->hostname->setText(QStr(arg1).replace(cpos = ui->hostname->cursorPosition() - 1, 1, nullptr)); + else if(ui->hostnamepipe->isHidden()) + { + if(ui->hostnameerror->isVisible()) ui->hostnameerror->hide(); + ui->hostnamepipe->show(); + } +} + +void systemback::on_password1_textChanged(cQStr &arg1) +{ + if(ui->passwordpipe->isVisible()) + { + ui->passwordpipe->hide(); + if(ui->installnext->isEnabled()) ui->installnext->setDisabled(true); + } + + if(arg1.isEmpty()) + { + if(! ui->password2->text().isEmpty()) ui->password2->clear(); + if(ui->password2->isEnabled()) ui->password2->setDisabled(true); + if(ui->passworderror->isVisible()) ui->passworderror->hide(); + } + else + { + if(! ui->password2->isEnabled()) ui->password2->setEnabled(true); + + if(ui->password2->text().isEmpty()) + { + if(ui->passworderror->isVisible()) ui->passworderror->hide(); + } + else if(arg1 == ui->password2->text()) + { + if(ui->passworderror->isVisible()) ui->passworderror->hide(); + ui->passwordpipe->show(); + } + else if(ui->passworderror->isHidden()) + ui->passworderror->show(); + } +} + +void systemback::on_password2_textChanged() +{ + on_password1_textChanged(ui->password1->text()); +} + +void systemback::on_rootpassword1_textChanged(cQStr &arg1) +{ + if(ui->rootpasswordpipe->isVisible()) + { + ui->rootpasswordpipe->hide(); + if(ui->installnext->isEnabled()) ui->installnext->setDisabled(true); + } + + if(arg1.isEmpty()) + { + if(! ui->rootpassword2->text().isEmpty()) ui->rootpassword2->clear(); + if(ui->rootpassword2->isEnabled()) ui->rootpassword2->setDisabled(true); + if(ui->rootpassworderror->isVisible()) ui->rootpassworderror->hide(); + } + else + { + if(! ui->rootpassword2->isEnabled()) ui->rootpassword2->setEnabled(true); + + if(ui->rootpassword2->text().isEmpty()) + { + if(ui->rootpassworderror->isVisible()) ui->rootpassworderror->hide(); + } + else if(arg1 == ui->rootpassword2->text()) + { + if(ui->rootpassworderror->isVisible()) ui->rootpassworderror->hide(); + ui->rootpasswordpipe->show(); + } + else if(ui->rootpassworderror->isHidden()) + ui->rootpassworderror->show(); + } +} + +void systemback::on_rootpassword2_textChanged() +{ + on_rootpassword1_textChanged(ui->rootpassword1->text()); +} + +void systemback::on_schedulerstate_clicked() +{ + if(ui->schedulerstate->isChecked()) + { + if(! sb::schdle[0]) + { + sb::schdle[0] = sb::True; + if(sb::isdir(sb::sdir[1]) && sb::access(sb::sdir[1], sb::Write)) sb::crtfile(sb::sdir[1] % "/.sbschedule"); + } + + ui->schedulerstate->setText(tr("Enabled")); + if(sb::schdle[1]) ui->daydown->setEnabled(true); + if(sb::schdle[1] < 7) ui->dayup->setEnabled(true); + if(sb::schdle[2]) ui->hourdown->setEnabled(true); + if(sb::schdle[2] < 23) ui->hourup->setEnabled(true); + if(sb::schdle[3] && (sb::schdle[1] || sb::schdle[2] || sb::schdle[3] > 30)) ui->minutedown->setEnabled(true); + if(sb::schdle[3] < 59) ui->minuteup->setEnabled(true); + ui->silentmode->setEnabled(true); + + if(! sb::schdle[5]) + { + if(sb::schdle[4] > 10) ui->seconddown->setEnabled(true); + if(sb::schdle[4] < 99) ui->secondup->setEnabled(true); + ui->windowposition->setEnabled(true); + } + } + else + { + sb::schdle[0] = sb::False, + ui->schedulerstate->setText(tr("Disabled")), + ui->silentmode->setDisabled(true); + if(ui->windowposition->isEnabled()) ui->windowposition->setDisabled(true); + + for(QPB pbtn : ui->schedulerdayhrminpanel->findChildren()) + if(pbtn->isEnabled()) pbtn->setDisabled(true); + + for(QWdt wdgt : QWL{ui->secondup, ui->seconddown}) + if(wdgt->isEnabled()) wdgt->setDisabled(true); + } +} + +void systemback::on_silentmode_clicked(bool chckd) +{ + if(! chckd) + { + sb::schdle[5] = sb::False; + if(sb::schdle[4] > 10) ui->seconddown->setEnabled(true); + if(sb::schdle[4] < 99) ui->secondup->setEnabled(true); + ui->windowposition->setEnabled(true); + } + else if(! sb::schdle[5]) + { + sb::schdle[5] = sb::True, + ui->windowposition->setDisabled(true); + + for(QWdt wdgt : QWL{ui->secondup, ui->seconddown}) + if(wdgt->isEnabled()) wdgt->setDisabled(true); + } +} + +void systemback::on_dayup_clicked() +{ + ++sb::schdle[1], + ui->schedulerday->setText(QStr::number(sb::schdle[1]) % ' ' % tr("day(s)")); + if(! ui->daydown->isEnabled()) ui->daydown->setEnabled(true); + if(sb::schdle[1] == 7) ui->dayup->setDisabled(true); + if(! ui->minutedown->isEnabled() && sb::schdle[3]) ui->minutedown->setEnabled(true); +} + +void systemback::on_daydown_clicked() +{ + --sb::schdle[1], + ui->schedulerday->setText(QStr::number(sb::schdle[1]) % ' ' % tr("day(s)")); + if(! ui->dayup->isEnabled()) ui->dayup->setEnabled(true); + + if(! sb::schdle[1]) + { + if(! sb::schdle[2]) + { + if(sb::schdle[3] < 30) sb::schdle[3] = 30, + ui->schedulerminute->setText(QStr::number(sb::schdle[3]) % ' ' % tr("minute(s)")); + + if(ui->minutedown->isEnabled() && sb::schdle[3] < 31) ui->minutedown->setDisabled(true); + } + + ui->daydown->setDisabled(true); + } +} + +void systemback::on_hourup_clicked() +{ + ++sb::schdle[2], + ui->schedulerhour->setText(QStr::number(sb::schdle[2]) % ' ' % tr("hour(s)")); + if(! ui->hourdown->isEnabled()) ui->hourdown->setEnabled(true); + if(sb::schdle[2] == 23) ui->hourup->setDisabled(true); + if(! ui->minutedown->isEnabled() && sb::schdle[3]) ui->minutedown->setEnabled(true); +} + +void systemback::on_hourdown_clicked() +{ + --sb::schdle[2], + ui->schedulerhour->setText(QStr::number(sb::schdle[2]) % ' ' % tr("hour(s)")); + if(! ui->hourup->isEnabled()) ui->hourup->setEnabled(true); + + if(! sb::schdle[2]) + { + if(! sb::schdle[1]) + { + if(sb::schdle[3] < 30) sb::schdle[3] = 30, + ui->schedulerminute->setText(QStr::number(sb::schdle[3]) % ' ' % tr("minute(s)")); + + if(ui->minutedown->isEnabled() && sb::schdle[3] < 31) ui->minutedown->setDisabled(true); + } + + ui->hourdown->setDisabled(true); + } +} + +void systemback::on_minuteup_clicked() +{ + sb::schdle[3] = sb::schdle[3] + (sb::schdle[3] == 55 ? 4 : 5), + ui->schedulerminute->setText(QStr::number(sb::schdle[3]) % ' ' % tr("minute(s)")); + if(! ui->minutedown->isEnabled()) ui->minutedown->setEnabled(true); + if(sb::schdle[3] == 59) ui->minuteup->setDisabled(true); +} + +void systemback::on_minutedown_clicked() +{ + sb::schdle[3] = sb::schdle[3] - (sb::schdle[3] == 59 ? 4 : 5), + ui->schedulerminute->setText(QStr::number(sb::schdle[3]) % ' ' % tr("minute(s)")); + if(! ui->minuteup->isEnabled()) ui->minuteup->setEnabled(true); + if(! sb::schdle[3] || (sb::schdle[3] == 30 && ! (sb::schdle[1] || sb::schdle[2]))) ui->minutedown->setDisabled(true); +} + +void systemback::on_secondup_clicked() +{ + sb::schdle[4] = sb::schdle[4] + (sb::schdle[4] == 95 ? 4 : 5), + ui->schedulersecond->setText(QStr::number(sb::schdle[4]) % ' ' % tr("seconds")); + if(! ui->seconddown->isEnabled()) ui->seconddown->setEnabled(true); + if(sb::schdle[4] == 99) ui->secondup->setDisabled(true); +} + +void systemback::on_seconddown_clicked() +{ + sb::schdle[4] = sb::schdle[4] - (sb::schdle[4] == 99 ? 4 : 5), + ui->schedulersecond->setText(QStr::number(sb::schdle[4]) % ' ' % tr("seconds")); + if(! ui->secondup->isEnabled()) ui->secondup->setEnabled(true); + if(sb::schdle[4] == 10) ui->seconddown->setDisabled(true); +} + +void systemback::on_windowposition_currentIndexChanged(cQStr &arg1) +{ + ui->windowposition->resize(fontMetrics().width(arg1) + ss(30), ui->windowposition->height()); + + if(ui->schedulepanel->isVisible()) + { + QStr cval(arg1 == tr("Top left") ? "topleft" + : arg1 == tr("Top right") ? "topright" + : arg1 == tr("Center") ? "center" + : arg1 == tr("Bottom left") ? "bottomleft" : "bottomright"); + + if(sb::schdlr[0] != cval) sb::schdlr[0] = cval; + } +} + +void systemback::on_userdatainclude_clicked(bool chckd) +{ + if(chckd) + { + ullong hfree(sb::dfree("/home")); + QFile file("/etc/passwd"); + + if(hfree > 104857600 && sb::dfree("/root") > 104857600 && sb::fopen(file)) + while(! file.atEnd()) + { + QStr usr(file.readLine().trimmed()); + if(usr.contains(":/home/") && sb::isdir("/home/" % (usr = sb::left(usr, sb::instr(usr, ":") -1))) && sb::dfree("/home/" % usr) != hfree) return ui->userdatainclude->setChecked(false); + } + else + ui->userdatainclude->setChecked(false); + } +} + +void systemback::on_interrupt_clicked() +{ + if(! (irblck || intrrpt)) + { + if(! intrptimer) + { + pset(13), + intrrpt = true, + ui->interrupt->setDisabled(true); + if(! sb::ExecKill) sb::ExecKill = true; + + if(sb::SBThrd.isRunning()) sb::ThrdKill = true, + sb::thrdelay(), + sb::error("\n " % tr("Systemback worker thread is interrupted by the user.") % "\n\n"); + + connect(intrptimer = new QTimer, +#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) + SIGNAL(timeout()), this, SLOT(on_interrupt_clicked()) +#else + &QTimer::timeout, this, &systemback::on_interrupt_clicked +#endif + ); + + intrptimer->start(100); + } + else if(sstart) + sb::crtfile(sb::sdir[1] % "/.sbschedule"), + close(); + else + { + delete intrptimer, intrptimer = nullptr; + + if(fscrn) + { + ui->statuspanel->hide(), + ui->mainpanel->show(); + short nwidth(ss(154) + ui->partitionsettings->width() - ui->partitionsettings->contentsRect().width() + ui->partitionsettings->columnWidth(0) + ui->partitionsettings->columnWidth(1) + ui->partitionsettings->columnWidth(2) + ui->partitionsettings->columnWidth(3) + ui->partitionsettings->columnWidth(4) + ui->partitionsettings->columnWidth(5) + ui->partitionsettings->columnWidth(6)); + ushort sz[]{ss(850), ss(465), ss(60)}; + windowmove(nwidth < sz[0] ? nwidth : sz[0], sz[1], false), + ui->wpanel->setMinimumSize(ss(698), sz[1]), + ui->wpanel->setMaximumSize(width() - sz[2], height() - sz[2]); + } + else + { + for(QCB ckbx : ui->sbpanel->findChildren()) + if(ckbx->isChecked()) ckbx->setChecked(false); + + on_pointpipe1_clicked(), + ui->statuspanel->hide(); + + if(ui->livepanel->isVisibleTo(ui->mainpanel)) + ui->liveback->setFocus(); + else if(! ui->sbpanel->isVisibleTo(ui->mainpanel)) + { + ui->sbpanel->show(), + ui->function1->setText("Systemback"); + + if(ui->restorepanel->isVisibleTo(ui->mainpanel)) + ui->restorepanel->hide(); + else if(ui->copypanel->isVisibleTo(ui->mainpanel)) + ui->copypanel->hide(); + else if(ui->repairpanel->isVisibleTo(ui->mainpanel)) + ui->repairpanel->hide(); + + ui->functionmenunext->isEnabled() ? ui->functionmenunext->setFocus() : ui->functionmenuback->setFocus(); + } + + ui->mainpanel->show(), + windowmove(ss(698), ss(465)); + } + } + } +} + +void systemback::on_livewritestart_clicked() +{ + dialogopen(108); +} + +void systemback::on_schedulerlater_clicked() +{ + if(sb::isdir(sb::sdir[1]) && sb::access(sb::sdir[1], sb::Write)) sb::crtfile(sb::sdir[1] % "/.sbschedule"); + close(); +} + +void systemback::on_scalingup_clicked() +{ + ui->scalingfactor->setText([this] { + if(ui->scalingfactor->text() == "auto") + { + ui->scalingdown->setEnabled(true); + return "x1"; + } + else if(ui->scalingfactor->text() == "x1") + return "x1.5"; + + ui->scalingup->setDisabled(true); + return "x2"; + }()); +} + +void systemback::on_scalingdown_clicked() +{ + ui->scalingfactor->setText([this] { + if(ui->scalingfactor->text() == "x2") + { + ui->scalingup->setEnabled(true); + return "x1.5"; + } + else if(ui->scalingfactor->text() == "x1.5") + return "x1"; + + ui->scalingdown->setDisabled(true); + return "auto"; + }()); +} + +void systemback::on_newrestorepoint_clicked() +{ + statustart(); + + auto err([this] { + if(intrrpt) + intrrpt = false; + else + { + dialogopen(sb::dfree(sb::sdir[1]) < 104857600 ? 305 : 319); + if(! sstart) pntupgrade(); + } + }); + + for(cQStr &item : QDir(sb::sdir[1]).entryList(QDir::Dirs | QDir::Hidden | QDir::NoSymLinks | QDir::NoDotAndDotDot)) + if(sb::like(item, {"_.DELETED_*", "_.S00_*"})) + { + if(prun.type != 12) pset(12); + if(! sb::remove(sb::sdir[1] % '/' % item) || intrrpt) return err(); + } + + for(uchar a(9) ; a > 1 ; --a) + if(! sb::pnames[a].isEmpty() && (a == 9 || a > 2 ? sb::pnumber < a + 2 : sb::pnumber == 3)) ++ppipe; + + if(ppipe) + { + uchar dnum(0); + + for(uchar a(9) ; a > 1 ; --a) + if(! sb::pnames[a].isEmpty() && (a == 9 || a > 2 ? sb::pnumber < a + 2 : sb::pnumber == 3)) + { + pset(14, bstr(QStr::number(++dnum) % '/' % QStr::number(ppipe))); + if(! (sb::rename(sb::sdir[1] % (a < 9 ? QStr("/S0" % QStr::number(a + 1)) : "/S10") % '_' % sb::pnames[a], sb::sdir[1] % "/.DELETED_" % sb::pnames[a]) && sb::remove(sb::sdir[1] % "/.DELETED_" % sb::pnames[a])) || intrrpt) return err(); + } + } + + pset(15); + QStr dtime(QDateTime().currentDateTime().toString("yyyy-MM-dd,hh.mm.ss")); + if(! sb::crtrpoint(dtime)) return err(); + + for(uchar a(0) ; a < 9 && sb::isdir(sb::sdir[1] % "/S0" % QStr::number(a + 1) % '_' % sb::pnames[a]) ; ++a) + if(! sb::rename(sb::sdir[1] % "/S0" % QStr::number(a + 1) % '_' % sb::pnames[a], sb::sdir[1] % (a < 8 ? "/S0" : "/S") % QStr::number(a + 2) % '_' % sb::pnames[a])) return err(); + + if(! sb::rename(sb::sdir[1] % "/.S00_" % dtime, sb::sdir[1] % "/S01_" % dtime)) return err(); + sb::crtfile(sb::sdir[1] % "/.sbschedule"); + if(intrrpt) return err(); + emptycache(); + + if(sstart) + sb::ThrdKill = true, + close(); + else + pntupgrade(), + ui->statuspanel->hide(), + ui->mainpanel->show(), + ui->functionmenunext->isEnabled() ? ui->functionmenunext->setFocus() : ui->functionmenuback->setFocus(), + windowmove(ss(698), ss(465)); +} + +void systemback::on_pointdelete_clicked() +{ + statustart(); + uchar dnum(0); + + for(uchar a : {9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 11, 12, 13, 14}) + { + if(getppipe(a)->isChecked()) + { + pset(16, bstr(QStr::number(++dnum) % '/' % QStr::number(ppipe))); + + if(! sb::rename(sb::sdir[1] % [a]() -> QStr { + switch(a) { + case 9: + return "/S10_"; + case 10 ... 14: + return "/H0" % QStr::number(a - 9) % '_'; + default: + return "/S0" % QStr::number(a + 1) % '_'; + } + }() % sb::pnames[a], sb::sdir[1] % "/.DELETED_" % sb::pnames[a]) || ! sb::remove(sb::sdir[1] % "/.DELETED_" % sb::pnames[a]) || intrrpt) return [this] { + if(intrrpt) + intrrpt = false; + else + dialogopen(329), + pntupgrade(); + }(); + } + } + + pntupgrade(), + emptycache(), + ui->statuspanel->hide(), + ui->mainpanel->show(), + ui->functionmenunext->isEnabled() ? ui->functionmenunext->setFocus() : ui->functionmenuback->setFocus(), + windowmove(ss(698), ss(465)); +} + +void systemback::on_livenew_clicked() +{ + statustart(), pset(17, " 1/3"); + + auto err([this](ushort dlg = 0) { + if(! (intrrpt || dlg == 327)) + { + if(sb::dfree(sb::sdir[2]) < 104857600 || (sb::isdir("/home/.sbuserdata") && sb::dfree("/home") < 104857600)) + dlg = 313; + else if(! dlg) + dlg = 328; + } + + for(cQStr &dir : {"/.sblvtmp", "/media/.sblvtmp", "/snap/.sblvtmp", "/var/.sblvtmp", "/home/.sbuserdata", "/root/.sbuserdata"}) + if(sb::isdir(dir)) sb::remove(dir); + + if(sb::autoiso) on_livemenu_clicked(); + + if(intrrpt) + intrrpt = false; + else + { + if(sb::isdir(sb::sdir[2] % "/.sblivesystemcreate")) sb::remove(sb::sdir[2] % "/.sblivesystemcreate"); + dialogopen(dlg); + } + }); + + QStr lvtype; + + if((sb::exist(sb::sdir[2] % "/.sblivesystemcreate") && ! sb::remove(sb::sdir[2] % "/.sblivesystemcreate")) + || intrrpt || ! (sb::crtdir(sb::sdir[2] % "/.sblivesystemcreate") && sb::crtdir(sb::sdir[2] % "/.sblivesystemcreate/.disk") && sb::crtdir(sb::sdir[2] % "/.sblivesystemcreate/" % (lvtype = sb::isfile("/usr/share/initramfs-tools/scripts/casper") ? "casper" : "live")) && sb::crtdir(sb::sdir[2] % "/.sblivesystemcreate/syslinux"))) return err(); + + QStr ifname(ui->livename->text() == "auto" ? "systemback_live_" % QDateTime().currentDateTime().toString("yyyy-MM-dd") : ui->livename->text()), ckernel; + { uchar ncount(0); + while(sb::exist(sb::sdir[2] % '/' % ifname % ".sblive")) ncount++ ? ifname = sb::left(ifname, sb::rinstr(ifname, "_")) % QStr::number(ncount) : ifname.append("_1"); } + if(intrrpt || ! (sb::crtfile(sb::sdir[2] % "/.sblivesystemcreate/.disk/info", "Systemback Live (" % ifname % ") - Release " % sb::right(ui->version->text(), -sb::rinstr(ui->version->text(), "_")) % '\n') && sb::copy("/boot/vmlinuz-" % (ckernel = ckname()), sb::sdir[2] % "/.sblivesystemcreate/" % lvtype % "/vmlinuz")) || intrrpt) return err(); + irblck = true; + + if(lvtype == "casper") + { + QStr fname, did; + + { + QFile file("/etc/passwd"); + if(! sb::fopen(file)) return err(); + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + + if(cline.startsWith(guname() % ':')) + { + QSL uslst(cline.split(':')); + if(uslst.count() > 4) fname = sb::left(uslst.at(4), sb::instr(uslst.at(4), ",") - 1); + break; + } + } + } + + if(sb::isfile("/etc/lsb-release")) + { + QFile file("/etc/lsb-release"); + if(! sb::fopen(file)) return err(); + + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + + if(cline.startsWith("DISTRIB_ID=")) + { + did = sb::right(cline, -sb::instr(cline, "=")); + break; + } + } + } + + if(did.isEmpty()) did = "Ubuntu"; + QFile file("/etc/hostname"); + if(! sb::fopen(file)) return err(); + QStr hname(file.readLine().trimmed()); + file.close(); + if(! sb::crtfile("/etc/casper.conf", "USERNAME=\"" % guname() % "\"\nUSERFULLNAME=\"" % fname % "\"\nHOST=\"" % hname % "\"\nBUILD_SYSTEM=\"" % did % "\"\n\nexport USERNAME USERFULLNAME HOST BUILD_SYSTEM\n") || intrrpt) return err(); + QSL incl{"*integrity_check_", "*mountpoints_", "*fstab_", "*swap_", "*xconfig_", "*networking_", "*disable_update_notifier_", "*disable_hibernation_", "*disable_kde_services_", "*fix_language_selector_", "*disable_trackerd_", "*disable_updateinitramfs_", "*kubuntu_disable_restart_notifications_", "*kubuntu_mobile_session_"}; + + for(cQStr &item : QDir("/usr/share/initramfs-tools/scripts/casper-bottom").entryList(QDir::Files)) + if(! (sb::like(item, incl) || cfmod("/usr/share/initramfs-tools/scripts/casper-bottom/" % item, 0644))) return err(); + } + else + { + sb::crtfile("/usr/share/initramfs-tools/scripts/init-bottom/sbfstab", "#!/bin/sh\nif [ \"$1\" != prereqs ] && [ \"$BOOT\" = live ] && [ ! -e /root/etc/fstab ]\nthen touch /root/etc/fstab\nfi\n"); + if(! cfmod("/usr/share/initramfs-tools/scripts/init-bottom/sbfstab", 0755)) return err(); + } + + bool xmntry(sb::isfile("/etc/X11/xorg.conf") || (sb::isdir("/etc/X11/xorg.conf.d") && [] { + for(cQStr &item : QDir("/etc/X11/xorg.conf.d").entryList(QDir::Files)) + if(item.endsWith(".conf")) return true; + + return false; + }())); + + if(xmntry) + { + sb::crtfile("/usr/share/initramfs-tools/scripts/init-bottom/sbnoxconf", "#!/bin/sh\nif [ \"$1\" != prereqs ] && grep noxconf /proc/cmdline >/dev/null 2>&1\nthen\nif [ -s /root/etc/X11/xorg.conf ]\nthen rm /root/etc/X11/xorg.conf\nfi\nif [ -d /root/etc/X11/xorg.conf.d ] && ls /root/etc/X11/xorg.conf.d | grep .conf$ >/dev/null 2>&1\nthen rm /root/etc/X11/xorg.conf.d/*.conf 2>/dev/null\nfi\nfi\n"); + if(! cfmod("/usr/share/initramfs-tools/scripts/init-bottom/sbnoxconf", 0755)) return err(); + } + + sb::crtfile("/usr/share/initramfs-tools/scripts/init-bottom/sbfinstall", [this]() -> QStr { + QStr ftxt("#!/bin/sh\nif [ \"$1\" != prereqs ] && grep finstall /proc/cmdline >/dev/null 2>&1\nthen\nif [ -f /root/home/" % guname() % "/.config/autostart/dropbox.desktop ]\nthen rm /root/home/" % guname() % "/.config/autostart/dropbox.desktop\nfi\nif [ -f /root/usr/bin/ksplashqml ]\nthen\nchmod -x /root/usr/bin/ksplash* /root/usr/bin/plasma*\nif [ -f /root/usr/share/autostart/plasma-desktop.desktop ]\nthen mv /root/usr/share/autostart/plasma-desktop.desktop /root/usr/share/autostart/plasma-desktop.desktop_\nfi\nif [ -f /root/usr/share/autostart/plasma-netbook.desktop ]\nthen mv /root/usr/share/autostart/plasma-netbook.desktop /root/usr/share/autostart/plasma-netbook.desktop_\nfi\nfi\n"); + + for(uchar a(0) ; a < 5 ; ++a) + { + QStr fpath("/etc/" % [a]() -> QStr { + switch(a) { + case 0: + return "lightdm/lightdm.conf"; + case 1: + return "kde4/kdm/kdmrc"; + case 2: + return "sddm.conf"; + case 3: + return "gdm/custom.conf"; + case 4: + return "gdm3/daemon.conf"; + default: + return "mdm/mdm.conf"; + } + }()); + + if(sb::isfile(fpath) || sb::isdir(sb::left(fpath, sb::rinstr(fpath, "/") - 1))) ftxt.append([&, a]() -> QStr { + switch(a) { + case 0: + return "cat << EOF >/root/etc/lightdm/lightdm.conf\n[SeatDefaults]\nautologin-guest=false\nautologin-user=" % guname() % "\nautologin-user-timeout=0\nautologin-session=lightdm-autologin\nEOF"; + case 1: + return "sed -ir -e \"s/^#?AutoLoginEnable=.*\\$/AutoLoginEnable=true/\" -e \"s/^#?AutoLoginUser=.*\\$/AutoLoginUser=" % guname() % "/\" -e \"s/^#?AutoReLogin=.*\\$/AutoReLogin=true/\" /root/etc/kde4/kdm/kdmrc"; + case 2: + return "cat << EOF >/root/etc/sddm.conf\n[Autologin]\nUser=" % guname() % "\nSession=plasma.desktop\nEOF"; + default: + return "cat << EOF >/root" % fpath % "\n[daemon]\nAutomaticLoginEnable=True\nAutomaticLogin=" % guname() % "\nEOF"; + } + }() % '\n'); + } + + QStr txt[]{"cat << EOF >/root/etc/xdg/autostart/sbfinstall", "[Desktop Entry]\nEncoding=UTF-8\nVersion=1.0\nName=Systemback installer\n", "Type=Application\nIcon=systemback\nTerminal=false\n", "NoDisplay=true\nEOF\n"}; + return ftxt % txt[0] % ".desktop\n" % txt[1] % "Exec=/usr/lib/systemback/sbsustart finstall gtk+\n" % txt[2] % "NotShowIn=KDE;\n" % txt[3] % txt[0] % "-kde.desktop\n" % txt[1] % "Exec=sh -c \"/usr/lib/systemback/sbsustart finstall && if [ -f /usr/bin/plasmashell ] ; then plasmashell --shut-up & elif [ -f /usr/bin/plasma-desktop ] ; then plasma-desktop & fi\"\n" % txt[2] % "OnlyShowIn=KDE;\n" % txt[3] % "fi\n"; + }()); + + if(! cfmod("/usr/share/initramfs-tools/scripts/init-bottom/sbfinstall", 0755)) return err(); + + { + uchar rv(sb::exec("update-initramfs -tck" % ckernel)); + + if(lvtype == "casper") + { + QSL incl{"*integrity_check_", "*mountpoints_", "*fstab_", "*swap_", "*xconfig_", "*networking_", "*disable_update_notifier_", "*disable_hibernation_", "*disable_kde_services_", "*fix_language_selector_", "*disable_trackerd_", "*disable_updateinitramfs_", "*kubuntu_disable_restart_notifications_", "*kubuntu_mobile_session_"}; + + for(cQStr &item : QDir("/usr/share/initramfs-tools/scripts/casper-bottom").entryList(QDir::Files)) + if(! (sb::like(item, incl) || cfmod("/usr/share/initramfs-tools/scripts/casper-bottom/" % item, 0755))) return err(); + } + else if(! sb::remove("/usr/share/initramfs-tools/scripts/init-bottom/sbfstab")) + return err(); + + if((xmntry && ! sb::remove("/usr/share/initramfs-tools/scripts/init-bottom/sbnoxconf")) || ! sb::remove("/usr/share/initramfs-tools/scripts/init-bottom/sbfinstall")) return err(); + if(rv) return err(327); + } + + irblck = false; + if(! sb::copy("/boot/initrd.img-" % ckernel, sb::sdir[2] % "/.sblivesystemcreate/" % lvtype % "/initrd.gz")) return err(); + + if(sb::isfile("/usr/lib/syslinux/isolinux.bin")) + { + if(! (sb::copy("/usr/lib/syslinux/isolinux.bin", sb::sdir[2] % "/.sblivesystemcreate/syslinux/isolinux.bin") && sb::copy("/usr/lib/syslinux/vesamenu.c32", sb::sdir[2] % "/.sblivesystemcreate/syslinux/vesamenu.c32"))) return err(); + } + else if(! (sb::copy("/usr/lib/ISOLINUX/isolinux.bin", sb::sdir[2] % "/.sblivesystemcreate/syslinux/isolinux.bin") && sb::copy("/usr/lib/syslinux/modules/bios/vesamenu.c32", sb::sdir[2] % "/.sblivesystemcreate/syslinux/vesamenu.c32") && sb::copy("/usr/lib/syslinux/modules/bios/libcom32.c32", sb::sdir[2] % "/.sblivesystemcreate/syslinux/libcom32.c32") && sb::copy("/usr/lib/syslinux/modules/bios/libutil.c32", sb::sdir[2] % "/.sblivesystemcreate/syslinux/libutil.c32") && sb::copy("/usr/lib/syslinux/modules/bios/ldlinux.c32", sb::sdir[2] % "/.sblivesystemcreate/syslinux/ldlinux.c32"))) + return err(); + + if(! (sb::copy("/usr/share/systemback/splash.png", sb::sdir[2] % "/.sblivesystemcreate/syslinux/splash.png") && sb::lvprpr(ui->userdatainclude->isChecked()))) return err(); + + { + QStr ide; + + for(cQStr &item : {"/.sblvtmp/cdrom", "/.sblvtmp/dev", "/.sblvtmp/mnt", "/.sblvtmp/proc", "/.sblvtmp/run", "/.sblvtmp/srv", "/.sblvtmp/sys", "/.sblvtmp/tmp", "/bin", "/boot", "/etc", "/lib", "/lib32", "/lib64", "/opt", "/sbin", "/selinux", "/snap/.sblvtmp/snap", "/usr", "/initrd.img", "/initrd.img.old", "/vmlinuz", "/vmlinuz.old"}) + if(sb::exist(item)) ide.append(' ' % item); + + if(sb::isdir(sb::sdir[2] % "/.sblivesystemcreate/userdata")) + { + ide.append(" \"" % sb::sdir[2] % "\"/.sblivesystemcreate/userdata/home"); + if(sb::isdir(sb::sdir[2] % "/.sblivesystemcreate/userdata/root")) ide.append(" \"" % sb::sdir[2] % "\"/.sblivesystemcreate/userdata/root"); + } + else + { + if(sb::isdir("/home/.sbuserdata")) ide.append(" /home/.sbuserdata/home"); + if(sb::isdir("/root/.sbuserdata")) ide.append(" /root/.sbuserdata/root"); + } + + if(intrrpt) return err(); + pset(18, " 2/3"); + QStr elist; + + for(cQStr &excl : {"/boot/efi/EFI", "/etc/fstab", "/etc/mtab", "/etc/udev/rules.d/70-persistent-cd.rules", "/etc/udev/rules.d/70-persistent-net.rules"}) + if(sb::exist(excl)) elist.append(" -e " % excl); + + for(cQStr &cdir : {"/etc/rc0.d", "/etc/rc1.d", "/etc/rc2.d", "/etc/rc3.d", "/etc/rc4.d", "/etc/rc5.d", "/etc/rc6.d", "/etc/rcS.d"}) + if(sb::isdir(cdir)) + for(cQStr &item : QDir(cdir).entryList(QDir::Files)) + if(item.contains("cryptdisks")) elist.append(" -e " % cdir % '/' % item); + + if(sb::exec("mksquashfs" % ide % " \"" % sb::sdir[2] % "\"/.sblivesystemcreate/.systemback /media/.sblvtmp/media /var/.sblvtmp/var \"" % sb::sdir[2] % "\"/.sblivesystemcreate/" % lvtype % "/filesystem.squashfs " % (sb::xzcmpr ? "-comp xz " : nullptr) % "-info -b 1M -no-duplicates -no-recovery -always-use-fragments" % elist, sb::Prgrss)) return err(311); + } + + pset(19, " 3/3"), + sb::Progress = -1; + for(cQStr &dir : {"/.sblvtmp", "/media/.sblvtmp", "/var/.sblvtmp"}) sb::remove(dir); + + for(cQStr &dir : {"/home/.sbuserdata", "/root/.sbuserdata", "/snap/.sblvtmp"}) + if(sb::isdir(dir)) sb::remove(dir); + + if(intrrpt) return err(); + + { + QStr rpart, grxorg, srxorg, prmtrs; + if(sb::fsize(sb::sdir[2] % "/.sblivesystemcreate/" % lvtype % "/filesystem.squashfs") > 4294967295) rpart = "root=LABEL=SBROOT "; + + if(sb::isfile("/etc/default/grub")) + { + QFile file("/etc/default/grub"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr cline(file.readLine().trimmed()); + + if(cline.startsWith("GRUB_CMDLINE_LINUX_DEFAULT=") && cline.count('\"') > 1) + { + if(! prmtrs.isEmpty()) prmtrs.clear(); + QStr pprt; + + for(cQStr &cprmtr : sb::left(sb::right(cline, -sb::instr(cline, "\"")), -1).split(' ')) + if(! (cprmtr.isEmpty() || (pprt.isEmpty() && sb::like(cprmtr, {"_quiet_", "_splash_", "_xforcevesa_"})))) + { + if(cprmtr.contains("\\\"")) + { + if(pprt.isEmpty()) + pprt = cprmtr % ' '; + else + prmtrs.append(' ' % pprt.append(cprmtr).replace("\\\"", "\"")), + pprt.clear(); + } + else if(pprt.isEmpty()) + prmtrs.append(' ' % cprmtr); + else + pprt.append(cprmtr % ' '); + } + } + } + } + + if(xmntry) grxorg = "menuentry \"" % tr("Boot Live without xorg.conf file") % "\" {\n set gfxpayload=keep\n linux /" % lvtype % "/vmlinuz " % rpart % "boot=" % lvtype % " noxconf quiet splash" % prmtrs % "\n initrd /" % lvtype % "/initrd.gz\n}\n\n", srxorg = "label noxconf\n menu label " % tr("Boot Live without xorg.conf file") % "\n kernel /" % lvtype % "/vmlinuz\n append " % rpart % "boot=" % lvtype % " initrd=/" % lvtype % "/initrd.gz noxconf quiet splash" % prmtrs % "\n\n"; +#ifdef __amd64__ + if(sb::isfile("/usr/share/systemback/efi-amd64.bootfiles") && (sb::exec("tar -xJf /usr/share/systemback/efi-amd64.bootfiles -C \"" % sb::sdir[2] % "\"/.sblivesystemcreate --no-same-owner --no-same-permissions") || ! (sb::copy("/usr/share/systemback/splash.png", sb::sdir[2] % "/.sblivesystemcreate/boot/grub/splash.png") && + sb::crtfile(sb::sdir[2] % "/.sblivesystemcreate/boot/grub/grub.cfg", "if loadfont /boot/grub/font.pf2\nthen\n set gfxmode=auto\n insmod efi_gop\n insmod efi_uga\n insmod gfxterm\n terminal_output gfxterm\nfi\n\nset theme=/boot/grub/theme.cfg\n\nmenuentry \"" % tr("Boot Live system") % "\" {\n set gfxpayload=keep\n linux /" % lvtype % "/vmlinuz " % rpart % "boot=" % lvtype % " quiet splash" % prmtrs % "\n initrd /" % lvtype % "/initrd.gz\n}\n\nmenuentry \"" % tr("Boot system installer") % "\" {\n set gfxpayload=keep\n linux /" % lvtype % "/vmlinuz " % rpart % "boot=" % lvtype % " finstall quiet splash" % prmtrs % "\n initrd /" % lvtype % "/initrd.gz\n}\n\nmenuentry \"" % tr("Boot Live in safe graphics mode") % "\" {\n set gfxpayload=keep\n linux /" % lvtype % "/vmlinuz " % rpart % "boot=" % lvtype % " xforcevesa nomodeset quiet splash" % prmtrs % "\n initrd /" % lvtype % "/initrd.gz\n}\n\n" % grxorg % "menuentry \"" % tr("Boot Live in debug mode") % "\" {\n set gfxpayload=keep\n linux /" % lvtype % "/vmlinuz " % rpart % "boot=" % lvtype % prmtrs % "\n initrd /" % lvtype % "/initrd.gz\n}\n") && + sb::crtfile(sb::sdir[2] % "/.sblivesystemcreate/boot/grub/theme.cfg", "title-color: \"white\"\ntitle-text: \"Systemback Live (" % ifname % ")\"\ntitle-font: \"Sans Regular 16\"\ndesktop-color: \"black\"\ndesktop-image: \"/boot/grub/splash.png\"\nmessage-color: \"white\"\nmessage-bg-color: \"black\"\nterminal-font: \"Sans Regular 12\"\n\n+ boot_menu {\n top = 150\n left = 15%\n width = 75%\n height = " % (xmntry ? "150" : "130") % "\n item_font = \"Sans Regular 12\"\n item_color = \"grey\"\n selected_item_color = \"white\"\n item_height = 20\n item_padding = 15\n item_spacing = 5\n}\n\n+ vbox {\n top = 100%\n left = 2%\n + label {text = \"" % tr("Press 'E' key to edit") % "\" font = \"Sans 10\" color = \"white\" align = \"left\"}\n}\n") && + sb::crtfile(sb::sdir[2] % "/.sblivesystemcreate/boot/grub/loopback.cfg", "menuentry \"" % tr("Boot Live system") % "\" {\n set gfxpayload=keep\n linux /" % lvtype % "/vmlinuz " % rpart % "boot=" % lvtype % " iso-scan/filename=$iso_path quiet splash" % prmtrs % "\n initrd /" % lvtype % "/initrd.gz\n}\n\nmenuentry \"" % tr("Boot system installer") % "\" {\n set gfxpayload=keep\n linux /" % lvtype % "/vmlinuz " % rpart % "boot=" % lvtype % " iso-scan/filename=$iso_path finstall quiet splash" % prmtrs % "\n initrd /" % lvtype % "/initrd.gz\n}\n\nmenuentry \"" % tr("Boot Live in safe graphics mode") % "\" {\n set gfxpayload=keep\n linux /" % lvtype % "/vmlinuz " % rpart % "boot=" % lvtype % " iso-scan/filename=$iso_path xforcevesa nomodeset quiet splash" % prmtrs % "\n initrd /" % lvtype % "/initrd.gz\n}\n\n" % grxorg % "menuentry \"" % tr("Boot Live in debug mode") % "\" {\n set gfxpayload=keep\n linux /" % lvtype % "/vmlinuz " % rpart % "boot=" % lvtype % " iso-scan/filename=$iso_path" % prmtrs % "\n initrd /" % lvtype % "/initrd.gz\n}\n")))) return err(); +#endif + if(! sb::crtfile(sb::sdir[2] % "/.sblivesystemcreate/syslinux/syslinux.cfg", "default vesamenu.c32\nprompt 0\ntimeout 100\n\nmenu title Systemback Live (" % ifname % ")\nmenu tabmsg " % tr("Press TAB key to edit") % "\nmenu background splash.png\n\nlabel live\n menu label " % tr("Boot Live system") % "\n kernel /" % lvtype % "/vmlinuz\n append " % rpart % "boot=" % lvtype % " initrd=/" % lvtype % "/initrd.gz quiet splash" % prmtrs % "\n\nlabel install\n menu label " % tr("Boot system installer") % "\n kernel /" % lvtype % "/vmlinuz\n append " % rpart % "boot=" % lvtype % " initrd=/" % lvtype % "/initrd.gz finstall quiet splash" % prmtrs % "\n\nlabel safe\n menu label " % tr("Boot Live in safe graphics mode") % "\n kernel /" % lvtype % "/vmlinuz\n append " % rpart % "boot=" % lvtype % " initrd=/" % lvtype % "/initrd.gz xforcevesa nomodeset quiet splash" % prmtrs % "\n\n" % srxorg % "label debug\n menu label " % tr("Boot Live in debug mode") % "\n kernel /" % lvtype % "/vmlinuz\n append " % rpart % "boot=" % lvtype % " initrd=/" % lvtype % "/initrd.gz" % prmtrs % '\n') + || intrrpt || ! sb::remove(sb::sdir[2] % "/.sblivesystemcreate/.systemback") + || intrrpt || (sb::isdir(sb::sdir[2] % "/.sblivesystemcreate/userdata") && ! sb::remove(sb::sdir[2] % "/.sblivesystemcreate/userdata")) + || intrrpt) return err(); + } + + if(sb::ThrdLng[0]) sb::ThrdLng[0] = 0; + sb::ThrdStr[0] = sb::sdir[2] % '/' % ifname % ".sblive"; + ui->progressbar->setValue(0); + + if(sb::exec("tar -cf \"" % sb::sdir[2] % "\"/" % ifname % ".sblive -C \"" % sb::sdir[2] % "\"/.sblivesystemcreate .", sb::Prgrss)) + { + if(sb::exist(sb::sdir[2] % '/' % ifname % ".sblive")) sb::remove(sb::sdir[2] % '/' % ifname % ".sblive"); + return err(312); + } + + if(! cfmod(sb::sdir[2] % '/' % ifname % ".sblive", 0666)) return err(); + + if(sb::autoiso) + { + ullong isize(sb::fsize(sb::sdir[2] % '/' % ifname % ".sblive")); + + if(isize < 4294967295 && isize + 52428800 < sb::dfree(sb::sdir[2])) + { + pset(20, " 4/3+1"), + sb::Progress = -1; + if(! (sb::rename(sb::sdir[2] % "/.sblivesystemcreate/syslinux/syslinux.cfg", sb::sdir[2] % "/.sblivesystemcreate/syslinux/isolinux.cfg") && sb::rename(sb::sdir[2] % "/.sblivesystemcreate/syslinux", sb::sdir[2] % "/.sblivesystemcreate/isolinux")) || intrrpt) return err(); + ui->progressbar->setValue(0); + + if(sb::exec("genisoimage -r -V sblive -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o \"" % sb::sdir[2] % "\"/" % ifname % ".iso \"" % sb::sdir[2] % "\"/.sblivesystemcreate", sb::Prgrss)) + { + if(sb::isfile(sb::sdir[2] % '/' % ifname % ".iso")) sb::remove(sb::sdir[2] % '/' % ifname % ".iso"); + return err(312); + } + + if(sb::exec("isohybrid \"" % sb::sdir[2] % "\"/" % ifname % ".iso") || ! cfmod(sb::sdir[2] % '/' % ifname % ".iso", 0666) || intrrpt) return err(); + } + } + + emptycache(), + sb::remove(sb::sdir[2] % "/.sblivesystemcreate"), + on_livemenu_clicked(), + dialogopen(207); +} + +void systemback::on_liveconvert_clicked() +{ + statustart(), pset(21, " 1/2"); + QStr path(sb::sdir[2] % '/' % sb::left(ui->livelist->currentItem()->text(), sb::instr(ui->livelist->currentItem()->text(), " ") - 1)); + + auto err([&](ushort dlg = 0) { + if(sb::isdir(sb::sdir[2] % "/.sblivesystemconvert")) sb::remove(sb::sdir[2] % "/.sblivesystemconvert"); + if(sb::isfile(path % ".iso")) sb::remove(path % ".iso"); + + if(intrrpt) + intrrpt = false; + else + dialogopen(dlg ? dlg : 335); + }); + + if((sb::exist(sb::sdir[2] % "/.sblivesystemconvert") && ! sb::remove(sb::sdir[2] % "/.sblivesystemconvert")) || ! sb::crtdir(sb::sdir[2] % "/.sblivesystemconvert")) return err(); + sb::ThrdLng[0] = sb::fsize(path % ".sblive"), sb::ThrdStr[0] = sb::sdir[2] % "/.sblivesystemconvert"; + if(sb::exec("tar -xf \"" % path % "\".sblive -C \"" % sb::sdir[2] % "\"/.sblivesystemconvert --no-same-owner --no-same-permissions", sb::Prgrss)) return err(326); + if(! (sb::rename(sb::sdir[2] % "/.sblivesystemconvert/syslinux/syslinux.cfg", sb::sdir[2] % "/.sblivesystemconvert/syslinux/isolinux.cfg") && sb::rename(sb::sdir[2] % "/.sblivesystemconvert/syslinux", sb::sdir[2] % "/.sblivesystemconvert/isolinux")) || intrrpt) return err(324); + pset(21, " 2/2"), + sb::Progress = -1, + ui->progressbar->setValue(0); + if(sb::exec("genisoimage -r -V sblive -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o \"" % path % "\".iso \"" % sb::sdir[2] % "\"/.sblivesystemconvert", sb::Prgrss)) return err(325); + if(sb::exec("isohybrid \"" % path % "\".iso") || ! cfmod(path % ".iso", 0666)) return err(); + sb::remove(sb::sdir[2] % "/.sblivesystemconvert"); + if(intrrpt) return err(); + emptycache(), + ui->livelist->currentItem()->setText(sb::left(ui->livelist->currentItem()->text(), sb::rinstr(ui->livelist->currentItem()->text(), " ")) % "sblive+iso)"), + ui->liveconvert->setDisabled(true), + ui->statuspanel->hide(), + ui->mainpanel->show(), + ui->liveback->setFocus(), + windowmove(ss(698), ss(465)); +} + +void systemback::on_partitiondelete_clicked() +{ + busy(), ui->copycover->show(); + + switch(ui->partitionsettings->item(ui->partitionsettings->currentItem()->row(), 8)->text().toUShort()) { + case sb::Extended: + sb::delpart(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 0)->text()); + break; + default: + sb::mkptable(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 0)->text(), grub.isEFI ? "gpt" : "msdos"); + } + + on_partitionrefresh2_clicked(), + busy(false); +} + +void systemback::on_newpartition_clicked() +{ + busy(), ui->copycover->show(); + QStr dev(sb::left(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 0)->text(), (ui->partitionsettings->item(ui->partitionsettings->currentRow(), 0)->text().contains("mmc") ? 12 : 8))); + bool msize(ui->partitionsize->value() == ui->partitionsize->maximum()); + ullong start(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 9)->text().toULongLong()), len(msize ? ui->partitionsettings->item(ui->partitionsettings->currentRow(), 10)->text().toULongLong() : ullong(ui->partitionsize->value()) * 1048576); + uchar type; + + switch(ui->partitionsettings->item(ui->partitionsettings->currentRow(), 8)->text().toUShort()) { + case sb::Freespace: + { + uchar pcnt(0), fcnt(0); + + for(ushort a(0) ; a < ui->partitionsettings->rowCount() ; ++a) + if(ui->partitionsettings->item(a, 0)->text().startsWith(dev)) + switch(ui->partitionsettings->item(a, 8)->text().toUShort()) { + case sb::GPT: + case sb::Extended: + type = sb::Primary; + goto exec; + case sb::Primary: + ++pcnt; + break; + case sb::Freespace: + ++fcnt; + } + + if(pcnt < 3 || (fcnt == 1 && ui->partitionsize->value() == ui->partitionsize->maximum())) + { + type = sb::Primary; + break; + } + else if(! sb::mkpart(dev, start, ui->partitionsettings->item(ui->partitionsettings->currentRow(), 10)->text().toULongLong(), sb::Extended)) + goto end; + + start += 1048576; + if(msize && (len -= 1048576) < 1048576) goto end; + } + default: + type = sb::Logical; + } + +exec: + sb::mkpart(dev, start, len, type); +end: + on_partitionrefresh2_clicked(), + busy(false); +} + +void systemback::on_languageoverride_clicked(bool chckd) +{ + if(chckd) + { + QStr lname(ui->languages->currentText()); + + sb::lang = lname == "المصرية العربية" ? "ar_EG" + : lname == "Català" ? "ca_ES" + : lname == "Čeština" ? "cs_CS" + : lname == "Dansk" ? "da_DK" + : lname == "Deutsch" ? "de_DE" + : lname == "English (common)" ? "en_EN" + : lname == "English (United Kingdom)" ? "en_GB" + : lname == "Español" ? "es_ES" + : lname == "Suomi" ? "fi_FI" + : lname == "Français" ? "fr_FR" + : lname == "Galego" ? "gl_ES" + : lname == "Magyar" ? "hu_HU" + : lname == "Bahasa Indonesia" ? "id_ID" + : lname == "Português (Brasil)" ? "pt_BR" + : lname == "Română" ? "ro_RO" + : lname == "Русский" ? "ru_RU" + : lname == "Türkçe" ? "tr_TR" + : lname == "Українськa" ? "uk_UK" : "zh_CN"; + + ui->languages->setEnabled(true); + } + else + sb::lang = "auto", + ui->languages->setDisabled(true); +} + +void systemback::on_languages_currentIndexChanged(cQStr &arg1) +{ + ui->languages->resize(fontMetrics().width(arg1) + ss(30), ui->languages->height()); + + if(ui->languages->isEnabled()) sb::lang = arg1 == "المصرية العربية" ? "ar_EG" + : arg1 == "Català" ? "ca_ES" + : arg1 == "Čeština" ? "cs_CS" + : arg1 == "Dansk" ? "da_DK" + : arg1 == "Deutsch" ? "de_DE" + : arg1 == "English (common)" ? "en_EN" + : arg1 == "English (United Kingdom)" ? "en_GB" + : arg1 == "Español" ? "es_ES" + : arg1 == "Suomi" ? "fi_FI" + : arg1 == "Français" ? "fr_FR" + : arg1 == "Galego" ? "gl_ES" + : arg1 == "Magyar" ? "hu_HU" + : arg1 == "Bahasa Indonesia" ? "id_ID" + : arg1 == "Português (Brasil)" ? "pt_BR" + : arg1 == "Română" ? "ro_RO" + : arg1 == "Русский" ? "ru_RU" + : arg1 == "Türkçe" ? "tr_TR" + : arg1 == "Українськa" ? "uk_UK" : "zh_CN"; +} + +void systemback::on_styleoverride_clicked(bool chckd) +{ + sb::style = chckd ? ui->styles->currentText() : "auto", + ui->styles->setEnabled(chckd); +} + +void systemback::on_styles_currentIndexChanged(cQStr &arg1) +{ + ui->styles->resize(fontMetrics().width(arg1) + ss(30), ui->styles->height()); + if(ui->styles->isEnabled()) sb::style = arg1; +} + +void systemback::on_alwaysontop_clicked(bool chckd) +{ + if(chckd) + setwontop(), + sb::waot = sb::True; + else + sb::waot = sb::False, + setwontop(false); +} + +void systemback::on_incrementaldisable_clicked(bool chckd) +{ + sb::incrmtl = chckd ? sb::False : sb::True; +} + +void systemback::on_cachemptydisable_clicked(bool chckd) +{ + sb::ecache = chckd ? sb::False : sb::True; +} + +void systemback::on_usexzcompressor_clicked(bool chckd) +{ + sb::xzcmpr = chckd ? sb::True : sb::False; +} + +void systemback::on_autoisocreate_clicked(bool chckd) +{ + sb::autoiso = chckd ? sb::True : sb::False; +} + +void systemback::on_schedulerdisable_clicked(bool chckd) +{ + if(chckd) + on_schedulerrefresh_clicked(), + ui->adduser->setEnabled(true); + else + { + sb::schdlr[1] = "false", + ui->schedulerusers->setText(nullptr); + if(ui->adduser->isEnabled()) ui->adduser->setDisabled(true); + } + + ui->users->setEnabled(chckd), + ui->schedulerrefresh->setEnabled(chckd); +} + +void systemback::on_users_currentIndexChanged(cQStr &arg1) +{ + ui->users->setToolTip(arg1); +} + +void systemback::on_adduser_clicked() +{ + if(ui->users->count() == 1) + { + if(sb::schdlr[1] != "everyone") sb::schdlr[1] = "everyone", + ui->schedulerusers->setText(tr("Everyone")); + + ui->users->clear(), + ui->adduser->setDisabled(true); + } + else + sb::schdlr[1] == "everyone" ? sb::schdlr[1] = ':' % ui->users->currentText() : sb::schdlr[1].append(',' % ui->users->currentText()), + ui->schedulerusers->setText(sb::right(sb::schdlr[1], -1)), + ui->users->removeItem(ui->users->findText(ui->users->currentText())); +} + +void systemback::on_schedulerrefresh_clicked() +{ + busy(); + + if(sb::schdlr[1] != "everyone") sb::schdlr[1] = "everyone", + ui->schedulerusers->setText(tr("Everyone")); + + ui->users->count() ? ui->users->clear() : ui->adduser->setEnabled(true), + ui->users->addItem("root"); + QFile file("/etc/passwd"); + + if(sb::fopen(file)) + while(! file.atEnd()) + { + QStr usr(file.readLine().trimmed()); + if(usr.contains(":/home/") && sb::isdir("/home/" % (usr = sb::left(usr, sb::instr(usr, ":") -1)))) ui->users->addItem(usr); + } + + busy(false); +} + +void systemback::on_grubreinstallrestore_currentIndexChanged(cQStr &arg1) +{ + if(! arg1.isEmpty()) ui->grubreinstallrestore->resize(fontMetrics().width(arg1) + ss(30), ui->grubreinstallrestore->height()); +} + +void systemback::on_grubinstallcopy_currentIndexChanged(cQStr &arg1) +{ + if(! arg1.isEmpty()) ui->grubinstallcopy->resize(fontMetrics().width(arg1) + ss(30), ui->grubinstallcopy->height()); +} + +void systemback::on_grubreinstallrepair_currentIndexChanged(cQStr &arg1) +{ + if(! arg1.isEmpty()) ui->grubreinstallrepair->resize(fontMetrics().width(arg1) + ss(30), ui->grubreinstallrepair->height()); +} diff --git a/systemback/systemback.hpp b/systemback/systemback.hpp new file mode 100644 index 0000000..5736413 --- /dev/null +++ b/systemback/systemback.hpp @@ -0,0 +1,323 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef SYSTEMBACK_HPP +#define SYSTEMBACK_HPP + +#include "../libsystemback/sblib.hpp" +#include +#include +#include + +#define QTblWI QTableWidgetItem +#define QLWI QListWidgetItem +#define QTrWI QTreeWidgetItem +#define cQTrWI const QTreeWidgetItem + +namespace Ui { +class systemback; +} + +class systemback : public QMainWindow +{ + Q_OBJECT + +public: + systemback(); + ~systemback(); + + bool fscrn; + +protected: + bool eventFilter(QObject *, QEvent *ev); + + void keyReleaseEvent(QKeyEvent *ev), + keyPressEvent(QKeyEvent *ev), + closeEvent(QCloseEvent *ev); + +private: + enum { Normal = 100, High = 147, Max = 200 }; + + Ui::systemback *ui; + + struct { + QStr txt; + uchar type, pnts; + } prun; + + struct { + QStr name; + bool isEFI; + } grub; + + QWdt wndw, fwdgt; + QFont bfnt; + QTimer utimer, *shdltimer, *dlgtimer, *intrptimer; + QStr cpoint, pname, hash; + QBA ocfg; + ushort dialog; + short wgeom[4], cpos; + uchar busycnt, ppipe, sfctr, icnt; + bool sislive, wismax, wmblck, uchkd, nrxth, ickernel, irblck, utblck, nohmcpy[2], sstart, intrrpt; + + QLE getpoint(uchar num); + QCB getppipe(uchar num); + + QStr guname(), + ckname(); + + QRect sgeom(bool rdc = false, QDW dtp = nullptr); + ushort ss(ushort dsize); + template bool cfmod(const T &path, ushort mode); + + bool minside(cQRect &rct), + minside(QWdt wgt); + + void windowmove(ushort nwidth, ushort nheight, bool fxdw = true), + dialogopen(ushort dlg = 0, cbstr &dev = nullptr), + ilstupdt(bool inc = false, cQStr &dir = nullptr), + pset(uchar type, cbstr &tend = nullptr), + dirxpnd(QTrWI *item, bool inc = false), + ptxtchange(uchar num, cQStr &txt), + setwontop(bool state = true), + busy(bool state = true), + pnmchange(uchar num), + pntupgrade(), + emptycache(), + statustart(), + systemcopy(), + livewrite(), + rmntcheck(), + stschange(), + bttnsshow(), + bttnshide(), + restore(), + repair(); + +#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) +private slots: +#endif + void dialogtimer(); + +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) +private slots: +#endif + void schedulertimer(); + void unitimer(); + +private slots: + void benter(bool click = false); + void abtreleased(); + void wbreleased(); + void wreleased(); + void rreleased(); + void mpressed(); + void rpressed(); + void wpressed(); + void bpressed(); + void wbenter(); + void wbleave(); + void foutpnt(); + void renter(); + void rleave(); + void wmove(); + void rmove(); + void bmove(); + + void on_partitionsettings_currentItemChanged(QTblWI *crrnt, QTblWI *prvs); + void on_livedevices_currentItemChanged(QTblWI *crrnt, QTblWI *prvs); + void on_grubreinstallrestore_currentIndexChanged(const QStr &arg1); + void on_grubreinstallrepair_currentIndexChanged(const QStr &arg1); + void on_grubinstallcopy_currentIndexChanged(const QStr &arg1); + void on_repairpartition_currentIndexChanged(const QStr &arg1); + void on_repairmountpoint_currentTextChanged(const QStr &arg1); + void on_windowposition_currentIndexChanged(const QStr &arg1); + void on_includeusers_currentIndexChanged(const QStr &arg1); + void on_excludeitemslist_currentItemChanged(QTrWI *crrnt); + void on_includeitemslist_currentItemChanged(QTrWI *crrnt); + void on_filesystem_currentIndexChanged(const QStr &arg1); + void on_languages_currentIndexChanged(const QStr &arg1); + void on_mountpoint_currentTextChanged(const QStr &arg1); + void on_excludedlist_currentItemChanged(QLWI *crrnt); + void on_includedlist_currentItemChanged(QLWI *crrnt); + void on_styles_currentIndexChanged(const QStr &arg1); + void on_admins_currentIndexChanged(const QStr &arg1); + void on_adminpassword_textChanged(const QStr &arg1); + void on_rootpassword1_textChanged(const QStr &arg1); + void on_users_currentIndexChanged(const QStr &arg1); + void on_excludeitemslist_itemCollapsed(QTrWI *item); + void on_dirchoose_currentItemChanged(QTrWI *crrnt); + void on_excludeitemslist_itemExpanded(QTrWI *item); + void on_includeitemslist_itemExpanded(QTrWI *item); + void on_livelist_currentItemChanged(QLWI *crrnt); + void on_password1_textChanged(const QStr &arg1); + void on_usersettingscopy_stateChanged(int arg1); + void on_autorestoreoptions_clicked(bool chckd); + void on_incrementaldisable_clicked(bool chckd); + void on_livename_textChanged(const QStr &arg1); + void on_fullname_textChanged(const QStr &arg1); + void on_username_textChanged(const QStr &arg1); + void on_hostname_textChanged(const QStr &arg1); + void on_autorepairoptions_clicked(bool chckd); + void on_point10_textChanged(const QStr &arg1); + void on_point11_textChanged(const QStr &arg1); + void on_point12_textChanged(const QStr &arg1); + void on_point13_textChanged(const QStr &arg1); + void on_point14_textChanged(const QStr &arg1); + void on_point15_textChanged(const QStr &arg1); + void on_skipfstabrestore_clicked(bool chckd); + void on_languageoverride_clicked(bool chckd); + void on_schedulerdisable_clicked(bool chckd); + void on_cachemptydisable_clicked(bool chckd); + void on_point1_textChanged(const QStr &arg1); + void on_point2_textChanged(const QStr &arg1); + void on_point3_textChanged(const QStr &arg1); + void on_point4_textChanged(const QStr &arg1); + void on_point5_textChanged(const QStr &arg1); + void on_point6_textChanged(const QStr &arg1); + void on_point7_textChanged(const QStr &arg1); + void on_point8_textChanged(const QStr &arg1); + void on_point9_textChanged(const QStr &arg1); + void on_skipfstabrepair_clicked(bool chckd); + void on_userdatainclude_clicked(bool chckd); + void on_usexzcompressor_clicked(bool chckd); + void on_dirchoose_itemExpanded(QTrWI *item); + void on_configurationfilesrestore_clicked(); + void on_styleoverride_clicked(bool chckd); + void on_autoisocreate_clicked(bool chckd); + void on_repairpartitionrefresh_clicked(); + void on_alwaysontop_clicked(bool chckd); + void on_silentmode_clicked(bool chckd); + void on_livedevicesrefresh_clicked(); + void on_liveworkdirbutton_clicked(); + void on_rootpassword2_textChanged(); + void on_partitionrefresh2_clicked(); + void on_partitionrefresh3_clicked(); + void on_excluderemoveitem_clicked(); + void on_includeremoveitem_clicked(); + void on_format_clicked(bool chckd); + void on_functionmenunext_clicked(); + void on_functionmenuback_clicked(); + void on_storagedirbutton_clicked(); + void on_partitionrefresh_clicked(); + void on_fullname_editingFinished(); + void on_schedulerrefresh_clicked(); + void on_passwordinputok_clicked(); + void on_dirchoosecancel_clicked(); + void on_changepartition_clicked(); + void on_newrestorepoint_clicked(); + void on_partitiondelete_clicked(); + void on_schedulerstart_clicked(); + void on_schedulerstate_clicked(); + void on_pointhighlight_clicked(); + void on_livewritestart_clicked(); + void on_schedulerlater_clicked(); + void on_excludeadditem_clicked(); + void on_includeadditem_clicked(); + void on_systemupgrade_clicked(); + void on_systemrestore_clicked(); + void on_password2_textChanged(); + void on_schedulerback_clicked(); + void on_unmountdelete_clicked(); + void on_dialogcancel_clicked(); + void on_schedulemenu_clicked(); + void on_pointexclude_clicked(); + void on_systemrepair_clicked(); + void on_newpartition_clicked(); + void on_settingsmenu_clicked(); + void on_settingsback_clicked(); + void on_startcancel_clicked(); + void on_restoremenu_clicked(); + void on_installmenu_clicked(); + void on_excludemenu_clicked(); + void on_includemenu_clicked(); + void on_restoreback_clicked(); + void on_installback_clicked(); + void on_excludeback_clicked(); + void on_licensemenu_clicked(); + void on_licenseback_clicked(); + void on_pointpipe10_clicked(); + void on_pointpipe11_clicked(); + void on_pointpipe12_clicked(); + void on_pointpipe13_clicked(); + void on_pointpipe14_clicked(); + void on_pointpipe15_clicked(); + void on_pointrename_clicked(); + void on_dirchooseok_clicked(); + void on_fullrestore_clicked(); + void on_restorenext_clicked(); + void on_installnext_clicked(); + void on_repairmount_clicked(); + void on_liveexclude_clicked(); + void on_pointdelete_clicked(); + void on_liveconvert_clicked(); + void on_scalingdown_clicked(); + void on_includeback_clicked(); + void on_repairmenu_clicked(); + void on_repairback_clicked(); + void on_pointpipe1_clicked(); + void on_pointpipe2_clicked(); + void on_pointpipe3_clicked(); + void on_pointpipe4_clicked(); + void on_pointpipe5_clicked(); + void on_pointpipe6_clicked(); + void on_pointpipe7_clicked(); + void on_pointpipe8_clicked(); + void on_pointpipe9_clicked(); + void on_livedelete_clicked(); + void on_fullrepair_clicked(); + void on_grubrepair_clicked(); + void on_repairnext_clicked(); + void on_minutedown_clicked(); + void on_seconddown_clicked(); + void on_dirrefresh_clicked(); + void on_pnumber10_clicked(); + void on_aboutmenu_clicked(); + void on_aboutback_clicked(); + void on_interrupt_clicked(); + void on_scalingup_clicked(); + void on_pnumber3_clicked(); + void on_pnumber4_clicked(); + void on_pnumber5_clicked(); + void on_pnumber6_clicked(); + void on_pnumber7_clicked(); + void on_pnumber8_clicked(); + void on_pnumber9_clicked(); + void on_copymenu_clicked(); + void on_copyback_clicked(); + void on_livemenu_clicked(); + void on_liveback_clicked(); + void on_dialogok_clicked(); + void on_copynext_clicked(); + void on_hourdown_clicked(); + void on_minuteup_clicked(); + void on_secondup_clicked(); + void on_livenew_clicked(); + void on_daydown_clicked(); + void on_unmount_clicked(); + void on_adduser_clicked(); + void on_hourup_clicked(); + void on_dayup_clicked(); +}; + +template bool systemback::cfmod(const T &path, ushort mode) +{ + return chmod(bstr(path), mode) ? sb::error("\n " % tr("An error occurred while changing the access permissions of the following file:") % "\n\n " % QStr(path) % "\n\n") : true; +} + +#endif diff --git a/systemback/systemback.pro b/systemback/systemback.pro new file mode 100644 index 0000000..181ffb2 --- /dev/null +++ b/systemback/systemback.pro @@ -0,0 +1,55 @@ +QT += core \ + gui \ + widgets + +TARGET = systemback + +CONFIG += c++11 \ + exceptions_off + +TEMPLATE = app + +DEFINES += _FILE_OFFSET_BITS=64 + +SOURCES += main.cpp \ + systemback.cpp + +HEADERS += systemback.hpp \ + bttnevent.hpp \ + chckbxevent.hpp \ + lblevent.hpp \ + lndtevent.hpp \ + pnlevent.hpp \ + tblwdgtevent.hpp + +FORMS += systemback.ui + +RESOURCES += pictures.qrc + +QMAKE_CXXFLAGS += -g \ + -fno-rtti \ + -fvisibility=hidden \ + -fvisibility-inlines-hidden \ + -fno-asynchronous-unwind-tables + +CONFIG(debug, debug|release) { + QMAKE_CXXFLAGS_WARN_ON += -Wextra \ + -Wshadow \ + -Werror +} + +QMAKE_LFLAGS += -g \ + -Wl,-rpath=/usr/lib/systemback \ + -Wl,--as-needed \ + -fuse-ld=gold \ + -Wl,-z,relro + +! equals(QMAKE_CXX, clang++) { + QMAKE_CXXFLAGS += -flto + QMAKE_LFLAGS += -flto +} + +LIBS += -L../libsystemback \ + -lsystemback \ + -lcrypt \ + -lX11 diff --git a/systemback/systemback.ui b/systemback/systemback.ui new file mode 100644 index 0000000..0738652 --- /dev/null +++ b/systemback/systemback.ui @@ -0,0 +1,7849 @@ + + + systemback + + + + 0 + 0 + 1392 + 3446 + + + + Systemback + + + + :/pictures/systemback.png:/pictures/systemback.png + + + true + + + + + + + + + 0 + 0 + 1392 + 3426 + + + + + true + + + + 402 + 3305 + 138 + 48 + + + + + 20 + + + + true + + + + + 2 + 2 + 44 + 44 + + + + + FreeSans + + + + PointingHandCursor + + + true + + + + + + Qt::AlignCenter + + + + + + 47 + 2 + 44 + 44 + + + + PointingHandCursor + + + true + + + - + + + Qt::AlignCenter + + + + + + 92 + 2 + 44 + 44 + + + + PointingHandCursor + + + true + + + X + + + Qt::AlignCenter + + + + + + + 0 + 0 + 1393 + 3104 + + + + true + + + + + 1 + 1344 + 696 + 440 + + + + true + + + + + 8 + 0 + 680 + 32 + + + + Full name of the new user: + + + + + + 8 + 72 + 680 + 32 + + + + New username to login: + + + + + + 8 + 144 + 680 + 32 + + + + New user account password: + + + + + + 8 + 216 + 680 + 32 + + + + New root password (optional, not recommended for Ubuntu): + + + + + + 8 + 288 + 680 + 32 + + + + New hostname: + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + false + + + + 544 + 392 + 136 + 32 + + + + PointingHandCursor + + + Next + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + + 24 + 32 + 616 + 32 + + + + false + + + 80 + + + + + + 647 + 108 + 26 + 24 + + + + :/pictures/ok.png + + + true + + + Qt::AlignCenter + + + + + + 335 + 180 + 26 + 24 + + + + :/pictures/ok.png + + + true + + + Qt::AlignCenter + + + + + + 335 + 252 + 26 + 24 + + + + :/pictures/ok.png + + + true + + + Qt::AlignCenter + + + + + + 647 + 324 + 26 + 24 + + + + :/pictures/ok.png + + + true + + + Qt::AlignCenter + + + + + + 647 + 107 + 26 + 26 + + + + :/pictures/error.png + + + true + + + Qt::AlignCenter + + + + + + 335 + 179 + 26 + 26 + + + + :/pictures/error.png + + + true + + + Qt::AlignCenter + + + + + + 335 + 251 + 26 + 26 + + + + :/pictures/error.png + + + true + + + Qt::AlignCenter + + + + + + 647 + 323 + 26 + 26 + + + + :/pictures/error.png + + + true + + + Qt::AlignCenter + + + + + + 24 + 104 + 616 + 32 + + + + false + + + 32 + + + + + + 24 + 320 + 616 + 32 + + + + false + + + 64 + + + + + + 24 + 176 + 304 + 32 + + + + false + + + 35 + + + QLineEdit::Password + + + + + false + + + + 368 + 176 + 304 + 32 + + + + false + + + 35 + + + QLineEdit::Password + + + + + + 24 + 248 + 304 + 32 + + + + false + + + 35 + + + QLineEdit::Password + + + + + false + + + + 368 + 248 + 304 + 32 + + + + false + + + 35 + + + QLineEdit::Password + + + + + + 647 + 36 + 26 + 24 + + + + :/pictures/ok.png + + + true + + + Qt::AlignCenter + + + hostnameerror + rootpassworderror + passworderror + usernameerror + hostnamepipe + usernamepipe + passwordpipe + rootpasswordpipe + label_8 + label_10 + label_11 + label_12 + label_13 + installback + installnext + username + hostname + password1 + password2 + rootpassword1 + rootpassword2 + fullname + fullnamepipe + + + + + 1 + 1784 + 696 + 440 + + + + true + + + + + 0 + 0 + 320 + 32 + + + + + 75 + true + + + + Working directory + + + Qt::AlignCenter + + + + + + 320 + 0 + 376 + 32 + + + + + 75 + true + + + + Created Live images + + + Qt::AlignCenter + + + + + + 0 + 72 + 320 + 32 + + + + + 75 + true + + + + Name of the Live system + + + Qt::AlignCenter + + + + + + 0 + 144 + 320 + 32 + + + + + 75 + true + + + + Options + + + Qt::AlignCenter + + + + + + 0 + 208 + 432 + 32 + + + + + 75 + true + + + + Write target + + + Qt::AlignCenter + + + + + + 464 + 208 + 232 + 32 + + + + + 75 + true + + + + Live operations + + + Qt::AlignCenter + + + + + + 8 + 104 + 272 + 32 + + + + + true + + + + Qt::ClickFocus + + + false + + + auto + + + 32 + + + + + + 287 + 108 + 26 + 24 + + + + :/pictures/ok.png + + + true + + + Qt::AlignCenter + + + + + + 287 + 107 + 26 + 26 + + + + :/pictures/error.png + + + true + + + Qt::AlignCenter + + + + + + 8 + 182 + 204 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Include the user data files + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + + 390 + 416 + 300 + 24 + + + + Kendek, GPLv3 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 432 + 284 + 40 + 48 + + + + PointingHandCursor + + + Qt::NoFocus + + + Redetect devices + + + + :/pictures/refresh.png:/pictures/refresh.png + + + + 23 + 23 + + + + + + false + + + + 488 + 360 + 184 + 32 + + + + PointingHandCursor + + + Qt::ClickFocus + + + Delete + + + + + false + + + + 488 + 280 + 184 + 32 + + + + PointingHandCursor + + + Qt::ClickFocus + + + Write to target + + + + + false + + + + 488 + 320 + 184 + 32 + + + + PointingHandCursor + + + Qt::ClickFocus + + + Convert to ISO + + + + + false + + + + 488 + 240 + 184 + 32 + + + + PointingHandCursor + + + Qt::ClickFocus + + + Create new + + + + + + 8 + 32 + 304 + 32 + + + + true + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + 2 + 2 + 274 + 28 + + + + ArrowCursor + + + Qt::NoFocus + + + false + + + background-color: rgba(0, 0, 0, 0) + + + false + + + true + + + + + + 278 + 2 + 24 + 28 + + + + + 75 + true + + + + PointingHandCursor + + + Qt::NoFocus + + + ... + + + true + + + + + + + 8 + 240 + 416 + 136 + + + + Qt::ClickFocus + + + QAbstractItemView::NoEditTriggers + + + false + + + false + + + false + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + false + + + false + + + 4 + + + false + + + 10 + + + false + + + true + + + false + + + 20 + + + false + + + 20 + + + + + + + + + + 328 + 32 + 360 + 168 + + + + Qt::ClickFocus + + + QAbstractItemView::NoEditTriggers + + + false + + + QAbstractItemView::SelectRows + + + true + + + + + + 5 + 5 + 686 + 430 + + + + livenameerror + livenamepipe + liveworkdirarea + label_14 + label_15 + label_16 + label_17 + label_18 + label_19 + livename + userdatainclude + liveback + label_20 + livedevicesrefresh + livedelete + livewritestart + liveconvert + livenew + livedevices + livelist + livecover + + + + + 1 + 2224 + 696 + 440 + + + + true + + + + + 0 + 0 + 696 + 48 + + + + Mount the faulty system partition(s) to the '/mnt' directory according to the original structure.<br>('/' -> '/mnt', '/home' -> '/mnt/home', etc.) + + + Qt::AlignCenter + + + true + + + + + + 96 + 56 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + + 216 + 56 + 208 + 32 + + + + PointingHandCursor + + + Qt::ClickFocus + + + true + + + + + false + + + + 432 + 56 + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Mount + + + + 26 + 26 + + + + + + + 552 + 52 + 48 + 40 + + + + PointingHandCursor + + + Qt::NoFocus + + + Reset mounts + + + + :/pictures/refresh.png:/pictures/refresh.png + + + + 23 + 23 + + + + + + + 0 + 96 + 696 + 32 + + + + + 75 + true + + + + Repair type + + + Qt::AlignCenter + + + + + + 0 + 224 + 696 + 32 + + + + + 75 + true + + + + Options + + + Qt::AlignCenter + + + + + false + + + + 212 + 320 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + + 8 + 198 + 126 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + GRUB 2 repair + + + + + + 8 + 134 + 156 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + System files repair + + + true + + + + + + 8 + 320 + 201 + 32 + + + + Reinstall GRUB 2 bootloader: + + + + + + 8 + 262 + 131 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Auto detection + + + true + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + + 8 + 166 + 99 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Full repair + + + + + false + + + + 8 + 294 + 209 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Do not repair the fstab file + + + + + false + + + + 544 + 392 + 136 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Next + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 212 + 320 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + QComboBox::AdjustToContents + + + + + + 5 + 5 + 686 + 430 + + + + grubreinstallrepairdisable + label_21 + repairpartition + repairmountpoint + repairmount + repairpartitionrefresh + label_22 + label_23 + grubreinstallrepair + grubrepair + systemrepair + grubreinstallrepairtext + autorepairoptions + repairback + fullrepair + skipfstabrepair + repairnext + repaircover + + + + + 1 + 2664 + 696 + 440 + + + + true + + + + + 8 + 6 + 440 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Exclude hidden user files and directories from restore points + + + true + + + + + + 8 + 38 + 406 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Exclude user data files and directories from Live system + + + + + + 8 + 64 + 304 + 32 + + + + + 75 + true + + + + Excludable items + + + Qt::AlignCenter + + + + + + 384 + 64 + 304 + 32 + + + + + 75 + true + + + + Excluded items + + + Qt::AlignCenter + + + + + false + + + + 324 + 248 + 48 + 48 + + + + PointingHandCursor + + + Qt::NoFocus + + + Remove item from the exclusion list + + + + :/pictures/leftarrow.png:/pictures/leftarrow.png + + + + 24 + 22 + + + + + + false + + + + 324 + 176 + 48 + 48 + + + + PointingHandCursor + + + Qt::NoFocus + + + Add item to the exclusion list + + + + :/pictures/rightarrow.png:/pictures/rightarrow.png + + + + 24 + 22 + + + + + + + 390 + 416 + 300 + 24 + + + + Kendek, GPLv3 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + + 8 + 96 + 304 + 280 + + + + Qt::ClickFocus + + + QAbstractItemView::NoEditTriggers + + + false + + + QAbstractItemView::SelectItems + + + true + + + + 1 + + + + + + + 384 + 96 + 304 + 280 + + + + Qt::ClickFocus + + + QAbstractItemView::NoEditTriggers + + + false + + + true + + + + + + 686 + 430 + 10 + 10 + + + + PointingHandCursor + + + :/pictures/resize.png + + + true + + + Qt::AlignCenter + + + + + + 5 + 5 + 686 + 430 + + + + + + + + 697 + 464 + 696 + 440 + + + + true + + + + + 8 + 8 + 113 + 32 + + + + Scheduler state: + + + + + + 126 + 8 + 136 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Disabled + + + + 13 + 13 + + + + true + + + + + + 0 + 48 + 696 + 32 + + + + + 75 + true + + + + Timer settings + + + Qt::AlignCenter + + + + + + 0 + 272 + 696 + 32 + + + + + 75 + true + + + + Options + + + Qt::AlignCenter + + + + + + 8 + 80 + 680 + 32 + + + + Waiting time before creating a new restore point: + + + + + + 8 + 212 + 167 + 32 + + + + Visible countdown time: + + + + + + 8 + 336 + 240 + 32 + + + + Pop-up window position on screen: + + + + + false + + + + 8 + 304 + 138 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Use silent mode + + + + + false + + + + 253 + 336 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + + 390 + 416 + 300 + 24 + + + + Kendek, GPLv3 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 181 + 112 + 336 + 72 + + + + true + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + false + + + + 0 + 0 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + More + + + + :/pictures/up.png:/pictures/up.png + + + + 24 + 12 + + + + true + + + 50 + + + true + + + + + false + + + + 112 + 0 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + More + + + + :/pictures/up.png:/pictures/up.png + + + + 24 + 12 + + + + true + + + 50 + + + true + + + + + false + + + + 224 + 0 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + More + + + + :/pictures/up.png:/pictures/up.png + + + + 24 + 12 + + + + true + + + 50 + + + true + + + + + false + + + + 224 + 48 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + Less + + + + :/pictures/down.png:/pictures/down.png + + + + 24 + 12 + + + + true + + + 50 + + + true + + + + + false + + + + 112 + 48 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + Less + + + + :/pictures/down.png:/pictures/down.png + + + + 24 + 12 + + + + true + + + 50 + + + true + + + + + false + + + + 0 + 48 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + Less + + + + :/pictures/down.png:/pictures/down.png + + + + 24 + 12 + + + + true + + + 50 + + + true + + + + + + 8 + 24 + 96 + 24 + + + + true + + + Qt::AlignCenter + + + + + + 104 + 24 + 16 + 24 + + + + : + + + Qt::AlignCenter + + + + + + 120 + 24 + 96 + 24 + + + + true + + + Qt::AlignCenter + + + + + + 216 + 24 + 16 + 24 + + + + : + + + Qt::AlignCenter + + + + + + 232 + 24 + 96 + 24 + + + + true + + + Qt::AlignCenter + + + + + + + 180 + 192 + 112 + 72 + + + + true + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + false + + + + 0 + 0 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + More + + + + :/pictures/up.png:/pictures/up.png + + + + 24 + 12 + + + + true + + + 50 + + + true + + + + + false + + + + 0 + 48 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + Less + + + + :/pictures/down.png:/pictures/down.png + + + + 24 + 12 + + + + true + + + 50 + + + true + + + + + + 8 + 24 + 96 + 24 + + + + true + + + Qt::AlignCenter + + + + + + + + 697 + 904 + 696 + 440 + + + + true + + + + + 8 + 0 + 680 + 32 + + + + Simple system backup and restore application with extra features + + + + + + 8 + 32 + 680 + 32 + + + + Project homepage: + + + + + + 24 + 64 + 311 + 32 + + + + + true + + + + PointingHandCursor + + + https://sourceforge.net/projects/systemback + + + + + + 24 + 96 + 241 + 32 + + + + + true + + + + PointingHandCursor + + + https://launchpad.net/systemback + + + + + + 8 + 128 + 680 + 32 + + + + Contact: + + + + + + 24 + 160 + 141 + 32 + + + + + true + + + + PointingHandCursor + + + nemh@freemail.hu + + + + + + 8 + 192 + 408 + 32 + + + + Donate: + + + + + + 24 + 224 + 51 + 32 + + + + + true + + + + PointingHandCursor + + + https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZQ668BBR7UCEQ + + + PayPal + + + + + + 8 + 256 + 408 + 32 + + + + Systemback version: + + + + + + 25 + 288 + 392 + 32 + + + + IBeamCursor + + + Qt::TextSelectableByMouse + + + + + + 424 + 160 + 256 + 256 + + + + :/pictures/logo.png + + + true + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + + 168 + 392 + 136 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + License + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + + 390 + 416 + 300 + 24 + + + + (c) 2016, Krisztián Kende + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 697 + 1344 + 696 + 440 + + + + true + + + + false + + + + 8 + 8 + 680 + 368 + + + + Qt::NoFocus + + + false + + + QFrame::NoFrame + + + QTextEdit::NoWrap + + + Qt::NoTextInteraction + + + + + + 390 + 416 + 300 + 24 + + + + (c) 2016, Krisztián Kende + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + + + 697 + 2224 + 696 + 440 + + + + true + + + + + 8 + 0 + 651 + 32 + + + + + + + 664 + 0 + 32 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Re-read directories + + + + :/pictures/refresh.png:/pictures/refresh.png + + + + 21 + 21 + + + + true + + + + + + 18 + 400 + 191 + 32 + + + + + 75 + true + + + + Writable Linux filesystem! + + + + + + 576 + 400 + 112 + 32 + + + + PointingHandCursor + + + OK + + + + 13 + 13 + + + + + + + 456 + 400 + 112 + 32 + + + + PointingHandCursor + + + Cancel + + + + 13 + 13 + + + + + + + 686 + 430 + 10 + 10 + + + + PointingHandCursor + + + :/pictures/resize.png + + + true + + + Qt::AlignCenter + + + + + + 0 + 32 + 696 + 360 + + + + Qt::ClickFocus + + + QAbstractItemView::NoEditTriggers + + + false + + + QAbstractItemView::SelectItems + + + true + + + + 1 + + + + + + + + 1 + 24 + 696 + 440 + + + + true + + + + false + + + + 7 + 238 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Maximum number of temporary restore points + + + + + false + + + + 7 + 158 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Maximum number of temporary restore points + + + + + false + + + + 7 + 358 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Maximum number of temporary restore points + + + + + false + + + + 7 + 118 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Maximum number of temporary restore points + + + false + + + + + false + + + + 7 + 198 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Maximum number of temporary restore points + + + true + + + + + false + + + + 7 + 318 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Maximum number of temporary restore points + + + + + false + + + + 7 + 398 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Maximum number of temporary restore points + + + + + false + + + + 7 + 278 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Maximum number of temporary restore points + + + + + + 0 + 0 + 238 + 32 + + + + + 75 + true + + + + Restore points + + + Qt::AlignCenter + + + + + + 0 + 0 + 646 + 32 + + + + + 75 + true + + + + Highlighted restore points + + + Qt::AlignCenter + + + + + + 0 + 224 + 648 + 32 + + + + + 75 + true + + + + Point operations + + + Qt::AlignCenter + + + + + false + + + + 232 + 256 + 184 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Create new + + + + + false + + + + 232 + 296 + 184 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Highlight + + + + + false + + + + 232 + 336 + 184 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Rename + + + + + false + + + + 232 + 376 + 184 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Delete + + + + + false + + + + 401 + 38 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 401 + 78 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 401 + 118 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 401 + 158 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 401 + 198 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + + 424 + 0 + 272 + 32 + + + + + 75 + true + + + + Storage directory + + + Qt::AlignCenter + + + + + + 424 + 64 + 272 + 32 + + + + + 75 + true + + + + Function menu + + + Qt::AlignCenter + + + + + + 448 + 96 + 224 + 272 + + + + + + 0 + 0 + 448 + 272 + + + + + false + + + + 224 + 40 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Schedule + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 224 + 120 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + About + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 224 + 80 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Settings + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 0 + 200 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + System upgrade + + + + + false + + + + 0 + 80 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + System install + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 0 + 120 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Live system create + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 0 + 160 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + System repair + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 0 + 0 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + System restore + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 0 + 40 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + System copy + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 0 + 240 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Exclude + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 224 + 0 + 224 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Include + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + + + false + + + + 504 + 376 + 48 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/menuback.png:/pictures/menuback.png + + + + 15 + 16 + + + + + + true + + + + 568 + 376 + 48 + 32 + + + + PointingHandCursor + + + Next + + + + :/pictures/menunext.png:/pictures/menunext.png + + + + 15 + 16 + + + + + + + 390 + 416 + 300 + 24 + + + + Kendek, GPLv3 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 440 + 32 + 240 + 32 + + + + true + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + 2 + 2 + 210 + 28 + + + + + false + + + + ArrowCursor + + + Qt::NoFocus + + + false + + + background-color: rgba(0, 0, 0, 0) + + + false + + + true + + + + + + 214 + 2 + 24 + 28 + + + + + 75 + true + + + + PointingHandCursor + + + Qt::NoFocus + + + Change path + + + ... + + + true + + + + + + + 28 + 32 + 372 + 392 + + + + + false + + + + 0 + 0 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 0 + 40 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 0 + 80 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 0 + 120 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 0 + 160 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 0 + 200 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + not used + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 0 + 240 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + not used + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 0 + 280 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + not used + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 0 + 320 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + not used + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 0 + 360 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + not used + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 204 + 0 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 204 + 40 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 204 + 80 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 204 + 120 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 204 + 160 + 168 + 32 + + + + Qt::ClickFocus + + + false + + + empty + + + 128 + + + Qt::AlignCenter + + + + + false + + + + 169 + 6 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 169 + 46 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 169 + 86 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 169 + 126 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 169 + 166 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 169 + 206 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 169 + 246 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 169 + 286 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 169 + 326 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + + false + + + + 169 + 366 + 20 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Select restore point + + + + label_3 + points + widget + storagedirarea + label_4 + label_2 + pnumber6 + pnumber4 + pnumber9 + pnumber3 + pnumber5 + pnumber8 + pnumber10 + pnumber7 + label + newrestorepoint + pointhighlight + pointrename + pointdelete + pointpipe11 + pointpipe12 + pointpipe13 + pointpipe14 + pointpipe15 + label_5 + functionmenuback + functionmenunext + label_6 + + + + + 0 + 0 + 698 + 24 + + + + + 75 + true + + + + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 205), stop:1 rgba(255, 255, 255, 0)) + + + + + + 674 + 0 + 24 + 24 + + + + + 75 + true + + + + PointingHandCursor + + + ::: + + + Qt::AlignCenter + + + + + + 0 + 0 + 698 + 24 + + + + + 75 + true + + + + Systemback + + + Qt::AlignCenter + + + + + + 1 + 464 + 696 + 440 + + + + true + + + + + 0 + 0 + 696 + 32 + + + + + 75 + true + + + + Restore type + + + Qt::AlignCenter + + + + + + 8 + 38 + 107 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Full restore + + + true + + + + + + 8 + 70 + 165 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + System files restore + + + + + + 8 + 102 + 258 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + User(s) configuration files restore + + + + + false + + + + 24 + 134 + 297 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Keep newly installed configuration files + + + + + + 24 + 160 + 106 + 32 + + + + Include user(s): + + + + + false + + + + 135 + 160 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + + 0 + 192 + 696 + 32 + + + + + 75 + true + + + + Options + + + Qt::AlignCenter + + + + + + 8 + 230 + 131 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Auto detection + + + true + + + + + false + + + + 8 + 262 + 219 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Do not restore the fstab file + + + + + + 8 + 288 + 200 + 32 + + + + Reinstall GRUB 2 bootloader: + + + + + false + + + + 213 + 288 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + + 544 + 392 + 136 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Next + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 213 + 288 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + QComboBox::AdjustToContents + + + grubreinstallrestoredisable + label_7 + fullrestore + systemrestore + configurationfilesrestore + keepfiles + includeuserstext + includeusers + label_9 + autorestoreoptions + skipfstabrestore + grubreinstallrestoretext + grubreinstallrestore + restoreback + restorenext + + + + + 1 + 904 + 696 + 440 + + + + true + + + + + 0 + 0 + 696 + 32 + + + + + 75 + true + + + + Partition settings + + + Qt::AlignCenter + + + + + + 0 + 280 + 696 + 32 + + + + + 75 + true + + + + Options + + + Qt::AlignCenter + + + + + + 8 + 318 + 246 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Transfer user configuration files + + + true + + + + + + 8 + 318 + 162 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Copy user data files + + + + + + 196 + 344 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + + 8 + 344 + 183 + 32 + + + + Install GRUB 2 bootloader: + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + false + + + + 544 + 392 + 136 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Next + + + + :/pictures/next.png:/pictures/next.png + + + + 13 + 13 + + + + + + false + + + + 196 + 344 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + QComboBox::AdjustToContents + + + + + + 8 + 32 + 544 + 240 + + + + Qt::ClickFocus + + + QAbstractItemView::NoEditTriggers + + + false + + + false + + + false + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + false + + + false + + + 11 + + + false + + + 10 + + + true + + + false + + + 20 + + + false + + + 20 + + + + + + + + + + + + + + + + + 686 + 430 + 10 + 10 + + + + PointingHandCursor + + + :/pictures/resize.png + + + true + + + Qt::AlignCenter + + + + + + 5 + 5 + 686 + 430 + + + + + + + 552 + 32 + 144 + 240 + + + + + false + + + + 34 + 170 + 81 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Format + + + true + + + + + + 16 + 200 + 48 + 40 + + + + PointingHandCursor + + + Qt::NoFocus + + + Reset partitions settings + + + + :/pictures/refresh.png:/pictures/refresh.png + + + + 23 + 23 + + + + + + false + + + + 16 + 0 + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Unmount + + + + 13 + 13 + + + + + + false + + + + 16 + 128 + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + false + + + + 80 + 200 + 48 + 40 + + + + PointingHandCursor + + + Qt::NoFocus + + + Change partition settings + + + + + + + :/pictures/leftgreenarrow.png:/pictures/leftgreenarrow.png + + + + 24 + 22 + + + + + + + 0 + 96 + 144 + 32 + + + + Filesystem: + + + Qt::AlignCenter + + + + + false + + + + 16 + 64 + 112 + 32 + + + + PointingHandCursor + + + Qt::ClickFocus + + + true + + + + + + 0 + 32 + 144 + 32 + + + + Mount point: + + + Qt::AlignCenter + + + + + + + 552 + 32 + 144 + 240 + + + + + + 16 + 80 + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Reset partitions settings + + + + + + + :/pictures/refresh.png:/pictures/refresh.png + + + + 20 + 20 + + + + + + false + + + + 16 + 40 + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + QPushButton:enabled{color: red} + + + ! Delete ! + + + + 13 + 13 + + + + + + false + + + + 16 + 0 + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Unmount + + + + 13 + 13 + + + + + + + + 552 + 32 + 144 + 240 + + + + + + 80 + 64 + 48 + 40 + + + + PointingHandCursor + + + Qt::NoFocus + + + Add new partition + + + + + + + :/pictures/leftgreenarrow.png:/pictures/leftgreenarrow.png + + + + 24 + 22 + + + + + + + 16 + 64 + 48 + 40 + + + + PointingHandCursor + + + Qt::NoFocus + + + Reset partitions settings + + + + + + + :/pictures/refresh.png:/pictures/refresh.png + + + + 23 + 23 + + + + + + + 0 + 0 + 144 + 24 + + + + Create new: + + + Qt::AlignHCenter|Qt::AlignTop + + + + + + 16 + 24 + 112 + 32 + + + + Qt::ClickFocus + + + Qt::AlignCenter + + + QAbstractSpinBox::PlusMinus + + + true + + + MiB + + + 1 + + + + + + + 313 + 340 + 375 + 40 + + + + Need to set the mount point as '/boot/efi'! + + + true + + + efiwarning + partitionsettingspanel3 + partitionsettingspanel2 + grubinstallcopydisable + partitionsettingstext + partitionoptionstext + usersettingscopy + userdatafilescopy + grubinstallcopy + grubinstalltext + copyback + copynext + partitionsettings + partitionsettingspanel1 + copycover + copyresize + + + + + 0 + 3 + 24 + 21 + + + + PointingHandCursor + + + Window DPI scaling + + + + + + Qt::AlignCenter + + + + + + 697 + 2664 + 116 + 76 + + + + true + + + + + 2 + 2 + 112 + 72 + + + + true + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + 8 + 24 + 96 + 24 + + + + Multiplier factor for scaling the window contents + + + true + + + auto + + + Qt::AlignCenter + + + + + + 0 + 48 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + + :/pictures/down.png:/pictures/down.png + + + + 24 + 12 + + + + true + + + + + + 0 + 0 + 112 + 24 + + + + PointingHandCursor + + + Qt::NoFocus + + + + :/pictures/up.png:/pictures/up.png + + + + 24 + 12 + + + + true + + + + + + + + 697 + 1784 + 696 + 440 + + + + true + + + + + 390 + 416 + 300 + 24 + + + + Kendek, GPLv3 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + + 0 + 0 + 696 + 32 + + + + + 75 + true + + + + User interface + + + Qt::AlignCenter + + + + + false + + + + 271 + 32 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + false + + + + 203 + 72 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + + 8 + 118 + 182 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Window always on top + + + + + + 0 + 140 + 696 + 32 + + + + + 75 + true + + + + System + + + Qt::AlignCenter + + + + + + 8 + 306 + 426 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Disable scheduler daemon starting for the following users: + + + + + + 8 + 242 + 327 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Use XZ compressor for squashfs filesystems + + + + + + 8 + 38 + 259 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Override auto-detected language: + + + + + + 8 + 78 + 191 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Override the used style: + + + + + + 8 + 178 + 539 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Disable incremental restore points (do not use hard links between backups) + + + + + + 200 + 334 + 416 + 32 + + + + Qt::NoFocus + + + true + + + + + false + + + + 24 + 334 + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + false + + + + 144 + 330 + 48 + 40 + + + + PointingHandCursor + + + Qt::NoFocus + + + + :/pictures/rightarrow.png:/pictures/rightarrow.png + + + + 24 + 22 + + + + + + false + + + + 624 + 330 + 48 + 40 + + + + PointingHandCursor + + + Qt::NoFocus + + + + :/pictures/refresh.png:/pictures/refresh.png + + + + 23 + 23 + + + + + + + 8 + 274 + 470 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Create Live ISO images automatically (faster than the conversion) + + + + + + 8 + 210 + 427 + 20 + + + + PointingHandCursor + + + Qt::NoFocus + + + Do not empty memory cache at the end of some processes + + + + + + + 697 + 24 + 696 + 440 + + + + true + + + + + 8 + 48 + 304 + 32 + + + + + 75 + true + + + + Includable items + + + Qt::AlignCenter + + + + + + 384 + 48 + 304 + 32 + + + + + 75 + true + + + + Included items + + + Qt::AlignCenter + + + + + false + + + + 324 + 239 + 48 + 48 + + + + PointingHandCursor + + + Qt::NoFocus + + + Remove item from the exclusion list + + + + :/pictures/leftarrow.png:/pictures/leftarrow.png + + + + 24 + 22 + + + + + + false + + + + 324 + 167 + 48 + 48 + + + + PointingHandCursor + + + Qt::NoFocus + + + Add item to the exclusion list + + + + :/pictures/rightarrow.png:/pictures/rightarrow.png + + + + 24 + 22 + + + + + + + 390 + 416 + 300 + 24 + + + + Kendek, GPLv3 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 16 + 392 + 136 + 32 + + + + PointingHandCursor + + + Back + + + + :/pictures/back.png:/pictures/back.png + + + + 13 + 13 + + + + + + + 8 + 80 + 304 + 296 + + + + Qt::ClickFocus + + + QAbstractItemView::NoEditTriggers + + + false + + + QAbstractItemView::SelectItems + + + true + + + + 1 + + + + + + + 384 + 80 + 304 + 296 + + + + Qt::ClickFocus + + + QAbstractItemView::NoEditTriggers + + + false + + + true + + + + + + 686 + 430 + 10 + 10 + + + + PointingHandCursor + + + :/pictures/resize.png + + + true + + + Qt::AlignCenter + + + + + + 5 + 5 + 686 + 430 + + + + + + + 0 + 0 + 696 + 48 + + + + + 75 + true + + + + Include user data files and directories into the restore points +These will be defined as restorable configuration files! + + + Qt::AlignCenter + + + true + + + includeitemstext + includedtext + includeremoveitem + includeadditem + includekendektext + includeback + includeitemslist + includedlist + includetext + includecover + includeresize + + border + function1 + installpanel + livepanel + repairpanel + excludepanel + includepanel + schedulepanel + aboutpanel + licensepanel + choosepanel + sbpanel + windowbutton1 + restorepanel + copypanel + scalingbutton + settingspanel + scalingbuttonspanel + + + + + 0 + 3104 + 402 + 161 + + + + true + + + + + 0 + 0 + 402 + 24 + + + + + 75 + true + + + + Systemback + + + Qt::AlignCenter + + + + + + 378 + 0 + 24 + 24 + + + + + 75 + true + + + + PointingHandCursor + + + ::: + + + Qt::AlignCenter + + + + + + 0 + 0 + 402 + 24 + + + + + 75 + true + + + + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 205), stop:1 rgba(255, 255, 255, 0)) + + + + + + 1 + 24 + 400 + 136 + + + + true + + + + + 0 + 0 + 400 + 96 + + + + + 75 + true + + + + Qt::AlignCenter + + + + + + 8 + 96 + 144 + 32 + + + + + 75 + true + + + + 0 + + + %p% + + + + + false + + + + 248 + 96 + 144 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + QPushButton:enabled{color: red} + + + ! Interrupt ! + + + + 13 + 13 + + + + + + + 190 + 116 + 20 + 20 + + + + Qt::ClickFocus + + + interrupt + processrun + progressbar + focusfix + + border_2 + function2 + substatuspanel + windowbutton2 + + + + + 0 + 3265 + 402 + 161 + + + + true + + + + + 0 + 0 + 402 + 24 + + + + + 75 + true + + + + Systemback + + + Qt::AlignCenter + + + + + + 378 + 0 + 24 + 24 + + + + + 75 + true + + + + PointingHandCursor + + + ::: + + + Qt::AlignCenter + + + + + + 0 + 0 + 402 + 24 + + + + + 75 + true + + + + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 205), stop:1 rgba(255, 255, 255, 0)) + + + + + + 1 + 24 + 400 + 136 + + + + true + + + + + 10 + 10 + 60 + 60 + + + + :/pictures/dialoginfo.png + + + true + + + Qt::AlignCenter + + + + + + 80 + 8 + 312 + 88 + + + + Creates a scheduled restore point within few seconds. + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + false + + + + 280 + 96 + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Start + + + + 13 + 13 + + + + + + + 160 + 96 + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + Later + + + + 13 + 13 + + + + + + + 280 + 72 + 112 + 24 + + + + Qt::AlignCenter + + + + border_4 + function4 + subschedulerpanel + windowbutton4 + + + + + 402 + 3104 + 506 + 201 + + + + true + + + + + 0 + 0 + 506 + 24 + + + + + 75 + true + + + + Systemback + + + Qt::AlignCenter + + + + + + 482 + 0 + 24 + 24 + + + + + 75 + true + + + + PointingHandCursor + + + ::: + + + Qt::AlignCenter + + + + + + 0 + 0 + 506 + 24 + + + + + 75 + true + + + + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 205), stop:1 rgba(255, 255, 255, 0)) + + + + + + 1 + 24 + 504 + 176 + + + + true + + + + + 10 + 10 + 60 + 60 + + + + :/pictures/dialoginfo.png + + + true + + + Qt::AlignCenter + + + + + + 10 + 10 + 60 + 60 + + + + :/pictures/dialogquestion.png + + + true + + + Qt::AlignCenter + + + + + + 10 + 10 + 60 + 60 + + + + :/pictures/dialogerror.png + + + true + + + Qt::AlignCenter + + + + + + 80 + 10 + 416 + 128 + + + + Qt::RichText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + 264 + 136 + 112 + 32 + + + + PointingHandCursor + + + Cancel + + + + 13 + 13 + + + + + + + 384 + 136 + 112 + 32 + + + + PointingHandCursor + + + OK + + + + 13 + 13 + + + + + + + 384 + 112 + 112 + 24 + + + + 30s + + + Qt::AlignCenter + + + dialogerror + dialogquestion + dialoginfo + dialogtext + dialogcancel + dialogok + dialognumber + + border_3 + function3 + subdialogpanel + windowbutton3 + + + + + 908 + 3104 + 376 + 224 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 8 + 4 + 64 + 64 + + + + :/pictures/passwordlogo.png + + + true + + + Qt::AlignCenter + + + + + + 88 + 16 + 280 + 56 + + + + + 13 + 75 + true + + + + Systemback user authentication + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + 8 + 80 + 102 + 32 + + + + Administrator: + + + + + + 115 + 80 + 112 + 32 + + + + + 112 + 32 + + + + PointingHandCursor + + + Qt::NoFocus + + + + + + 8 + 128 + 72 + 32 + + + + Password: + + + + + + 85 + 128 + 250 + 32 + + + + false + + + 35 + + + QLineEdit::Password + + + + + + 342 + 132 + 26 + 24 + + + + :/pictures/ok.png + + + true + + + Qt::AlignCenter + + + + + + 342 + 131 + 26 + 26 + + + + :/pictures/error.png + + + true + + + Qt::AlignCenter + + + + + false + + + + 256 + 184 + 112 + 32 + + + + PointingHandCursor + + + OK + + + + 13 + 13 + + + + + + + 136 + 184 + 112 + 32 + + + + PointingHandCursor + + + Cancel + + + + 13 + 13 + + + + startcancel + adminpassworderror + label_41 + passwordtitletext + adminstext + admins + adminpasswordtext + adminpassword + adminpasswordpipe + passwordinputok + + + + + 540 + 3305 + 48 + 48 + + + + true + + + + + 0 + 0 + 48 + 24 + + + + + 75 + true + + + + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 205), stop:1 rgba(255, 255, 255, 0)) + + + Qt::AlignCenter + + + + + + 1 + 24 + 47 + 24 + + + + true + + + + mainpanel + statuspanel + schedulerpanel + dialogpanel + passwordpanel + buttonspanel + resizepanel + + + + + 20 + 3062 + 20 + 20 + + + + Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing + + + + + + 0 + 3426 + 20 + 20 + + + + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(71, 74, 71, 255)); + + + wallpaper + logo + wpanel + + + + + + pnlevent + QWidget +

pnlevent.hpp
+ 1 + + + lblevent + QLabel +
lblevent.hpp
+
+ + lndtevent + QLineEdit +
lndtevent.hpp
+
+ + chckbxevent + QCheckBox +
chckbxevent.hpp
+
+ + tblwdgtevent + QTableWidget +
tblwdgtevent.hpp
+
+ + bttnevent + QPushButton +
bttnevent.hpp
+
+ + + functionmenunext + functionmenuback + restoreback + copyback + fullname + username + password1 + password2 + rootpassword1 + rootpassword2 + hostname + installnext + installback + liveback + repairback + excludeback + schedulerback + aboutback + licenseback + settingsback + dirchooseok + dirchoosecancel + dialogok + dialogcancel + adminpassword + passwordinputok + startcancel + + + + + + diff --git a/systemback/tblwdgtevent.hpp b/systemback/tblwdgtevent.hpp new file mode 100644 index 0000000..0096b8e --- /dev/null +++ b/systemback/tblwdgtevent.hpp @@ -0,0 +1,52 @@ +/* + * Copyright(C) 2014-2016, Krisztián Kende + * + * This file is part of the Systemback. + * + * The Systemback is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later + * version. + * + * The Systemback is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with the + * Systemback. If not, see . + */ + +#ifndef TBLWDGTEVENT_HPP +#define TBLWDGTEVENT_HPP + +#include + +class tblwdgtevent : public QTableWidget +{ + Q_OBJECT + +public: + inline tblwdgtevent(QWidget *prnt) : QTableWidget(prnt) {} + +protected: + void focusInEvent(QFocusEvent *ev), + focusOutEvent(QFocusEvent *ev); + +signals: + void Focus_In(); + void Focus_Out(); +}; + +inline void tblwdgtevent::focusInEvent(QFocusEvent *ev) +{ + QTableWidget::focusInEvent(ev); + emit Focus_In(); +} + +inline void tblwdgtevent::focusOutEvent(QFocusEvent *ev) +{ + QTableWidget::focusOutEvent(ev); + emit Focus_Out(); +} + +#endif