Merge branch 'master' of https://github.com/calamares/calamares into development
This commit is contained in:
commit
de81e06efc
@ -29,7 +29,7 @@
|
||||
#
|
||||
# cmake . -DSKIP_MODULES="partition luksbootkeycfg"
|
||||
|
||||
project( calamares CXX )
|
||||
project( calamares C CXX )
|
||||
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
@ -67,10 +67,10 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||
|
||||
# Third-party code where we don't care so much about compiler warnings
|
||||
# (because it's uncomfortable to patch) get different flags; use
|
||||
# set_source_files_properties( <file>
|
||||
# PROPERTIES COMPILE_FLAGS "${SUPPRESS_3RDPARTY_WARNINGS}" )
|
||||
# mark_thirdparty_code( <file> [<file>...] )
|
||||
# to switch off warnings for those sources.
|
||||
set( SUPPRESS_3RDPARTY_WARNINGS "-Wno-everything" )
|
||||
set( SUPPRESS_BOOST_WARNINGS " -Wno-zero-as-null-pointer-constant -Wno-disabled-macro-expansion" )
|
||||
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
|
||||
set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
|
||||
@ -85,8 +85,17 @@ else()
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--fatal-warnings -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type" )
|
||||
|
||||
set( SUPPRESS_3RDPARTY_WARNINGS "" )
|
||||
set( SUPPRESS_BOOST_WARNINGS "" )
|
||||
endif()
|
||||
|
||||
macro(mark_thirdparty_code)
|
||||
set_source_files_properties( ${ARGV}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${SUPPRESS_3RDPARTY_WARNINGS}"
|
||||
COMPILE_DEFINITIONS "THIRDPARTY"
|
||||
)
|
||||
endmacro()
|
||||
|
||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||
if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 OR
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9 )
|
||||
@ -103,8 +112,8 @@ find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core Gui Widgets LinguistTools S
|
||||
find_package( YAMLCPP 0.5.1 REQUIRED )
|
||||
find_package( PolkitQt5-1 REQUIRED )
|
||||
|
||||
option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON )
|
||||
option( INSTALL_CONFIG "Install configuration files" ON )
|
||||
option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON )
|
||||
option( WITH_PYTHONQT "Enable next generation Python modules API (experimental, requires PythonQt)." OFF )
|
||||
option( BUILD_TESTING "Build the testing tree." ON )
|
||||
|
||||
@ -114,27 +123,25 @@ endif ()
|
||||
|
||||
find_package( PythonLibs 3.3 )
|
||||
set_package_properties(
|
||||
PYTHONLIBS PROPERTIES
|
||||
PythonLibs PROPERTIES
|
||||
DESCRIPTION "C interface libraries for the Python 3 interpreter."
|
||||
URL "http://python.org"
|
||||
PURPOSE "Python 3 is used for some Calamares job modules."
|
||||
PURPOSE "Python 3 is used for Python job modules."
|
||||
)
|
||||
|
||||
if ( PYTHONLIBS_FOUND )
|
||||
include( BoostPython3 )
|
||||
find_boost_python3( 1.54.0 ${PYTHONLIBS_VERSION_STRING} CALAMARES_BOOST_PYTHON3_FOUND )
|
||||
set_package_properties(
|
||||
CALAMARES_BOOST_PYTHON3 PROPERTIES
|
||||
DESCRIPTION "A C++ library which enables seamless interoperability between C++ and Python 3."
|
||||
URL "http://www.boost.org"
|
||||
PURPOSE "Boost.Python is used for interfacing with Calamares job modules written in Python 3."
|
||||
Boost PROPERTIES
|
||||
PURPOSE "Boost.Python is used for Python job modules."
|
||||
)
|
||||
|
||||
find_package( PythonQt )
|
||||
set_package_properties( PYTHONQT PROPERTIES
|
||||
set_package_properties( PythonQt PROPERTIES
|
||||
DESCRIPTION "A Python embedding solution for Qt applications."
|
||||
URL "http://pythonqt.sourceforge.net"
|
||||
PURPOSE "PythonQt is used for the Python modules API."
|
||||
PURPOSE "PythonQt is used for Python view modules."
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -157,7 +164,7 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX
|
||||
### Bump version here
|
||||
set( CALAMARES_VERSION_MAJOR 3 )
|
||||
set( CALAMARES_VERSION_MINOR 1 )
|
||||
set( CALAMARES_VERSION_PATCH 4 )
|
||||
set( CALAMARES_VERSION_PATCH 5 )
|
||||
set( CALAMARES_VERSION_RC 0 )
|
||||
|
||||
set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} )
|
||||
@ -234,8 +241,8 @@ if( mksquashfs_PROGRAM )
|
||||
set( src_fs ${CMAKE_SOURCE_DIR}/data/example-root/ )
|
||||
set( dst_fs ${CMAKE_BINARY_DIR}/example.sqfs )
|
||||
if( EXISTS ${src_fs} )
|
||||
# Collect directories needed for a minimal binary distro,
|
||||
# based on the build host. If /lib64 exists, assume it is needed.
|
||||
# Collect directories needed for a minimal binary distro,
|
||||
# Note that the last path component is added to the root, so
|
||||
# if you add /usr/sbin here, it will be put into /sbin_1.
|
||||
# Add such paths to /etc/profile under ${src_fs}.
|
||||
@ -268,20 +275,12 @@ set_package_properties( mksquashfs PROPERTIES
|
||||
# add_subdirectory( thirdparty )
|
||||
add_subdirectory( src )
|
||||
|
||||
add_feature_info(Python ${WITH_PYTHON} "Python job modules")
|
||||
add_feature_info(PythonQt ${WITH_PYTHONQT} "Python view modules")
|
||||
add_feature_info(Config ${INSTALL_CONFIG} "Install Calamares configuration")
|
||||
|
||||
feature_summary(WHAT ALL)
|
||||
|
||||
if( NOT WITH_PYTHON )
|
||||
message( "-- WARNING: Building Calamares without Python support. Legacy Python job modules will not work.\n" )
|
||||
endif()
|
||||
if( NOT WITH_PYTHONQT )
|
||||
message( "-- WARNING: Building Calamares without PythonQt support. Python modules will not work.\n" )
|
||||
endif()
|
||||
|
||||
|
||||
if( NOT INSTALL_CONFIG )
|
||||
message( "-- WARNING: Configuration files will not be installed.\n" )
|
||||
endif()
|
||||
|
||||
# Add all targets to the build-tree export set
|
||||
set( CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Calamares" CACHE PATH "Installation directory for CMake files" )
|
||||
set( CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}" )
|
||||
|
@ -20,38 +20,50 @@
|
||||
# "python-$dotsuffix", where suffix is based on the `python_version` argument.
|
||||
# One can supply a custom component name by setting the
|
||||
# `CALAMARES_BOOST_PYTHON3_COMPONENT` variable at CMake time.
|
||||
|
||||
set( CALAMARES_BOOST_PYTHON3_COMPONENT python3 CACHE STRING
|
||||
"Name of the Boost.Python component. If Boost.Python is installed as
|
||||
libboost_python-foo.so then this variable should be set to 'python-foo'."
|
||||
)
|
||||
|
||||
macro( find_boost_python3 boost_version python_version found_var )
|
||||
set( ${found_var} OFF )
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
# turns "3.4.123abc" into "34"
|
||||
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1\\2" _fbp_python_short_version ${python_version} )
|
||||
|
||||
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} python-py${_fbp_python_short_version} )
|
||||
macro( _find_boost_python3_int boost_version componentname found_var )
|
||||
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} ${componentname} )
|
||||
find_package( Boost ${boost_version} QUIET COMPONENTS ${_fbp_name} )
|
||||
string( TOUPPER ${_fbp_name} _fbp_uc_name )
|
||||
if( Boost_${_fbp_uc_name}_FOUND )
|
||||
set( ${found_var} ON )
|
||||
set( ${found_var} ${_fbp_uc_name} )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
if (NOT ${found_var})
|
||||
macro( find_boost_python3 boost_version python_version found_var )
|
||||
set( ${found_var} OFF )
|
||||
set( _fbp_found OFF )
|
||||
|
||||
# turns "3.4.123abc" into "34"
|
||||
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1\\2" _fbp_python_short_version ${python_version} )
|
||||
_find_boost_python3_int( ${boost_version} python-py${_fbp_python_short_version} _fbp_found )
|
||||
|
||||
if (NOT _fbp_found)
|
||||
# The following loop changes the searched name for Gentoo based distributions
|
||||
# turns "3.4.123abc" into "3.4"
|
||||
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1.\\2" _fbp_python_short_version ${python_version} )
|
||||
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} python-${_fbp_python_short_version} )
|
||||
find_package( Boost ${boost_version} QUIET COMPONENTS ${_fbp_name} )
|
||||
string( TOUPPER ${_fbp_name} _fbp_uc_name )
|
||||
if( Boost_${_fbp_uc_name}_FOUND )
|
||||
set( ${found_var} ON )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
_find_boost_python3_int( ${boost_version} python-${_fbp_python_short_version} _fbp_found )
|
||||
endif()
|
||||
|
||||
set( ${found_var} ${_fbp_found} )
|
||||
|
||||
# This is superfluous, but allows proper reporting in the features list
|
||||
if ( _fbp_found )
|
||||
find_package( Boost ${boost_version} COMPONENTS ${_fbp_found} )
|
||||
else()
|
||||
find_package( Boost ${boost_version} COMPONENTS Python )
|
||||
endif()
|
||||
set_package_properties(
|
||||
Boost PROPERTIES
|
||||
DESCRIPTION "A C++ library which enables seamless interoperability between C++ and Python 3."
|
||||
URL "http://www.boost.org"
|
||||
)
|
||||
endmacro()
|
||||
|
83
LICENSES/LGPLv2.1-Presentation
Normal file
83
LICENSES/LGPLv2.1-Presentation
Normal file
@ -0,0 +1,83 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QML Presentation System.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QML Presentation System.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
22
LICENSES/LGPLv2.1-Presentation-Exception
Normal file
22
LICENSES/LGPLv2.1-Presentation-Exception
Normal file
@ -0,0 +1,22 @@
|
||||
Digia Qt LGPL Exception version 1.1
|
||||
|
||||
As an additional permission to the GNU Lesser General Public License version
|
||||
2.1, the object code form of a "work that uses the Library" may incorporate
|
||||
material from a header file that is part of the Library. You may distribute
|
||||
such object code under terms of your choice, provided that:
|
||||
(i) the header files of the Library have not been modified; and
|
||||
(ii) the incorporated material is limited to numerical parameters, data
|
||||
structure layouts, accessors, macros, inline functions and
|
||||
templates; and
|
||||
(iii) you comply with the terms of Section 6 of the GNU Lesser General
|
||||
Public License version 2.1.
|
||||
|
||||
Moreover, you may apply this exception to a modified version of the Library,
|
||||
provided that such modification does not involve copying material from the
|
||||
Library into the modified Library's header files unless such material is
|
||||
limited to (i) numerical parameters; (ii) data structure layouts;
|
||||
(iii) accessors; and (iv) small macros, templates and inline functions of
|
||||
five lines or less in length.
|
||||
|
||||
Furthermore, you are not required to apply this additional permission to a
|
||||
modified version of the Library.
|
@ -7,7 +7,7 @@
|
||||
[![Coverity Scan Build Status](https://scan.coverity.com/projects/5389/badge.svg)](https://scan.coverity.com/projects/5389)
|
||||
[![GitHub license](https://img.shields.io/github/license/calamares/calamares.svg)](https://github.com/calamares/calamares/blob/master/LICENSE)
|
||||
|
||||
| [Report a Bug](https://calamares.io/bugs/) | [Contribute](https://github.com/calamares/calamares/blob/master/HACKING.md) | [Translate](https://www.transifex.com/projects/p/calamares/) | Freenode (IRC): #calamares | [Wiki](https://github.com/calamares/calamares/wiki) |
|
||||
| [Report a Bug](https://github.com/calamares/calamares/issues/new) | [Contribute](https://github.com/calamares/calamares/blob/master/ci/HACKING.md) | [Translate](https://www.transifex.com/projects/p/calamares/) | Freenode (IRC): #calamares | [Wiki](https://github.com/calamares/calamares/wiki) |
|
||||
|:-----------------------------------------:|:----------------------:|:-----------------------:|:--------------------------:|:--------------------------:|
|
||||
|
||||
### Dependencies
|
||||
|
@ -12,7 +12,7 @@ Terminal=false
|
||||
StartupNotify=true
|
||||
Categories=Qt;System;
|
||||
|
||||
# Translations
|
||||
|
||||
Name[ca]=Calamares
|
||||
Icon[ca]=calamares
|
||||
GenericName[ca]=Instal·lador de sistema
|
||||
|
@ -30,11 +30,6 @@ The Calamares release process
|
||||
* Check `README.md` and everything in `hacking`, make sure it's all still
|
||||
relevant. Run `hacking/calamaresstyle` to check the C++ code style.
|
||||
Python code is checked as part of the Travis CI builds.
|
||||
* Update submodules.
|
||||
```
|
||||
git submodule # Note list of submodules
|
||||
git submodule update thirdparty/libcrashreporter-qt
|
||||
```
|
||||
* Check defaults in `settings.conf` and other configuration files.
|
||||
* Pull latest translations from Transifex. This is done nightly on Jenkins,
|
||||
so a manual pull is rarely necessary.
|
||||
@ -43,8 +38,13 @@ The Calamares release process
|
||||
fairly complete translations.
|
||||
|
||||
#### (2) Tarball
|
||||
* Create tarball: `git-archive-all -v calamares-1.1-rc1.tar.gz` . Double check
|
||||
that the tarball matches the version number.
|
||||
* Create tarball: `git-archive-all -v calamares-1.1-rc1.tar.gz` or without
|
||||
the helper script,
|
||||
```
|
||||
V=calamares-3.1.5
|
||||
git archive -o $V.tar.gz --prefix $V/ master
|
||||
```
|
||||
Double check that the tarball matches the version number.
|
||||
* Test tarball.
|
||||
|
||||
#### (3) Tag
|
||||
|
@ -1162,12 +1162,12 @@ Instalační program bude ukončen a všechny změny ztraceny.</translation>
|
||||
<message>
|
||||
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="66"/>
|
||||
<source>&Cancel</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>&Zrušit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="67"/>
|
||||
<source>&OK</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>&OK</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -173,7 +173,7 @@ Output:
|
||||
<message>
|
||||
<location filename="../src/libcalamares/ProcessJob.cpp" line="111"/>
|
||||
<source>External command finished with errors</source>
|
||||
<translation>Ekstern kommando blev færdiggjort uden fejl</translation>
|
||||
<translation>Ekstern kommando blev færdiggjort med fejl</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libcalamares/ProcessJob.cpp" line="112"/>
|
||||
@ -702,7 +702,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/CreatePartitionTableJob.cpp" line="66"/>
|
||||
<source>Creating new %1 partition table on %2.</source>
|
||||
<translation>Opretter ny %1 partitionstabel på %2.</translation>
|
||||
<translation>Opretter ny %1-partitionstabel på %2.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/CreatePartitionTableJob.cpp" line="76"/>
|
||||
@ -984,7 +984,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="147"/>
|
||||
<source>Install %1 on <strong>new</strong> %2 system partition.</source>
|
||||
<translation>Installér %1 på den <strong>nye</strong> %2 systempartition.</translation>
|
||||
<translation>Installér %1 på <strong>nye</strong> %2-systempartition.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="151"/>
|
||||
@ -994,7 +994,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="159"/>
|
||||
<source>Install %2 on %3 system partition <strong>%1</strong>.</source>
|
||||
<translation>Installér %2 på %3 systempartition <strong>%1</strong>.</translation>
|
||||
<translation>Installér %2 på %3-systempartition <strong>%1</strong>.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="164"/>
|
||||
@ -1772,7 +1772,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="216"/>
|
||||
<source>%1 system partition (%2)</source>
|
||||
<translation>%1 systempartition (%2)</translation>
|
||||
<translation>%1-systempartition (%2)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="227"/>
|
||||
|
@ -1163,12 +1163,12 @@ The installer will quit and all changes will be lost.</source>
|
||||
<message>
|
||||
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="66"/>
|
||||
<source>&Cancel</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>中止(&C)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="67"/>
|
||||
<source>&OK</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>了解(&O)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
Binary file not shown.
@ -53,4 +53,4 @@ msgstr[2] ""
|
||||
|
||||
#: src/modules/packages/main.py:68
|
||||
msgid "Install packages."
|
||||
msgstr ""
|
||||
msgstr "Instalovat balíčky."
|
||||
|
Binary file not shown.
@ -33,20 +33,20 @@ msgstr "Dummy python step {}"
|
||||
#: src/modules/packages/main.py:59
|
||||
#, python-format
|
||||
msgid "Processing packages (%(count)d / %(total)d)"
|
||||
msgstr ""
|
||||
msgstr "パッケージの処理中 (%(count)d / %(total)d)"
|
||||
|
||||
#: src/modules/packages/main.py:61
|
||||
#, python-format
|
||||
msgid "Installing one package."
|
||||
msgid_plural "Installing %(num)d packages."
|
||||
msgstr[0] ""
|
||||
msgstr[0] " %(num)d パッケージのインストール中。"
|
||||
|
||||
#: src/modules/packages/main.py:64
|
||||
#, python-format
|
||||
msgid "Removing one package."
|
||||
msgid_plural "Removing %(num)d packages."
|
||||
msgstr[0] ""
|
||||
msgstr[0] " %(num)d パッケージの削除中。"
|
||||
|
||||
#: src/modules/packages/main.py:68
|
||||
msgid "Install packages."
|
||||
msgstr ""
|
||||
msgstr "パッケージのインストール"
|
||||
|
@ -27,8 +27,6 @@ include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../libcalamares
|
||||
|
||||
${THIRDPARTY_DIR}/libcrashreporter-qt/src/
|
||||
|
||||
../libcalamares
|
||||
../libcalamaresui
|
||||
)
|
||||
@ -51,10 +49,6 @@ SET_TARGET_PROPERTIES(calamares_bin
|
||||
RUNTIME_OUTPUT_NAME calamares
|
||||
)
|
||||
|
||||
if( WITH_CRASHREPORTER )
|
||||
list( APPEND LINK_LIBRARIES ${LINK_LIBRARIES} pthread crashreporter-handler )
|
||||
endif()
|
||||
|
||||
target_link_libraries( calamares_bin
|
||||
PRIVATE
|
||||
${CALAMARES_LIBRARIES}
|
||||
|
@ -23,9 +23,6 @@
|
||||
#include "utils/CalamaresUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "CalamaresConfig.h"
|
||||
#ifdef WITH_CRASHREPORTER
|
||||
#include "libcrashreporter-handler/Handler.h"
|
||||
#endif
|
||||
|
||||
#include <QCommandLineParser>
|
||||
#include <QDebug>
|
||||
@ -36,13 +33,6 @@ main( int argc, char* argv[] )
|
||||
{
|
||||
CalamaresApplication a( argc, argv );
|
||||
|
||||
#ifdef WITH_CRASHREPORTER
|
||||
CrashReporter::Handler* handler =
|
||||
new CrashReporter::Handler( QDir::tempPath(),
|
||||
true,
|
||||
"calamares_crash_reporter" );
|
||||
#endif
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription( "Distribution-independent installer framework" );
|
||||
parser.addHelpOption();
|
||||
|
@ -1,47 +0,0 @@
|
||||
PROJECT( CrashReporter )
|
||||
cmake_policy(SET CMP0017 NEW)
|
||||
|
||||
set(CALAMARES_CRASH_REPORTER_TARGET calamares_crash_reporter)
|
||||
|
||||
list(APPEND crashreporter_SOURCES main.cpp)
|
||||
list(APPEND crashreporter_RC resources.qrc)
|
||||
|
||||
qt5_wrap_ui( crashreporter_UI_HEADERS ${crashreporter_UI} )
|
||||
qt5_add_resources( crashreporter_RC_RCC ${crashreporter_RC} )
|
||||
|
||||
|
||||
if(BUILD_RELEASE)
|
||||
set(CRASHREPORTER_RELEASE_CHANNEL "release")
|
||||
else()
|
||||
set(CRASHREPORTER_RELEASE_CHANNEL "nightly")
|
||||
endif()
|
||||
|
||||
set(CRASHREPORTER_SUBMIT_URL "https://calamares.io/oops/addreport.php")
|
||||
set(CRASHREPORTER_ICON ":/squid.svg")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CrashReporterConfig.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CrashReporterConfig.h)
|
||||
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}
|
||||
../../libcalamares
|
||||
../../libcalamaresui
|
||||
../../thirdparty/libcrashreporter-qt/src
|
||||
)
|
||||
|
||||
add_executable( ${CALAMARES_CRASH_REPORTER_TARGET}
|
||||
${crashreporter_SOURCES}
|
||||
${crashreporter_HEADERS_MOC}
|
||||
${crashreporter_UI_HEADERS}
|
||||
${crashreporter_RC_RCC}
|
||||
)
|
||||
|
||||
target_link_libraries( ${CALAMARES_CRASH_REPORTER_TARGET}
|
||||
${CALAMARES_LIBRARIES}
|
||||
crashreporter-gui
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
set_target_properties(${CALAMARES_CRASH_REPORTER_TARGET} PROPERTIES AUTOMOC ON)
|
||||
install(TARGETS ${CALAMARES_CRASH_REPORTER_TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
|
||||
|
||||
qt5_use_modules(${CALAMARES_CRASH_REPORTER_TARGET} Widgets Network)
|
@ -1,23 +0,0 @@
|
||||
#ifndef CRASHREPORTERCONFIG_H
|
||||
#define CRASHREPORTERCONFIG_H
|
||||
|
||||
// QCoreApplication settings for QSettings
|
||||
#cmakedefine CALAMARES_ORGANIZATION_NAME "${CALAMARES_ORGANIZATION_NAME}"
|
||||
#cmakedefine CALAMARES_ORGANIZATION_DOMAIN "${CALAMARES_ORGANIZATION_DOMAIN}"
|
||||
#cmakedefine CALAMARES_APPLICATION_NAME "${CALAMARES_APPLICATION_NAME}"
|
||||
#cmakedefine CALAMARES_VERSION "${CALAMARES_VERSION}"
|
||||
|
||||
|
||||
#define CRASHREPORTER_BUILD_ID "@CMAKE_DATESTAMP_YEAR@@CMAKE_DATESTAMP_MONTH@@CMAKE_DATESTAMP_DAY@000000"
|
||||
|
||||
#define CRASHREPORTER_RELEASE_CHANNEL "@CRASHREPORTER_RELEASE_CHANNEL@"
|
||||
|
||||
#define CRASHREPORTER_PRODUCT_NAME "@CALAMARES_APPLICATION_NAME@"
|
||||
|
||||
#define CRASHREPORTER_VERSION_STRING "@CALAMARES_VERSION_STRING@"
|
||||
|
||||
#define CRASHREPORTER_SUBMIT_URL "@CRASHREPORTER_SUBMIT_URL@"
|
||||
|
||||
#define CRASHREPORTER_ICON "@CRASHREPORTER_ICON@"
|
||||
|
||||
#endif // CRASHREPORTERCONFIG_H
|
@ -1,166 +0,0 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libcrashreporter-gui/CrashReporter.h>
|
||||
|
||||
#include <libcrashreporter-gui/CrashReporterGzip.h>
|
||||
|
||||
#include "CrashReporterConfig.h"
|
||||
|
||||
#include <QTranslator>
|
||||
#include <iostream>
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
|
||||
#include "utils/CalamaresUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <numeric>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windows.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
static const char k_usage[] =
|
||||
"Usage:\n"
|
||||
" CrashReporter <dumpFilePath> <linuxBacktracePath>\n";
|
||||
#else
|
||||
static const char k_usage[] =
|
||||
"Usage:\n"
|
||||
" CrashReporter <dumpFilePath>\n";
|
||||
#endif
|
||||
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
#ifdef Q_OS_WIN // log to console window
|
||||
if ( fileno( stdout ) != -1 && _get_osfhandle( fileno( stdout ) ) != -1 )
|
||||
{
|
||||
/* stdout is fine, presumably redirected to a file or pipe */
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef BOOL (WINAPI * AttachConsole_t) (DWORD);
|
||||
AttachConsole_t p_AttachConsole = (AttachConsole_t) GetProcAddress( GetModuleHandleW( L"kernel32.dll" ), "AttachConsole" );
|
||||
|
||||
if ( p_AttachConsole != NULL && p_AttachConsole( ATTACH_PARENT_PROCESS ) )
|
||||
{
|
||||
_wfreopen ( L"CONOUT$", L"w", stdout );
|
||||
dup2( fileno( stdout ), 1 );
|
||||
_wfreopen ( L"CONOUT$", L"w", stderr );
|
||||
dup2( fileno( stderr ), 2 );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// used by some Qt stuff, eg QSettings
|
||||
// leave first! As Settings object is created quickly
|
||||
QCoreApplication::setOrganizationName( QLatin1String( CALAMARES_ORGANIZATION_NAME ) );
|
||||
QCoreApplication::setOrganizationDomain( QLatin1String( CALAMARES_ORGANIZATION_DOMAIN ) );
|
||||
QCoreApplication::setApplicationName( QLatin1String( CALAMARES_APPLICATION_NAME ) );
|
||||
QCoreApplication::setApplicationVersion( QLatin1String( CALAMARES_VERSION ) );
|
||||
|
||||
QApplication app( argc, argv );
|
||||
CalamaresUtils::installTranslator( QLocale::system(), QString(), &app );
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
if ( app.arguments().size() != 8 )
|
||||
#else
|
||||
if ( app.arguments().size() != 2 )
|
||||
#endif
|
||||
{
|
||||
std::cout << k_usage;
|
||||
return 1;
|
||||
}
|
||||
cDebug() << "Arguments list:" << app.arguments().join( ", " );
|
||||
|
||||
CrashReporter reporter( QUrl( CRASHREPORTER_SUBMIT_URL ), app.arguments() );
|
||||
|
||||
#ifdef CRASHREPORTER_ICON
|
||||
reporter.setLogo( QPixmap( CRASHREPORTER_ICON ) );
|
||||
#endif
|
||||
reporter.setWindowTitle( CRASHREPORTER_PRODUCT_NAME );
|
||||
reporter.setText("<html><head/><body><p><span style=\" font-weight:600;\">Sorry!"
|
||||
"</span> " CRASHREPORTER_PRODUCT_NAME " crashed. Please tell us "
|
||||
"about it! " CRASHREPORTER_PRODUCT_NAME " has created an error "
|
||||
"report for you that can help improve the stability in the "
|
||||
"future. You can now send this report directly to the "
|
||||
CRASHREPORTER_PRODUCT_NAME " developers.</p><p>Can you tell us "
|
||||
"what you were doing when this happened?</p></body></html>");
|
||||
reporter.setBottomText(QString());
|
||||
|
||||
reporter.setReportData( "BuildID", CRASHREPORTER_BUILD_ID );
|
||||
reporter.setReportData( "ProductName", CRASHREPORTER_PRODUCT_NAME );
|
||||
reporter.setReportData( "Version", CRASHREPORTER_VERSION_STRING );
|
||||
reporter.setReportData( "ReleaseChannel", CRASHREPORTER_RELEASE_CHANNEL);
|
||||
|
||||
//reporter.setReportData( "timestamp", QByteArray::number( QDateTime::currentDateTime().toTime_t() ) );
|
||||
|
||||
|
||||
|
||||
// add parameters
|
||||
|
||||
// QList<Pair> pairs;
|
||||
// pairs //<< Pair( "BuildID", buildId.toUtf8() )
|
||||
// << Pair( )
|
||||
// //<< Pair( "Version", CalamaresUtils::appFriendlyVersion().toLocal8Bit() )
|
||||
// //<< Pair( "Vendor", "Tomahawk" )
|
||||
// //<< Pair( )
|
||||
|
||||
// << Pair("InstallTime", "1357622062")
|
||||
// << Pair("Theme", "classic/1.0")
|
||||
// << Pair("Version", "30")
|
||||
// << Pair("id", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}")
|
||||
// << Pair("Vendor", "Mozilla")
|
||||
// << Pair("EMCheckCompatibility", "true")
|
||||
// << Pair("Throttleable", "0")
|
||||
// << Pair("URL", "http://code.google.com/p/crashme/")
|
||||
// << Pair("version", "20.0a1")
|
||||
// << Pair("CrashTime", "1357770042")
|
||||
// << Pair("submitted_timestamp", "2013-01-09T22:21:18.646733+00:00")
|
||||
// << Pair("buildid", "20130107030932")
|
||||
// << Pair("timestamp", "1357770078.646789")
|
||||
// << Pair("Notes", "OpenGL: NVIDIA Corporation -- GeForce 8600M GT/PCIe/SSE2 -- 3.3.0 NVIDIA 313.09 -- texture_from_pixmap\r\n")
|
||||
// << Pair("StartupTime", "1357769913")
|
||||
// << Pair("FramePoisonSize", "4096")
|
||||
// << Pair("FramePoisonBase", "7ffffffff0dea000")
|
||||
// << Pair("Add-ons", "%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D:20.0a1,crashme%40ted.mielczarek.org:0.4")
|
||||
// << Pair("SecondsSinceLastCrash", "1831736")
|
||||
// << Pair("ProductName", "WaterWolf")
|
||||
// << Pair("legacy_processing", "0")
|
||||
// << Pair("ProductID", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}")
|
||||
|
||||
;
|
||||
|
||||
// send log
|
||||
QFile logFile( CalamaresUtils::appLogDir().filePath( "Calamares.log" ) );
|
||||
logFile.open( QFile::ReadOnly );
|
||||
reporter.setReportData( "upload_file_calamareslog",
|
||||
gzip_compress( logFile.readAll() ),
|
||||
"application/x-gzip",
|
||||
QFileInfo( logFile ).fileName().toUtf8());
|
||||
logFile.close();
|
||||
|
||||
reporter.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="squid.svg">../../data/images/squid.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -32,8 +32,7 @@ set( kdsagSources
|
||||
kdsingleapplicationguard/kdtoolsglobal.cpp
|
||||
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
|
||||
)
|
||||
set_source_files_properties( ${kdsagSources}
|
||||
PROPERTIES COMPILE_FLAGS "${SUPPRESS_3RDPARTY_WARNINGS}" )
|
||||
mark_thirdparty_code( ${kdsagSources} )
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
@ -47,6 +46,9 @@ if( WITH_PYTHON )
|
||||
PythonJob.cpp
|
||||
PythonJobApi.cpp
|
||||
)
|
||||
set_source_files_properties( PythonJob.cpp
|
||||
PROPERTIES COMPILE_FLAGS "${SUPPRESS_BOOST_WARNINGS}"
|
||||
)
|
||||
|
||||
include_directories(${PYTHON_INCLUDE_DIRS})
|
||||
link_directories(${PYTHON_LIBRARIES})
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
//cmakedefines for CMake variables (e.g. for optdepends) go here
|
||||
#cmakedefine WITH_PYTHON
|
||||
#cmakedefine WITH_CRASHREPORTER
|
||||
#cmakedefine WITH_PYTHONQT
|
||||
|
||||
#endif // CALAMARESCONFIG_H
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
const QString& workingPath,
|
||||
const QVariantMap& moduleConfiguration = QVariantMap(),
|
||||
QObject* parent = nullptr );
|
||||
virtual ~PythonJob();
|
||||
virtual ~PythonJob() override;
|
||||
|
||||
QString prettyName() const override;
|
||||
QString prettyStatusMessage() const override;
|
||||
|
@ -1,6 +1,6 @@
|
||||
project( libcalamaresui CXX )
|
||||
|
||||
list( APPEND calamaresui_SOURCES
|
||||
set( calamaresui_SOURCES
|
||||
modulesystem/CppJobModule.cpp
|
||||
modulesystem/Module.cpp
|
||||
modulesystem/ModuleManager.cpp
|
||||
@ -29,7 +29,15 @@ list( APPEND calamaresui_SOURCES
|
||||
ViewManager.cpp
|
||||
)
|
||||
|
||||
list( APPEND calamaresui_UI
|
||||
# Don't warn about third-party sources
|
||||
mark_thirdparty_code(
|
||||
utils/ImageRegistry.cpp
|
||||
utils/qjsonitem.cpp
|
||||
utils/qjsonmodel.cpp
|
||||
widgets/waitingspinnerwidget.cpp
|
||||
)
|
||||
|
||||
set( calamaresui_UI
|
||||
utils/DebugWindow.ui
|
||||
)
|
||||
|
||||
|
@ -40,7 +40,7 @@ protected:
|
||||
private:
|
||||
friend class Module;
|
||||
explicit PythonJobModule();
|
||||
virtual ~PythonJobModule();
|
||||
virtual ~PythonJobModule() override;
|
||||
|
||||
QString m_scriptFileName;
|
||||
QString m_workingPath;
|
||||
|
@ -487,8 +487,8 @@ def run():
|
||||
if (os.path.exists(greeter_path)):
|
||||
# configure first found lightdm-greeter
|
||||
for entry in os.listdir(greeter_path):
|
||||
if entry.name.endswith('.desktop'):
|
||||
greeter = entry.name.split('.')[0]
|
||||
if entry.endswith('.desktop'):
|
||||
greeter = entry.split('.')[0]
|
||||
libcalamares.utils.debug(
|
||||
"found greeter {!s}".format(greeter)
|
||||
)
|
||||
|
@ -50,11 +50,11 @@ FinishedPage::FinishedPage( QWidget* parent )
|
||||
CALAMARES_RETRANSLATE(
|
||||
ui->retranslateUi( this );
|
||||
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( *Calamares::Branding::VersionedName )
|
||||
.arg( *Calamares::Branding::ProductName ) );
|
||||
"%1 has been installed on your computer.<br/>"
|
||||
"You may now restart into your new system, or continue "
|
||||
"using the %2 Live environment." )
|
||||
.arg( *Calamares::Branding::VersionedName )
|
||||
.arg( *Calamares::Branding::ProductName ) );
|
||||
)
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ FinishedPage::setUpRestart()
|
||||
this, [this]
|
||||
{
|
||||
if ( ui->restartCheckBox->isVisible() &&
|
||||
ui->restartCheckBox->isChecked() )
|
||||
ui->restartCheckBox->isChecked() )
|
||||
QProcess::execute( "/bin/sh", { "-c", m_restartNowCommand } );
|
||||
} );
|
||||
}
|
||||
@ -108,9 +108,9 @@ FinishedPage::onInstallationFailed( const QString& message, const QString& detai
|
||||
{
|
||||
Q_UNUSED( details );
|
||||
ui->mainText->setText( tr( "<h1>Installation Failed</h1><br/>"
|
||||
"%1 has not been installed on your computer.<br/>"
|
||||
"The error message was: %2." )
|
||||
.arg( *Calamares::Branding::VersionedName )
|
||||
.arg( message ) );
|
||||
"%1 has not been installed on your computer.<br/>"
|
||||
"The error message was: %2." )
|
||||
.arg( *Calamares::Branding::VersionedName )
|
||||
.arg( message ) );
|
||||
setRestartNowEnabled( false );
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ FinishedViewStep::FinishedViewStep( QObject* parent )
|
||||
: Calamares::ViewStep( parent )
|
||||
, m_widget( new FinishedPage() )
|
||||
, installFailed( false )
|
||||
, m_notifyOnFinished( false )
|
||||
{
|
||||
auto jq = Calamares::JobQueue::instance();
|
||||
connect( jq, &Calamares::JobQueue::failed,
|
||||
@ -110,7 +111,7 @@ FinishedViewStep::sendNotification()
|
||||
{
|
||||
// If the installation failed, don't send notification popup;
|
||||
// there's a (modal) dialog popped up with the failure notice.
|
||||
if (installFailed)
|
||||
if ( installFailed )
|
||||
return;
|
||||
|
||||
QDBusInterface notify( "org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications" );
|
||||
@ -139,7 +140,8 @@ FinishedViewStep::onActivate()
|
||||
{
|
||||
m_widget->setUpRestart();
|
||||
|
||||
sendNotification();
|
||||
if ( m_notifyOnFinished )
|
||||
sendNotification();
|
||||
}
|
||||
|
||||
|
||||
@ -152,8 +154,8 @@ FinishedViewStep::jobs() const
|
||||
void
|
||||
FinishedViewStep::onInstallationFailed( const QString& message, const QString& details )
|
||||
{
|
||||
Q_UNUSED(message);
|
||||
Q_UNUSED(details);
|
||||
Q_UNUSED( message );
|
||||
Q_UNUSED( details );
|
||||
installFailed = true;
|
||||
}
|
||||
|
||||
@ -179,6 +181,9 @@ FinishedViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
m_widget->setRestartNowCommand( "systemctl -i reboot" );
|
||||
}
|
||||
}
|
||||
if ( configurationMap.contains( "notifyOnFinished" ) &&
|
||||
configurationMap.value( "notifyOnFinished" ).type() == QVariant::Bool )
|
||||
m_notifyOnFinished = configurationMap.value( "notifyOnFinished" ).toBool();
|
||||
}
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( FinishedViewStepFactory, registerPlugin<FinishedViewStep>(); )
|
||||
|
@ -68,6 +68,7 @@ private:
|
||||
void sendNotification();
|
||||
|
||||
bool installFailed;
|
||||
bool m_notifyOnFinished;
|
||||
};
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( FinishedViewStepFactory )
|
||||
|
@ -1,4 +1,17 @@
|
||||
Configuration for the "finished" page, which is usually shown only at
|
||||
the end of the installation (successful or not).
|
||||
---
|
||||
# The finished page can hold a "restart system now" checkbox.
|
||||
# If this is false, no checkbox is show and the system is not restarted
|
||||
# when Calamares exits.
|
||||
restartNowEnabled: true
|
||||
# Initial state of the checkbox "restart now".
|
||||
restartNowChecked: false
|
||||
# If the checkbox is shown, and the checkbox is checked, then when
|
||||
# Calamares exits from the finished-page it will run this command.
|
||||
restartNowCommand: "systemctl -i reboot"
|
||||
|
||||
# When the last page is (successfully) reached, send a DBus notification
|
||||
# to the desktop that the installation is done. This works only if the
|
||||
# user as whom Calamares is run, can reach the regular desktop session bus.
|
||||
notifyOnFinished: false
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
IsPartitionRole
|
||||
};
|
||||
|
||||
BootLoaderModel( QObject* parent = 0 );
|
||||
BootLoaderModel( QObject* parent = nullptr );
|
||||
~BootLoaderModel() override;
|
||||
|
||||
/**
|
||||
|
@ -270,8 +270,8 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition )
|
||||
if ( !KPMHelpers::isPartitionFreeSpace( childPartition ) )
|
||||
lst << childPartition;
|
||||
|
||||
for ( auto partition : lst )
|
||||
deletePartition( device, partition );
|
||||
for ( auto childPartition : lst )
|
||||
deletePartition( device, childPartition );
|
||||
}
|
||||
|
||||
QList< Calamares::job_ptr >& jobs = deviceInfo->jobs;
|
||||
@ -441,7 +441,7 @@ PartitionCoreModule::osproberEntries() const
|
||||
}
|
||||
|
||||
void
|
||||
PartitionCoreModule::refreshPartition( Device* device, Partition* partition )
|
||||
PartitionCoreModule::refreshPartition( Device* device, Partition* )
|
||||
{
|
||||
// Keep it simple for now: reset the model. This can be improved to cause
|
||||
// the model to emit dataChanged() for the affected row instead, avoiding
|
||||
|
@ -35,8 +35,8 @@
|
||||
|
||||
|
||||
static const int VIEW_HEIGHT = qMax( CalamaresUtils::defaultFontHeight() + 8, // wins out with big fonts
|
||||
(int)( CalamaresUtils::defaultFontHeight() * 0.6 ) + 22 ); // wins out with small fonts
|
||||
static const int CORNER_RADIUS = 3;
|
||||
int( CalamaresUtils::defaultFontHeight() * 0.6 ) + 22 ); // wins out with small fonts
|
||||
static constexpr int CORNER_RADIUS = 3;
|
||||
static const int EXTENDED_PARTITION_MARGIN = qMax( 4, VIEW_HEIGHT / 6 );
|
||||
|
||||
// The SELECTION_MARGIN is applied within a hardcoded 2px padding anyway, so
|
||||
@ -54,8 +54,8 @@ static const int SELECTION_MARGIN = qMin( ( EXTENDED_PARTITION_MARGIN - 2 ) / 2,
|
||||
PartitionBarsView::PartitionBarsView( QWidget* parent )
|
||||
: QAbstractItemView( parent )
|
||||
, m_nestedPartitionsMode( NoNestedPartitions )
|
||||
, m_hoveredIndex( QModelIndex() )
|
||||
, canBeSelected( []( const QModelIndex& ) { return true; } )
|
||||
, m_hoveredIndex( QModelIndex() )
|
||||
{
|
||||
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||
setFrameStyle( QFrame::NoFrame );
|
||||
@ -422,14 +422,14 @@ PartitionBarsView::setSelectionFilter( std::function< bool ( const QModelIndex&
|
||||
|
||||
|
||||
QModelIndex
|
||||
PartitionBarsView::moveCursor( CursorAction cursorAction, Qt::KeyboardModifiers modifiers )
|
||||
PartitionBarsView::moveCursor( CursorAction, Qt::KeyboardModifiers )
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
PartitionBarsView::isIndexHidden( const QModelIndex& index ) const
|
||||
PartitionBarsView::isIndexHidden( const QModelIndex& ) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -491,7 +491,7 @@ PartitionBarsView::mouseMoveEvent( QMouseEvent* event )
|
||||
|
||||
|
||||
void
|
||||
PartitionBarsView::leaveEvent( QEvent* event )
|
||||
PartitionBarsView::leaveEvent( QEvent* )
|
||||
{
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
if ( m_hoveredIndex.isValid() )
|
||||
|
@ -58,7 +58,7 @@ PartitionSizeController::setPartResizerWidget( PartResizerWidget* widget, bool f
|
||||
Q_ASSERT( m_device );
|
||||
|
||||
if ( m_partResizerWidget )
|
||||
disconnect( m_partResizerWidget, 0, this, 0 );
|
||||
disconnect( m_partResizerWidget, nullptr, this, nullptr );
|
||||
|
||||
m_dirty = false;
|
||||
m_currentSpinBoxValue = -1;
|
||||
@ -108,7 +108,7 @@ void
|
||||
PartitionSizeController::setSpinBox( QSpinBox* spinBox )
|
||||
{
|
||||
if ( m_spinBox )
|
||||
disconnect( m_spinBox, 0, this, 0 );
|
||||
disconnect( m_spinBox, nullptr, this, nullptr );
|
||||
m_spinBox = spinBox;
|
||||
m_spinBox->setMaximum( std::numeric_limits< int >::max() );
|
||||
connectWidgets();
|
||||
|
@ -347,7 +347,7 @@ ReplaceWidget::updateFromCurrentDevice( QComboBox* devicesComboBox )
|
||||
|
||||
QAbstractItemModel* oldModel = m_ui->partitionTreeView->model();
|
||||
if ( oldModel )
|
||||
disconnect( oldModel, 0, this, 0 );
|
||||
disconnect( oldModel, nullptr, this, nullptr );
|
||||
|
||||
PartitionModel* model = m_core->partitionModelForDevice( device );
|
||||
m_ui->partitionTreeView->setModel( model );
|
||||
|
@ -78,7 +78,7 @@ FormatPartitionJob::prettyStatusMessage() const
|
||||
Calamares::JobResult
|
||||
FormatPartitionJob::exec()
|
||||
{
|
||||
Report report( 0 );
|
||||
Report report( nullptr ); // Root of the report tree, no parent
|
||||
QString partitionPath = m_partition->partitionPath();
|
||||
QString message = tr( "The installer failed to format partition %1 on disk '%2'." ).arg( partitionPath, m_device->name() );
|
||||
|
||||
|
@ -36,9 +36,10 @@ static const int SECTION_SPACING = 12;
|
||||
SummaryPage::SummaryPage( const SummaryViewStep* thisViewStep, QWidget* parent )
|
||||
: QWidget()
|
||||
, m_thisViewStep( thisViewStep )
|
||||
, m_scrollArea( new QScrollArea( this ) )
|
||||
, m_contentWidget( nullptr )
|
||||
, m_scrollArea( new QScrollArea( this ) )
|
||||
{
|
||||
Q_UNUSED( parent );
|
||||
Q_ASSERT( m_thisViewStep );
|
||||
QVBoxLayout* layout = new QVBoxLayout( this );
|
||||
layout->setContentsMargins( 0, 0, 0, 0 );
|
||||
@ -65,7 +66,6 @@ SummaryPage::onActivate()
|
||||
{
|
||||
createContentWidget();
|
||||
|
||||
QString text;
|
||||
bool first = true;
|
||||
const Calamares::ViewStepList steps =
|
||||
stepsForSummary( Calamares::ViewManager::instance()->viewSteps() );
|
||||
|
@ -5,8 +5,6 @@ find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED DBus Network )
|
||||
|
||||
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
||||
|
||||
set_source_files_properties( checker/partman_devices.c PROPERTIES LANGUAGE CXX )
|
||||
|
||||
set( CHECKER_SOURCES
|
||||
checker/CheckItemWidget.cpp
|
||||
checker/CheckerWidget.cpp
|
||||
|
@ -19,6 +19,14 @@
|
||||
#ifndef PARTMAN_DEVICES_H
|
||||
#define PARTMAN_DEVICES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int check_big_enough(long long required_space);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // PARTMAN_DEVICES_H
|
||||
|
@ -1,29 +1,16 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* - added looping, keys-instead-of-shortcut
|
||||
*
|
||||
* Based on the QML Presentation System.
|
||||
* Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
* Header reproduced verbatim below.
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
* SPDX-License-Identifier: LGPL-2.1
|
||||
* License-Filename: LICENSES/LGPLv2.1-Presentation
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QML Presentation System.
|
||||
**
|
||||
@ -62,18 +49,20 @@
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick 2.5
|
||||
import QtQuick.Window 2.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property variant slides: []
|
||||
property int currentSlide;
|
||||
property int currentSlide: 0
|
||||
|
||||
property bool showNotes: false;
|
||||
property bool allowDelay: true;
|
||||
property bool loop: true;
|
||||
property alias mouseNavigation: mouseArea.enabled
|
||||
property bool arrowNavigation: true
|
||||
property bool keyShortcutsEnabled: true
|
||||
|
||||
property color titleColor: textColor;
|
||||
property color textColor: "black"
|
||||
@ -83,6 +72,7 @@ Item {
|
||||
// Private API
|
||||
property bool _faded: false
|
||||
property int _userNum;
|
||||
property int _lastShownSlide: 0
|
||||
|
||||
Component.onCompleted: {
|
||||
var slideCount = 0;
|
||||
@ -98,10 +88,8 @@ Item {
|
||||
root._userNum = 0;
|
||||
|
||||
// Make first slide visible...
|
||||
if (root.slides.length > 0) {
|
||||
root.currentSlide = 0;
|
||||
if (root.slides.length > 0)
|
||||
root.slides[root.currentSlide].visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
function switchSlides(from, to, forward) {
|
||||
@ -110,6 +98,13 @@ Item {
|
||||
return true
|
||||
}
|
||||
|
||||
onCurrentSlideChanged: {
|
||||
switchSlides(root.slides[_lastShownSlide], root.slides[currentSlide], currentSlide > _lastShownSlide)
|
||||
_lastShownSlide = currentSlide
|
||||
// Always keep focus on the slideshow
|
||||
root.focus = true
|
||||
}
|
||||
|
||||
function goToNextSlide() {
|
||||
root._userNum = 0
|
||||
if (_faded)
|
||||
@ -118,38 +113,18 @@ Item {
|
||||
if (root.slides[currentSlide]._advance())
|
||||
return;
|
||||
}
|
||||
if (root.currentSlide + 1 < root.slides.length) {
|
||||
var from = slides[currentSlide]
|
||||
var to = slides[currentSlide + 1]
|
||||
if (switchSlides(from, to, true)) {
|
||||
currentSlide = currentSlide + 1;
|
||||
root.focus = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (root.loop) {
|
||||
var from = slides[currentSlide]
|
||||
var to = slides[0]
|
||||
if (switchSlides(from, to, true)) {
|
||||
currentSlide = 0;
|
||||
root.focus = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (currentSlide + 1 < root.slides.length)
|
||||
++currentSlide;
|
||||
else
|
||||
currentSlide = 0; // Loop at the end
|
||||
}
|
||||
|
||||
function goToPreviousSlide() {
|
||||
root._userNum = 0
|
||||
if (root._faded)
|
||||
return
|
||||
if (root.currentSlide - 1 >= 0) {
|
||||
var from = slides[currentSlide]
|
||||
var to = slides[currentSlide - 1]
|
||||
if (switchSlides(from, to, false)) {
|
||||
currentSlide = currentSlide - 1;
|
||||
root.focus = true;
|
||||
}
|
||||
}
|
||||
if (currentSlide - 1 >= 0)
|
||||
--currentSlide;
|
||||
}
|
||||
|
||||
function goToUserSlide() {
|
||||
@ -158,38 +133,45 @@ Item {
|
||||
return
|
||||
if (_userNum < 0)
|
||||
goToNextSlide()
|
||||
else if (root.currentSlide != _userNum) {
|
||||
var from = slides[currentSlide]
|
||||
var to = slides[_userNum]
|
||||
if (switchSlides(from, to, _userNum > currentSlide)) {
|
||||
currentSlide = _userNum;
|
||||
root.focus = true;
|
||||
}
|
||||
else {
|
||||
currentSlide = _userNum;
|
||||
root.focus = true;
|
||||
}
|
||||
}
|
||||
|
||||
focus: true
|
||||
|
||||
Keys.onSpacePressed: goToNextSlide()
|
||||
Keys.onRightPressed: goToNextSlide()
|
||||
Keys.onDownPressed: goToNextSlide()
|
||||
Keys.onLeftPressed: goToPreviousSlide()
|
||||
Keys.onUpPressed: goToPreviousSlide()
|
||||
Keys.onEscapePressed: Qt.quit()
|
||||
// directly type in the slide number: depends on root having focus
|
||||
Keys.onPressed: {
|
||||
if (event.key >= Qt.Key_0 && event.key <= Qt.Key_9)
|
||||
_userNum = 10 * _userNum + (event.key - Qt.Key_0)
|
||||
else {
|
||||
if (event.key == Qt.Key_Return || event.key == Qt.Key_Enter)
|
||||
goToUserSlide();
|
||||
else if (event.key == Qt.Key_Backspace)
|
||||
goToPreviousSlide();
|
||||
else if (event.key == Qt.Key_C)
|
||||
root._faded = !root._faded;
|
||||
_userNum = 0;
|
||||
}
|
||||
}
|
||||
|
||||
focus: true // Keep focus
|
||||
|
||||
// Navigation through key events, too
|
||||
Keys.onSpacePressed: goToNextSlide()
|
||||
Keys.onRightPressed: goToNextSlide()
|
||||
Keys.onLeftPressed: goToPreviousSlide()
|
||||
|
||||
// navigate with arrow keys
|
||||
Shortcut { sequence: StandardKey.MoveToNextLine; enabled: root.arrowNavigation; onActivated: goToNextSlide() }
|
||||
Shortcut { sequence: StandardKey.MoveToPreviousLine; enabled: root.arrowNavigation; onActivated: goToPreviousSlide() }
|
||||
Shortcut { sequence: StandardKey.MoveToNextChar; enabled: root.arrowNavigation; onActivated: goToNextSlide() }
|
||||
Shortcut { sequence: StandardKey.MoveToPreviousChar; enabled: root.arrowNavigation; onActivated: goToPreviousSlide() }
|
||||
|
||||
// presentation-specific single-key shortcuts (which interfere with normal typing)
|
||||
Shortcut { sequence: " "; enabled: root.keyShortcutsEnabled; onActivated: goToNextSlide() }
|
||||
Shortcut { sequence: "c"; enabled: root.keyShortcutsEnabled; onActivated: root._faded = !root._faded }
|
||||
|
||||
// standard shortcuts
|
||||
Shortcut { sequence: StandardKey.MoveToNextPage; onActivated: goToNextSlide() }
|
||||
Shortcut { sequence: StandardKey.MoveToPreviousPage; onActivated: goToPreviousSlide() }
|
||||
Shortcut { sequence: StandardKey.Quit; onActivated: Qt.quit() }
|
||||
|
||||
Rectangle {
|
||||
z: 1000
|
||||
color: "black"
|
||||
@ -219,16 +201,61 @@ Item {
|
||||
title: "QML Presentation: Notes"
|
||||
visible: root.showNotes
|
||||
|
||||
Text {
|
||||
Flickable {
|
||||
anchors.fill: parent
|
||||
anchors.margins: parent.height * 0.1;
|
||||
contentWidth: parent.width
|
||||
contentHeight: textContainer.height
|
||||
|
||||
font.pixelSize: 16
|
||||
wrapMode: Text.WordWrap
|
||||
Item {
|
||||
id: textContainer
|
||||
width: parent.width
|
||||
height: notesText.height + 2 * notesText.padding
|
||||
|
||||
property string notes: root.slides[root.currentSlide].notes;
|
||||
text: notes == "" ? "Slide has no notes..." : notes;
|
||||
font.italic: notes == "";
|
||||
Text {
|
||||
id: notesText
|
||||
|
||||
property real padding: 16;
|
||||
|
||||
x: padding
|
||||
y: padding
|
||||
width: parent.width - 2 * padding
|
||||
|
||||
|
||||
font.pixelSize: 16
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
property string notes: root.slides[root.currentSlide].notes;
|
||||
|
||||
onNotesChanged: {
|
||||
var result = "";
|
||||
|
||||
var lines = notes.split("\n");
|
||||
var beginNewLine = false
|
||||
for (var i=0; i<lines.length; ++i) {
|
||||
var line = lines[i].trim();
|
||||
if (line.length == 0) {
|
||||
beginNewLine = true;
|
||||
} else {
|
||||
if (beginNewLine && result.length) {
|
||||
result += "\n\n"
|
||||
beginNewLine = false
|
||||
}
|
||||
if (result.length > 0)
|
||||
result += " ";
|
||||
result += line;
|
||||
}
|
||||
}
|
||||
|
||||
if (result.length == 0) {
|
||||
font.italic = true;
|
||||
text = "no notes.."
|
||||
} else {
|
||||
font.italic = false;
|
||||
text = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1
|
||||
* License-Filename: LICENSES/LGPLv2.1-Presentation
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
@ -167,20 +173,19 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: dot
|
||||
y: baseFontSize * row.indentFactor / 2
|
||||
width: baseFontSize / 4
|
||||
height: baseFontSize / 4
|
||||
anchors.baseline: text.baseline
|
||||
anchors.baselineOffset: -text.font.pixelSize / 2
|
||||
width: text.font.pixelSize / 3
|
||||
height: text.font.pixelSize / 3
|
||||
color: slide.textColor
|
||||
radius: width / 2
|
||||
smooth: true
|
||||
opacity: text.text.length == 0 ? 0 : 1
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Item {
|
||||
id: space
|
||||
width: dot.width * 2
|
||||
width: dot.width * 1.5
|
||||
height: 1
|
||||
color: "#00ffffff"
|
||||
}
|
||||
|
||||
Text {
|
||||
|
Loading…
Reference in New Issue
Block a user