Merge branch 'calamares' of https://github.com/calamares/calamares into development
This commit is contained in:
commit
9e92f5d032
21
.github/workflows/issues.yml
vendored
21
.github/workflows/issues.yml
vendored
@ -1,17 +1,26 @@
|
|||||||
name: issues
|
name: issues
|
||||||
|
|
||||||
on: issues
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened, reopened, closed]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
irc:
|
irc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: "notify: new"
|
||||||
name: notify
|
|
||||||
uses: rectalogic/notify-irc@v1
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: github.event.issue.state == 'open'
|
||||||
with:
|
with:
|
||||||
server: chat.freenode.net
|
server: chat.freenode.net
|
||||||
|
nickname: cala-issues
|
||||||
channel: "#calamares"
|
channel: "#calamares"
|
||||||
nickname: gh-issues
|
message: "OPENED ${{ github.event.issue.html_url }} by ${{ github.actor }} ${{ github.event.issue.title }}"
|
||||||
message: |
|
- name: "notify: closed"
|
||||||
${{ github.actor }} issue ${{ github.event.issue.title }}
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: github.event.issue.state != 'open'
|
||||||
|
with:
|
||||||
|
server: chat.freenode.net
|
||||||
|
nickname: cala-issues
|
||||||
|
channel: "#calamares"
|
||||||
|
message: "CLOSED ${{ github.event.issue.html_url }} by ${{ github.actor }} ${{ github.event.issue.title }}"
|
||||||
|
100
.github/workflows/nightly-debian.yml
vendored
Normal file
100
.github/workflows/nightly-debian.yml
vendored
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
name: nightly-debian-10
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "12 23 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILDDIR: /build
|
||||||
|
SRCDIR: ${{ github.workspace }}
|
||||||
|
CMAKE_ARGS: |
|
||||||
|
-DWEBVIEW_FORCE_WEBKIT=1
|
||||||
|
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||||
|
-DWITH_PYTHONQT=OFF"
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: docker://debian:10
|
||||||
|
options: --tmpfs /build:rw --user 0:0
|
||||||
|
steps:
|
||||||
|
- name: "prepare env"
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get -y install git-core
|
||||||
|
apt-get -y install \
|
||||||
|
build-essential \
|
||||||
|
cmake \
|
||||||
|
extra-cmake-modules \
|
||||||
|
gettext \
|
||||||
|
kio-dev \
|
||||||
|
libatasmart-dev \
|
||||||
|
libboost-python-dev \
|
||||||
|
libkf5config-dev \
|
||||||
|
libkf5coreaddons-dev \
|
||||||
|
libkf5i18n-dev \
|
||||||
|
libkf5iconthemes-dev \
|
||||||
|
libkf5parts-dev \
|
||||||
|
libkf5service-dev \
|
||||||
|
libkf5solid-dev \
|
||||||
|
libparted-dev \
|
||||||
|
libpolkit-qt5-1-dev \
|
||||||
|
libqt5svg5-dev \
|
||||||
|
libqt5webkit5-dev \
|
||||||
|
libyaml-cpp-dev \
|
||||||
|
os-prober \
|
||||||
|
pkg-config \
|
||||||
|
python3-dev \
|
||||||
|
qtbase5-dev \
|
||||||
|
qtdeclarative5-dev \
|
||||||
|
qttools5-dev \
|
||||||
|
qttools5-dev-tools
|
||||||
|
# Same name as on KDE neon, different version
|
||||||
|
apt-get -y install libkpmcore-dev
|
||||||
|
# Additional dependencies
|
||||||
|
apt-get -y install \
|
||||||
|
libappstreamqt-dev \
|
||||||
|
libicu-dev \
|
||||||
|
libkf5crash-dev \
|
||||||
|
libkf5package-dev \
|
||||||
|
libkf5plasma-dev \
|
||||||
|
libpwquality-dev \
|
||||||
|
libqt5webenginewidgets5 \
|
||||||
|
qtwebengine5-dev
|
||||||
|
- name: "prepare source"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: "prepare build"
|
||||||
|
id: pre_build
|
||||||
|
run: |
|
||||||
|
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
|
||||||
|
mkdir -p $BUILDDIR
|
||||||
|
test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
|
||||||
|
echo "::set-output name=message::"`git log -1 --abbrev-commit --pretty=oneline --no-decorate ${{ github.event.head_commit.id }}`
|
||||||
|
- name: "Calamares: cmake"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: cmake $CMAKE_ARGS $SRCDIR
|
||||||
|
- name: "Calamares: make"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: make -j2 VERBOSE=1
|
||||||
|
- name: "Calamares: install"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: make install VERBOSE=1
|
||||||
|
- name: "notify: ok"
|
||||||
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: ${{ success() && github.repository == 'calamares/calamares' }}
|
||||||
|
with:
|
||||||
|
server: chat.freenode.net
|
||||||
|
nickname: cala-ci
|
||||||
|
channel: "#calamares"
|
||||||
|
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
||||||
|
- name: "notify: fail"
|
||||||
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: ${{ failure() && github.repository == 'calamares/calamares' }}
|
||||||
|
with:
|
||||||
|
server: chat.freenode.net
|
||||||
|
nickname: cala-ci
|
||||||
|
channel: "#calamares"
|
||||||
|
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
99
.github/workflows/nightly-neon.yml
vendored
Normal file
99
.github/workflows/nightly-neon.yml
vendored
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
name: nightly-neon
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "52 23 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILDDIR: /build
|
||||||
|
SRCDIR: ${{ github.workspace }}
|
||||||
|
CMAKE_ARGS: |
|
||||||
|
-DWEBVIEW_FORCE_WEBKIT=1
|
||||||
|
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||||
|
-DWITH_PYTHONQT=OFF"
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: docker://kdeneon/plasma:user
|
||||||
|
options: --tmpfs /build:rw --user 0:0
|
||||||
|
steps:
|
||||||
|
- name: "prepare env"
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install git-core
|
||||||
|
sudo apt-get -y install \
|
||||||
|
build-essential \
|
||||||
|
cmake \
|
||||||
|
extra-cmake-modules \
|
||||||
|
gettext \
|
||||||
|
kio-dev \
|
||||||
|
libatasmart-dev \
|
||||||
|
libboost-python-dev \
|
||||||
|
libkf5config-dev \
|
||||||
|
libkf5coreaddons-dev \
|
||||||
|
libkf5i18n-dev \
|
||||||
|
libkf5iconthemes-dev \
|
||||||
|
libkf5parts-dev \
|
||||||
|
libkf5service-dev \
|
||||||
|
libkf5solid-dev \
|
||||||
|
libkpmcore-dev \
|
||||||
|
libparted-dev \
|
||||||
|
libpolkit-qt5-1-dev \
|
||||||
|
libqt5svg5-dev \
|
||||||
|
libqt5webkit5-dev \
|
||||||
|
libyaml-cpp-dev \
|
||||||
|
os-prober \
|
||||||
|
pkg-config \
|
||||||
|
python3-dev \
|
||||||
|
qtbase5-dev \
|
||||||
|
qtdeclarative5-dev \
|
||||||
|
qttools5-dev \
|
||||||
|
qttools5-dev-tools
|
||||||
|
- name: "prepare source"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: "prepare build"
|
||||||
|
id: pre_build
|
||||||
|
run: |
|
||||||
|
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
|
||||||
|
mkdir -p $BUILDDIR
|
||||||
|
test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
|
||||||
|
echo "::set-output name=message::"`git log -1 --abbrev-commit --pretty=oneline --no-decorate ${{ github.event.head_commit.id }}`
|
||||||
|
- name: "Calamares: cmake"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: cmake $CMAKE_ARGS $SRCDIR
|
||||||
|
- name: "Calamares: make"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: make -j2 VERBOSE=1
|
||||||
|
- name: "Calamares: install"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: make install VERBOSE=1 DESTDIR=${{ env.BUILDDIR }}/stage
|
||||||
|
- name: "Calamares: archive"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: tar czf calamares.tar.gz stage
|
||||||
|
- name: "upload"
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: calamares-tarball
|
||||||
|
path: ${{ env.BUILDDIR }}/calamares.tar.gz
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 3
|
||||||
|
- name: "notify: ok"
|
||||||
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: ${{ success() && github.repository == 'calamares/calamares' }}
|
||||||
|
with:
|
||||||
|
server: chat.freenode.net
|
||||||
|
nickname: cala-ci
|
||||||
|
channel: "#calamares"
|
||||||
|
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
||||||
|
- name: "notify: fail"
|
||||||
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: ${{ failure() && github.repository == 'calamares/calamares' }}
|
||||||
|
with:
|
||||||
|
server: chat.freenode.net
|
||||||
|
nickname: cala-ci
|
||||||
|
channel: "#calamares"
|
||||||
|
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
98
.github/workflows/nightly-opensuse.yml
vendored
Normal file
98
.github/workflows/nightly-opensuse.yml
vendored
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
name: nightly-opensuse
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "32 23 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILDDIR: /build
|
||||||
|
SRCDIR: ${{ github.workspace }}
|
||||||
|
CMAKE_ARGS: |
|
||||||
|
-DWEBVIEW_FORCE_WEBKIT=1
|
||||||
|
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||||
|
-DWITH_PYTHONQT=OFF"
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: docker://opensuse/leap
|
||||||
|
options: --tmpfs /build:rw --user 0:0
|
||||||
|
steps:
|
||||||
|
- name: "prepare env"
|
||||||
|
run: |
|
||||||
|
zypper --non-interactive up
|
||||||
|
zypper --non-interactive in git-core
|
||||||
|
# From deploycala.py
|
||||||
|
zypper --non-interactive in \
|
||||||
|
"autoconf" \
|
||||||
|
"automake" \
|
||||||
|
"bison" \
|
||||||
|
"flex" \
|
||||||
|
"git" \
|
||||||
|
"libtool" \
|
||||||
|
"m4" \
|
||||||
|
"make" \
|
||||||
|
"cmake" \
|
||||||
|
"extra-cmake-modules" \
|
||||||
|
"gcc-c++" \
|
||||||
|
"libqt5-qtbase-devel" \
|
||||||
|
"libqt5-linguist-devel" \
|
||||||
|
"libqt5-qtsvg-devel" \
|
||||||
|
"libqt5-qtdeclarative-devel" \
|
||||||
|
"libqt5-qtwebengine-devel" \
|
||||||
|
"yaml-cpp-devel" \
|
||||||
|
"libpolkit-qt5-1-devel" \
|
||||||
|
"kservice-devel" \
|
||||||
|
"kpackage-devel" \
|
||||||
|
"kparts-devel" \
|
||||||
|
"kcrash-devel" \
|
||||||
|
"kpmcore-devel" \
|
||||||
|
"plasma5-workspace-devel" \
|
||||||
|
"plasma-framework-devel" \
|
||||||
|
"libpwquality-devel" \
|
||||||
|
"parted-devel" \
|
||||||
|
"python3-devel" \
|
||||||
|
"boost-devel" \
|
||||||
|
"libboost_python-py3-*-devel"
|
||||||
|
# Additional dependencies
|
||||||
|
zypper --non-interactive in \
|
||||||
|
libicu-devel \
|
||||||
|
libAppStreamQt-devel \
|
||||||
|
libatasmart-devel
|
||||||
|
- name: "prepare source"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: "prepare build"
|
||||||
|
id: pre_build
|
||||||
|
run: |
|
||||||
|
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
|
||||||
|
mkdir -p $BUILDDIR
|
||||||
|
test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
|
||||||
|
echo "::set-output name=message::"`git log -1 --abbrev-commit --pretty=oneline --no-decorate ${{ github.event.head_commit.id }}`
|
||||||
|
- name: "Calamares: cmake"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: cmake $CMAKE_ARGS $SRCDIR
|
||||||
|
- name: "Calamares: make"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: make -j2 VERBOSE=1
|
||||||
|
- name: "Calamares: install"
|
||||||
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
|
run: make install VERBOSE=1
|
||||||
|
- name: "notify: ok"
|
||||||
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: ${{ success() && github.repository == 'calamares/calamares' }}
|
||||||
|
with:
|
||||||
|
server: chat.freenode.net
|
||||||
|
nickname: cala-ci
|
||||||
|
channel: "#calamares"
|
||||||
|
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
||||||
|
- name: "notify: fail"
|
||||||
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: ${{ failure() && github.repository == 'calamares/calamares' }}
|
||||||
|
with:
|
||||||
|
server: chat.freenode.net
|
||||||
|
nickname: cala-ci
|
||||||
|
channel: "#calamares"
|
||||||
|
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
@ -1,4 +1,4 @@
|
|||||||
name: ci
|
name: ci-push
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -27,17 +27,10 @@ jobs:
|
|||||||
image: docker://kdeneon/plasma:user
|
image: docker://kdeneon/plasma:user
|
||||||
options: --tmpfs /build:rw --user 0:0
|
options: --tmpfs /build:rw --user 0:0
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: "prepare env"
|
||||||
name: prepare env
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install git-core
|
sudo apt-get -y install git-core
|
||||||
-
|
|
||||||
name: checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
|
||||||
name: install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get -y install \
|
sudo apt-get -y install \
|
||||||
build-essential \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
@ -66,31 +59,37 @@ jobs:
|
|||||||
qtdeclarative5-dev \
|
qtdeclarative5-dev \
|
||||||
qttools5-dev \
|
qttools5-dev \
|
||||||
qttools5-dev-tools
|
qttools5-dev-tools
|
||||||
-
|
- name: "prepare source"
|
||||||
name: prepare build
|
uses: actions/checkout@v2
|
||||||
|
- name: "prepare build"
|
||||||
|
id: pre_build
|
||||||
run: |
|
run: |
|
||||||
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
|
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
|
||||||
mkdir -p $BUILDDIR
|
mkdir -p $BUILDDIR
|
||||||
test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
|
test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
|
||||||
-
|
echo "::set-output name=message::"`git log -1 --abbrev-commit --pretty=oneline --no-decorate ${{ github.event.head_commit.id }}`
|
||||||
name: cmake
|
- name: "Calamares: cmake"
|
||||||
working-directory: ${{ env.BUILDDIR }}
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
run: cmake $CMAKE_ARGS $SRCDIR
|
run: cmake $CMAKE_ARGS $SRCDIR
|
||||||
-
|
- name: "Calamares: make"
|
||||||
name: make
|
|
||||||
working-directory: ${{ env.BUILDDIR }}
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
run: make -j2 VERBOSE=1
|
run: make -j2 VERBOSE=1
|
||||||
-
|
- name: "Calamares: install"
|
||||||
name: install
|
|
||||||
working-directory: ${{ env.BUILDDIR }}
|
working-directory: ${{ env.BUILDDIR }}
|
||||||
run: |
|
run: make install VERBOSE=1
|
||||||
make install VERBOSE=1
|
- name: "notify: ok"
|
||||||
-
|
|
||||||
name: notify
|
|
||||||
uses: rectalogic/notify-irc@v1
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: ${{ success() && github.repository == 'calamares/calamares' }}
|
||||||
with:
|
with:
|
||||||
server: chat.freenode.net
|
server: chat.freenode.net
|
||||||
|
nickname: cala-ci
|
||||||
channel: "#calamares"
|
channel: "#calamares"
|
||||||
nickname: gh-notify
|
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ github.actor }} on ${{ github.event.ref }}\n.. ${{ steps.pre_build.outputs.message }}"
|
||||||
message: |
|
- name: "notify: fail"
|
||||||
${{ github.actor }} pushed ${{ github.event.ref }} CI ${{ steps.install.conclusion }} JOB ${{ github.job }} RUN ${{ github.run_id }}
|
uses: rectalogic/notify-irc@v1
|
||||||
|
if: ${{ failure() && github.repository == 'calamares/calamares' }}
|
||||||
|
with:
|
||||||
|
server: chat.freenode.net
|
||||||
|
nickname: cala-ci
|
||||||
|
channel: "#calamares"
|
||||||
|
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ github.actor }} on ${{ github.event.ref }}\n.. ${{ steps.pre_build.outputs.message }}\n.. DIFF ${{ github.event.compare }}"
|
1
AUTHORS
1
AUTHORS
@ -38,6 +38,7 @@ and moral support from (alphabetically by first name or nickname):
|
|||||||
- Kevin Kofler
|
- Kevin Kofler
|
||||||
- Kyle Robertze
|
- Kyle Robertze
|
||||||
- Lisa Vitolo
|
- Lisa Vitolo
|
||||||
|
- Neal Gompa
|
||||||
- n3rdopolis
|
- n3rdopolis
|
||||||
- Philip Müller
|
- Philip Müller
|
||||||
- Ramon Buldó
|
- Ramon Buldó
|
||||||
|
58
CHANGES
58
CHANGES
@ -7,17 +7,71 @@ contributors are listed. Note that Calamares does not have a historical
|
|||||||
changelog -- this log starts with version 3.2.0. The release notes on the
|
changelog -- this log starts with version 3.2.0. The release notes on the
|
||||||
website will have to do for older versions.
|
website will have to do for older versions.
|
||||||
|
|
||||||
# 3.2.36 (unreleased) #
|
# 3.2.38 (unreleased) #
|
||||||
|
|
||||||
|
This release contains contributions from (alphabetically by first name):
|
||||||
|
- No external contributors yet
|
||||||
|
|
||||||
|
## Core ##
|
||||||
|
- No core changes yet
|
||||||
|
|
||||||
|
## Modules ##
|
||||||
|
- No module changes yet
|
||||||
|
|
||||||
|
|
||||||
|
# 3.2.37 (2021-02-23) #
|
||||||
|
|
||||||
|
This release contains contributions from (alphabetically by first name):
|
||||||
|
- benne-dee
|
||||||
|
|
||||||
|
## Core ##
|
||||||
|
- Calamares has a table of 'best guess' languages for each country
|
||||||
|
and when GeoIP is enabled, it will automatically select that
|
||||||
|
country's language as default -- the user can of course pick
|
||||||
|
a different one. The 'best guess' is based on Unicode / ISO
|
||||||
|
data, which is sometimes dubious. Based on some personal notes,
|
||||||
|
the 'best guess' language for Belarus has been changed to Russian.
|
||||||
|
- Calamares has a table of 'best guess' keyboard mappings,
|
||||||
|
allowing native language input. However, usernames and
|
||||||
|
passwords should be in US-ASCII (this is a limitation of
|
||||||
|
the login system -- **some** parts of the system will support
|
||||||
|
non-ASCII input, but it's better safe than sorry).
|
||||||
|
Add Greek to the list of languages that needs US-ASCII
|
||||||
|
in addition to native input.
|
||||||
|
- The CI infrastructure now builds Calamares and Calamares-extensions
|
||||||
|
on a nightly basis.
|
||||||
|
|
||||||
|
## Modules ##
|
||||||
|
- The *netinstall* module has a YAML schema, allowing packagers
|
||||||
|
to validate and verify their netinstall configurations before
|
||||||
|
shipping an ISO (or writing bug reports). Thanks benne-dee.
|
||||||
|
- The *finished* module has been heavily refactored, opening
|
||||||
|
the way to a QML-based version of the same module. This is
|
||||||
|
also preparatory work for allowing packagers (e.g. PostmarketOS)
|
||||||
|
to customize the messages on the finished page.
|
||||||
|
|
||||||
|
|
||||||
|
# 3.2.36 (2021-02-03) #
|
||||||
|
|
||||||
This release contains contributions from (alphabetically by first name):
|
This release contains contributions from (alphabetically by first name):
|
||||||
- Anubhav Choudhary
|
- Anubhav Choudhary
|
||||||
|
- benne-dee
|
||||||
- Gaël PORTAY
|
- Gaël PORTAY
|
||||||
|
- Jonas Strassel
|
||||||
|
- Kevin Kofler
|
||||||
|
- Matti Hyttinen
|
||||||
|
- Neal Gompa
|
||||||
|
|
||||||
## Core ##
|
## Core ##
|
||||||
- It is now possible to hide the *next* and *back* buttons during
|
- It is now possible to hide the *next* and *back* buttons during
|
||||||
the "exec" phase of installation. THanks Anubhav.
|
the "exec" phase of installation. Thanks Anubhav.
|
||||||
|
- The Calamares CI has migrated to GitHub actions. Thanks Jonas.
|
||||||
|
|
||||||
## Modules ##
|
## Modules ##
|
||||||
|
- *bootloader* now uses the current file names for the UEFI Secure Boot
|
||||||
|
shim instead of obsolete ones.
|
||||||
|
- The *mount* module creates swap in its own subvolume, if btrfs is used.
|
||||||
|
Thanks Matti.
|
||||||
- *partition* includes more information about what it will do, including
|
- *partition* includes more information about what it will do, including
|
||||||
GPT partition types (in human-readable format, if possible). Thanks Gaël.
|
GPT partition types (in human-readable format, if possible). Thanks Gaël.
|
||||||
- Some edge-cases with overlay filesystems have been resolved in the
|
- Some edge-cases with overlay filesystems have been resolved in the
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
# TODO:3.3: Require CMake 3.12
|
# TODO:3.3: Require CMake 3.12
|
||||||
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
|
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
|
||||||
project( CALAMARES
|
project( CALAMARES
|
||||||
VERSION 3.2.36
|
VERSION 3.2.38
|
||||||
LANGUAGES C CXX
|
LANGUAGES C CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ include( CMakeColors )
|
|||||||
set( CMAKE_CXX_STANDARD 17 )
|
set( CMAKE_CXX_STANDARD 17 )
|
||||||
set( CMAKE_CXX_STANDARD_REQUIRED ON )
|
set( CMAKE_CXX_STANDARD_REQUIRED ON )
|
||||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type" )
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type" )
|
||||||
set( CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS_DEBUG}" )
|
set( CMAKE_CXX_FLAGS_DEBUG "-Og -g ${CMAKE_CXX_FLAGS_DEBUG}" )
|
||||||
set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
|
set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
|
||||||
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" )
|
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" )
|
||||||
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" )
|
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" )
|
||||||
@ -202,7 +202,7 @@ set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" )
|
|||||||
set( CMAKE_C_STANDARD 99 )
|
set( CMAKE_C_STANDARD 99 )
|
||||||
set( CMAKE_C_STANDARD_REQUIRED ON )
|
set( CMAKE_C_STANDARD_REQUIRED ON )
|
||||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" )
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" )
|
||||||
set( CMAKE_C_FLAGS_DEBUG "-g" )
|
set( CMAKE_C_FLAGS_DEBUG "-Og -g" )
|
||||||
set( CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
|
set( CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
|
||||||
set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" )
|
set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" )
|
||||||
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" )
|
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" )
|
||||||
@ -230,6 +230,10 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
|||||||
string( APPEND CMAKE_CXX_FLAGS " ${CLANG_WARNINGS}" )
|
string( APPEND CMAKE_CXX_FLAGS " ${CLANG_WARNINGS}" )
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
# The dwarf-debugging flags are slightly different, too
|
||||||
|
string( APPEND CMAKE_CXX_FLAGS_DEBUG " -gdwarf" )
|
||||||
|
string( APPEND CMAKE_C_FLAGS_DEBUG " -gdwarf" )
|
||||||
|
|
||||||
# Third-party code where we don't care so much about compiler warnings
|
# Third-party code where we don't care so much about compiler warnings
|
||||||
# (because it's uncomfortable to patch) get different flags; use
|
# (because it's uncomfortable to patch) get different flags; use
|
||||||
# mark_thirdparty_code( <file> [<file>...] )
|
# mark_thirdparty_code( <file> [<file>...] )
|
||||||
@ -686,3 +690,16 @@ feature_summary(
|
|||||||
DESCRIPTION "The following REQUIRED packages were not found:"
|
DESCRIPTION "The following REQUIRED packages were not found:"
|
||||||
QUIET_ON_EMPTY
|
QUIET_ON_EMPTY
|
||||||
)
|
)
|
||||||
|
|
||||||
|
### PACKAGING
|
||||||
|
#
|
||||||
|
# Note: most distro's will do distro-specific packaging rather than
|
||||||
|
# using CPack, and this duplicates information in the AppStream, too.
|
||||||
|
# TODO:3.3 With newer CMake, move HOMEPAGE_URL to the project()call
|
||||||
|
set(CPACK_PACKAGE_VENDOR calamares)
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Linux system installer")
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION "Calamares is a Linux system installer, intended for Linux distributions to use on their ISOs and other bootable media to install the distribution to the end-user's computer. Calamares can also be used as an OEM configuration tool. It is modular, extensible and highly-configurable for Linux distributions from all five major Linux families.")
|
||||||
|
set(CPACK_PACKAGE_HOMEPAGE_URL "https://calamares.io")
|
||||||
|
set(CPACK_PACKAGE_ICON "data/images/squid.png")
|
||||||
|
|
||||||
|
include(CPack)
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#
|
#
|
||||||
# Release script for Calamares
|
# Release script for Calamares
|
||||||
#
|
#
|
||||||
|
# NOTE: this script contains Linuxisms (in particular, expects GNU mktemp(1))
|
||||||
|
#
|
||||||
# This attempts to perform the different steps of the RELEASE.md
|
# This attempts to perform the different steps of the RELEASE.md
|
||||||
# document automatically. It's not tested on other machines or
|
# document automatically. It's not tested on other machines or
|
||||||
# setups other than [ade]'s development VM.
|
# setups other than [ade]'s development VM.
|
||||||
|
@ -145,7 +145,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamares/JobQueue.cpp" line="196"/>
|
<location filename="../src/libcalamares/JobQueue.cpp" line="196"/>
|
||||||
<source>Done</source>
|
<source>Done</source>
|
||||||
<translation>בוצע</translation>
|
<translation>סיום</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -495,7 +495,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/calamares/CalamaresWindow.cpp" line="305"/>
|
<location filename="../src/calamares/CalamaresWindow.cpp" line="305"/>
|
||||||
<source>%1 Installer</source>
|
<source>%1 Installer</source>
|
||||||
<translation>תכנית התקנת %1</translation>
|
<translation>אשף התקנת %1</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -539,7 +539,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="822"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="822"/>
|
||||||
<source>Reuse %1 as home partition for %2.</source>
|
<source>Reuse %1 as home partition for %2.</source>
|
||||||
<translation>להשתמש ב־%1 כמחיצת הבית (home) עבור %2.</translation>
|
<translation>שימוש ב־%1 כמחיצת הבית (home) עבור %2.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="958"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="958"/>
|
||||||
@ -2504,7 +2504,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="159"/>
|
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="159"/>
|
||||||
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="199"/>
|
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="199"/>
|
||||||
<source>Free Space</source>
|
<source>Free Space</source>
|
||||||
<translation>זכרון פנוי</translation>
|
<translation>שטח פנוי</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="163"/>
|
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="163"/>
|
||||||
@ -2931,7 +2931,7 @@ Output:
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="41"/>
|
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="41"/>
|
||||||
<source>Unpartitioned space or unknown partition table</source>
|
<source>Unpartitioned space or unknown partition table</source>
|
||||||
<translation>הזכרון לא מחולק למחיצות או שטבלת המחיצות אינה מוכרת</translation>
|
<translation>השטח לא מחולק למחיצות או שטבלת המחיצות אינה מוכרת</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -2991,7 +2991,7 @@ Output:
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="157"/>
|
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="157"/>
|
||||||
<source>%1 cannot be installed on empty space. Please select an existing partition.</source>
|
<source>%1 cannot be installed on empty space. Please select an existing partition.</source>
|
||||||
<translation>לא ניתן להתקין את %1 על זכרון ריק. אנא בחר מחיצה קיימת.</translation>
|
<translation>לא ניתן להתקין את %1 על שטח ריק. נא לבחור מחיצה קיימת.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="167"/>
|
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="167"/>
|
||||||
@ -3341,7 +3341,7 @@ Output:
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="96"/>
|
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="96"/>
|
||||||
<source>Flag new partition as <strong>%1</strong>.</source>
|
<source>Flag new partition as <strong>%1</strong>.</source>
|
||||||
<translation>סמן מחיצה חדשה כ <strong>%1</strong>.</translation>
|
<translation>סימון המחיצה החדשה בתור <strong>%1</strong>.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="108"/>
|
<location filename="../src/modules/partition/jobs/SetPartitionFlagsJob.cpp" line="108"/>
|
||||||
@ -4065,7 +4065,7 @@ Output:
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/usersq/usersq.qml" line="59"/>
|
<location filename="../src/modules/usersq/usersq.qml" line="59"/>
|
||||||
<source>Your Full Name</source>
|
<source>Your Full Name</source>
|
||||||
<translation>שם המלא</translation>
|
<translation>שמך המלא</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/usersq/usersq.qml" line="80"/>
|
<location filename="../src/modules/usersq/usersq.qml" line="80"/>
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="72"/>
|
<location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="72"/>
|
||||||
<source>This system was started with an <strong>EFI</strong> boot environment.<br><br>To configure startup from an EFI environment, this installer must deploy a boot loader application, like <strong>GRUB</strong> or <strong>systemd-boot</strong> on an <strong>EFI System Partition</strong>. This is automatic, unless you choose manual partitioning, in which case you must choose it or create it on your own.</source>
|
<source>This system was started with an <strong>EFI</strong> boot environment.<br><br>To configure startup from an EFI environment, this installer must deploy a boot loader application, like <strong>GRUB</strong> or <strong>systemd-boot</strong> on an <strong>EFI System Partition</strong>. This is automatic, unless you choose manual partitioning, in which case you must choose it or create it on your own.</source>
|
||||||
<translation>Sistem ini telah dimulai dengan lingkungan boot <strong>EFI</strong>.<br><br>Untuk mengkonfigurasi startup dari lingkungan EFI, installer ini seharusnya memaparkan sebuah aplikasi boot loader, seperti <strong>GRUB</strong> atau <strong>systemd-boot</strong> pada sebuah <strong>EFI System Partition</strong>. Ini adalah otomatis, kecuali kalau kamu memilih pemartisian manual, dalam beberapa kasus kamu harus memilihnya atau menciptakannya pada milikmu.</translation>
|
<translation>Sistem ini telah dimulai dengan lingkungan boot <strong>EFI</strong>.<br><br>Untuk mengkonfigurasi startup dari lingkungan EFI, installer ini seharusnya memaparkan sebuah aplikasi boot loader, seperti <strong>GRUB</strong> atau <strong>systemd-boot</strong> pada sebuah <strong>EFI System Partition</strong>. Ini adalah otomatis, kecuali kalau kamu memilih pemartisian manual, dalam kasus ini kamu harus memilihnya atau menciptakannya sendiri.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="84"/>
|
<location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="84"/>
|
||||||
<source>This system was started with a <strong>BIOS</strong> boot environment.<br><br>To configure startup from a BIOS environment, this installer must install a boot loader, like <strong>GRUB</strong>, either at the beginning of a partition or on the <strong>Master Boot Record</strong> near the beginning of the partition table (preferred). This is automatic, unless you choose manual partitioning, in which case you must set it up on your own.</source>
|
<source>This system was started with a <strong>BIOS</strong> boot environment.<br><br>To configure startup from a BIOS environment, this installer must install a boot loader, like <strong>GRUB</strong>, either at the beginning of a partition or on the <strong>Master Boot Record</strong> near the beginning of the partition table (preferred). This is automatic, unless you choose manual partitioning, in which case you must set it up on your own.</source>
|
||||||
<translation>Sistem ini dimulai dengan sebuah lingkungan boot <strong>BIOS</strong>.<br><br>Untuk mengkonfigurasi startup dari sebuah lingkungan BIOS, installer ini seharusnya memasang sebuah boot loader, seperti <strong>GRUB</strong>, baik di awal partisi atau pada <strong>Master Boot Record</strong> di dekat awalan tabel partisi (yang disukai). Ini adalah otomatis, kecuali kalau kamu memilih pemartisian manual, dalam beberapa kasus kamu harus menyetelnya pada milikmu.</translation>
|
<translation>Sistem ini dimulai dengan sebuah lingkungan boot <strong>BIOS</strong>.<br><br>Untuk mengkonfigurasi startup dari sebuah lingkungan BIOS, installer ini harus memasang sebuah boot loader, seperti <strong>GRUB</strong>, baik di awal partisi atau pada <strong>Master Boot Record</strong> di dekat awalan tabel partisi (yang disukai). Ini adalah otomatis, kecuali kalau kamu memilih pemartisian manual, dalam beberapa kasus kamu harus menyetelnya sendiri.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -101,7 +101,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/calamares/DebugWindow.ui" line="110"/>
|
<location filename="../src/calamares/DebugWindow.ui" line="110"/>
|
||||||
<source>Reload Stylesheet</source>
|
<source>Reload Stylesheet</source>
|
||||||
<translation type="unfinished"/>
|
<translation>Muat ulang Lembar gaya</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/calamares/DebugWindow.ui" line="117"/>
|
<location filename="../src/calamares/DebugWindow.ui" line="117"/>
|
||||||
@ -235,8 +235,8 @@
|
|||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../src/libcalamares/modulesystem/RequirementsChecker.cpp" line="115"/>
|
<location filename="../src/libcalamares/modulesystem/RequirementsChecker.cpp" line="115"/>
|
||||||
<source>Waiting for %n module(s).</source>
|
<source>Waiting for %n module(s).</source>
|
||||||
<translation type="unfinished">
|
<translation>
|
||||||
<numerusform/>
|
<numerusform>Menunggu %n modul().</numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
@ -267,7 +267,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="151"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="151"/>
|
||||||
<source>Would you like to paste the install log to the web?</source>
|
<source>Would you like to paste the install log to the web?</source>
|
||||||
<translation>Maukah anda untuk menempelkan log pemasangan ke situs?</translation>
|
<translation>Maukah anda untuk menempelkan log instalasi ke situs?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="164"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="164"/>
|
||||||
@ -324,7 +324,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="327"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="327"/>
|
||||||
<source>Continue with installation?</source>
|
<source>Continue with installation?</source>
|
||||||
<translation type="unfinished"/>
|
<translation>Lanjutkan instalasi?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="329"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="329"/>
|
||||||
@ -454,7 +454,8 @@ Instalasi akan ditutup dan semua perubahan akan hilang.</translation>
|
|||||||
<location filename="../src/libcalamaresui/utils/Paste.cpp" line="25"/>
|
<location filename="../src/libcalamaresui/utils/Paste.cpp" line="25"/>
|
||||||
<source>Install log posted to:
|
<source>Install log posted to:
|
||||||
%1</source>
|
%1</source>
|
||||||
<translation type="unfinished"/>
|
<translation>Log instalasi terunggah ke:
|
||||||
|
%1</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -630,7 +631,7 @@ Instalasi akan ditutup dan semua perubahan akan hilang.</translation>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1598"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1598"/>
|
||||||
<source>No Swap</source>
|
<source>No Swap</source>
|
||||||
<translation>Tidak perlu SWAP</translation>
|
<translation>Tidak pakai SWAP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1606"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1606"/>
|
||||||
@ -640,7 +641,7 @@ Instalasi akan ditutup dan semua perubahan akan hilang.</translation>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1609"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1609"/>
|
||||||
<source>Swap (no Hibernate)</source>
|
<source>Swap (no Hibernate)</source>
|
||||||
<translation>Swap (tidak hibernasi)</translation>
|
<translation>Swap (tanpa hibernasi)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1612"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1612"/>
|
||||||
@ -768,8 +769,7 @@ Instalasi akan ditutup dan semua perubahan akan hilang.</translation>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/Config.cpp" line="54"/>
|
<location filename="../src/modules/welcome/Config.cpp" line="54"/>
|
||||||
<source>This computer does not satisfy the minimum requirements for installing %1.<br/>Installation cannot continue. <a href="#details">Details...</a></source>
|
<source>This computer does not satisfy the minimum requirements for installing %1.<br/>Installation cannot continue. <a href="#details">Details...</a></source>
|
||||||
<translation>Komputer ini tidak memenuhi syarat minimum untuk memasang %1.
|
<translation>Komputer ini tidak memenuhi syarat minimum untuk memasang %1.<br/>Instalasi tidak dapat dilanjutkan. <a href="#details">Lebih rinci...</a></translation>
|
||||||
Installer tidak dapat dilanjutkan. <a href="</translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/Config.cpp" line="61"/>
|
<location filename="../src/modules/welcome/Config.cpp" line="61"/>
|
||||||
@ -790,7 +790,7 @@ Instalasi dapat dilanjutkan, namun beberapa fitur akan dinonfungsikan.</translat
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/Config.cpp" line="244"/>
|
<location filename="../src/modules/welcome/Config.cpp" line="244"/>
|
||||||
<source><h1>Welcome to the Calamares setup program for %1</h1></source>
|
<source><h1>Welcome to the Calamares setup program for %1</h1></source>
|
||||||
<translation type="unfinished"/>
|
<translation><h1>Selamat datang ke program Calamares untuk %1</h1></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/Config.cpp" line="245"/>
|
<location filename="../src/modules/welcome/Config.cpp" line="245"/>
|
||||||
@ -815,12 +815,12 @@ Instalasi dapat dilanjutkan, namun beberapa fitur akan dinonfungsikan.</translat
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/Config.cpp" line="218"/>
|
<location filename="../src/modules/users/Config.cpp" line="218"/>
|
||||||
<source>'%1' is not allowed as username.</source>
|
<source>'%1' is not allowed as username.</source>
|
||||||
<translation type="unfinished"/>
|
<translation>'%1' tidak diperbolehkan sebagai nama pengguna.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/Config.cpp" line="225"/>
|
<location filename="../src/modules/users/Config.cpp" line="225"/>
|
||||||
<source>Your username must start with a lowercase letter or underscore.</source>
|
<source>Your username must start with a lowercase letter or underscore.</source>
|
||||||
<translation type="unfinished"/>
|
<translation>Nama penggunamu harus diawali dengan huruf kecil atau garis bawah.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/Config.cpp" line="229"/>
|
<location filename="../src/modules/users/Config.cpp" line="229"/>
|
||||||
@ -840,12 +840,12 @@ Instalasi dapat dilanjutkan, namun beberapa fitur akan dinonfungsikan.</translat
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/Config.cpp" line="284"/>
|
<location filename="../src/modules/users/Config.cpp" line="284"/>
|
||||||
<source>'%1' is not allowed as hostname.</source>
|
<source>'%1' is not allowed as hostname.</source>
|
||||||
<translation type="unfinished"/>
|
<translation>'%1' tidak diperbolehkan sebagai hostname.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/Config.cpp" line="290"/>
|
<location filename="../src/modules/users/Config.cpp" line="290"/>
|
||||||
<source>Only letters, numbers, underscore and hyphen are allowed.</source>
|
<source>Only letters, numbers, underscore and hyphen are allowed.</source>
|
||||||
<translation type="unfinished"/>
|
<translation>Hanya huruf, angka, garis bawah, dan tanda penghubung yang diperbolehkan.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/Config.cpp" line="527"/>
|
<location filename="../src/modules/users/Config.cpp" line="527"/>
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="128"/>
|
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="128"/>
|
||||||
<source>Do not install a boot loader</source>
|
<source>Do not install a boot loader</source>
|
||||||
<translation type="unfinished"/>
|
<translation>बूट लोडर install नगर्ने</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="146"/>
|
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="146"/>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/viewpages/BlankViewStep.cpp" line="61"/>
|
<location filename="../src/libcalamaresui/viewpages/BlankViewStep.cpp" line="61"/>
|
||||||
<source>Blank Page</source>
|
<source>Blank Page</source>
|
||||||
<translation type="unfinished"/>
|
<translation>खाली पृष्ठ</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -60,7 +60,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/calamares/DebugWindow.ui" line="18"/>
|
<location filename="../src/calamares/DebugWindow.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/calamares/DebugWindow.ui" line="28"/>
|
<location filename="../src/calamares/DebugWindow.ui" line="28"/>
|
||||||
@ -80,7 +80,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/calamares/DebugWindow.ui" line="61"/>
|
<location filename="../src/calamares/DebugWindow.ui" line="61"/>
|
||||||
<source>Type:</source>
|
<source>Type:</source>
|
||||||
<translation type="unfinished"/>
|
<translation>प्रकार</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/calamares/DebugWindow.ui" line="68"/>
|
<location filename="../src/calamares/DebugWindow.ui" line="68"/>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/calamares/DebugWindow.ui" line="97"/>
|
<location filename="../src/calamares/DebugWindow.ui" line="97"/>
|
||||||
<source>Tools</source>
|
<source>Tools</source>
|
||||||
<translation type="unfinished"/>
|
<translation>औजारहरु</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/calamares/DebugWindow.ui" line="110"/>
|
<location filename="../src/calamares/DebugWindow.ui" line="110"/>
|
||||||
@ -145,7 +145,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamares/JobQueue.cpp" line="196"/>
|
<location filename="../src/libcalamares/JobQueue.cpp" line="196"/>
|
||||||
<source>Done</source>
|
<source>Done</source>
|
||||||
<translation type="unfinished"/>
|
<translation>सकियो</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -153,7 +153,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamares/JobExample.cpp" line="17"/>
|
<location filename="../src/libcalamares/JobExample.cpp" line="17"/>
|
||||||
<source>Example job (%1)</source>
|
<source>Example job (%1)</source>
|
||||||
<translation type="unfinished"/>
|
<translation>उदाहरण कार्य (%1)</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -212,7 +212,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="67"/>
|
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="67"/>
|
||||||
<source>Loading ...</source>
|
<source>Loading ...</source>
|
||||||
<translation type="unfinished"/>
|
<translation>लोड हुँदैछ ...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="88"/>
|
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="88"/>
|
||||||
@ -222,7 +222,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="268"/>
|
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="268"/>
|
||||||
<source>Loading failed.</source>
|
<source>Loading failed.</source>
|
||||||
<translation type="unfinished"/>
|
<translation>लोड भएन । </translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -366,7 +366,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="394"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="394"/>
|
||||||
<source>Setup is complete. Close the setup program.</source>
|
<source>Setup is complete. Close the setup program.</source>
|
||||||
<translation type="unfinished"/>
|
<translation>सेटअप सकियो । सेटअप प्रोग्राम बन्द गर्नु होस </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="395"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="395"/>
|
||||||
@ -504,7 +504,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.ui" line="18"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="120"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="120"/>
|
||||||
@ -547,7 +547,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1031"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1031"/>
|
||||||
<source>Boot loader location:</source>
|
<source>Boot loader location:</source>
|
||||||
<translation type="unfinished"/>
|
<translation>बूट लोडरको स्थान</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1083"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1083"/>
|
||||||
@ -631,12 +631,12 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1598"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1598"/>
|
||||||
<source>No Swap</source>
|
<source>No Swap</source>
|
||||||
<translation type="unfinished"/>
|
<translation>swap छैन</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1606"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1606"/>
|
||||||
<source>Reuse Swap</source>
|
<source>Reuse Swap</source>
|
||||||
<translation type="unfinished"/>
|
<translation>swap पुनः प्रयोग गर्नुहोस</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1609"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1609"/>
|
||||||
@ -789,22 +789,22 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/Config.cpp" line="244"/>
|
<location filename="../src/modules/welcome/Config.cpp" line="244"/>
|
||||||
<source><h1>Welcome to the Calamares setup program for %1</h1></source>
|
<source><h1>Welcome to the Calamares setup program for %1</h1></source>
|
||||||
<translation type="unfinished"/>
|
<translation>%1 को लागि Calamares Setup Programमा स्वागत छ । </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/Config.cpp" line="245"/>
|
<location filename="../src/modules/welcome/Config.cpp" line="245"/>
|
||||||
<source><h1>Welcome to %1 setup</h1></source>
|
<source><h1>Welcome to %1 setup</h1></source>
|
||||||
<translation type="unfinished"/>
|
<translation>%1 को Setupमा स्वागत छ । </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/Config.cpp" line="250"/>
|
<location filename="../src/modules/welcome/Config.cpp" line="250"/>
|
||||||
<source><h1>Welcome to the Calamares installer for %1</h1></source>
|
<source><h1>Welcome to the Calamares installer for %1</h1></source>
|
||||||
<translation type="unfinished"/>
|
<translation>%1 को लागि Calamares Installerमा स्वागत छ । </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/Config.cpp" line="251"/>
|
<location filename="../src/modules/welcome/Config.cpp" line="251"/>
|
||||||
<source><h1>Welcome to the %1 installer</h1></source>
|
<source><h1>Welcome to the %1 installer</h1></source>
|
||||||
<translation type="unfinished"/>
|
<translation>%1 को Installerमा स्वागत छ । </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/Config.cpp" line="212"/>
|
<location filename="../src/modules/users/Config.cpp" line="212"/>
|
||||||
@ -849,7 +849,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/Config.cpp" line="527"/>
|
<location filename="../src/modules/users/Config.cpp" line="527"/>
|
||||||
<source>Your passwords do not match!</source>
|
<source>Your passwords do not match!</source>
|
||||||
<translation type="unfinished"/>
|
<translation>पासवर्डहरू मिलेन । </translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -1256,7 +1256,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="18"/>
|
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="36"/>
|
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="36"/>
|
||||||
@ -1323,7 +1323,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/finished/FinishedPage.ui" line="18"/>
|
<location filename="../src/modules/finished/FinishedPage.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/finished/FinishedPage.ui" line="102"/>
|
<location filename="../src/modules/finished/FinishedPage.ui" line="102"/>
|
||||||
@ -1605,7 +1605,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/license/LicensePage.ui" line="18"/>
|
<location filename="../src/modules/license/LicensePage.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/license/LicensePage.ui" line="26"/>
|
<location filename="../src/modules/license/LicensePage.ui" line="26"/>
|
||||||
@ -2263,7 +2263,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/packagechooser/page_package.ui" line="24"/>
|
<location filename="../src/modules/packagechooser/page_package.ui" line="24"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/packagechooser/page_package.ui" line="44"/>
|
<location filename="../src/modules/packagechooser/page_package.ui" line="44"/>
|
||||||
@ -2317,7 +2317,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/keyboard/KeyboardPage.ui" line="18"/>
|
<location filename="../src/modules/keyboard/KeyboardPage.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/keyboard/KeyboardPage.ui" line="74"/>
|
<location filename="../src/modules/keyboard/KeyboardPage.ui" line="74"/>
|
||||||
@ -2335,7 +2335,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/page_usersetup.ui" line="18"/>
|
<location filename="../src/modules/users/page_usersetup.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/users/page_usersetup.ui" line="40"/>
|
<location filename="../src/modules/users/page_usersetup.ui" line="40"/>
|
||||||
@ -2511,7 +2511,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="18"/>
|
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="26"/>
|
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="26"/>
|
||||||
@ -2721,7 +2721,7 @@ The installer will quit and all changes will be lost.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/plasmalnf/page_plasmalnf.ui" line="18"/>
|
<location filename="../src/modules/plasmalnf/page_plasmalnf.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/plasmalnf/PlasmaLnfPage.cpp" line="79"/>
|
<location filename="../src/modules/plasmalnf/PlasmaLnfPage.cpp" line="79"/>
|
||||||
@ -2945,7 +2945,7 @@ Output:
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ReplaceWidget.ui" line="18"/>
|
<location filename="../src/modules/partition/gui/ReplaceWidget.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="127"/>
|
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="127"/>
|
||||||
@ -3588,7 +3588,7 @@ Output:
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/tracking/page_trackingstep.ui" line="18"/>
|
<location filename="../src/modules/tracking/page_trackingstep.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/tracking/page_trackingstep.ui" line="28"/>
|
<location filename="../src/modules/tracking/page_trackingstep.ui" line="28"/>
|
||||||
@ -3736,7 +3736,7 @@ Output:
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="18"/>
|
<location filename="../src/modules/welcome/WelcomePage.ui" line="18"/>
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished"/>
|
<translation>फारम</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/WelcomePage.ui" line="79"/>
|
<location filename="../src/modules/welcome/WelcomePage.ui" line="79"/>
|
||||||
|
@ -291,7 +291,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="178"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="178"/>
|
||||||
<source>&Close</source>
|
<source>&Close</source>
|
||||||
<translation>Fe&char</translation>
|
<translation>&Fechar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="189"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="189"/>
|
||||||
@ -396,7 +396,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="419"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="419"/>
|
||||||
<source>&Done</source>
|
<source>&Done</source>
|
||||||
<translation>Concluí&do</translation>
|
<translation>&Concluído</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/libcalamaresui/ViewManager.cpp" line="438"/>
|
<location filename="../src/libcalamaresui/ViewManager.cpp" line="438"/>
|
||||||
@ -512,7 +512,7 @@ O instalador será fechado e todas as alterações serão perdidas.</translation
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="120"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="120"/>
|
||||||
<source>Select storage de&vice:</source>
|
<source>Select storage de&vice:</source>
|
||||||
<translation>Selecione o dispositi&vo de armazenamento:</translation>
|
<translation>Selecione o dispositivo de armazenamento:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="121"/>
|
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="121"/>
|
||||||
@ -898,7 +898,7 @@ O instalador será fechado e todas as alterações serão perdidas.</translation
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="123"/>
|
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="123"/>
|
||||||
<source>Fi&le System:</source>
|
<source>Fi&le System:</source>
|
||||||
<translation>Sistema de &Arquivos:</translation>
|
<translation>Sistema de Arquivos:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="155"/>
|
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="155"/>
|
||||||
@ -908,7 +908,7 @@ O instalador será fechado e todas as alterações serão perdidas.</translation
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="165"/>
|
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="165"/>
|
||||||
<source>&Mount Point:</source>
|
<source>&Mount Point:</source>
|
||||||
<translation>Ponto de &Montagem:</translation>
|
<translation>Ponto de Montagem:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="192"/>
|
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="192"/>
|
||||||
|
@ -3845,7 +3845,7 @@ Kuruluma devam edebilirsiniz fakat bazı özellikler devre dışı kalabilir.</t
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/modules/welcome/WelcomePage.cpp" line="238"/>
|
<location filename="../src/modules/welcome/WelcomePage.cpp" line="238"/>
|
||||||
<source><h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Thanks to <a href="https://calamares.io/team/">the Calamares team</a> and the <a href="https://www.transifex.com/calamares/calamares/">Calamares translators team</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> development is sponsored by <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software.</source>
|
<source><h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Thanks to <a href="https://calamares.io/team/">the Calamares team</a> and the <a href="https://www.transifex.com/calamares/calamares/">Calamares translators team</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> development is sponsored by <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software.</source>
|
||||||
<translation><h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Telif Hakkı 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Telif Hakkı 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Teşekkrürler <a href="https://calamares.io/team/">Calamares takımı</a> ve <a href="https://www.transifex.com/calamares/calamares/">Calamares çeviri ekibi</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> gelişim sponsoru <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Özgür Yazılım</translation>
|
<translation><h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Telif Hakkı 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Telif Hakkı 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Teşekkürler <a href="https://calamares.io/team/">Calamares takımı</a> ve <a href="https://www.transifex.com/calamares/calamares/">Calamares çeviri ekibi</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> gelişim sponsoru <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Özgür Yazılım</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
# xxmn77 <xxmn77@gmail.com>, 2020
|
# Xəyyam Qocayev <xxmn77@gmail.com>, 2020
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -13,7 +13,7 @@ msgstr ""
|
|||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-12-07 17:09+0100\n"
|
"POT-Creation-Date: 2020-12-07 17:09+0100\n"
|
||||||
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
|
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
|
||||||
"Last-Translator: xxmn77 <xxmn77@gmail.com>, 2020\n"
|
"Last-Translator: Xəyyam Qocayev <xxmn77@gmail.com>, 2020\n"
|
||||||
"Language-Team: Azerbaijani (https://www.transifex.com/calamares/teams/20061/az/)\n"
|
"Language-Team: Azerbaijani (https://www.transifex.com/calamares/teams/20061/az/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
# xxmn77 <xxmn77@gmail.com>, 2020
|
# Xəyyam Qocayev <xxmn77@gmail.com>, 2020
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -13,7 +13,7 @@ msgstr ""
|
|||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-12-07 17:09+0100\n"
|
"POT-Creation-Date: 2020-12-07 17:09+0100\n"
|
||||||
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
|
"PO-Revision-Date: 2017-08-09 10:34+0000\n"
|
||||||
"Last-Translator: xxmn77 <xxmn77@gmail.com>, 2020\n"
|
"Last-Translator: Xəyyam Qocayev <xxmn77@gmail.com>, 2020\n"
|
||||||
"Language-Team: Azerbaijani (Azerbaijan) (https://www.transifex.com/calamares/teams/20061/az_AZ/)\n"
|
"Language-Team: Azerbaijani (Azerbaijan) (https://www.transifex.com/calamares/teams/20061/az_AZ/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
# Eli Shleifer <eligator@gmail.com>, 2017
|
# Eli Shleifer <eligator@gmail.com>, 2017
|
||||||
# Omeritzics Games <omeritzicschwartz@gmail.com>, 2020
|
# Omer I.S. <omeritzicschwartz@gmail.com>, 2020
|
||||||
# Yaron Shahrabani <sh.yaron@gmail.com>, 2020
|
# Yaron Shahrabani <sh.yaron@gmail.com>, 2020
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
|
@ -219,3 +219,16 @@ slideshow: "show.qml"
|
|||||||
slideshowAPI: 2
|
slideshowAPI: 2
|
||||||
|
|
||||||
|
|
||||||
|
# These options are to customize online uploading of logs to pastebins:
|
||||||
|
# - type : Defines the kind of pastebin service to be used.Currently
|
||||||
|
# it accepts two values:
|
||||||
|
# - none : disables the pastebin functionality
|
||||||
|
# - fiche : use fiche pastebin server
|
||||||
|
# - url : Defines the address of pastebin service to be used.
|
||||||
|
# Takes string as input
|
||||||
|
# - port : Defines the port number to be used to send logs. Takes
|
||||||
|
# integer as input
|
||||||
|
uploadServer :
|
||||||
|
type : "fiche"
|
||||||
|
url : "termbin.com"
|
||||||
|
port : 9999
|
||||||
|
@ -59,7 +59,7 @@ dumpWidgetTree( QDebug& deb, const QWidget* widget, int depth )
|
|||||||
{
|
{
|
||||||
deb << ' ';
|
deb << ' ';
|
||||||
}
|
}
|
||||||
deb << widget->objectName();
|
deb << widget->metaObject()->className() << widget->objectName();
|
||||||
|
|
||||||
for ( const auto* w : widget->findChildren< QWidget* >( QString(), Qt::FindDirectChildrenOnly ) )
|
for ( const auto* w : widget->findChildren< QWidget* >( QString(), Qt::FindDirectChildrenOnly ) )
|
||||||
{
|
{
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#include <QMutexLocker>
|
#include <QMutexLocker>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -29,7 +29,8 @@
|
|||||||
/* MODIFICATIONS
|
/* MODIFICATIONS
|
||||||
*
|
*
|
||||||
* Edited anyway:
|
* Edited anyway:
|
||||||
* 20191211 India changed to AnyLanguage, since Hindi doesn't make sense. #1284
|
* 20191211 India (IN) changed to AnyLanguage, since Hindi doesn't make sense. #1284
|
||||||
|
* 20210207 Belarus (BY) changed to Russian, as the more-common-language. #1634
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -77,7 +78,7 @@ static const CountryData country_data_table[] = {
|
|||||||
{ QLocale::Language::Portuguese, QLocale::Country::Brazil, 'B', 'R' },
|
{ QLocale::Language::Portuguese, QLocale::Country::Brazil, 'B', 'R' },
|
||||||
{ QLocale::Language::Dzongkha, QLocale::Country::Bhutan, 'B', 'T' },
|
{ QLocale::Language::Dzongkha, QLocale::Country::Bhutan, 'B', 'T' },
|
||||||
{ QLocale::Language::AnyLanguage, QLocale::Country::BouvetIsland, 'B', 'V' },
|
{ QLocale::Language::AnyLanguage, QLocale::Country::BouvetIsland, 'B', 'V' },
|
||||||
{ QLocale::Language::Belarusian, QLocale::Country::Belarus, 'B', 'Y' },
|
{ QLocale::Language::Russian, QLocale::Country::Belarus, 'B', 'Y' },
|
||||||
{ QLocale::Language::Swahili, QLocale::Country::CongoKinshasa, 'C', 'D' },
|
{ QLocale::Language::Swahili, QLocale::Country::CongoKinshasa, 'C', 'D' },
|
||||||
{ QLocale::Language::French, QLocale::Country::CentralAfricanRepublic, 'C', 'F' },
|
{ QLocale::Language::French, QLocale::Country::CentralAfricanRepublic, 'C', 'F' },
|
||||||
{ QLocale::Language::French, QLocale::Country::CongoBrazzaville, 'C', 'G' },
|
{ QLocale::Language::French, QLocale::Country::CongoBrazzaville, 'C', 'G' },
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#include <QtDBus>
|
#include <QtDBus>
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
namespace CalamaresUtils
|
namespace CalamaresUtils
|
||||||
{
|
{
|
||||||
namespace Partition
|
namespace Partition
|
||||||
@ -58,13 +60,21 @@ querySolidAutoMount( QDBusConnection& dbus, AutoMountInfo& info )
|
|||||||
// Find previous setting; this **does** need to block
|
// Find previous setting; this **does** need to block
|
||||||
auto msg = kdedCall( QStringLiteral( "isModuleAutoloaded" ) );
|
auto msg = kdedCall( QStringLiteral( "isModuleAutoloaded" ) );
|
||||||
msg.setArguments( { moduleName } );
|
msg.setArguments( { moduleName } );
|
||||||
|
std::optional< bool > result;
|
||||||
QDBusMessage r = dbus.call( msg, QDBus::Block );
|
QDBusMessage r = dbus.call( msg, QDBus::Block );
|
||||||
if ( r.type() == QDBusMessage::ReplyMessage )
|
if ( r.type() == QDBusMessage::ReplyMessage )
|
||||||
{
|
{
|
||||||
auto arg = r.arguments();
|
auto arg = r.arguments();
|
||||||
cDebug() << arg;
|
if ( arg.length() == 1 )
|
||||||
info.wasSolidModuleAutoLoaded = false;
|
{
|
||||||
|
auto v = arg.at( 0 );
|
||||||
|
if ( v.isValid() && v.type() == QVariant::Bool )
|
||||||
|
{
|
||||||
|
result = v.toBool();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
info.wasSolidModuleAutoLoaded = result.has_value() ? result.value() : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr< AutoMountInfo >
|
std::shared_ptr< AutoMountInfo >
|
||||||
@ -79,7 +89,7 @@ automountDisable( bool disable )
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
automountRestore( std::shared_ptr< AutoMountInfo >&& t )
|
automountRestore( const std::shared_ptr< AutoMountInfo >& t )
|
||||||
{
|
{
|
||||||
QDBusConnection dbus = QDBusConnection::sessionBus();
|
QDBusConnection dbus = QDBusConnection::sessionBus();
|
||||||
enableSolidAutoMount( dbus, t->wasSolidModuleAutoLoaded );
|
enableSolidAutoMount( dbus, t->wasSolidModuleAutoLoaded );
|
||||||
|
@ -43,7 +43,7 @@ DLLEXPORT std::shared_ptr< AutoMountInfo > automountDisable( bool disable = true
|
|||||||
* Pass the value returned from automountDisable() to restore the
|
* Pass the value returned from automountDisable() to restore the
|
||||||
* previous settings.
|
* previous settings.
|
||||||
*/
|
*/
|
||||||
DLLEXPORT void automountRestore( std::shared_ptr< AutoMountInfo >&& t );
|
DLLEXPORT void automountRestore( const std::shared_ptr< AutoMountInfo >& t );
|
||||||
|
|
||||||
} // namespace Partition
|
} // namespace Partition
|
||||||
} // namespace CalamaresUtils
|
} // namespace CalamaresUtils
|
||||||
|
@ -13,10 +13,13 @@
|
|||||||
#ifndef UTILS_LOGGER_H
|
#ifndef UTILS_LOGGER_H
|
||||||
#define UTILS_LOGGER_H
|
#define UTILS_LOGGER_H
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QSharedPointer>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace Logger
|
namespace Logger
|
||||||
{
|
{
|
||||||
struct FuncSuppressor
|
struct FuncSuppressor
|
||||||
@ -206,16 +209,34 @@ public:
|
|||||||
* Pointers are printed as void-pointer, so just an address (unlike, say,
|
* Pointers are printed as void-pointer, so just an address (unlike, say,
|
||||||
* QObject pointers which show an address and some metadata) preceded
|
* QObject pointers which show an address and some metadata) preceded
|
||||||
* by an '@'. This avoids C-style (void*) casts in the code.
|
* by an '@'. This avoids C-style (void*) casts in the code.
|
||||||
|
*
|
||||||
|
* Shared pointers are indicated by 'S@' and unique pointers by 'U@'.
|
||||||
*/
|
*/
|
||||||
struct Pointer
|
struct Pointer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Pointer( const void* p )
|
explicit Pointer( const void* p )
|
||||||
: ptr( p )
|
: ptr( p )
|
||||||
|
, kind( 0 )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template < typename T >
|
||||||
|
explicit Pointer( const std::shared_ptr< T >& p )
|
||||||
|
: ptr( p.get() )
|
||||||
|
, kind( 'S' )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template < typename T >
|
||||||
|
explicit Pointer( const std::unique_ptr< T >& p )
|
||||||
|
: ptr( p.get() )
|
||||||
|
, kind( 'U' )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const void* const ptr;
|
const void* const ptr;
|
||||||
|
const char kind;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief output operator for DebugRow */
|
/** @brief output operator for DebugRow */
|
||||||
@ -256,7 +277,12 @@ operator<<( QDebug& s, const DebugMap& t )
|
|||||||
inline QDebug&
|
inline QDebug&
|
||||||
operator<<( QDebug& s, const Pointer& p )
|
operator<<( QDebug& s, const Pointer& p )
|
||||||
{
|
{
|
||||||
s << NoQuote << '@' << p.ptr << Quote;
|
s << NoQuote;
|
||||||
|
if ( p.kind )
|
||||||
|
{
|
||||||
|
s << p.kind;
|
||||||
|
}
|
||||||
|
s << '@' << p.ptr << Quote;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
} // namespace Logger
|
} // namespace Logger
|
||||||
|
@ -11,11 +11,13 @@
|
|||||||
|
|
||||||
/** @brief Support for "named" enumerations
|
/** @brief Support for "named" enumerations
|
||||||
*
|
*
|
||||||
* For tables which map string names to enum values, provide a NamedEnumTable
|
* When a string needs to be one specific string out of a set of
|
||||||
* which hangs on to an initializer_list of pairs of names and values.
|
* alternatives -- one "name" from an enumerated set -- then it
|
||||||
* This table can be used with find() to map names to values, or
|
* is useful to have an **enum type** for the enumeration so that
|
||||||
* values to names. A convenience function smash() is provided to help
|
* C++ code can work with the (strong) type of the enum, while
|
||||||
* in printing integer (underlying) values of an enum.
|
* the string can be used for human-readable interaction.
|
||||||
|
* The `NamedEnumTable<E>` template provides support for naming
|
||||||
|
* values of an enum.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef UTILS_NAMEDENUM_H
|
#ifndef UTILS_NAMEDENUM_H
|
||||||
@ -27,7 +29,100 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/** @brief Type for collecting parts of a named enum. */
|
/** @brief Type for collecting parts of a named enum.
|
||||||
|
*
|
||||||
|
* The `NamedEnumTable<E>` template provides support for naming
|
||||||
|
* values of an enum. It supports mapping strings to enum values
|
||||||
|
* and mapping enum values to strings.
|
||||||
|
*
|
||||||
|
* ## Example
|
||||||
|
*
|
||||||
|
* Suppose we have code where there are three alternatives; it is
|
||||||
|
* useful to have a strong type to make the alternatives visible
|
||||||
|
* in that code, so the compiler can help check:
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* enum class MilkshakeSize { None, Small, Large };
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* In a switch() statement, the compiler will check that all kinds
|
||||||
|
* of milkshakes are dealt with; we can pass a MilkshakeSize to
|
||||||
|
* a function and rest assured that nobody will call that function
|
||||||
|
* with a silly value, like `1`.
|
||||||
|
*
|
||||||
|
* There is no relation between the C++ identifiers used, and
|
||||||
|
* any I/O related to that enumeration. In other words,
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* std::cout << MilkshakeSize::Small;
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* Will **not** print out "Small", or "small", or 1. It won't even
|
||||||
|
* compile, because there is no mapping of the enum values to
|
||||||
|
* something that can be output.
|
||||||
|
*
|
||||||
|
* By making a `NamedEnumTable<MilkshakeSize>` we can define a mapping
|
||||||
|
* between strings (names) and enum values, so that we can easily
|
||||||
|
* output the human-readable name, and also take string input
|
||||||
|
* and convert it to an enum value. Suppose we have a function
|
||||||
|
* `milkshakeSizeNames()` that returns a reference to such a table,
|
||||||
|
* then we can use `find()` to map enums-to-names and names-to-enums.
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* const auto& names = milkshakeSizeNames();
|
||||||
|
* MilkshakeSize sz{ MilkshakeSize::Large };
|
||||||
|
* std::cout << names.find(sz); // Probably "large"
|
||||||
|
*
|
||||||
|
* bool ok;
|
||||||
|
* sz = names.find( "small", ok ); // Probably MilkshakeSize::Small
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* ## Usage
|
||||||
|
*
|
||||||
|
* It is recommended to use a static const declaration for the table;
|
||||||
|
* typical use will define a function that returns a reference to
|
||||||
|
* the table, for shared use.
|
||||||
|
*
|
||||||
|
* The constructor for a table takes an initializer_list; each element
|
||||||
|
* of the initializer_list is a **pair** consisting of a name and
|
||||||
|
* an associated enum value. The names should be QStrings. For each enum
|
||||||
|
* value that is listed, the canonical name should come **first** in the
|
||||||
|
* table, so that printing the enum values gives the canonical result.
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* static const NamedEnumTable<MilkshakeSize>& milkshakeSizeNames()
|
||||||
|
* {
|
||||||
|
* static NamedEnumTable<MilkshakeSize> n { // Initializer list for n
|
||||||
|
* { "large", MilkshakeSize::Large }, // One pair of name-and-value
|
||||||
|
* { "small", MilkshakeSize::Small },
|
||||||
|
* { "big", MilkshakeSize::Large }
|
||||||
|
* };
|
||||||
|
* return n;
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* The function `eNames()`, above, returns a reference to a name table
|
||||||
|
* for the enum (presumably an enum class) `E`. It is possible to have
|
||||||
|
* more than one table for an enum, or to make the table locally,
|
||||||
|
* but **usually** you want one definitive table of names and values.
|
||||||
|
* The `eNames()` function gives you that definitive table. In Calamres
|
||||||
|
* code, such functions are usually named after the underlying enum.
|
||||||
|
*
|
||||||
|
* Using this particular table, looking up "large" will return `MilkshakeSize::Large`,
|
||||||
|
* looking up "big" will **also** return `MilkshakeSize::Large`, looking up "derp"
|
||||||
|
* will return `MilkshakeSize::Large` (because that is the first value in the table)
|
||||||
|
* but will set the boolean `ok` parameter to false. Conversely, looking
|
||||||
|
* up `MilkshakeSize::Large` will return "large" (never "big").
|
||||||
|
*
|
||||||
|
* Note that this particular table does **not** name MilkshakeSize::None,
|
||||||
|
* so it is probably wrong: you can't get a string for that enum
|
||||||
|
* value, and no string will map to MilkshakeSize::None either.
|
||||||
|
* In general, tables should cover all of the enum values.
|
||||||
|
*
|
||||||
|
* Passing an empty initializer_list to the constructor is supported,
|
||||||
|
* but will cause UB if the table is ever used for looking up a string.
|
||||||
|
*
|
||||||
|
*/
|
||||||
template < typename T >
|
template < typename T >
|
||||||
struct NamedEnumTable
|
struct NamedEnumTable
|
||||||
{
|
{
|
||||||
@ -43,7 +138,9 @@ struct NamedEnumTable
|
|||||||
* Use braced-initialisation for NamedEnum, and remember that the
|
* Use braced-initialisation for NamedEnum, and remember that the
|
||||||
* elements of the list are **pairs**, e.g.
|
* elements of the list are **pairs**, e.g.
|
||||||
*
|
*
|
||||||
|
* ```
|
||||||
* static const NamedEnumTable<Colors> c{ {"red", Colors::Red } };
|
* static const NamedEnumTable<Colors> c{ {"red", Colors::Red } };
|
||||||
|
* ```
|
||||||
*/
|
*/
|
||||||
NamedEnumTable( const std::initializer_list< pair_t >& v )
|
NamedEnumTable( const std::initializer_list< pair_t >& v )
|
||||||
: table( v )
|
: table( v )
|
||||||
@ -55,10 +152,12 @@ struct NamedEnumTable
|
|||||||
*
|
*
|
||||||
* Searches case-insensitively.
|
* Searches case-insensitively.
|
||||||
*
|
*
|
||||||
* If the name @p s is not found, @p ok is set to false and
|
* If the name @p s is not found, @p ok is set to @c false and
|
||||||
* the first enum value in the table is returned. Otherwise,
|
* the first enum value in the table is returned. Otherwise,
|
||||||
* @p ok is set to true and the corresponding value is returned.
|
* @p ok is set to @c true and the corresponding value is returned.
|
||||||
*
|
* Use the output value of @p ok to determine if the lookup was
|
||||||
|
* successful: there is otherwise no sensible way to distinguish
|
||||||
|
* found-the-name-of-the-first-item from not-found.
|
||||||
*/
|
*/
|
||||||
enum_t find( const string_t& s, bool& ok ) const
|
enum_t find( const string_t& s, bool& ok ) const
|
||||||
{
|
{
|
||||||
@ -75,11 +174,17 @@ struct NamedEnumTable
|
|||||||
return table.begin()->second;
|
return table.begin()->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @brief Find a value @p s in the table.
|
/** @brief Find a value @p s in the table and return its name.
|
||||||
*
|
*
|
||||||
* If the value @p s is not found, @p ok is set to false and
|
* If @p s is an enum value in the table, return the corresponding
|
||||||
* an empty string is returned. Otherwise, @p is set to true
|
* name (the first name with that value, if there are aliases)
|
||||||
* and the corresponding name is returned.
|
* and set @p ok to @c true.
|
||||||
|
*
|
||||||
|
* If the value @p s is not found, @p ok is set to @c false and
|
||||||
|
* an empty string is returned. This indicates that the table does
|
||||||
|
* not cover all of the values * in `enum_t` (and @p s is one
|
||||||
|
* of them), **or** that the passed-in value of @p s is
|
||||||
|
* not a legal value, e.g. via a static_cast<enum_t>.
|
||||||
*/
|
*/
|
||||||
string_t find( enum_t s, bool& ok ) const
|
string_t find( enum_t s, bool& ok ) const
|
||||||
{
|
{
|
||||||
@ -98,7 +203,10 @@ struct NamedEnumTable
|
|||||||
|
|
||||||
/** @brief Find a value @p s in the table and return its name.
|
/** @brief Find a value @p s in the table and return its name.
|
||||||
*
|
*
|
||||||
* Returns emptry string if the value is not found.
|
* Returns an empty string if the value @p s is not found (this
|
||||||
|
* indicates that the table does not cover all of the values
|
||||||
|
* in `enum_t`, **or** that the passed-in value of @p s is
|
||||||
|
* not a legal value, e.g. via a static_cast<enum_t>).
|
||||||
*/
|
*/
|
||||||
string_t find( enum_t s ) const
|
string_t find( enum_t s ) const
|
||||||
{
|
{
|
||||||
@ -107,7 +215,24 @@ struct NamedEnumTable
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief Smashes an enum value to its underlying type. */
|
/** @brief Smashes an enum value to its underlying type.
|
||||||
|
*
|
||||||
|
* While an enum **class** is not an integral type, and its values can't be
|
||||||
|
* printed or treated like an integer (like an old-style enum can),
|
||||||
|
* the underlying type **is** integral. This template function
|
||||||
|
* returns the value of an enum value, in its underlying type.
|
||||||
|
* This can be useful for debugging purposes, e.g.
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* MilkshakeSize sz{ MilkshakeSize::None };
|
||||||
|
* std::cout << milkshakeSizeNames().find( sz ) << smash( sz );
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* This will print both the name and the underlying integer for the
|
||||||
|
* value; assuming the table from the example is used, there is
|
||||||
|
* no name for MilkshakeSize::None, so it will print an empty string,
|
||||||
|
* followed by the integral representation -- probably a 0.
|
||||||
|
*/
|
||||||
template < typename E >
|
template < typename E >
|
||||||
constexpr typename std::underlying_type< E >::type
|
constexpr typename std::underlying_type< E >::type
|
||||||
smash( const E e )
|
smash( const E e )
|
||||||
|
@ -135,14 +135,15 @@ truncateMultiLine( const QString& string, CalamaresUtils::LinesStartEnd lines, C
|
|||||||
return shorter;
|
return shorter;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int linesInString = string.count( NEWLINE ) + ( string.endsWith( NEWLINE ) ? 0 : 1 );
|
const int physicalLinesInString = string.count( NEWLINE );
|
||||||
if ( ( string.length() <= chars.total ) && ( linesInString <= maxLines ) )
|
const int logicalLinesInString = physicalLinesInString + ( string.endsWith( NEWLINE ) ? 0 : 1 );
|
||||||
|
if ( ( string.length() <= chars.total ) && ( logicalLinesInString <= maxLines ) )
|
||||||
{
|
{
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString front, back;
|
QString front, back;
|
||||||
if ( string.count( NEWLINE ) >= maxLines )
|
if ( physicalLinesInString >= maxLines )
|
||||||
{
|
{
|
||||||
int from = -1;
|
int from = -1;
|
||||||
for ( int i = 0; i < lines.atStart; ++i )
|
for ( int i = 0; i < lines.atStart; ++i )
|
||||||
@ -174,8 +175,53 @@ truncateMultiLine( const QString& string, CalamaresUtils::LinesStartEnd lines, C
|
|||||||
back = string.right( lastNewLine );
|
back = string.right( lastNewLine );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// We have: <= maxLines and longer than chars.total, so:
|
||||||
|
// - carve out a chunk in the middle, based a little on
|
||||||
|
// how the balance of atStart and atEnd is
|
||||||
|
const int charsToChop = string.length() - chars.total;
|
||||||
|
if ( charsToChop < 1 )
|
||||||
|
{
|
||||||
|
// That's strange, again
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
const int startPortion = charsToChop * lines.atStart / maxLines;
|
||||||
|
const int endPortion = charsToChop * lines.atEnd / maxLines;
|
||||||
|
front = string.left( string.length() / 2 - startPortion );
|
||||||
|
back = string.right( string.length() / 2 - endPortion );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( front.length() + back.length() <= chars.total )
|
||||||
|
{
|
||||||
return front + back;
|
return front + back;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We need to cut off some bits, preserving whether there are
|
||||||
|
// newlines present at the end of the string. Go case-by-case:
|
||||||
|
if ( !front.isEmpty() && back.isEmpty() )
|
||||||
|
{
|
||||||
|
// Truncate towards the front
|
||||||
|
bool needsNewline = front.endsWith( NEWLINE );
|
||||||
|
front.truncate( chars.total );
|
||||||
|
if ( !front.endsWith( NEWLINE ) && needsNewline )
|
||||||
|
{
|
||||||
|
front.append( NEWLINE );
|
||||||
|
}
|
||||||
|
return front;
|
||||||
|
}
|
||||||
|
if ( front.isEmpty() && !back.isEmpty() )
|
||||||
|
{
|
||||||
|
// Truncate towards the tail
|
||||||
|
return back.right( chars.total );
|
||||||
|
}
|
||||||
|
// Both are non-empty, so nibble away at both of them
|
||||||
|
front.truncate( chars.total / 2 );
|
||||||
|
if ( !front.endsWith( NEWLINE ) && physicalLinesInString > 0 )
|
||||||
|
{
|
||||||
|
front.append( NEWLINE );
|
||||||
|
}
|
||||||
|
return front + back.right( chars.total / 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,6 +89,8 @@ struct CharCount
|
|||||||
* @p lines.atStart is zero) or end (if @p lines.atEnd is zero) or in the middle
|
* @p lines.atStart is zero) or end (if @p lines.atEnd is zero) or in the middle
|
||||||
* (if both are nonzero).
|
* (if both are nonzero).
|
||||||
*
|
*
|
||||||
|
* Asking for 0 lines will make this behave like QString::truncate().
|
||||||
|
*
|
||||||
* @param string the input string.
|
* @param string the input string.
|
||||||
* @param lines number of lines to preserve.
|
* @param lines number of lines to preserve.
|
||||||
* @param chars maximum number of characters in the returned string.
|
* @param chars maximum number of characters in the returned string.
|
||||||
|
@ -67,6 +67,7 @@ private Q_SLOTS:
|
|||||||
/** @brief Test smart string truncation. */
|
/** @brief Test smart string truncation. */
|
||||||
void testStringTruncation();
|
void testStringTruncation();
|
||||||
void testStringTruncationShorter();
|
void testStringTruncationShorter();
|
||||||
|
void testStringTruncationDegenerate();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void recursiveCompareMap( const QVariantMap& a, const QVariantMap& b, int depth );
|
void recursiveCompareMap( const QVariantMap& a, const QVariantMap& b, int depth );
|
||||||
@ -597,6 +598,8 @@ and the translations updated.)" );
|
|||||||
QVERIFY( !longString.endsWith( NEWLINE ) );
|
QVERIFY( !longString.endsWith( NEWLINE ) );
|
||||||
QCOMPARE( longString.count( NEWLINE ), 2 );
|
QCOMPARE( longString.count( NEWLINE ), 2 );
|
||||||
QVERIFY( longString.length() > insufficientLength );
|
QVERIFY( longString.length() > insufficientLength );
|
||||||
|
// Even the first line must be more than the insufficientLength
|
||||||
|
QVERIFY( longString.indexOf( NEWLINE ) > insufficientLength );
|
||||||
|
|
||||||
// Grab first line, untruncated
|
// Grab first line, untruncated
|
||||||
{
|
{
|
||||||
@ -626,11 +629,84 @@ and the translations updated.)" );
|
|||||||
QVERIFY( longString.endsWith( s ) );
|
QVERIFY( longString.endsWith( s ) );
|
||||||
QVERIFY( !s.endsWith( NEWLINE ) );
|
QVERIFY( !s.endsWith( NEWLINE ) );
|
||||||
QVERIFY( s.endsWith( "updated." ) );
|
QVERIFY( s.endsWith( "updated." ) );
|
||||||
cDebug() << "Result-line" << Logger::Quote << s;
|
|
||||||
QCOMPARE( s.count( NEWLINE ), 1 ); // Because last line doesn't end with a newline
|
QCOMPARE( s.count( NEWLINE ), 1 ); // Because last line doesn't end with a newline
|
||||||
QVERIFY( s.startsWith( "displayed in " ) );
|
QVERIFY( s.startsWith( "displayed in " ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// First line, truncated
|
||||||
|
{
|
||||||
|
auto s = truncateMultiLine( longString, LinesStartEnd { 1, 0 }, CharCount { insufficientLength } );
|
||||||
|
cDebug() << "Result-line" << Logger::Quote << s;
|
||||||
|
QVERIFY( s.length() > 1 );
|
||||||
|
QVERIFY( s.endsWith( NEWLINE ) );
|
||||||
|
QVERIFY( s.startsWith( "Some " ) );
|
||||||
|
// Because the first line has a newline, the truncated version does too,
|
||||||
|
// but that makes it one longer than requested.
|
||||||
|
QCOMPARE( s.length(), insufficientLength + 1 );
|
||||||
|
QVERIFY( longString.startsWith( s.left( insufficientLength ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Last line, truncated; this line is quite short
|
||||||
|
{
|
||||||
|
const int quiteShort = 8;
|
||||||
|
QVERIFY( longString.lastIndexOf( NEWLINE ) < longString.length() - quiteShort );
|
||||||
|
|
||||||
|
auto s = truncateMultiLine( longString, LinesStartEnd { 0, 1 }, CharCount { quiteShort } );
|
||||||
|
cDebug() << "Result-line" << Logger::Quote << s;
|
||||||
|
QVERIFY( s.length() > 1 );
|
||||||
|
QVERIFY( !s.endsWith( NEWLINE ) ); // Because the original doesn't either
|
||||||
|
QVERIFY( s.startsWith( "upda" ) );
|
||||||
|
QCOMPARE( s.length(), quiteShort ); // No extra newlines
|
||||||
|
QVERIFY( longString.endsWith( s ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// First and last, but both truncated
|
||||||
|
{
|
||||||
|
const int quiteShort = 16;
|
||||||
|
QVERIFY( longString.indexOf( NEWLINE ) > quiteShort );
|
||||||
|
QVERIFY( longString.lastIndexOf( NEWLINE ) < longString.length() - quiteShort );
|
||||||
|
|
||||||
|
auto s = truncateMultiLine( longString, LinesStartEnd { 1, 1 }, CharCount { quiteShort } );
|
||||||
|
cDebug() << "Result-line" << Logger::Quote << s;
|
||||||
|
QVERIFY( s.length() > 1 );
|
||||||
|
QVERIFY( !s.endsWith( NEWLINE ) ); // Because the original doesn't either
|
||||||
|
QVERIFY( s.startsWith( "Some " ) );
|
||||||
|
QVERIFY( s.endsWith( "updated." ) );
|
||||||
|
QCOMPARE( s.length(), quiteShort + 1 ); // Newline between front and back part
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LibCalamaresTests::testStringTruncationDegenerate()
|
||||||
|
{
|
||||||
|
Logger::setupLogLevel( Logger::LOGDEBUG );
|
||||||
|
|
||||||
|
using namespace CalamaresUtils;
|
||||||
|
|
||||||
|
// This is quite long, 1 line only, with no newlines
|
||||||
|
const QString longString( "The portscout new distfile checker has detected that one or more of your "
|
||||||
|
"ports appears to be out of date. Please take the opportunity to check "
|
||||||
|
"each of the ports listed below, and if possible and appropriate, "
|
||||||
|
"submit/commit an update. If any ports have already been updated, you can "
|
||||||
|
"safely ignore the entry." );
|
||||||
|
|
||||||
|
const char NEWLINE = '\n';
|
||||||
|
const int quiteShort = 16;
|
||||||
|
QVERIFY( longString.length() > quiteShort );
|
||||||
|
QVERIFY( !longString.contains( NEWLINE ) );
|
||||||
|
QVERIFY( longString.indexOf( NEWLINE ) < 0 );
|
||||||
|
|
||||||
|
{
|
||||||
|
auto s = truncateMultiLine( longString, LinesStartEnd { 1, 0 }, CharCount { quiteShort } );
|
||||||
|
cDebug() << "Result-line" << Logger::Quote << s;
|
||||||
|
QVERIFY( s.length() > 1 );
|
||||||
|
QCOMPARE( s.length(), quiteShort ); // No newline between front and back part
|
||||||
|
QVERIFY( s.startsWith( "The port" ) ); // 8, which is quiteShort / 2
|
||||||
|
QVERIFY( s.endsWith( "e entry." ) ); // also 8 chars
|
||||||
|
|
||||||
|
auto t = truncateMultiLine( longString, LinesStartEnd { 2, 2 }, CharCount { quiteShort } );
|
||||||
|
QCOMPARE( s, t );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
|
* SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
|
||||||
* SPDX-FileCopyrightText: 2018 Raul Rodrigo Segura (raurodse)
|
* SPDX-FileCopyrightText: 2018 Raul Rodrigo Segura (raurodse)
|
||||||
* SPDX-FileCopyrightText: 2019 Camilo Higuita <milo.h@aol.com>
|
* SPDX-FileCopyrightText: 2019 Camilo Higuita <milo.h@aol.com>
|
||||||
|
* SPDX-FileCopyrightText: 2021 Anubhav Choudhary <ac.10edu@gmail.com>
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*
|
*
|
||||||
* Calamares is Free Software: see the License-Identifier above.
|
* Calamares is Free Software: see the License-Identifier above.
|
||||||
@ -86,6 +87,13 @@ const QStringList Branding::s_styleEntryStrings =
|
|||||||
"sidebarTextSelect",
|
"sidebarTextSelect",
|
||||||
"sidebarTextHighlight"
|
"sidebarTextHighlight"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const QStringList Branding::s_uploadServerStrings =
|
||||||
|
{
|
||||||
|
"type",
|
||||||
|
"url",
|
||||||
|
"port"
|
||||||
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
// *INDENT-ON*
|
// *INDENT-ON*
|
||||||
|
|
||||||
@ -218,6 +226,12 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
|
|||||||
return imageFi.absoluteFilePath();
|
return imageFi.absoluteFilePath();
|
||||||
} );
|
} );
|
||||||
loadStrings( m_style, doc, "style", []( const QString& s ) -> QString { return s; } );
|
loadStrings( m_style, doc, "style", []( const QString& s ) -> QString { return s; } );
|
||||||
|
|
||||||
|
const QVariantMap temp = CalamaresUtils::yamlMapToVariant( doc[ "uploadServer" ] );
|
||||||
|
for ( auto it = temp.constBegin(); it != temp.constEnd(); ++it )
|
||||||
|
{
|
||||||
|
m_uploadServer.insert( it.key(), it.value().toString() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch ( YAML::Exception& e )
|
catch ( YAML::Exception& e )
|
||||||
{
|
{
|
||||||
@ -278,6 +292,11 @@ Branding::imagePath( Branding::ImageEntry imageEntry ) const
|
|||||||
return m_images.value( s_imageEntryStrings.value( imageEntry ) );
|
return m_images.value( s_imageEntryStrings.value( imageEntry ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString
|
||||||
|
Branding::uploadServer( Branding::UploadServerEntry uploadServerEntry ) const
|
||||||
|
{
|
||||||
|
return m_uploadServer.value( s_uploadServerStrings.value( uploadServerEntry ) );
|
||||||
|
}
|
||||||
|
|
||||||
QPixmap
|
QPixmap
|
||||||
Branding::image( Branding::ImageEntry imageEntry, const QSize& size ) const
|
Branding::image( Branding::ImageEntry imageEntry, const QSize& size ) const
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
||||||
* SPDX-FileCopyrightText: 2018 Raul Rodrigo Segura (raurodse)
|
* SPDX-FileCopyrightText: 2018 Raul Rodrigo Segura (raurodse)
|
||||||
* SPDX-FileCopyrightText: 2019 Camilo Higuita <milo.h@aol.com>
|
* SPDX-FileCopyrightText: 2019 Camilo Higuita <milo.h@aol.com>
|
||||||
|
* SPDX-FileCopyrightText: 2021 Anubhav Choudhary <ac.10edu@gmail.com>
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*
|
*
|
||||||
* Calamares is Free Software: see the License-Identifier above.
|
* Calamares is Free Software: see the License-Identifier above.
|
||||||
@ -22,6 +23,7 @@
|
|||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
#include <QUrl>
|
||||||
|
|
||||||
namespace YAML
|
namespace YAML
|
||||||
{
|
{
|
||||||
@ -42,6 +44,7 @@ public:
|
|||||||
* e.g. *Branding::ProductName to get the string value for
|
* e.g. *Branding::ProductName to get the string value for
|
||||||
* the product name.
|
* the product name.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum StringEntry
|
enum StringEntry
|
||||||
{
|
{
|
||||||
ProductName,
|
ProductName,
|
||||||
@ -80,6 +83,14 @@ public:
|
|||||||
};
|
};
|
||||||
Q_ENUM( StyleEntry )
|
Q_ENUM( StyleEntry )
|
||||||
|
|
||||||
|
enum UploadServerEntry : short
|
||||||
|
{
|
||||||
|
Type,
|
||||||
|
URL,
|
||||||
|
Port
|
||||||
|
};
|
||||||
|
Q_ENUM( UploadServerEntry )
|
||||||
|
|
||||||
/** @brief Setting for how much the main window may expand. */
|
/** @brief Setting for how much the main window may expand. */
|
||||||
enum class WindowExpansion
|
enum class WindowExpansion
|
||||||
{
|
{
|
||||||
@ -223,6 +234,7 @@ public slots:
|
|||||||
|
|
||||||
QString styleString( StyleEntry styleEntry ) const;
|
QString styleString( StyleEntry styleEntry ) const;
|
||||||
QString imagePath( ImageEntry imageEntry ) const;
|
QString imagePath( ImageEntry imageEntry ) const;
|
||||||
|
QString uploadServer( UploadServerEntry uploadServerEntry ) const;
|
||||||
|
|
||||||
PanelSide sidebarSide() const { return m_sidebarSide; }
|
PanelSide sidebarSide() const { return m_sidebarSide; }
|
||||||
PanelSide navigationSide() const { return m_navigationSide; }
|
PanelSide navigationSide() const { return m_navigationSide; }
|
||||||
@ -233,12 +245,14 @@ private:
|
|||||||
static const QStringList s_stringEntryStrings;
|
static const QStringList s_stringEntryStrings;
|
||||||
static const QStringList s_imageEntryStrings;
|
static const QStringList s_imageEntryStrings;
|
||||||
static const QStringList s_styleEntryStrings;
|
static const QStringList s_styleEntryStrings;
|
||||||
|
static const QStringList s_uploadServerStrings;
|
||||||
|
|
||||||
QString m_descriptorPath; // Path to descriptor (e.g. "/etc/calamares/default/branding.desc")
|
QString m_descriptorPath; // Path to descriptor (e.g. "/etc/calamares/default/branding.desc")
|
||||||
QString m_componentName; // Matches last part of full path to containing directory
|
QString m_componentName; // Matches last part of full path to containing directory
|
||||||
QMap< QString, QString > m_strings;
|
QMap< QString, QString > m_strings;
|
||||||
QMap< QString, QString > m_images;
|
QMap< QString, QString > m_images;
|
||||||
QMap< QString, QString > m_style;
|
QMap< QString, QString > m_style;
|
||||||
|
QMap< QString, QString > m_uploadServer;
|
||||||
|
|
||||||
/* The slideshow can be done in one of two ways:
|
/* The slideshow can be done in one of two ways:
|
||||||
* - as a sequence of images
|
* - as a sequence of images
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
||||||
* SPDX-FileCopyrightText: 2019 Dominic Hayes <ferenosdev@outlook.com>
|
* SPDX-FileCopyrightText: 2019 Dominic Hayes <ferenosdev@outlook.com>
|
||||||
* SPDX-FileCopyrightText: 2019 Gabriel Craciunescu <crazy@frugalware.org>
|
* SPDX-FileCopyrightText: 2019 Gabriel Craciunescu <crazy@frugalware.org>
|
||||||
|
* SPDX-FileCopyrightText: 2021 Anubhav Choudhary <ac.10edu@gmail.com>
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*
|
*
|
||||||
* Calamares is Free Software: see the License-Identifier above.
|
* Calamares is Free Software: see the License-Identifier above.
|
||||||
@ -141,7 +142,8 @@ ViewManager::insertViewStep( int before, ViewStep* step )
|
|||||||
void
|
void
|
||||||
ViewManager::onInstallationFailed( const QString& message, const QString& details )
|
ViewManager::onInstallationFailed( const QString& message, const QString& details )
|
||||||
{
|
{
|
||||||
bool shouldOfferWebPaste = false; // TODO: config var
|
QString serverType = Calamares::Branding::instance()->uploadServer( Calamares::Branding::Type );
|
||||||
|
bool shouldOfferWebPaste = CalamaresUtils::UploadServersList.contains( serverType );
|
||||||
|
|
||||||
cError() << "Installation failed:" << message;
|
cError() << "Installation failed:" << message;
|
||||||
cDebug() << Logger::SubEntry << "- message:" << message;
|
cDebug() << Logger::SubEntry << "- message:" << message;
|
||||||
@ -153,7 +155,10 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
|
|||||||
QString text = "<p>" + message + "</p>";
|
QString text = "<p>" + message + "</p>";
|
||||||
if ( !details.isEmpty() )
|
if ( !details.isEmpty() )
|
||||||
{
|
{
|
||||||
text += "<p>" + CalamaresUtils::truncateMultiLine( details, CalamaresUtils::LinesStartEnd { 8, 0 } ) + "</p>";
|
text += "<p>"
|
||||||
|
+ CalamaresUtils::truncateMultiLine( details, CalamaresUtils::LinesStartEnd { 6, 2 } )
|
||||||
|
.replace( '\n', QStringLiteral( "<br/>" ) )
|
||||||
|
+ "</p>";
|
||||||
}
|
}
|
||||||
if ( shouldOfferWebPaste )
|
if ( shouldOfferWebPaste )
|
||||||
{
|
{
|
||||||
@ -184,8 +189,16 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
|
|||||||
connect( msgBox, &QMessageBox::buttonClicked, [msgBox]( QAbstractButton* button ) {
|
connect( msgBox, &QMessageBox::buttonClicked, [msgBox]( QAbstractButton* button ) {
|
||||||
if ( msgBox->buttonRole( button ) == QMessageBox::ButtonRole::YesRole )
|
if ( msgBox->buttonRole( button ) == QMessageBox::ButtonRole::YesRole )
|
||||||
{
|
{
|
||||||
// TODO: host and port should be configurable
|
QString pasteUrlMsg;
|
||||||
QString pasteUrlMsg = CalamaresUtils::sendLogToPastebin( msgBox, QStringLiteral( "termbin.com" ), 9999 );
|
QString serverType = Calamares::Branding::instance()->uploadServer( Calamares::Branding::Type );
|
||||||
|
if ( serverType == "fiche" )
|
||||||
|
{
|
||||||
|
pasteUrlMsg = CalamaresUtils::ficheLogUpload( msgBox );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pasteUrlMsg = QString();
|
||||||
|
}
|
||||||
|
|
||||||
QString pasteUrlTitle = tr( "Install Log Paste URL" );
|
QString pasteUrlTitle = tr( "Install Log Paste URL" );
|
||||||
if ( pasteUrlMsg.isEmpty() )
|
if ( pasteUrlMsg.isEmpty() )
|
||||||
|
@ -9,20 +9,35 @@
|
|||||||
|
|
||||||
#include "Paste.h"
|
#include "Paste.h"
|
||||||
|
|
||||||
|
#include "Branding.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QTcpSocket>
|
#include <QTcpSocket>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
#include <QClipboard>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
namespace CalamaresUtils
|
namespace CalamaresUtils
|
||||||
{
|
{
|
||||||
|
|
||||||
|
QStringList UploadServersList = {
|
||||||
|
"fiche"
|
||||||
|
// In future more serverTypes can be added as Calamares support them
|
||||||
|
// "none" serverType is explicitly not mentioned here
|
||||||
|
};
|
||||||
|
|
||||||
QString
|
QString
|
||||||
sendLogToPastebin( QObject* parent, const QString& ficheHost, quint16 fichePort )
|
ficheLogUpload( QObject* parent )
|
||||||
{
|
{
|
||||||
QString pasteUrlFmt = parent->tr( "Install log posted to:\n%1" );
|
|
||||||
|
const QString& ficheHost = Calamares::Branding::instance()->uploadServer( Calamares::Branding::URL );
|
||||||
|
quint16 fichePort = Calamares::Branding::instance()->uploadServer( Calamares::Branding::Port ).toInt();
|
||||||
|
|
||||||
|
QString pasteUrlFmt = parent->tr( "Install log posted to\n\n%1\n\nLink copied to clipboard" );
|
||||||
|
|
||||||
QFile pasteSourceFile( Logger::logFile() );
|
QFile pasteSourceFile( Logger::logFile() );
|
||||||
if ( !pasteSourceFile.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
if ( !pasteSourceFile.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
||||||
{
|
{
|
||||||
@ -78,7 +93,17 @@ sendLogToPastebin( QObject* parent, const QString& ficheHost, quint16 fichePort
|
|||||||
QRegularExpression pasteUrlRegex( "^http[s]?://" + ficheHost );
|
QRegularExpression pasteUrlRegex( "^http[s]?://" + ficheHost );
|
||||||
QString pasteUrlMsg = QString( pasteUrlFmt ).arg( pasteUrlStr );
|
QString pasteUrlMsg = QString( pasteUrlFmt ).arg( pasteUrlStr );
|
||||||
|
|
||||||
if ( nBytesRead < 8 || !pasteUrl.isValid() || !pasteUrlRegex.match( pasteUrlStr ).hasMatch() )
|
if ( nBytesRead >= 8 && pasteUrl.isValid() && pasteUrlRegex.match( pasteUrlStr ).hasMatch() )
|
||||||
|
{
|
||||||
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
|
clipboard->setText(pasteUrlStr, QClipboard::Clipboard);
|
||||||
|
|
||||||
|
if (clipboard->supportsSelection())
|
||||||
|
{
|
||||||
|
clipboard->setText(pasteUrlStr, QClipboard::Selection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
cError() << "No data from paste server";
|
cError() << "No data from paste server";
|
||||||
return QString();
|
return QString();
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef UTILS_PASTE_H
|
#ifndef UTILS_PASTE_H
|
||||||
#define UTILS_PASTE_H
|
#define UTILS_PASTE_H
|
||||||
|
|
||||||
#include <qglobal.h> // for quint16
|
#include<QStringList>
|
||||||
|
|
||||||
class QObject;
|
class QObject;
|
||||||
class QString;
|
class QString;
|
||||||
@ -22,7 +22,9 @@ namespace CalamaresUtils
|
|||||||
*
|
*
|
||||||
* Returns the (string) URL that the pastebin gives us.
|
* Returns the (string) URL that the pastebin gives us.
|
||||||
*/
|
*/
|
||||||
QString sendLogToPastebin( QObject* parent, const QString& ficheHost, quint16 fichePort );
|
QString ficheLogUpload( QObject* parent );
|
||||||
|
|
||||||
|
extern QStringList UploadServersList;
|
||||||
|
|
||||||
} // namespace CalamaresUtils
|
} // namespace CalamaresUtils
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "utils/CalamaresUtilsGui.h"
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
#include "utils/Dirs.h"
|
#include "utils/Dirs.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/Qml.h"
|
|
||||||
#include "utils/Retranslator.h"
|
#include "utils/Retranslator.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@ -62,6 +61,10 @@ ExecutionViewStep::ExecutionViewStep( QObject* parent )
|
|||||||
, m_label( new QLabel )
|
, m_label( new QLabel )
|
||||||
, m_slideshow( makeSlideshow( m_widget ) )
|
, m_slideshow( makeSlideshow( m_widget ) )
|
||||||
{
|
{
|
||||||
|
m_widget->setObjectName( "slideshow" );
|
||||||
|
m_progressBar->setObjectName( "exec-progress" );
|
||||||
|
m_label->setObjectName( "exec-message" );
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout( m_widget );
|
QVBoxLayout* layout = new QVBoxLayout( m_widget );
|
||||||
QVBoxLayout* innerLayout = new QVBoxLayout;
|
QVBoxLayout* innerLayout = new QVBoxLayout;
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@ SlideshowQML::SlideshowQML( QWidget* parent )
|
|||||||
, m_qmlComponent( nullptr )
|
, m_qmlComponent( nullptr )
|
||||||
, m_qmlObject( nullptr )
|
, m_qmlObject( nullptr )
|
||||||
{
|
{
|
||||||
|
m_qmlShow->setObjectName("qml");
|
||||||
|
|
||||||
CalamaresUtils::registerQmlModels();
|
CalamaresUtils::registerQmlModels();
|
||||||
|
|
||||||
m_qmlShow->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
m_qmlShow->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||||
@ -203,6 +205,8 @@ SlideshowPictures::SlideshowPictures( QWidget* parent )
|
|||||||
, m_imageIndex( 0 )
|
, m_imageIndex( 0 )
|
||||||
, m_images( Branding::instance()->slideshowImages() )
|
, m_images( Branding::instance()->slideshowImages() )
|
||||||
{
|
{
|
||||||
|
m_label->setObjectName("image");
|
||||||
|
|
||||||
m_label->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
m_label->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||||
m_label->setAlignment( Qt::AlignCenter );
|
m_label->setAlignment( Qt::AlignCenter );
|
||||||
m_timer->setInterval( std::chrono::milliseconds( 2000 ) );
|
m_timer->setInterval( std::chrono::milliseconds( 2000 ) );
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
|
# SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
|
||||||
# SPDX-FileCopyrightText: 2017 Gabriel Craciunescu <crazy@frugalware.org>
|
# SPDX-FileCopyrightText: 2017 Gabriel Craciunescu <crazy@frugalware.org>
|
||||||
# SPDX-FileCopyrightText: 2017 Ben Green <Bezzy1999@hotmail.com>
|
# SPDX-FileCopyrightText: 2017 Ben Green <Bezzy1999@hotmail.com>
|
||||||
|
# SPDX-FileCopyrightText: 2021 Neal Gompa <ngompa13@gmail.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# Calamares is Free Software: see the License-Identifier above.
|
# Calamares is Free Software: see the License-Identifier above.
|
||||||
@ -372,9 +373,9 @@ def install_secureboot(efi_directory):
|
|||||||
install_efi_directory = install_path + efi_directory
|
install_efi_directory = install_path + efi_directory
|
||||||
|
|
||||||
if efi_word_size() == "64":
|
if efi_word_size() == "64":
|
||||||
install_efi_bin = "shim64.efi"
|
install_efi_bin = "shimx64.efi"
|
||||||
else:
|
elif efi_word_size() == "32":
|
||||||
install_efi_bin = "shim.efi"
|
install_efi_bin = "shimia32.efi"
|
||||||
|
|
||||||
# Copied, roughly, from openSUSE's install script,
|
# Copied, roughly, from openSUSE's install script,
|
||||||
# and pythonified. *disk* is something like /dev/sda,
|
# and pythonified. *disk* is something like /dev/sda,
|
||||||
|
@ -11,6 +11,7 @@ calamares_add_plugin( finished
|
|||||||
TYPE viewmodule
|
TYPE viewmodule
|
||||||
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
||||||
SOURCES
|
SOURCES
|
||||||
|
Config.cpp
|
||||||
FinishedViewStep.cpp
|
FinishedViewStep.cpp
|
||||||
FinishedPage.cpp
|
FinishedPage.cpp
|
||||||
UI
|
UI
|
||||||
|
201
src/modules/finished/Config.cpp
Normal file
201
src/modules/finished/Config.cpp
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*
|
||||||
|
* Calamares is Free Software: see the License-Identifier above.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Config.h"
|
||||||
|
|
||||||
|
#include "Branding.h"
|
||||||
|
#include "Settings.h"
|
||||||
|
#include "utils/Logger.h"
|
||||||
|
#include "utils/Variant.h"
|
||||||
|
|
||||||
|
#include <QProcess>
|
||||||
|
#include <QtDBus/QDBusConnection>
|
||||||
|
#include <QtDBus/QDBusInterface>
|
||||||
|
#include <QtDBus/QDBusReply>
|
||||||
|
|
||||||
|
const NamedEnumTable< Config::RestartMode >&
|
||||||
|
restartModes()
|
||||||
|
{
|
||||||
|
using M = Config::RestartMode;
|
||||||
|
static const NamedEnumTable< M > table { { "never", M::Never },
|
||||||
|
{ "user-unchecked", M::UserDefaultUnchecked },
|
||||||
|
{ "unchecked", M::UserDefaultUnchecked },
|
||||||
|
{ "user-checked", M::UserDefaultChecked },
|
||||||
|
{ "checked", M::UserDefaultChecked },
|
||||||
|
{ "always", M::Always }
|
||||||
|
|
||||||
|
};
|
||||||
|
return table;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Config::Config( QObject* parent )
|
||||||
|
: QObject( parent )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Config::setRestartNowMode( Config::RestartMode m )
|
||||||
|
{
|
||||||
|
// Can only go "down" in state (Always > UserDefaultChecked > .. > Never)
|
||||||
|
if ( m > m_restartNowMode )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If changing to an unconditional mode, also set other flag
|
||||||
|
if ( m == RestartMode::Always || m == RestartMode::Never )
|
||||||
|
{
|
||||||
|
setRestartNowWanted( m == RestartMode::Always );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( m != m_restartNowMode )
|
||||||
|
{
|
||||||
|
m_restartNowMode = m;
|
||||||
|
emit restartModeChanged( m );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Config::setRestartNowWanted( bool w )
|
||||||
|
{
|
||||||
|
// Follow the mode which may affect @p w
|
||||||
|
if ( m_restartNowMode == RestartMode::Always )
|
||||||
|
{
|
||||||
|
w = true;
|
||||||
|
}
|
||||||
|
if ( m_restartNowMode == RestartMode::Never )
|
||||||
|
{
|
||||||
|
w = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( w != m_userWantsRestart )
|
||||||
|
{
|
||||||
|
m_userWantsRestart = w;
|
||||||
|
emit restartNowWantedChanged( w );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Config::doRestart()
|
||||||
|
{
|
||||||
|
if ( restartNowMode() != RestartMode::Never && restartNowWanted() )
|
||||||
|
{
|
||||||
|
cDebug() << "Running restart command" << m_restartNowCommand;
|
||||||
|
QProcess::execute( "/bin/sh", { "-c", m_restartNowCommand } );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Config::doNotify( bool hasFailed )
|
||||||
|
{
|
||||||
|
if ( !notifyOnFinished() )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDBusInterface notify(
|
||||||
|
"org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications" );
|
||||||
|
if ( notify.isValid() )
|
||||||
|
{
|
||||||
|
cDebug() << "Sending notification of completion. Failed?" << hasFailed;
|
||||||
|
|
||||||
|
QString title;
|
||||||
|
QString message;
|
||||||
|
if ( hasFailed )
|
||||||
|
{
|
||||||
|
title = Calamares::Settings::instance()->isSetupMode() ? tr( "Setup Failed" ) : tr( "Installation Failed" );
|
||||||
|
message = Calamares::Settings::instance()->isSetupMode()
|
||||||
|
? tr( "The setup of %1 did not complete successfully." )
|
||||||
|
: tr( "The installation of %1 did not complete successfully." );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
title = Calamares::Settings::instance()->isSetupMode() ? tr( "Setup Complete" )
|
||||||
|
: tr( "Installation Complete" );
|
||||||
|
message = Calamares::Settings::instance()->isSetupMode() ? tr( "The setup of %1 is complete." )
|
||||||
|
: tr( "The installation of %1 is complete." );
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto* branding = Calamares::Branding::instance();
|
||||||
|
QDBusReply< uint > r = notify.call( "Notify",
|
||||||
|
QString( "Calamares" ),
|
||||||
|
QVariant( 0U ),
|
||||||
|
QString( "calamares" ),
|
||||||
|
title,
|
||||||
|
message.arg( branding->versionedName() ),
|
||||||
|
QStringList(),
|
||||||
|
QVariantMap(),
|
||||||
|
QVariant( 0 ) );
|
||||||
|
if ( !r.isValid() )
|
||||||
|
{
|
||||||
|
cWarning() << "Could not call org.freedesktop.Notifications.Notify at end of installation." << r.error();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cWarning() << "Could not get dbus interface for notifications at end of installation." << notify.lastError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Config::setConfigurationMap( const QVariantMap& configurationMap )
|
||||||
|
{
|
||||||
|
RestartMode mode = RestartMode::Never;
|
||||||
|
|
||||||
|
//TODO:3.3 remove deprecated restart settings
|
||||||
|
QString restartMode = CalamaresUtils::getString( configurationMap, "restartNowMode" );
|
||||||
|
if ( restartMode.isEmpty() )
|
||||||
|
{
|
||||||
|
if ( configurationMap.contains( "restartNowEnabled" ) )
|
||||||
|
{
|
||||||
|
cWarning() << "Configuring the finished module with deprecated restartNowEnabled settings";
|
||||||
|
}
|
||||||
|
|
||||||
|
bool restartNowEnabled = CalamaresUtils::getBool( configurationMap, "restartNowEnabled", false );
|
||||||
|
bool restartNowChecked = CalamaresUtils::getBool( configurationMap, "restartNowChecked", false );
|
||||||
|
|
||||||
|
if ( !restartNowEnabled )
|
||||||
|
{
|
||||||
|
mode = RestartMode::Never;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mode = restartNowChecked ? RestartMode::UserDefaultChecked : RestartMode::UserDefaultUnchecked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool ok = false;
|
||||||
|
mode = restartModes().find( restartMode, ok );
|
||||||
|
if ( !ok )
|
||||||
|
{
|
||||||
|
cWarning() << "Configuring the finished module with bad restartNowMode" << restartMode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_restartNowMode = mode;
|
||||||
|
m_userWantsRestart = ( mode == RestartMode::Always || mode == RestartMode::UserDefaultChecked );
|
||||||
|
emit restartModeChanged( m_restartNowMode );
|
||||||
|
emit restartNowWantedChanged( m_userWantsRestart );
|
||||||
|
|
||||||
|
if ( mode != RestartMode::Never )
|
||||||
|
{
|
||||||
|
QString restartNowCommand = CalamaresUtils::getString( configurationMap, "restartNowCommand" );
|
||||||
|
if ( restartNowCommand.isEmpty() )
|
||||||
|
{
|
||||||
|
restartNowCommand = QStringLiteral( "shutdown -r now" );
|
||||||
|
}
|
||||||
|
m_restartNowCommand = restartNowCommand;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_notifyOnFinished = CalamaresUtils::getBool( configurationMap, "notifyOnFinished", false );
|
||||||
|
}
|
81
src/modules/finished/Config.h
Normal file
81
src/modules/finished/Config.h
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*
|
||||||
|
* Calamares is Free Software: see the License-Identifier above.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FINISHED_CONFIG_H
|
||||||
|
#define FINISHED_CONFIG_H
|
||||||
|
|
||||||
|
#include "utils/NamedEnum.h"
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class Config : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
Q_PROPERTY( RestartMode restartNowMode READ restartNowMode WRITE setRestartNowMode NOTIFY restartModeChanged )
|
||||||
|
Q_PROPERTY( bool restartNowWanted READ restartNowWanted WRITE setRestartNowWanted NOTIFY restartNowWantedChanged )
|
||||||
|
|
||||||
|
Q_PROPERTY( QString restartNowCommand READ restartNowCommand CONSTANT FINAL )
|
||||||
|
Q_PROPERTY( bool notifyOnFinished READ notifyOnFinished CONSTANT FINAL )
|
||||||
|
|
||||||
|
public:
|
||||||
|
Config( QObject* parent = nullptr );
|
||||||
|
|
||||||
|
enum class RestartMode
|
||||||
|
{
|
||||||
|
Never,
|
||||||
|
UserDefaultUnchecked,
|
||||||
|
UserDefaultChecked,
|
||||||
|
Always
|
||||||
|
};
|
||||||
|
Q_ENUM( RestartMode )
|
||||||
|
|
||||||
|
RestartMode restartNowMode() const { return m_restartNowMode; }
|
||||||
|
bool restartNowWanted() const { return m_userWantsRestart; }
|
||||||
|
|
||||||
|
QString restartNowCommand() const { return m_restartNowCommand; }
|
||||||
|
bool notifyOnFinished() const { return m_notifyOnFinished; }
|
||||||
|
|
||||||
|
void setConfigurationMap( const QVariantMap& configurationMap );
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void setRestartNowMode( RestartMode m );
|
||||||
|
void setRestartNowWanted( bool w );
|
||||||
|
|
||||||
|
/** @brief Run the restart command, if desired.
|
||||||
|
*
|
||||||
|
* This should generally not be called somewhere during the
|
||||||
|
* application's execution, but only in response to QApplication::quit()
|
||||||
|
* or something like that when the user expects the system to restart.
|
||||||
|
*/
|
||||||
|
void doRestart();
|
||||||
|
|
||||||
|
/** @brief Send DBus notification, if desired.
|
||||||
|
*
|
||||||
|
* This takes notifyOnFinished() into account.
|
||||||
|
*
|
||||||
|
* At the end of installation (when the FinishedViewStep is activated),
|
||||||
|
* send a desktop notification via DBus that the install is done.
|
||||||
|
*/
|
||||||
|
void doNotify( bool hasFailed = false );
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void restartModeChanged( RestartMode m );
|
||||||
|
void restartNowWantedChanged( bool w );
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString m_restartNowCommand;
|
||||||
|
RestartMode m_restartNowMode = RestartMode::Never;
|
||||||
|
bool m_userWantsRestart = false;
|
||||||
|
bool m_notifyOnFinished = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const NamedEnumTable< Config::RestartMode >& restartModes();
|
||||||
|
|
||||||
|
#endif
|
@ -11,26 +11,19 @@
|
|||||||
|
|
||||||
#include "FinishedPage.h"
|
#include "FinishedPage.h"
|
||||||
|
|
||||||
#include "CalamaresVersion.h"
|
#include "Config.h"
|
||||||
#include "ViewManager.h"
|
|
||||||
#include "ui_FinishedPage.h"
|
#include "ui_FinishedPage.h"
|
||||||
#include "utils/CalamaresUtilsGui.h"
|
|
||||||
#include "utils/Logger.h"
|
|
||||||
#include "utils/Retranslator.h"
|
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QBoxLayout>
|
|
||||||
#include <QFocusEvent>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QProcess>
|
|
||||||
|
|
||||||
#include "Branding.h"
|
#include "Branding.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
|
#include "utils/Retranslator.h"
|
||||||
|
|
||||||
FinishedPage::FinishedPage( QWidget* parent )
|
#include <QFocusEvent>
|
||||||
|
|
||||||
|
|
||||||
|
FinishedPage::FinishedPage( Config* config, QWidget* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
, ui( new Ui::FinishedPage )
|
, ui( new Ui::FinishedPage )
|
||||||
, m_mode( FinishedViewStep::RestartMode::UserUnchecked )
|
|
||||||
{
|
{
|
||||||
ui->setupUi( this );
|
ui->setupUi( this );
|
||||||
|
|
||||||
@ -38,68 +31,19 @@ FinishedPage::FinishedPage( QWidget* parent )
|
|||||||
ui->mainText->setWordWrap( true );
|
ui->mainText->setWordWrap( true );
|
||||||
ui->mainText->setOpenExternalLinks( true );
|
ui->mainText->setOpenExternalLinks( true );
|
||||||
|
|
||||||
CALAMARES_RETRANSLATE(
|
connect( config, &Config::restartModeChanged, [this]( Config::RestartMode mode ) {
|
||||||
const auto* branding = Calamares::Branding::instance(); ui->retranslateUi( this );
|
using Mode = Config::RestartMode;
|
||||||
if ( Calamares::Settings::instance()->isSetupMode() ) {
|
|
||||||
ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
|
|
||||||
"%1 has been set up on your computer.<br/>"
|
|
||||||
"You may now start using your new system." )
|
|
||||||
.arg( branding->versionedName() ) );
|
|
||||||
ui->restartCheckBox->setToolTip( tr( "<html><head/><body>"
|
|
||||||
"<p>When this box is checked, your system will "
|
|
||||||
"restart immediately when you click on "
|
|
||||||
"<span style=\"font-style:italic;\">Done</span> "
|
|
||||||
"or close the setup program.</p></body></html>" ) );
|
|
||||||
} else {
|
|
||||||
ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
|
|
||||||
"%1 has been installed on your computer.<br/>"
|
|
||||||
"You may now restart into your new system, or continue "
|
|
||||||
"using the %2 Live environment." )
|
|
||||||
.arg( branding->versionedName(), branding->productName() ) );
|
|
||||||
ui->restartCheckBox->setToolTip( tr( "<html><head/><body>"
|
|
||||||
"<p>When this box is checked, your system will "
|
|
||||||
"restart immediately when you click on "
|
|
||||||
"<span style=\"font-style:italic;\">Done</span> "
|
|
||||||
"or close the installer.</p></body></html>" ) );
|
|
||||||
} )
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
FinishedPage::setRestart( FinishedViewStep::RestartMode mode )
|
|
||||||
{
|
|
||||||
using Mode = FinishedViewStep::RestartMode;
|
|
||||||
|
|
||||||
m_mode = mode;
|
|
||||||
|
|
||||||
ui->restartCheckBox->setVisible( mode != Mode::Never );
|
ui->restartCheckBox->setVisible( mode != Mode::Never );
|
||||||
ui->restartCheckBox->setEnabled( mode != Mode::Always );
|
ui->restartCheckBox->setEnabled( mode != Mode::Always );
|
||||||
ui->restartCheckBox->setChecked( ( mode == Mode::Always ) || ( mode == Mode::UserChecked ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
FinishedPage::setRestartNowCommand( const QString& command )
|
|
||||||
{
|
|
||||||
m_restartNowCommand = command;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
FinishedPage::setUpRestart()
|
|
||||||
{
|
|
||||||
cDebug() << "FinishedPage::setUpRestart(), Quit button"
|
|
||||||
<< "setup=" << FinishedViewStep::modeName( m_mode ) << "command=" << m_restartNowCommand;
|
|
||||||
|
|
||||||
connect( qApp, &QApplication::aboutToQuit, [this]() {
|
|
||||||
if ( ui->restartCheckBox->isVisible() && ui->restartCheckBox->isChecked() )
|
|
||||||
{
|
|
||||||
cDebug() << "Running restart command" << m_restartNowCommand;
|
|
||||||
QProcess::execute( "/bin/sh", { "-c", m_restartNowCommand } );
|
|
||||||
}
|
|
||||||
} );
|
} );
|
||||||
}
|
connect( config, &Config::restartNowWantedChanged, ui->restartCheckBox, &QCheckBox::setChecked );
|
||||||
|
connect( ui->restartCheckBox, &QCheckBox::stateChanged, [config]( int state ) {
|
||||||
|
config->setRestartNowWanted( state != 0 );
|
||||||
|
} );
|
||||||
|
|
||||||
|
CALAMARES_RETRANSLATE_SLOT( &FinishedPage::retranslate );
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FinishedPage::focusInEvent( QFocusEvent* e )
|
FinishedPage::focusInEvent( QFocusEvent* e )
|
||||||
@ -110,19 +54,64 @@ FinishedPage::focusInEvent( QFocusEvent* e )
|
|||||||
void
|
void
|
||||||
FinishedPage::onInstallationFailed( const QString& message, const QString& details )
|
FinishedPage::onInstallationFailed( const QString& message, const QString& details )
|
||||||
{
|
{
|
||||||
|
m_failure = !message.isEmpty() ? message : details;
|
||||||
|
retranslate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FinishedPage::retranslate()
|
||||||
|
{
|
||||||
|
|
||||||
const auto* branding = Calamares::Branding::instance();
|
const auto* branding = Calamares::Branding::instance();
|
||||||
Q_UNUSED( details )
|
|
||||||
|
ui->retranslateUi( this );
|
||||||
|
if ( !m_failure.has_value() )
|
||||||
|
{
|
||||||
if ( Calamares::Settings::instance()->isSetupMode() )
|
if ( Calamares::Settings::instance()->isSetupMode() )
|
||||||
|
{
|
||||||
|
ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
|
||||||
|
"%1 has been set up on your computer.<br/>"
|
||||||
|
"You may now start using your new system." )
|
||||||
|
.arg( branding->versionedName() ) );
|
||||||
|
ui->restartCheckBox->setToolTip( tr( "<html><head/><body>"
|
||||||
|
"<p>When this box is checked, your system will "
|
||||||
|
"restart immediately when you click on "
|
||||||
|
"<span style=\"font-style:italic;\">Done</span> "
|
||||||
|
"or close the setup program.</p></body></html>" ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
|
||||||
|
"%1 has been installed on your computer.<br/>"
|
||||||
|
"You may now restart into your new system, or continue "
|
||||||
|
"using the %2 Live environment." )
|
||||||
|
.arg( branding->versionedName(), branding->productName() ) );
|
||||||
|
ui->restartCheckBox->setToolTip( tr( "<html><head/><body>"
|
||||||
|
"<p>When this box is checked, your system will "
|
||||||
|
"restart immediately when you click on "
|
||||||
|
"<span style=\"font-style:italic;\">Done</span> "
|
||||||
|
"or close the installer.</p></body></html>" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const QString message = m_failure.value();
|
||||||
|
|
||||||
|
if ( Calamares::Settings::instance()->isSetupMode() )
|
||||||
|
{
|
||||||
ui->mainText->setText( tr( "<h1>Setup Failed</h1><br/>"
|
ui->mainText->setText( tr( "<h1>Setup Failed</h1><br/>"
|
||||||
"%1 has not been set up on your computer.<br/>"
|
"%1 has not been set up on your computer.<br/>"
|
||||||
"The error message was: %2." )
|
"The error message was: %2." )
|
||||||
.arg( branding->versionedName() )
|
.arg( branding->versionedName() )
|
||||||
.arg( message ) );
|
.arg( message ) );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
ui->mainText->setText( tr( "<h1>Installation Failed</h1><br/>"
|
ui->mainText->setText( tr( "<h1>Installation Failed</h1><br/>"
|
||||||
"%1 has not been installed on your computer.<br/>"
|
"%1 has not been installed on your computer.<br/>"
|
||||||
"The error message was: %2." )
|
"The error message was: %2." )
|
||||||
.arg( branding->versionedName() )
|
.arg( branding->versionedName() )
|
||||||
.arg( message ) );
|
.arg( message ) );
|
||||||
setRestart( FinishedViewStep::RestartMode::Never );
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,10 +11,12 @@
|
|||||||
#ifndef FINISHEDPAGE_H
|
#ifndef FINISHEDPAGE_H
|
||||||
#define FINISHEDPAGE_H
|
#define FINISHEDPAGE_H
|
||||||
|
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "FinishedViewStep.h"
|
#include <optional>
|
||||||
|
|
||||||
|
class Config;
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
class FinishedPage;
|
class FinishedPage;
|
||||||
@ -24,24 +26,19 @@ class FinishedPage : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit FinishedPage( QWidget* parent = nullptr );
|
explicit FinishedPage( Config* config, QWidget* parent = nullptr );
|
||||||
|
|
||||||
void setRestart( FinishedViewStep::RestartMode mode );
|
|
||||||
void setRestartNowCommand( const QString& command );
|
|
||||||
|
|
||||||
void setUpRestart();
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void onInstallationFailed( const QString& message, const QString& details );
|
void onInstallationFailed( const QString& message, const QString& details );
|
||||||
|
void retranslate();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void focusInEvent( QFocusEvent* e ) override; //choose the child widget to focus
|
void focusInEvent( QFocusEvent* e ) override; //choose the child widget to focus
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::FinishedPage* ui;
|
Ui::FinishedPage* ui;
|
||||||
|
std::optional< QString > m_failure;
|
||||||
FinishedViewStep::RestartMode m_mode;
|
|
||||||
QString m_restartNowCommand;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FINISHEDPAGE_H
|
#endif // FINISHEDPAGE_H
|
||||||
|
@ -10,42 +10,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "FinishedViewStep.h"
|
#include "FinishedViewStep.h"
|
||||||
|
|
||||||
|
#include "Config.h"
|
||||||
#include "FinishedPage.h"
|
#include "FinishedPage.h"
|
||||||
|
|
||||||
#include "Branding.h"
|
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
#include "Settings.h"
|
|
||||||
|
|
||||||
#include "utils/Logger.h"
|
#include <QApplication>
|
||||||
#include "utils/NamedEnum.h"
|
|
||||||
#include "utils/Variant.h"
|
|
||||||
|
|
||||||
#include <QVariantMap>
|
|
||||||
#include <QtDBus/QDBusConnection>
|
|
||||||
#include <QtDBus/QDBusInterface>
|
|
||||||
#include <QtDBus/QDBusReply>
|
|
||||||
|
|
||||||
static const NamedEnumTable< FinishedViewStep::RestartMode >&
|
|
||||||
modeNames()
|
|
||||||
{
|
|
||||||
using Mode = FinishedViewStep::RestartMode;
|
|
||||||
|
|
||||||
static const NamedEnumTable< Mode > names { { QStringLiteral( "never" ), Mode::Never },
|
|
||||||
{ QStringLiteral( "user-unchecked" ), Mode::UserUnchecked },
|
|
||||||
{ QStringLiteral( "user-checked" ), Mode::UserChecked },
|
|
||||||
{ QStringLiteral( "always" ), Mode::Always } };
|
|
||||||
|
|
||||||
return names;
|
|
||||||
}
|
|
||||||
|
|
||||||
FinishedViewStep::FinishedViewStep( QObject* parent )
|
FinishedViewStep::FinishedViewStep( QObject* parent )
|
||||||
: Calamares::ViewStep( parent )
|
: Calamares::ViewStep( parent )
|
||||||
, m_widget( new FinishedPage() )
|
, m_config( new Config( this ) )
|
||||||
, installFailed( false )
|
, m_widget( new FinishedPage( m_config ) )
|
||||||
, m_notifyOnFinished( false )
|
, m_installFailed( false )
|
||||||
{
|
{
|
||||||
auto jq = Calamares::JobQueue::instance();
|
auto jq = Calamares::JobQueue::instance();
|
||||||
connect( jq, &Calamares::JobQueue::failed, m_widget, &FinishedPage::onInstallationFailed );
|
|
||||||
connect( jq, &Calamares::JobQueue::failed, this, &FinishedViewStep::onInstallationFailed );
|
connect( jq, &Calamares::JobQueue::failed, this, &FinishedViewStep::onInstallationFailed );
|
||||||
|
|
||||||
emit nextStatusChanged( true );
|
emit nextStatusChanged( true );
|
||||||
@ -102,54 +81,12 @@ FinishedViewStep::isAtEnd() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
FinishedViewStep::sendNotification()
|
|
||||||
{
|
|
||||||
// If the installation failed, don't send notification popup;
|
|
||||||
// there's a (modal) dialog popped up with the failure notice.
|
|
||||||
if ( installFailed )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDBusInterface notify(
|
|
||||||
"org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications" );
|
|
||||||
if ( notify.isValid() )
|
|
||||||
{
|
|
||||||
const auto* branding = Calamares::Branding::instance();
|
|
||||||
QDBusReply< uint > r = notify.call(
|
|
||||||
"Notify",
|
|
||||||
QString( "Calamares" ),
|
|
||||||
QVariant( 0U ),
|
|
||||||
QString( "calamares" ),
|
|
||||||
Calamares::Settings::instance()->isSetupMode() ? tr( "Setup Complete" ) : tr( "Installation Complete" ),
|
|
||||||
Calamares::Settings::instance()->isSetupMode()
|
|
||||||
? tr( "The setup of %1 is complete." ).arg( branding->versionedName() )
|
|
||||||
: tr( "The installation of %1 is complete." ).arg( branding->versionedName() ),
|
|
||||||
QStringList(),
|
|
||||||
QVariantMap(),
|
|
||||||
QVariant( 0 ) );
|
|
||||||
if ( !r.isValid() )
|
|
||||||
{
|
|
||||||
cWarning() << "Could not call org.freedesktop.Notifications.Notify at end of installation." << r.error();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cWarning() << "Could not get dbus interface for notifications at end of installation." << notify.lastError();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FinishedViewStep::onActivate()
|
FinishedViewStep::onActivate()
|
||||||
{
|
{
|
||||||
m_widget->setUpRestart();
|
m_config->doNotify( m_installFailed );
|
||||||
|
connect( qApp, &QApplication::aboutToQuit, m_config, &Config::doRestart );
|
||||||
if ( m_notifyOnFinished )
|
|
||||||
{
|
|
||||||
sendNotification();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -162,67 +99,15 @@ FinishedViewStep::jobs() const
|
|||||||
void
|
void
|
||||||
FinishedViewStep::onInstallationFailed( const QString& message, const QString& details )
|
FinishedViewStep::onInstallationFailed( const QString& message, const QString& details )
|
||||||
{
|
{
|
||||||
Q_UNUSED( message )
|
m_installFailed = true;
|
||||||
Q_UNUSED( details )
|
m_config->setRestartNowMode( Config::RestartMode::Never );
|
||||||
installFailed = true;
|
m_widget->onInstallationFailed( message, details );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FinishedViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
FinishedViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||||
{
|
{
|
||||||
RestartMode mode = RestartMode::Never;
|
m_config->setConfigurationMap( configurationMap );
|
||||||
|
|
||||||
QString restartMode = CalamaresUtils::getString( configurationMap, "restartNowMode" );
|
|
||||||
if ( restartMode.isEmpty() )
|
|
||||||
{
|
|
||||||
if ( configurationMap.contains( "restartNowEnabled" ) )
|
|
||||||
{
|
|
||||||
cWarning() << "Configuring the finished module with deprecated restartNowEnabled settings";
|
|
||||||
}
|
|
||||||
|
|
||||||
bool restartNowEnabled = CalamaresUtils::getBool( configurationMap, "restartNowEnabled", false );
|
|
||||||
bool restartNowChecked = CalamaresUtils::getBool( configurationMap, "restartNowChecked", false );
|
|
||||||
|
|
||||||
if ( !restartNowEnabled )
|
|
||||||
{
|
|
||||||
mode = RestartMode::Never;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mode = restartNowChecked ? RestartMode::UserChecked : RestartMode::UserUnchecked;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bool ok = false;
|
|
||||||
mode = modeNames().find( restartMode, ok );
|
|
||||||
if ( !ok )
|
|
||||||
{
|
|
||||||
cWarning() << "Configuring the finished module with bad restartNowMode" << restartMode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_widget->setRestart( mode );
|
|
||||||
|
|
||||||
if ( mode != RestartMode::Never )
|
|
||||||
{
|
|
||||||
QString restartNowCommand = CalamaresUtils::getString( configurationMap, "restartNowCommand" );
|
|
||||||
if ( restartNowCommand.isEmpty() )
|
|
||||||
{
|
|
||||||
restartNowCommand = QStringLiteral( "shutdown -r now" );
|
|
||||||
}
|
|
||||||
m_widget->setRestartNowCommand( restartNowCommand );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_notifyOnFinished = CalamaresUtils::getBool( configurationMap, "notifyOnFinished", false );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
|
||||||
FinishedViewStep::modeName( FinishedViewStep::RestartMode m )
|
|
||||||
{
|
|
||||||
bool ok = false;
|
|
||||||
return modeNames().find( m, ok ); // May be QString()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( FinishedViewStepFactory, registerPlugin< FinishedViewStep >(); )
|
CALAMARES_PLUGIN_FACTORY_DEFINITION( FinishedViewStepFactory, registerPlugin< FinishedViewStep >(); )
|
||||||
|
@ -11,13 +11,11 @@
|
|||||||
#ifndef FINISHEDVIEWSTEP_H
|
#ifndef FINISHEDVIEWSTEP_H
|
||||||
#define FINISHEDVIEWSTEP_H
|
#define FINISHEDVIEWSTEP_H
|
||||||
|
|
||||||
#include <QObject>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
#include "utils/PluginFactory.h"
|
#include "utils/PluginFactory.h"
|
||||||
#include "viewpages/ViewStep.h"
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include "DllMacro.h"
|
class Config;
|
||||||
|
|
||||||
class FinishedPage;
|
class FinishedPage;
|
||||||
|
|
||||||
class PLUGINDLLEXPORT FinishedViewStep : public Calamares::ViewStep
|
class PLUGINDLLEXPORT FinishedViewStep : public Calamares::ViewStep
|
||||||
@ -25,16 +23,6 @@ class PLUGINDLLEXPORT FinishedViewStep : public Calamares::ViewStep
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum class RestartMode
|
|
||||||
{
|
|
||||||
Never = 0, ///< @brief Don't show button, just exit
|
|
||||||
UserUnchecked, ///< @brief Show button, starts unchecked
|
|
||||||
UserChecked, ///< @brief Show button, starts checked
|
|
||||||
Always ///< @brief Show button, can't change, checked
|
|
||||||
};
|
|
||||||
/// @brief Returns the config-name of the given restart-mode @p m
|
|
||||||
static QString modeName( RestartMode m );
|
|
||||||
|
|
||||||
explicit FinishedViewStep( QObject* parent = nullptr );
|
explicit FinishedViewStep( QObject* parent = nullptr );
|
||||||
~FinishedViewStep() override;
|
~FinishedViewStep() override;
|
||||||
|
|
||||||
@ -58,16 +46,9 @@ public slots:
|
|||||||
void onInstallationFailed( const QString& message, const QString& details );
|
void onInstallationFailed( const QString& message, const QString& details );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Config* m_config;
|
||||||
FinishedPage* m_widget;
|
FinishedPage* m_widget;
|
||||||
|
bool m_installFailed; // Track if onInstallationFailed() was called
|
||||||
/**
|
|
||||||
* @brief At the end of installation (when this step is activated),
|
|
||||||
* send a desktop notification via DBus that the install is done.
|
|
||||||
*/
|
|
||||||
void sendNotification();
|
|
||||||
|
|
||||||
bool installFailed;
|
|
||||||
bool m_notifyOnFinished;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( FinishedViewStepFactory )
|
CALAMARES_PLUGIN_FACTORY_DECLARATION( FinishedViewStepFactory )
|
||||||
|
@ -6,3 +6,4 @@
|
|||||||
#layout additional-layout additional-variant vconsole-keymap
|
#layout additional-layout additional-variant vconsole-keymap
|
||||||
ru us - ruwin_alt_sh-UTF-8
|
ru us - ruwin_alt_sh-UTF-8
|
||||||
ua us - ua-utf
|
ua us - ua-utf
|
||||||
|
gr us - gr
|
||||||
|
@ -1,11 +1,71 @@
|
|||||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||||
|
# SPDX-FileContributor: benne-dee ( worked on groups schema )
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
---
|
---
|
||||||
$schema: https://json-schema.org/schema#
|
$schema: https://json-schema.org/draft-07/schema#
|
||||||
$id: https://calamares.io/schemas/netinstall
|
$id: https://calamares.io/schemas/netinstall
|
||||||
additionalProperties: false
|
definitions:
|
||||||
type: object
|
package:
|
||||||
properties:
|
$id: '#definitions/package'
|
||||||
|
oneOf:
|
||||||
|
-
|
||||||
|
type: string
|
||||||
|
description: bare package - actual package name as passed to the package manager
|
||||||
|
(e.g. `qt5-creator-dev`).
|
||||||
|
-
|
||||||
|
type: object
|
||||||
|
description: rich package - one with a package-name (for the package-manager) and
|
||||||
|
a description (for the human).
|
||||||
|
properties:
|
||||||
|
name: { type: string }
|
||||||
|
description: { type: string }
|
||||||
|
group:
|
||||||
|
$id: '#definitions/group'
|
||||||
|
type: object
|
||||||
|
description: Longer discussion in `netinstall.conf` file under 'Groups Format'
|
||||||
|
properties:
|
||||||
|
name: { type: string }
|
||||||
|
description: { type: string }
|
||||||
|
packages:
|
||||||
|
type: array
|
||||||
|
items: { $ref: '#definitions/package' }
|
||||||
|
hidden: { type: boolean, default: false }
|
||||||
|
selected: { type: boolean }
|
||||||
|
critical: { type: boolean, default: false }
|
||||||
|
immutable: { type: boolean }
|
||||||
|
expanded: { type: boolean }
|
||||||
|
subgroups:
|
||||||
|
type: array
|
||||||
|
items: { $ref: '#definitions/group' }
|
||||||
|
pre-install:
|
||||||
|
type: string
|
||||||
|
description: an optional command to run within the new system before the group's
|
||||||
|
packages are installed. It will run before **each** package in the group
|
||||||
|
is installed.
|
||||||
|
post-install:
|
||||||
|
type: string
|
||||||
|
description: an optional command to run within the new system after the group's
|
||||||
|
packages are installed. It will run after **each** package in the group
|
||||||
|
is installed.
|
||||||
|
required: [name, description] # Always required, at any level in the subgroups hirearchy
|
||||||
|
if:
|
||||||
|
properties:
|
||||||
|
subgroups:
|
||||||
|
maxItems: 0
|
||||||
|
then:
|
||||||
|
required: [name, description, packages] # bottom-most (sub)group requires some package (otherwise, why bother?)
|
||||||
|
# This should validate `netinstall.yaml` also.
|
||||||
|
groups:
|
||||||
|
$id: '#definitions/groups'
|
||||||
|
type: array
|
||||||
|
items: { $ref: '#definitions/group' }
|
||||||
|
|
||||||
|
oneOf:
|
||||||
|
- # netinstall.conf
|
||||||
|
type: object
|
||||||
|
description: netinstall.conf schema
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
groupsUrl: { type: string }
|
groupsUrl: { type: string }
|
||||||
required: { type: boolean, default: false }
|
required: { type: boolean, default: false }
|
||||||
label: # Translatable labels
|
label: # Translatable labels
|
||||||
@ -14,5 +74,16 @@ properties:
|
|||||||
properties:
|
properties:
|
||||||
sidebar: { type: string }
|
sidebar: { type: string }
|
||||||
title: { type: string }
|
title: { type: string }
|
||||||
groups: { type: array } # TODO: the schema for the whole groups file
|
groups: { $ref: '#definitions/groups' }
|
||||||
required: [ groupsUrl ]
|
required: [ groupsUrl ]
|
||||||
|
|
||||||
|
- # Groups file with top level *groups* key
|
||||||
|
type: object
|
||||||
|
description: Groups file with top level *groups* key
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
groups: { $ref: '#definitions/groups' }
|
||||||
|
required: [ groups ]
|
||||||
|
|
||||||
|
- # Groups file bare
|
||||||
|
{ $ref: '#definitions/groups' }
|
||||||
|
@ -79,6 +79,7 @@ if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND
|
|||||||
gui/ScanningDialog.cpp
|
gui/ScanningDialog.cpp
|
||||||
gui/ReplaceWidget.cpp
|
gui/ReplaceWidget.cpp
|
||||||
gui/VolumeGroupBaseDialog.cpp
|
gui/VolumeGroupBaseDialog.cpp
|
||||||
|
jobs/AutoMountManagementJob.cpp
|
||||||
jobs/ClearMountsJob.cpp
|
jobs/ClearMountsJob.cpp
|
||||||
jobs/ClearTempMountsJob.cpp
|
jobs/ClearTempMountsJob.cpp
|
||||||
jobs/CreatePartitionJob.cpp
|
jobs/CreatePartitionJob.cpp
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "core/PartUtils.h"
|
#include "core/PartUtils.h"
|
||||||
#include "core/PartitionInfo.h"
|
#include "core/PartitionInfo.h"
|
||||||
#include "core/PartitionModel.h"
|
#include "core/PartitionModel.h"
|
||||||
|
#include "jobs/AutoMountManagementJob.h"
|
||||||
#include "jobs/ClearMountsJob.h"
|
#include "jobs/ClearMountsJob.h"
|
||||||
#include "jobs/ClearTempMountsJob.h"
|
#include "jobs/ClearTempMountsJob.h"
|
||||||
#include "jobs/CreatePartitionJob.h"
|
#include "jobs/CreatePartitionJob.h"
|
||||||
@ -576,6 +577,11 @@ PartitionCoreModule::jobs( const Config* config ) const
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// The automountControl job goes in the list twice: the first
|
||||||
|
// time it runs, it disables automount and remembers the old setting
|
||||||
|
// for automount; the second time it restores that old setting.
|
||||||
|
Calamares::job_ptr automountControl( new AutoMountManagementJob( true /* disable automount */ ) );
|
||||||
|
lst << automountControl;
|
||||||
lst << Calamares::job_ptr( new ClearTempMountsJob() );
|
lst << Calamares::job_ptr( new ClearTempMountsJob() );
|
||||||
|
|
||||||
for ( auto info : m_deviceInfos )
|
for ( auto info : m_deviceInfos )
|
||||||
@ -592,6 +598,7 @@ PartitionCoreModule::jobs( const Config* config ) const
|
|||||||
devices << info->device.data();
|
devices << info->device.data();
|
||||||
}
|
}
|
||||||
lst << Calamares::job_ptr( new FillGlobalStorageJob( config, devices, m_bootLoaderInstallPath ) );
|
lst << Calamares::job_ptr( new FillGlobalStorageJob( config, devices, m_bootLoaderInstallPath ) );
|
||||||
|
lst << automountControl;
|
||||||
|
|
||||||
return lst;
|
return lst;
|
||||||
}
|
}
|
||||||
|
40
src/modules/partition/jobs/AutoMountManagementJob.cpp
Normal file
40
src/modules/partition/jobs/AutoMountManagementJob.cpp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*
|
||||||
|
* Calamares is Free Software: see the License-Identifier above.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "AutoMountManagementJob.h"
|
||||||
|
|
||||||
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
|
AutoMountManagementJob::AutoMountManagementJob( bool disable )
|
||||||
|
: m_disable( disable )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QString
|
||||||
|
AutoMountManagementJob::prettyName() const
|
||||||
|
{
|
||||||
|
return tr( "Manage auto-mount settings" );
|
||||||
|
}
|
||||||
|
|
||||||
|
Calamares::JobResult
|
||||||
|
AutoMountManagementJob::exec()
|
||||||
|
{
|
||||||
|
Logger::CDebug( Logger::LOGVERBOSE ) << "this" << Logger::Pointer( this ) << "value" << Logger::Pointer( m_stored )
|
||||||
|
<< ( m_stored ? "restore" : m_disable ? "disable" : "enable" );
|
||||||
|
if ( m_stored )
|
||||||
|
{
|
||||||
|
CalamaresUtils::Partition::automountRestore( m_stored );
|
||||||
|
m_stored.reset();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_stored = CalamaresUtils::Partition::automountDisable( m_disable );
|
||||||
|
}
|
||||||
|
return Calamares::JobResult::ok();
|
||||||
|
}
|
42
src/modules/partition/jobs/AutoMountManagementJob.h
Normal file
42
src/modules/partition/jobs/AutoMountManagementJob.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*
|
||||||
|
* Calamares is Free Software: see the License-Identifier above.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PARTITION_AUTOMOUNTMANAGEMENTJOB_H
|
||||||
|
#define PARTITION_AUTOMOUNTMANAGEMENTJOB_H
|
||||||
|
|
||||||
|
#include "Job.h"
|
||||||
|
|
||||||
|
#include "partition/AutoMount.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This job sets automounting to a specific value, and when run a
|
||||||
|
* second time, **re**sets to the original value. See the documentation
|
||||||
|
* for CalamaresUtils::Partition::automountDisable() for details.
|
||||||
|
* Use @c true to **disable** automounting.
|
||||||
|
*
|
||||||
|
* Effectively: queue the **same** job twice; the first time it runs
|
||||||
|
* it will set the automount behavior, and the second time it
|
||||||
|
* restores the original.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class AutoMountManagementJob : public Calamares::Job
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AutoMountManagementJob( bool disable = true );
|
||||||
|
|
||||||
|
QString prettyName() const override;
|
||||||
|
Calamares::JobResult exec() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool m_disable;
|
||||||
|
decltype( CalamaresUtils::Partition::automountDisable( true ) ) m_stored;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* PARTITION_AUTOMOUNTMANAGEMENTJOB_H */
|
87
src/modules/partition/tests/AutoMountTests.cpp
Normal file
87
src/modules/partition/tests/AutoMountTests.cpp
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*
|
||||||
|
* Calamares is Free Software: see the License-Identifier above.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "jobs/AutoMountManagementJob.h"
|
||||||
|
|
||||||
|
#include "utils/Logger.h"
|
||||||
|
#include "JobQueue.h"
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
|
class AutoMountJobTests : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AutoMountJobTests();
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void testRunThrice();
|
||||||
|
void testRunQueue();
|
||||||
|
};
|
||||||
|
|
||||||
|
AutoMountJobTests::AutoMountJobTests() {}
|
||||||
|
|
||||||
|
/* This doesn't really test anything, since automount management
|
||||||
|
* is supposed to be opaque: the job always returns true. What
|
||||||
|
* is interesting is the debug output, where the job informs
|
||||||
|
* about the pointer it holds.
|
||||||
|
*
|
||||||
|
* That should output 0, then non-zero, then 0 again.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
AutoMountJobTests::testRunThrice()
|
||||||
|
{
|
||||||
|
Logger::setupLogLevel( Logger::LOGVERBOSE );
|
||||||
|
|
||||||
|
auto original = CalamaresUtils::Partition::automountDisable( true );
|
||||||
|
cDebug() << "Got automount info" << Logger::Pointer( original );
|
||||||
|
|
||||||
|
AutoMountManagementJob j( false );
|
||||||
|
QVERIFY( j.exec() );
|
||||||
|
QVERIFY( j.exec() );
|
||||||
|
QVERIFY( j.exec() );
|
||||||
|
|
||||||
|
CalamaresUtils::Partition::automountRestore( original );
|
||||||
|
}
|
||||||
|
|
||||||
|
void AutoMountJobTests::testRunQueue()
|
||||||
|
{
|
||||||
|
Calamares::JobQueue q;
|
||||||
|
Calamares::job_ptr jp( new AutoMountManagementJob( false ) );
|
||||||
|
QSignalSpy progress( &q, &Calamares::JobQueue::progress );
|
||||||
|
QSignalSpy finish( &q, &Calamares::JobQueue::finished );
|
||||||
|
QSignalSpy fail( &q, &Calamares::JobQueue::failed );
|
||||||
|
|
||||||
|
Logger::setupLogLevel( Logger::LOGVERBOSE );
|
||||||
|
cDebug() << "Got automount job" << jp;
|
||||||
|
|
||||||
|
QVERIFY( !q.isRunning() );
|
||||||
|
q.enqueue( 2, { jp, jp } );
|
||||||
|
QVERIFY( !q.isRunning() );
|
||||||
|
|
||||||
|
QEventLoop loop;
|
||||||
|
QTimer::singleShot( std::chrono::milliseconds( 100 ), [&q](){ q.start(); } );
|
||||||
|
QTimer::singleShot( std::chrono::milliseconds( 5000 ), [&loop](){ loop.quit(); } );
|
||||||
|
connect( &q, &Calamares::JobQueue::finished, &loop, &QEventLoop::quit );
|
||||||
|
loop.exec();
|
||||||
|
|
||||||
|
QCOMPARE( fail.count(), 0 );
|
||||||
|
QCOMPARE( finish.count(), 1 );
|
||||||
|
// 5 progress: 0% and 100% for each *job* and then 100% overall
|
||||||
|
QCOMPARE( progress.count(), 5 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QTEST_GUILESS_MAIN( AutoMountJobTests )
|
||||||
|
|
||||||
|
#include "utils/moc-warnings.h"
|
||||||
|
|
||||||
|
#include "AutoMountTests.moc"
|
@ -58,3 +58,11 @@ calamares_add_test(
|
|||||||
DEFINITIONS ${_partition_defs}
|
DEFINITIONS ${_partition_defs}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
calamares_add_test(
|
||||||
|
automounttests
|
||||||
|
SOURCES
|
||||||
|
${PartitionModule_SOURCE_DIR}/jobs/AutoMountManagementJob.cpp
|
||||||
|
AutoMountTests.cpp
|
||||||
|
LIBRARIES
|
||||||
|
calamares
|
||||||
|
)
|
||||||
|
@ -36,6 +36,8 @@ static const char TRANSLITERATOR_ID[] = "Russian-Latin/BGN;"
|
|||||||
"Latin-ASCII";
|
"Latin-ASCII";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
static const QRegExp USERNAME_RX( "^[a-z_][a-z0-9_-]*[$]?$" );
|
static const QRegExp USERNAME_RX( "^[a-z_][a-z0-9_-]*[$]?$" );
|
||||||
static constexpr const int USERNAME_MAX_LENGTH = 31;
|
static constexpr const int USERNAME_MAX_LENGTH = 31;
|
||||||
|
|
||||||
|
@ -64,10 +64,9 @@ GroupTests::testReadGroup()
|
|||||||
#else
|
#else
|
||||||
QVERIFY( groups.contains( QStringLiteral( "root" ) ) );
|
QVERIFY( groups.contains( QStringLiteral( "root" ) ) );
|
||||||
#endif
|
#endif
|
||||||
// openSUSE doesn't have "sys"
|
|
||||||
// QVERIFY( groups.contains( QStringLiteral( "sys" ) ) );
|
|
||||||
QVERIFY( groups.contains( QStringLiteral( "nogroup" ) ) );
|
|
||||||
QVERIFY( groups.contains( QStringLiteral( "tty" ) ) );
|
QVERIFY( groups.contains( QStringLiteral( "tty" ) ) );
|
||||||
|
// openSUSE doesn't have "sys", KaOS doesn't have "nogroup"
|
||||||
|
QVERIFY( groups.contains( QStringLiteral( "sys" ) ) || groups.contains( QStringLiteral( "nogroup" ) ) );
|
||||||
|
|
||||||
for ( const QString& s : groups )
|
for ( const QString& s : groups )
|
||||||
{
|
{
|
||||||
|
@ -10,14 +10,19 @@
|
|||||||
# can check requirements for installation.
|
# can check requirements for installation.
|
||||||
---
|
---
|
||||||
# Display settings for various buttons on the welcome page.
|
# Display settings for various buttons on the welcome page.
|
||||||
# The URLs themselves come from branding.desc is the setting
|
# The URLs themselves come from `branding.desc`. Each button
|
||||||
# here is "true". If the setting is false, the button is hidden.
|
# is show if the corresponding *show<buttonname>* setting
|
||||||
|
# here is "true". If the setting is "false", the button is hidden.
|
||||||
|
# Empty or not-set is interpreted as "false".
|
||||||
|
#
|
||||||
|
# TODO:3.3 Remove the URL fallback here; URLs only in `branding.desc`
|
||||||
|
#
|
||||||
# The setting can also be a full URL which will then be used
|
# The setting can also be a full URL which will then be used
|
||||||
# instead of the one from the branding file, or empty or not-set
|
# instead of the one from the branding file.
|
||||||
# which will hide the button.
|
|
||||||
showSupportUrl: true
|
showSupportUrl: true
|
||||||
showKnownIssuesUrl: true
|
showKnownIssuesUrl: true
|
||||||
showReleaseNotesUrl: false
|
showReleaseNotesUrl: false
|
||||||
|
# TODO:3.3 Move to branding, keep only a bool here
|
||||||
showDonateUrl: https://kde.org/community/donations/
|
showDonateUrl: https://kde.org/community/donations/
|
||||||
|
|
||||||
# Requirements checking. These are general, generic, things
|
# Requirements checking. These are general, generic, things
|
||||||
@ -26,7 +31,7 @@ showDonateUrl: https://kde.org/community/donations/
|
|||||||
requirements:
|
requirements:
|
||||||
# Amount of available disk, in GiB. Floating-point is allowed here.
|
# Amount of available disk, in GiB. Floating-point is allowed here.
|
||||||
# Note that this does not account for *usable* disk, so it is possible
|
# Note that this does not account for *usable* disk, so it is possible
|
||||||
# to pass this requirement, yet have no space to install to.
|
# to satisfy this requirement, yet have no space to install to.
|
||||||
requiredStorage: 5.5
|
requiredStorage: 5.5
|
||||||
|
|
||||||
# Amount of available RAM, in GiB. Floating-point is allowed here.
|
# Amount of available RAM, in GiB. Floating-point is allowed here.
|
||||||
@ -34,7 +39,10 @@ requirements:
|
|||||||
|
|
||||||
# To check for internet connectivity, Calamares does a HTTP GET
|
# To check for internet connectivity, Calamares does a HTTP GET
|
||||||
# on this URL; on success (e.g. HTTP code 200) internet is OK.
|
# on this URL; on success (e.g. HTTP code 200) internet is OK.
|
||||||
internetCheckUrl: http://google.com
|
# Use a privacy-respecting URL here, preferably in your distro's domain.
|
||||||
|
#
|
||||||
|
# The URL is only used if "internet" is in the *check* list below.
|
||||||
|
internetCheckUrl: http://example.com
|
||||||
|
|
||||||
# List conditions to check. Each listed condition will be
|
# List conditions to check. Each listed condition will be
|
||||||
# probed in some way, and yields true or false according to
|
# probed in some way, and yields true or false according to
|
||||||
|
Loading…
Reference in New Issue
Block a user