[merge] with upstream

This commit is contained in:
Philip Müller 2020-05-19 16:42:01 +02:00
commit 61496e72fa
45 changed files with 1178 additions and 520 deletions

View File

@ -17,6 +17,7 @@
#include <QSharedMemory> #include <QSharedMemory>
#include <QSharedData> #include <QSharedData>
#include <QBasicTimer> #include <QBasicTimer>
#include <QElapsedTimer>
#include <QTime> #include <QTime>
#include <algorithm> #include <algorithm>
@ -764,7 +765,7 @@ void KDSingleApplicationGuard::Private::create( const QStringList & arguments )
} }
const int maxWaitMSecs = 1000 * 60; // stop waiting after 60 seconds const int maxWaitMSecs = 1000 * 60; // stop waiting after 60 seconds
QTime waitTimer; QElapsedTimer waitTimer;
waitTimer.start(); waitTimer.start();
// lets wait till the other instance initialized the register // lets wait till the other instance initialized the register

22
CHANGES
View File

@ -6,14 +6,28 @@ website will have to do for older versions.
# 3.2.25 (unreleased) # # 3.2.25 (unreleased) #
This release contains contributions from (alphabetically by first name): This release contains contributions from (alphabetically by first name):
- No external contributors yet - Anke Boersma
- FLVAL
- Gaël PORTAY
## Core ## ## Core ##
- No core changes yet - The slideshow in `branding.desc` can be configured with QML (recommended,
as it has been for the past umpteen releases) or with a list of
images (new).
- It is possible to turn off all the new QML code -- navigation, slideshow,
QML-based modules -- with a single `-DWITH_QML=OFF` at CMake time.
This removes QML from Calamares' dependency footprint (but only saves
200kB in Calamares itself).
- Tests have been extended and now support a tests/CMakeTests.txt file
for fine-tuning tests for Python modules.
## Modules ## ## Modules ##
- No module changes yet - The QML based *welcomeq* module is now a viable alternative to the
*welcome*(widgets based) module. Using QML files means it no longer
is needed to have pop-up windows for additional information or warnings,
all loads in the Calamares window itself. Additional features include the
option to customize the *About* info and load files like Release Notes
direct into Calamares, QML files added to the branding directory can be used.
# 3.2.24 (2020-05-11) # # 3.2.24 (2020-05-11) #

View File

@ -50,11 +50,14 @@ set( CALAMARES_VERSION_RC 1 ) # Set to 0 during release cycle, 1 during develop
option( INSTALL_CONFIG "Install configuration files" OFF ) option( INSTALL_CONFIG "Install configuration files" OFF )
option( INSTALL_POLKIT "Install Polkit configuration" ON ) option( INSTALL_POLKIT "Install Polkit configuration" ON )
option( INSTALL_COMPLETION "Install shell completions" OFF ) option( INSTALL_COMPLETION "Install shell completions" OFF )
option( BUILD_TESTING "Build the testing tree." ON ) # Options for the calamares executable
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( WITH_KF5Crash "Enable crash reporting with KCrash." ON ) option( WITH_KF5Crash "Enable crash reporting with KCrash." ON )
option( WITH_KF5DBus "Use DBus service for unique-application." OFF ) option( WITH_KF5DBus "Use DBus service for unique-application." OFF )
# When adding WITH_* that affects the ABI offered by libcalamares,
# also update libcalamares/CalamaresConfig.h.in
option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON )
option( WITH_PYTHONQT "Enable Python view modules API (deprecated, requires PythonQt)." OFF )
option( WITH_QML "Enable QML UI options." ON )
# Possible debugging flags are: # Possible debugging flags are:
# - DEBUG_TIMEZONES draws latitude and longitude lines on the timezone # - DEBUG_TIMEZONES draws latitude and longitude lines on the timezone
@ -159,6 +162,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
) )
endif() endif()
include( CTest )
### C++ SETUP ### C++ SETUP
# #
@ -250,7 +254,10 @@ include( CMakeColors )
### DEPENDENCIES ### DEPENDENCIES
# #
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Concurrent Core Gui Widgets LinguistTools Svg Quick QuickWidgets ) find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Concurrent Core Gui LinguistTools Network Svg Widgets )
if( WITH_QML )
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Quick QuickWidgets )
endif()
if( Qt5_VERSION VERSION_GREATER 5.12.1 ) if( Qt5_VERSION VERSION_GREATER 5.12.1 )
# At least Qt 5.12.2 seems to support Esperanto in QLocale # At least Qt 5.12.2 seems to support Esperanto in QLocale
if( "eo" IN_LIST _tx_incomplete ) if( "eo" IN_LIST _tx_incomplete )
@ -312,10 +319,6 @@ if( NOT KF5DBusAddons_FOUND )
set( WITH_KF5DBus OFF ) set( WITH_KF5DBus OFF )
endif() endif()
if( BUILD_TESTING )
enable_testing()
endif ()
find_package( PythonLibs ${PYTHONLIBS_VERSION} ) find_package( PythonLibs ${PYTHONLIBS_VERSION} )
set_package_properties( set_package_properties(
PythonLibs PROPERTIES PythonLibs PROPERTIES
@ -496,7 +499,11 @@ if ( CALAMARES_VERSION_RC EQUAL 0 )
endif() endif()
# enforce using constBegin, constEnd for const-iterators # enforce using constBegin, constEnd for const-iterators
add_definitions( "-DQT_STRICT_ITERATORS" ) add_definitions(
-DQT_STRICT_ITERATORS
-DQT_SHARED
-DQT_SHAREDPOINTER_TRACK_POINTERS
)
# set paths # set paths
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ) set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )

View File

@ -126,10 +126,10 @@ function( calamares_add_module_subdirectory )
endif() endif()
message( "" ) message( "" )
# We copy over the lang directory, if any # We copy over the lang directory, if any
if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/lang" ) if( IS_DIRECTORY "${_mod_dir}/lang" )
install_calamares_gettext_translations( install_calamares_gettext_translations(
${SUBDIRECTORY} ${SUBDIRECTORY}
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/lang" SOURCE_DIR "${_mod_dir}/lang"
FILENAME ${SUBDIRECTORY}.mo FILENAME ${SUBDIRECTORY}.mo
RENAME calamares-${SUBDIRECTORY}.mo RENAME calamares-${SUBDIRECTORY}.mo
) )
@ -162,6 +162,16 @@ function( calamares_add_module_subdirectory )
# may try to do things to the running system. Needs work to make that a # may try to do things to the running system. Needs work to make that a
# safe thing to do. # safe thing to do.
# #
# If the module has a tests/ subdirectory with *.global and *.job
# files (YAML files holding global and job-configurations for
# testing purposes) then those files are used to drive additional
# tests. The files must be numbered (starting from 1) for this to work;
# 1.global and 1.job together make the configuration for test 1.
#
# If the module has a tests/CMakeLists.txt while it doesn't have its
# own CMakeLists.txt (e.g. a Python module), then the subdirectory
# for tests/ is added on its own.
#
if ( BUILD_TESTING AND _mod_enabled AND _mod_testing ) if ( BUILD_TESTING AND _mod_enabled AND _mod_testing )
add_test( add_test(
NAME load-${SUBDIRECTORY} NAME load-${SUBDIRECTORY}
@ -170,7 +180,7 @@ function( calamares_add_module_subdirectory )
) )
# Try it with the tests/ configurations shipped with the module # Try it with the tests/ configurations shipped with the module
set( _count 1 ) set( _count 1 )
set( _testdir ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/tests ) set( _testdir ${_mod_dir}/tests )
while ( EXISTS "${_testdir}/${_count}.global" OR EXISTS "${_testdir}/${_count}.job" ) while ( EXISTS "${_testdir}/${_count}.global" OR EXISTS "${_testdir}/${_count}.job" )
set( _dash_g "" ) set( _dash_g "" )
set( _dash_j "" ) set( _dash_j "" )
@ -187,5 +197,8 @@ function( calamares_add_module_subdirectory )
) )
math( EXPR _count "${_count} + 1" ) math( EXPR _count "${_count} + 1" )
endwhile() endwhile()
if ( EXISTS ${_testdir}/CMakeTests.txt AND NOT EXISTS ${_mod_dir}/CMakeLists.txt )
include( ${_testdir}/CMakeTests.txt )
endif()
endif() endif()
endfunction() endfunction()

View File

@ -6,17 +6,17 @@
<message> <message>
<location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="71"/> <location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="71"/>
<source>The &lt;strong&gt;boot environment&lt;/strong&gt; of this system.&lt;br&gt;&lt;br&gt;Older x86 systems only support &lt;strong&gt;BIOS&lt;/strong&gt;.&lt;br&gt;Modern systems usually use &lt;strong&gt;EFI&lt;/strong&gt;, but may also show up as BIOS if started in compatibility mode.</source> <source>The &lt;strong&gt;boot environment&lt;/strong&gt; of this system.&lt;br&gt;&lt;br&gt;Older x86 systems only support &lt;strong&gt;BIOS&lt;/strong&gt;.&lt;br&gt;Modern systems usually use &lt;strong&gt;EFI&lt;/strong&gt;, but may also show up as BIOS if started in compatibility mode.</source>
<translation type="unfinished"/> <translation>&lt;strong&gt;محیط بوت&lt;/strong&gt; این سیستم. &lt;br&gt;&lt;br&gt;سیستمهای قدیمی x86 فقط از &lt;strong&gt;بایوس&lt;/strong&gt; پشتیبانی میکنند. &lt;br&gt;سیستمهای مدرن معمولا از &lt;strong&gt;ای.اف.آی&lt;/strong&gt; استفاده میکنند، اما ممکن است در صورتی که در حالت سازگاری اجرا شوند همچنان به صورت بایوس نشان داده شوند </translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="81"/> <location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="81"/>
<source>This system was started with an &lt;strong&gt;EFI&lt;/strong&gt; boot environment.&lt;br&gt;&lt;br&gt;To configure startup from an EFI environment, this installer must deploy a boot loader application, like &lt;strong&gt;GRUB&lt;/strong&gt; or &lt;strong&gt;systemd-boot&lt;/strong&gt; on an &lt;strong&gt;EFI System Partition&lt;/strong&gt;. 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 &lt;strong&gt;EFI&lt;/strong&gt; boot environment.&lt;br&gt;&lt;br&gt;To configure startup from an EFI environment, this installer must deploy a boot loader application, like &lt;strong&gt;GRUB&lt;/strong&gt; or &lt;strong&gt;systemd-boot&lt;/strong&gt; on an &lt;strong&gt;EFI System Partition&lt;/strong&gt;. This is automatic, unless you choose manual partitioning, in which case you must choose it or create it on your own.</source>
<translation type="unfinished"/> <translation>سیستم با محیط بوت &lt;strong&gt;ای.اف.آی&lt;/strong&gt; آغاز شد. &lt;br&gt;&lt;br&gt;به منظور پیکربندی راهاندازی از یک محیط ای.اف.آی، این نصاب باید حتما یک برنامه بالاآورنده بوت، مانند &lt;strong&gt;گراب&lt;/strong&gt; یا &lt;strong&gt;سیستمبوت&lt;/strong&gt; را روی یک پارتیشن سیستم ای.اف.آی مستقر نماید. این به صورت خودکار است مگر اینکه شما پارتیشنبندی دستی را انتخاب کنید که در این صورت باید خودتان انتخاب کنید یا به صورت دستی ایجاد کنید.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="93"/> <location filename="../src/modules/partition/gui/BootInfoWidget.cpp" line="93"/>
<source>This system was started with a &lt;strong&gt;BIOS&lt;/strong&gt; boot environment.&lt;br&gt;&lt;br&gt;To configure startup from a BIOS environment, this installer must install a boot loader, like &lt;strong&gt;GRUB&lt;/strong&gt;, either at the beginning of a partition or on the &lt;strong&gt;Master Boot Record&lt;/strong&gt; 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 &lt;strong&gt;BIOS&lt;/strong&gt; boot environment.&lt;br&gt;&lt;br&gt;To configure startup from a BIOS environment, this installer must install a boot loader, like &lt;strong&gt;GRUB&lt;/strong&gt;, either at the beginning of a partition or on the &lt;strong&gt;Master Boot Record&lt;/strong&gt; 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 type="unfinished"/> <translation>سیستم با محیط بوت &lt;strong&gt;بایوس&lt;/strong&gt; آغاز شد. &lt;br&gt;&lt;br&gt;به منظور پیکربندی راهانداری از یک محیط بایوس، این نصاب باید حتما یک برنامه بالاآورنده بوت، مانند &lt;strong&gt;گراب&lt;/strong&gt; را یا در شروع یک پارتیشن و یا روی &lt;strong&gt;رکورد راهانداز اصلی&lt;/strong&gt; نزدیک شروع جدول پارتیشن (ترجیحا) نصب کند. این به صورت خودکار است مگر اینکه شما پارتیشنبندی دستی را انتخاب کنید که در این صورت باید خودتان به صورت دستی آن را راهاندازی کنید.</translation>
</message> </message>
</context> </context>
<context> <context>
@ -24,27 +24,27 @@
<message> <message>
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="68"/> <location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="68"/>
<source>Master Boot Record of %1</source> <source>Master Boot Record of %1</source>
<translation type="unfinished"/> <translation>رکورد راه انداز اصلی یا همان ام.بی.آر ٪1</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="102"/> <location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="102"/>
<source>Boot Partition</source> <source>Boot Partition</source>
<translation type="unfinished"/> <translation>پارتیشن بوت</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="109"/> <location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="109"/>
<source>System Partition</source> <source>System Partition</source>
<translation type="unfinished"/> <translation>پارتیشن سیستمی</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="139"/> <location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="139"/>
<source>Do not install a boot loader</source> <source>Do not install a boot loader</source>
<translation type="unfinished"/> <translation>بوت لودر نصب نکن.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="157"/> <location filename="../src/modules/partition/core/BootLoaderModel.cpp" line="157"/>
<source>%1 (%2)</source> <source>%1 (%2)</source>
<translation type="unfinished"/> <translation>%1 (%2)</translation>
</message> </message>
</context> </context>
<context> <context>
@ -52,7 +52,7 @@
<message> <message>
<location filename="../src/libcalamaresui/viewpages/BlankViewStep.cpp" line="70"/> <location filename="../src/libcalamaresui/viewpages/BlankViewStep.cpp" line="70"/>
<source>Blank Page</source> <source>Blank Page</source>
<translation type="unfinished"/> <translation>صفحه خالی</translation>
</message> </message>
</context> </context>
<context> <context>
@ -60,58 +60,58 @@
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="14"/> <location filename="../src/calamares/DebugWindow.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="24"/> <location filename="../src/calamares/DebugWindow.ui" line="24"/>
<source>GlobalStorage</source> <source>GlobalStorage</source>
<translation type="unfinished"/> <translation>ذخیرهسازی همگانی</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="34"/> <location filename="../src/calamares/DebugWindow.ui" line="34"/>
<source>JobQueue</source> <source>JobQueue</source>
<translation type="unfinished"/> <translation>صف کارها</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="44"/> <location filename="../src/calamares/DebugWindow.ui" line="44"/>
<source>Modules</source> <source>Modules</source>
<translation type="unfinished"/> <translation>ماژولها</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="57"/> <location filename="../src/calamares/DebugWindow.ui" line="57"/>
<source>Type:</source> <source>Type:</source>
<translation type="unfinished"/> <translation>نوع:</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="64"/> <location filename="../src/calamares/DebugWindow.ui" line="64"/>
<location filename="../src/calamares/DebugWindow.ui" line="78"/> <location filename="../src/calamares/DebugWindow.ui" line="78"/>
<source>none</source> <source>none</source>
<translation type="unfinished"/> <translation>هیچ</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="71"/> <location filename="../src/calamares/DebugWindow.ui" line="71"/>
<source>Interface:</source> <source>Interface:</source>
<translation type="unfinished"/> <translation>رابط:</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="93"/> <location filename="../src/calamares/DebugWindow.ui" line="93"/>
<source>Tools</source> <source>Tools</source>
<translation type="unfinished"/> <translation>ابزارها</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="106"/> <location filename="../src/calamares/DebugWindow.ui" line="106"/>
<source>Reload Stylesheet</source> <source>Reload Stylesheet</source>
<translation type="unfinished"/> <translation>بارگزاری مجدد برگهشیوه </translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.ui" line="113"/> <location filename="../src/calamares/DebugWindow.ui" line="113"/>
<source>Widget Tree</source> <source>Widget Tree</source>
<translation type="unfinished"/> <translation>درخت ابزارکها</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/DebugWindow.cpp" line="231"/> <location filename="../src/calamares/DebugWindow.cpp" line="231"/>
<source>Debug information</source> <source>Debug information</source>
<translation type="unfinished"/> <translation>اطلاعات رفع اشکال</translation>
</message> </message>
</context> </context>
<context> <context>
@ -119,12 +119,12 @@
<message> <message>
<location filename="../src/libcalamaresui/viewpages/ExecutionViewStep.cpp" line="92"/> <location filename="../src/libcalamaresui/viewpages/ExecutionViewStep.cpp" line="92"/>
<source>Set up</source> <source>Set up</source>
<translation type="unfinished"/> <translation>راهاندازی</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/viewpages/ExecutionViewStep.cpp" line="92"/> <location filename="../src/libcalamaresui/viewpages/ExecutionViewStep.cpp" line="92"/>
<source>Install</source> <source>Install</source>
<translation type="unfinished"/> <translation>نصب</translation>
</message> </message>
</context> </context>
<context> <context>
@ -132,12 +132,12 @@
<message> <message>
<location filename="../src/libcalamares/JobExample.cpp" line="39"/> <location filename="../src/libcalamares/JobExample.cpp" line="39"/>
<source>Job failed (%1)</source> <source>Job failed (%1)</source>
<translation type="unfinished"/> <translation>کار شکست خورد. (%1)</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/JobExample.cpp" line="40"/> <location filename="../src/libcalamares/JobExample.cpp" line="40"/>
<source>Programmed job failure was explicitly requested.</source> <source>Programmed job failure was explicitly requested.</source>
<translation type="unfinished"/> <translation>عدم موفقیت کار برنامه ریزی شده به صورت صریح درخواست شد</translation>
</message> </message>
</context> </context>
<context> <context>
@ -145,7 +145,7 @@
<message> <message>
<location filename="../src/libcalamares/JobQueue.cpp" line="114"/> <location filename="../src/libcalamares/JobQueue.cpp" line="114"/>
<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="27"/> <location filename="../src/libcalamares/JobExample.cpp" line="27"/>
<source>Example job (%1)</source> <source>Example job (%1)</source>
<translation type="unfinished"/> <translation>کار نمونه (%1) </translation>
</message> </message>
</context> </context>
<context> <context>
@ -161,17 +161,17 @@
<message> <message>
<location filename="../src/libcalamares/ProcessJob.cpp" line="52"/> <location filename="../src/libcalamares/ProcessJob.cpp" line="52"/>
<source>Run command '%1' in target system.</source> <source>Run command '%1' in target system.</source>
<translation type="unfinished"/> <translation>دستور '%1' را در سیستم هدف اجرا کنید</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/ProcessJob.cpp" line="52"/> <location filename="../src/libcalamares/ProcessJob.cpp" line="52"/>
<source> Run command '%1'.</source> <source> Run command '%1'.</source>
<translation type="unfinished"/> <translation>دستور '%1' را اجرا کنید</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/ProcessJob.cpp" line="59"/> <location filename="../src/libcalamares/ProcessJob.cpp" line="59"/>
<source>Running command %1 %2</source> <source>Running command %1 %2</source>
<translation type="unfinished"/> <translation>اجرای دستور %1 %2</translation>
</message> </message>
</context> </context>
<context> <context>
@ -179,32 +179,32 @@
<message> <message>
<location filename="../src/libcalamares/PythonJob.cpp" line="210"/> <location filename="../src/libcalamares/PythonJob.cpp" line="210"/>
<source>Running %1 operation.</source> <source>Running %1 operation.</source>
<translation type="unfinished"/> <translation>اجرا عملیات %1</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/PythonJob.cpp" line="239"/> <location filename="../src/libcalamares/PythonJob.cpp" line="239"/>
<source>Bad working directory path</source> <source>Bad working directory path</source>
<translation type="unfinished"/> <translation>مسیر شاخه جاری نامناسب</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/PythonJob.cpp" line="240"/> <location filename="../src/libcalamares/PythonJob.cpp" line="240"/>
<source>Working directory %1 for python job %2 is not readable.</source> <source>Working directory %1 for python job %2 is not readable.</source>
<translation type="unfinished"/> <translation>شاخه جاری %1 برای کار پایتونی %2 خواندنی نیست</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/PythonJob.cpp" line="246"/> <location filename="../src/libcalamares/PythonJob.cpp" line="246"/>
<source>Bad main script file</source> <source>Bad main script file</source>
<translation type="unfinished"/> <translation>اسکریپت اصلی مشکلدار</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/PythonJob.cpp" line="247"/> <location filename="../src/libcalamares/PythonJob.cpp" line="247"/>
<source>Main script file %1 for python job %2 is not readable.</source> <source>Main script file %1 for python job %2 is not readable.</source>
<translation type="unfinished"/> <translation>فایل اسکریپت اصلی %1 برای کار پایتون %2 قابل خواندن نیست.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/PythonJob.cpp" line="315"/> <location filename="../src/libcalamares/PythonJob.cpp" line="315"/>
<source>Boost.Python error in job "%1".</source> <source>Boost.Python error in job "%1".</source>
<translation type="unfinished"/> <translation>Boost.Python error in job "%1".</translation>
</message> </message>
</context> </context>
<context> <context>
@ -212,17 +212,17 @@
<message> <message>
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="76"/> <location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="76"/>
<source>Loading ...</source> <source>Loading ...</source>
<translation type="unfinished"/> <translation>در حال بارگذاری ...</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="97"/> <location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="97"/>
<source>QML Step &lt;i&gt;%1&lt;/i&gt;.</source> <source>QML Step &lt;i&gt;%1&lt;/i&gt;.</source>
<translation type="unfinished"/> <translation>مرحله QML &lt;i&gt;%1&lt;/i&gt;.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="261"/> <location filename="../src/libcalamaresui/viewpages/QmlViewStep.cpp" line="261"/>
<source>Loading failed.</source> <source>Loading failed.</source>
<translation type="unfinished"/> <translation>بارگذاری شکست خورد.</translation>
</message> </message>
</context> </context>
<context> <context>
@ -230,9 +230,9 @@
<message numerus="yes"> <message numerus="yes">
<location filename="../src/libcalamares/modulesystem/RequirementsChecker.cpp" line="164"/> <location filename="../src/libcalamares/modulesystem/RequirementsChecker.cpp" line="164"/>
<source>Waiting for %n module(s).</source> <source>Waiting for %n module(s).</source>
<translation type="unfinished"> <translation>
<numerusform/> <numerusform>منتظر ماندن برای n% ماژول</numerusform>
<numerusform/> <numerusform>منتظر ماندن برای n% ماژول (ها).</numerusform>
</translation> </translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
@ -246,7 +246,7 @@
<message> <message>
<location filename="../src/libcalamares/modulesystem/RequirementsChecker.cpp" line="170"/> <location filename="../src/libcalamares/modulesystem/RequirementsChecker.cpp" line="170"/>
<source>System-requirements checking is complete.</source> <source>System-requirements checking is complete.</source>
<translation type="unfinished"/> <translation>چک کردن نیازمندیهای سیستم تمام شد.</translation>
</message> </message>
</context> </context>
<context> <context>
@ -254,171 +254,173 @@
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="153"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="153"/>
<source>Setup Failed</source> <source>Setup Failed</source>
<translation type="unfinished"/> <translation>راهاندازی شکست خورد.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="153"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="153"/>
<source>Installation Failed</source> <source>Installation Failed</source>
<translation type="unfinished"/> <translation>نصب شکست خورد. </translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="154"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="154"/>
<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 type="unfinished"/> <translation>آیا مایلید که گزارشها در وب الصاق شوند؟</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="167"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="167"/>
<source>Error</source> <source>Error</source>
<translation type="unfinished"/> <translation>خطا</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="174"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="174"/>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="518"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="518"/>
<source>&amp;Yes</source> <source>&amp;Yes</source>
<translation type="unfinished"/> <translation>&amp;بله</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="175"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="175"/>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="519"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="519"/>
<source>&amp;No</source> <source>&amp;No</source>
<translation type="unfinished"/> <translation>&amp;خیر</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="181"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="181"/>
<source>&amp;Close</source> <source>&amp;Close</source>
<translation type="unfinished"/> <translation>&amp;بسته</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="192"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="192"/>
<source>Install Log Paste URL</source> <source>Install Log Paste URL</source>
<translation type="unfinished"/> <translation>Install Log Paste URL</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="195"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="195"/>
<source>The upload was unsuccessful. No web-paste was done.</source> <source>The upload was unsuccessful. No web-paste was done.</source>
<translation type="unfinished"/> <translation>The upload was unsuccessful. No web-paste was done.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="211"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="211"/>
<source>Calamares Initialization Failed</source> <source>Calamares Initialization Failed</source>
<translation type="unfinished"/> <translation>راه اندازی کالاماریس شکست خورد.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="212"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="212"/>
<source>%1 can not be installed. Calamares was unable to load all of the configured modules. This is a problem with the way Calamares is being used by the distribution.</source> <source>%1 can not be installed. Calamares was unable to load all of the configured modules. This is a problem with the way Calamares is being used by the distribution.</source>
<translation type="unfinished"/> <translation>%1 نمیتواند نصب شود. کالاماریس نمیتواند همه ماژولهای پیکربندی را بالا بیاورد. این یک مشکل در نحوه استفاده کالاماریس توسط توزیع است.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="218"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="218"/>
<source>&lt;br/&gt;The following modules could not be loaded:</source> <source>&lt;br/&gt;The following modules could not be loaded:</source>
<translation type="unfinished"/> <translation>&lt;br/&gt;این ماژول نمیتواند بالا بیاید:</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="328"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="328"/>
<source>Continue with setup?</source> <source>Continue with setup?</source>
<translation type="unfinished"/> <translation>راه اندازی ادامه یابد؟</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="328"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="328"/>
<source>Continue with installation?</source> <source>Continue with installation?</source>
<translation type="unfinished"/> <translation>نصب ادامه یابد؟</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="330"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="330"/>
<source>The %1 setup program is about to make changes to your disk in order to set up %2.&lt;br/&gt;&lt;strong&gt;You will not be able to undo these changes.&lt;/strong&gt;</source> <source>The %1 setup program is about to make changes to your disk in order to set up %2.&lt;br/&gt;&lt;strong&gt;You will not be able to undo these changes.&lt;/strong&gt;</source>
<translation type="unfinished"/> <translation>برنامه نصب %1 در شرف ایجاد تغییرات در دیسک شما به منظور راهاندازی %2 است. &lt;br/&gt;&lt;strong&gt;شما قادر نخواهید بود تا این تغییرات را برگردانید.&lt;/strong&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="333"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="333"/>
<source>The %1 installer is about to make changes to your disk in order to install %2.&lt;br/&gt;&lt;strong&gt;You will not be able to undo these changes.&lt;/strong&gt;</source> <source>The %1 installer is about to make changes to your disk in order to install %2.&lt;br/&gt;&lt;strong&gt;You will not be able to undo these changes.&lt;/strong&gt;</source>
<translation type="unfinished"/> <translation>نصاب %1 در شرف ایجاد تغییرات در دیسک شما به منظور نصب %2 است. &lt;br/&gt;&lt;strong&gt;شما قادر نخواهید بود تا این تغییرات را برگردانید.&lt;/strong&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="336"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="336"/>
<source>&amp;Set up now</source> <source>&amp;Set up now</source>
<translation type="unfinished"/> <translation>&amp;همین حالا راهانداری کنید</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="336"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="336"/>
<source>&amp;Install now</source> <source>&amp;Install now</source>
<translation type="unfinished"/> <translation>&amp;همین حالا نصب کنید</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="343"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="343"/>
<source>Go &amp;back</source> <source>Go &amp;back</source>
<translation type="unfinished"/> <translation>برگردید به &amp;عقب</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="392"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="392"/>
<source>&amp;Set up</source> <source>&amp;Set up</source>
<translation type="unfinished"/> <translation>&amp;راهاندازی</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="392"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="392"/>
<source>&amp;Install</source> <source>&amp;Install</source>
<translation type="unfinished"/> <translation>&amp;نصب</translation>
</message> </message>
<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"/>
<source>The installation is complete. Close the installer.</source> <source>The installation is complete. Close the installer.</source>
<translation type="unfinished"/> <translation>نصب انجام شد. نصاب را ببندید.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="397"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="397"/>
<source>Cancel setup without changing the system.</source> <source>Cancel setup without changing the system.</source>
<translation type="unfinished"/> <translation>لغو راهاندازی بدون تغییر سیستم.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="398"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="398"/>
<source>Cancel installation without changing the system.</source> <source>Cancel installation without changing the system.</source>
<translation type="unfinished"/> <translation>لغو نصب بدون تغییر کردن سیستم.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="408"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="408"/>
<source>&amp;Next</source> <source>&amp;Next</source>
<translation type="unfinished"/> <translation>&amp;بعدی</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="413"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="413"/>
<source>&amp;Back</source> <source>&amp;Back</source>
<translation type="unfinished"/> <translation>&amp;قبلی</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="419"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="419"/>
<source>&amp;Done</source> <source>&amp;Done</source>
<translation type="unfinished"/> <translation>&amp;انجام شد</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="438"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="438"/>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished"/> <translation>&amp;لغو</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="511"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="511"/>
<source>Cancel setup?</source> <source>Cancel setup?</source>
<translation type="unfinished"/> <translation>لغو راهاندازی؟</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="511"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="511"/>
<source>Cancel installation?</source> <source>Cancel installation?</source>
<translation type="unfinished"/> <translation>لغو نصب؟</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="512"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="512"/>
<source>Do you really want to cancel the current setup process? <source>Do you really want to cancel the current setup process?
The setup program will quit and all changes will be lost.</source> The setup program will quit and all changes will be lost.</source>
<translation type="unfinished"/> <translation>آیا واقعا میخواهید روند راهاندازی فعلی رو لغو کنید؟
برنامه راه اندازی ترک می شود و همه تغییرات از بین می روند.</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="514"/> <location filename="../src/libcalamaresui/ViewManager.cpp" line="514"/>
<source>Do you really want to cancel the current install process? <source>Do you really want to cancel the current install process?
The installer will quit and all changes will be lost.</source> The installer will quit and all changes will be lost.</source>
<translation type="unfinished"/> <translation>آیا واقعاً می خواهید روند نصب فعلی را لغو کنید؟
نصاب ترک می شود و همه تغییرات از بین می روند.</translation>
</message> </message>
</context> </context>
<context> <context>
@ -426,22 +428,22 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/libcalamares/PythonHelper.cpp" line="297"/> <location filename="../src/libcalamares/PythonHelper.cpp" line="297"/>
<source>Unknown exception type</source> <source>Unknown exception type</source>
<translation type="unfinished"/> <translation>نوع ناشناخته استثنا</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/PythonHelper.cpp" line="315"/> <location filename="../src/libcalamares/PythonHelper.cpp" line="315"/>
<source>unparseable Python error</source> <source>unparseable Python error</source>
<translation type="unfinished"/> <translation>unparseable Python error</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/PythonHelper.cpp" line="359"/> <location filename="../src/libcalamares/PythonHelper.cpp" line="359"/>
<source>unparseable Python traceback</source> <source>unparseable Python traceback</source>
<translation type="unfinished"/> <translation>unparseable Python traceback</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/PythonHelper.cpp" line="366"/> <location filename="../src/libcalamares/PythonHelper.cpp" line="366"/>
<source>Unfetchable Python error.</source> <source>Unfetchable Python error.</source>
<translation type="unfinished"/> <translation>Unfetchable Python error.</translation>
</message> </message>
</context> </context>
<context> <context>
@ -450,7 +452,8 @@ The installer will quit and all changes will be lost.</source>
<location filename="../src/libcalamaresui/utils/Paste.cpp" line="34"/> <location filename="../src/libcalamaresui/utils/Paste.cpp" line="34"/>
<source>Install log posted to: <source>Install log posted to:
%1</source> %1</source>
<translation type="unfinished"/> <translation>نصب رخدادهای ارسال شده به:
%1</translation>
</message> </message>
</context> </context>
<context> <context>
@ -458,32 +461,32 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/calamares/CalamaresWindow.cpp" line="106"/> <location filename="../src/calamares/CalamaresWindow.cpp" line="106"/>
<source>Show debug information</source> <source>Show debug information</source>
<translation type="unfinished"/> <translation>نمایش اطلاعات دیباگ</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/CalamaresWindow.cpp" line="172"/> <location filename="../src/calamares/CalamaresWindow.cpp" line="172"/>
<source>&amp;Back</source> <source>&amp;Back</source>
<translation type="unfinished"/> <translation>&amp;قبلی</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/CalamaresWindow.cpp" line="184"/> <location filename="../src/calamares/CalamaresWindow.cpp" line="184"/>
<source>&amp;Next</source> <source>&amp;Next</source>
<translation type="unfinished"/> <translation>&amp;بعدی</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/CalamaresWindow.cpp" line="197"/> <location filename="../src/calamares/CalamaresWindow.cpp" line="197"/>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished"/> <translation>&amp;لغو</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/CalamaresWindow.cpp" line="281"/> <location filename="../src/calamares/CalamaresWindow.cpp" line="281"/>
<source>%1 Setup Program</source> <source>%1 Setup Program</source>
<translation type="unfinished"/> <translation>%1 برنامه راهاندازی</translation>
</message> </message>
<message> <message>
<location filename="../src/calamares/CalamaresWindow.cpp" line="282"/> <location filename="../src/calamares/CalamaresWindow.cpp" line="282"/>
<source>%1 Installer</source> <source>%1 Installer</source>
<translation type="unfinished"/> <translation>%1 نصاب</translation>
</message> </message>
</context> </context>
<context> <context>
@ -491,7 +494,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/welcome/checker/CheckerContainer.cpp" line="46"/> <location filename="../src/modules/welcome/checker/CheckerContainer.cpp" line="46"/>
<source>Gathering system information...</source> <source>Gathering system information...</source>
<translation type="unfinished"/> <translation>جمعآوری اطلاعات سیستم...</translation>
</message> </message>
</context> </context>
<context> <context>
@ -499,12 +502,12 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.ui" line="14"/> <location filename="../src/modules/partition/gui/ChoicePage.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="156"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="156"/>
<source>Select storage de&amp;vice:</source> <source>Select storage de&amp;vice:</source>
<translation type="unfinished"/> <translation>انتخاب &amp;دستگاه ذخیرهسازی:</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="157"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="157"/>
@ -512,62 +515,62 @@ The installer will quit and all changes will be lost.</source>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1002"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1002"/>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1088"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1088"/>
<source>Current:</source> <source>Current:</source>
<translation type="unfinished"/> <translation>فعلی:</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="158"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="158"/>
<source>After:</source> <source>After:</source>
<translation type="unfinished"/> <translation>بعد از:</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="334"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="334"/>
<source>&lt;strong&gt;Manual partitioning&lt;/strong&gt;&lt;br/&gt;You can create or resize partitions yourself. Having a GPT partition table and &lt;strong&gt;fat32 512Mb /boot partition is a must for UEFI installs&lt;/strong&gt;, either use an existing without formatting or create one.</source> <source>&lt;strong&gt;Manual partitioning&lt;/strong&gt;&lt;br/&gt;You can create or resize partitions yourself. Having a GPT partition table and &lt;strong&gt;fat32 512Mb /boot partition is a must for UEFI installs&lt;/strong&gt;, either use an existing without formatting or create one.</source>
<translation type="unfinished"/> <translation>&lt;strong&gt;پارتیشنبندی دستی&lt;/strong&gt;&lt;br/&gt;شما میتوانید خودتان پارتیشنها را بسازید و یا تغییر سایز دهید. با داشتن یک جدول پارتیشن GPT و &lt;strong&gt;پارتیشن /boot با اندازه 512 مگابیتی fat32 برای نصبهای UEFI الزامی است&lt;/strong&gt;، چه با استفاده از نمونه موجود آن بدون قالببندی یا ساخت آن.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="833"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="833"/>
<source>Reuse %1 as home partition for %2.</source> <source>Reuse %1 as home partition for %2.</source>
<translation type="unfinished"/> <translation>استفاده مجدد از %1 به عنوان پارتیشن خانه برای %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"/>
<source>&lt;strong&gt;Select a partition to shrink, then drag the bottom bar to resize&lt;/strong&gt;</source> <source>&lt;strong&gt;Select a partition to shrink, then drag the bottom bar to resize&lt;/strong&gt;</source>
<translation type="unfinished"/> <translation>&lt;strong&gt;انتخاب یک پارتیشن برای کوجک کردن و ایجاد پارتیشن جدید از آن، سپس نوار دکمه را بکشید تا تغییر اندازه دهد&lt;/strong&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="973"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="973"/>
<source>%1 will be shrunk to %2MiB and a new %3MiB partition will be created for %4.</source> <source>%1 will be shrunk to %2MiB and a new %3MiB partition will be created for %4.</source>
<translation type="unfinished"/> <translation>%1 تغییر سایز خواهد داد به %2 مبیبایت و یک پارتیشن %3 مبیبایتی برای %4 ساخته خواهد شد.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1030"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1030"/>
<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="1079"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1079"/>
<source>&lt;strong&gt;Select a partition to install on&lt;/strong&gt;</source> <source>&lt;strong&gt;Select a partition to install on&lt;/strong&gt;</source>
<translation type="unfinished"/> <translation>&lt;strong&gt;یک پارتیشن را برای نصب بر روی آن، انتخاب کنید&lt;/strong&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1135"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1135"/>
<source>An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1.</source> <source>An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1.</source>
<translation type="unfinished"/> <translation>پارتیشن سیستم ای.اف.آی نمیتواند در هیچ جایی از این سیستم یافت شود. لطفا برگردید و از پارتیشن بندی دستی استفاده کنید تا %1 را راهاندازی کنید.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1144"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1144"/>
<source>The EFI system partition at %1 will be used for starting %2.</source> <source>The EFI system partition at %1 will be used for starting %2.</source>
<translation type="unfinished"/> <translation>پارتیشن سیستم ای.اف.آی در %1 برای شروع %2 استفاده خواهد شد.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1152"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1152"/>
<source>EFI system partition:</source> <source>EFI system partition:</source>
<translation type="unfinished"/> <translation>پارتیشن سیستم ای.اف.آی</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1270"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1270"/>
<source>This storage device does not seem to have an operating system on it. What would you like to do?&lt;br/&gt;You will be able to review and confirm your choices before any change is made to the storage device.</source> <source>This storage device does not seem to have an operating system on it. What would you like to do?&lt;br/&gt;You will be able to review and confirm your choices before any change is made to the storage device.</source>
<translation type="unfinished"/> <translation>به نظر میرسد در دستگاه ذخیرهسازی هیچ سیستمعاملی وجود ندارد. تمایل به انجام چه کاری دارید؟&lt;br/&gt;شما میتوانید انتخابهایتان را قبل از اعمال هر تغییری در دستگاه ذخیرهسازی، مرور و تأیید نمایید.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1275"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1275"/>
@ -575,7 +578,7 @@ The installer will quit and all changes will be lost.</source>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1336"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1336"/>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1362"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1362"/>
<source>&lt;strong&gt;Erase disk&lt;/strong&gt;&lt;br/&gt;This will &lt;font color="red"&gt;delete&lt;/font&gt; all data currently present on the selected storage device.</source> <source>&lt;strong&gt;Erase disk&lt;/strong&gt;&lt;br/&gt;This will &lt;font color="red"&gt;delete&lt;/font&gt; all data currently present on the selected storage device.</source>
<translation type="unfinished"/> <translation>&lt;strong&gt;پاک کردن دیسک&lt;/strong&gt;&lt;br/&gt;این کار تمام دادههای موجود بر روی دستگاه ذخیرهسازی انتخاب شده را &lt;font color="red"&gt;حذف میکند&lt;/font&gt;.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1279"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1279"/>
@ -583,7 +586,7 @@ The installer will quit and all changes will be lost.</source>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1332"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1332"/>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1358"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1358"/>
<source>&lt;strong&gt;Install alongside&lt;/strong&gt;&lt;br/&gt;The installer will shrink a partition to make room for %1.</source> <source>&lt;strong&gt;Install alongside&lt;/strong&gt;&lt;br/&gt;The installer will shrink a partition to make room for %1.</source>
<translation type="unfinished"/> <translation>&lt;strong&gt;نصب در امتداد&lt;/strong&gt;&lt;br/&gt;این نصاب از یک پارتیشن برای ساخت یک اتاق برای %1 استفاده میکند.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1283"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1283"/>
@ -611,7 +614,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1507"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1507"/>
<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="1512"/> <location filename="../src/modules/partition/gui/ChoicePage.cpp" line="1512"/>
@ -1097,13 +1100,13 @@ The installer will quit and all changes will be lost.</source>
<location filename="../src/modules/partition/core/DeviceModel.cpp" line="93"/> <location filename="../src/modules/partition/core/DeviceModel.cpp" line="93"/>
<source>%1 - %2 (%3)</source> <source>%1 - %2 (%3)</source>
<extracomment>device[name] - size[number] (device-node[name])</extracomment> <extracomment>device[name] - size[number] (device-node[name])</extracomment>
<translation type="unfinished"/> <translation>%1 - %2 (%3)</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/core/DeviceModel.cpp" line="104"/> <location filename="../src/modules/partition/core/DeviceModel.cpp" line="104"/>
<source>%1 - (%2)</source> <source>%1 - (%2)</source>
<extracomment>device[name] - (device-node[name])</extracomment> <extracomment>device[name] - (device-node[name])</extracomment>
<translation type="unfinished"/> <translation>%1 - (%2)</translation>
</message> </message>
</context> </context>
<context> <context>
@ -1111,7 +1114,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/dracutlukscfg/DracutLuksCfgJob.cpp" line="136"/> <location filename="../src/modules/dracutlukscfg/DracutLuksCfgJob.cpp" line="136"/>
<source>Write LUKS configuration for Dracut to %1</source> <source>Write LUKS configuration for Dracut to %1</source>
<translation type="unfinished"/> <translation>Write LUKS configuration for Dracut to %1</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/dracutlukscfg/DracutLuksCfgJob.cpp" line="140"/> <location filename="../src/modules/dracutlukscfg/DracutLuksCfgJob.cpp" line="140"/>
@ -1195,7 +1198,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="14"/> <location filename="../src/modules/partition/gui/EncryptWidget.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="32"/> <location filename="../src/modules/partition/gui/EncryptWidget.ui" line="32"/>
@ -1261,7 +1264,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/finished/FinishedPage.ui" line="14"/> <location filename="../src/modules/finished/FinishedPage.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/finished/FinishedPage.ui" line="98"/> <location filename="../src/modules/finished/FinishedPage.ui" line="98"/>
@ -1543,7 +1546,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="63"/> <location filename="../src/modules/locale/LCLocaleDialog.cpp" line="63"/>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished"/> <translation>&amp;لغو</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="64"/> <location filename="../src/modules/locale/LCLocaleDialog.cpp" line="64"/>
@ -1556,7 +1559,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/license/LicensePage.ui" line="14"/> <location filename="../src/modules/license/LicensePage.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/license/LicensePage.ui" line="22"/> <location filename="../src/modules/license/LicensePage.ui" line="22"/>
@ -2157,7 +2160,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/packagechooser/page_package.ui" line="20"/> <location filename="../src/modules/packagechooser/page_package.ui" line="20"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/packagechooser/page_package.ui" line="40"/> <location filename="../src/modules/packagechooser/page_package.ui" line="40"/>
@ -2198,7 +2201,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/netinstall/PackageModel.cpp" line="176"/> <location filename="../src/modules/netinstall/PackageModel.cpp" line="176"/>
<source>Name</source> <source>Name</source>
<translation type="unfinished"/> <translation>نام</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/netinstall/PackageModel.cpp" line="176"/> <location filename="../src/modules/netinstall/PackageModel.cpp" line="176"/>
@ -2211,7 +2214,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/keyboard/KeyboardPage.ui" line="14"/> <location filename="../src/modules/keyboard/KeyboardPage.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/keyboard/KeyboardPage.ui" line="70"/> <location filename="../src/modules/keyboard/KeyboardPage.ui" line="70"/>
@ -2229,7 +2232,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/users/page_usersetup.ui" line="14"/> <location filename="../src/modules/users/page_usersetup.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/users/page_usersetup.ui" line="36"/> <location filename="../src/modules/users/page_usersetup.ui" line="36"/>
@ -2326,43 +2329,43 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="197"/> <location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="197"/>
<source>Root</source> <source>Root</source>
<translation type="unfinished"/> <translation>ریشه</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="200"/> <location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="200"/>
<source>Home</source> <source>Home</source>
<translation type="unfinished"/> <translation>خانه</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="202"/> <location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="202"/>
<source>Boot</source> <source>Boot</source>
<translation type="unfinished"/> <translation>بوت</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="205"/> <location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="205"/>
<source>EFI system</source> <source>EFI system</source>
<translation type="unfinished"/> <translation>سیستم ای.اف.آی</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="207"/> <location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="207"/>
<source>Swap</source> <source>Swap</source>
<translation type="unfinished"/> <translation>Swap</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="209"/> <location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="209"/>
<source>New partition for %1</source> <source>New partition for %1</source>
<translation type="unfinished"/> <translation>پارتیشن جدید برای %1</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="211"/> <location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="211"/>
<source>New partition</source> <source>New partition</source>
<translation type="unfinished"/> <translation>پارتیشن جدید</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="230"/> <location filename="../src/modules/partition/gui/PartitionLabelsView.cpp" line="230"/>
<source>%1 %2</source> <source>%1 %2</source>
<extracomment>size[number] filesystem[name]</extracomment> <extracomment>size[number] filesystem[name]</extracomment>
<translation type="unfinished"/> <translation>%1 %2</translation>
</message> </message>
</context> </context>
<context> <context>
@ -2371,23 +2374,23 @@ The installer will quit and all changes will be lost.</source>
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="168"/> <location filename="../src/modules/partition/core/PartitionModel.cpp" line="168"/>
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="208"/> <location filename="../src/modules/partition/core/PartitionModel.cpp" line="208"/>
<source>Free Space</source> <source>Free Space</source>
<translation type="unfinished"/> <translation>فضای خالی</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="172"/> <location filename="../src/modules/partition/core/PartitionModel.cpp" line="172"/>
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="212"/> <location filename="../src/modules/partition/core/PartitionModel.cpp" line="212"/>
<source>New partition</source> <source>New partition</source>
<translation type="unfinished"/> <translation>پارتیشن جدید</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="305"/> <location filename="../src/modules/partition/core/PartitionModel.cpp" line="305"/>
<source>Name</source> <source>Name</source>
<translation type="unfinished"/> <translation>نام</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="307"/> <location filename="../src/modules/partition/core/PartitionModel.cpp" line="307"/>
<source>File System</source> <source>File System</source>
<translation type="unfinished"/> <translation>سیستم فایل</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/core/PartitionModel.cpp" line="309"/> <location filename="../src/modules/partition/core/PartitionModel.cpp" line="309"/>
@ -2405,7 +2408,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="14"/> <location filename="../src/modules/partition/gui/PartitionPage.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="22"/> <location filename="../src/modules/partition/gui/PartitionPage.ui" line="22"/>
@ -2483,32 +2486,32 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="77"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="77"/>
<source>Gathering system information...</source> <source>Gathering system information...</source>
<translation type="unfinished"/> <translation>جمعآوری اطلاعات سیستم...</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="131"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="131"/>
<source>Partitions</source> <source>Partitions</source>
<translation type="unfinished"/> <translation>پارتیشنها</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="168"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="168"/>
<source>Install %1 &lt;strong&gt;alongside&lt;/strong&gt; another operating system.</source> <source>Install %1 &lt;strong&gt;alongside&lt;/strong&gt; another operating system.</source>
<translation type="unfinished"/> <translation>نصب %1 &lt;strong&gt;در امتداد&lt;/strong&gt; سیستم عامل دیگر.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="173"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="173"/>
<source>&lt;strong&gt;Erase&lt;/strong&gt; disk and install %1.</source> <source>&lt;strong&gt;Erase&lt;/strong&gt; disk and install %1.</source>
<translation type="unfinished"/> <translation>&lt;strong&gt;پاک کردن&lt;/strong&gt; دیسک و نصب %1.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="177"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="177"/>
<source>&lt;strong&gt;Replace&lt;/strong&gt; a partition with %1.</source> <source>&lt;strong&gt;Replace&lt;/strong&gt; a partition with %1.</source>
<translation type="unfinished"/> <translation>&lt;strong&gt;جایگزینی&lt;/strong&gt; یک پارتیشن و با %1</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="181"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="181"/>
<source>&lt;strong&gt;Manual&lt;/strong&gt; partitioning.</source> <source>&lt;strong&gt;Manual&lt;/strong&gt; partitioning.</source>
<translation type="unfinished"/> <translation>&lt;strong&gt;پارتیشنبندی&lt;/strong&gt; دستی.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="194"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="194"/>
@ -2538,12 +2541,12 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="249"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="249"/>
<source>Current:</source> <source>Current:</source>
<translation type="unfinished"/> <translation>فعلی:</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="266"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="266"/>
<source>After:</source> <source>After:</source>
<translation type="unfinished"/> <translation>بعد از:</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="432"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="432"/>
@ -2578,7 +2581,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="502"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="502"/>
<source>Boot partition not encrypted</source> <source>Boot partition not encrypted</source>
<translation type="unfinished"/> <translation>پارتیشن بوت رمزشده نیست</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="503"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="503"/>
@ -2593,7 +2596,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="721"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="721"/>
<source>There are no partitions to install on.</source> <source>There are no partitions to install on.</source>
<translation type="unfinished"/> <translation>هیچ پارتیشنی برای نصب وجود ندارد</translation>
</message> </message>
</context> </context>
<context> <context>
@ -2615,7 +2618,7 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/plasmalnf/page_plasmalnf.ui" line="14"/> <location filename="../src/modules/plasmalnf/page_plasmalnf.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/plasmalnf/PlasmaLnfPage.cpp" line="70"/> <location filename="../src/modules/plasmalnf/PlasmaLnfPage.cpp" line="70"/>
@ -2667,7 +2670,7 @@ There was no output from the command.</source>
<source> <source>
Output: Output:
</source> </source>
<translation type="unfinished"/> <translation>خروجی</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/utils/CalamaresUtilsSystem.cpp" line="423"/> <location filename="../src/libcalamares/utils/CalamaresUtilsSystem.cpp" line="423"/>
@ -2725,7 +2728,7 @@ Output:
<message> <message>
<location filename="../src/libcalamares/locale/Label.cpp" line="37"/> <location filename="../src/libcalamares/locale/Label.cpp" line="37"/>
<source>%1 (%2)</source> <source>%1 (%2)</source>
<translation type="unfinished"/> <translation>%1 (%2)</translation>
</message> </message>
<message> <message>
<location filename="../src/libcalamares/modulesystem/RequirementsChecker.cpp" line="63"/> <location filename="../src/libcalamares/modulesystem/RequirementsChecker.cpp" line="63"/>
@ -2834,7 +2837,7 @@ Output:
<message> <message>
<location filename="../src/modules/partition/gui/ReplaceWidget.ui" line="14"/> <location filename="../src/modules/partition/gui/ReplaceWidget.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="139"/> <location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="139"/>
@ -2896,12 +2899,12 @@ Output:
<message> <message>
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="275"/> <location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="275"/>
<source>The EFI system partition at %1 will be used for starting %2.</source> <source>The EFI system partition at %1 will be used for starting %2.</source>
<translation type="unfinished"/> <translation>پارتیشن سیستم ای.اف.آی در %1 برای شروع %2 استفاده خواهد شد.</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="291"/> <location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="291"/>
<source>EFI system partition:</source> <source>EFI system partition:</source>
<translation type="unfinished"/> <translation>پارتیشن سیستم ای.اف.آی</translation>
</message> </message>
</context> </context>
<context> <context>
@ -3396,7 +3399,7 @@ Output:
<message> <message>
<location filename="../src/modules/tracking/page_trackingstep.ui" line="14"/> <location filename="../src/modules/tracking/page_trackingstep.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/tracking/page_trackingstep.ui" line="24"/> <location filename="../src/modules/tracking/page_trackingstep.ui" line="24"/>
@ -3569,7 +3572,7 @@ Output:
<message> <message>
<location filename="../src/modules/welcome/WelcomePage.ui" line="14"/> <location filename="../src/modules/welcome/WelcomePage.ui" line="14"/>
<source>Form</source> <source>Form</source>
<translation type="unfinished"/> <translation>فرم</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/welcome/WelcomePage.ui" line="75"/> <location filename="../src/modules/welcome/WelcomePage.ui" line="75"/>

View File

@ -2558,12 +2558,12 @@ The installer will quit and all changes will be lost.</source>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="433"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="433"/>
<source>An EFI system partition is necessary to start %1.&lt;br/&gt;&lt;br/&gt;To configure an EFI system partition, go back and select or create a FAT32 filesystem with the &lt;strong&gt;%3&lt;/strong&gt; flag enabled and mount point &lt;strong&gt;%2&lt;/strong&gt;.&lt;br/&gt;&lt;br/&gt;You can continue without setting up an EFI system partition but your system may fail to start.</source> <source>An EFI system partition is necessary to start %1.&lt;br/&gt;&lt;br/&gt;To configure an EFI system partition, go back and select or create a FAT32 filesystem with the &lt;strong&gt;%3&lt;/strong&gt; flag enabled and mount point &lt;strong&gt;%2&lt;/strong&gt;.&lt;br/&gt;&lt;br/&gt;You can continue without setting up an EFI system partition but your system may fail to start.</source>
<translation type="unfinished"/> <translation> EFI %1 &lt;br/&gt;&lt;br/&gt; EFI 退 FAT32 &lt;strong&gt;%3&lt;/strong&gt; &lt;strong&gt;%2&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt; EFI </translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="447"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="447"/>
<source>An EFI system partition is necessary to start %1.&lt;br/&gt;&lt;br/&gt;A partition was configured with mount point &lt;strong&gt;%2&lt;/strong&gt; but its &lt;strong&gt;%3&lt;/strong&gt; flag is not set.&lt;br/&gt;To set the flag, go back and edit the partition.&lt;br/&gt;&lt;br/&gt;You can continue without setting the flag but your system may fail to start.</source> <source>An EFI system partition is necessary to start %1.&lt;br/&gt;&lt;br/&gt;A partition was configured with mount point &lt;strong&gt;%2&lt;/strong&gt; but its &lt;strong&gt;%3&lt;/strong&gt; flag is not set.&lt;br/&gt;To set the flag, go back and edit the partition.&lt;br/&gt;&lt;br/&gt;You can continue without setting the flag but your system may fail to start.</source>
<translation type="unfinished"/> <translation> EFI %1 &lt;br/&gt;&lt;br/&gt; &lt;strong&gt;%2&lt;/strong&gt; &lt;strong&gt;%3&lt;/strong&gt; &lt;br/&gt;退&lt;br/&gt;&lt;br/&gt; EFI </translation>
</message> </message>
<message> <message>
<location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="446"/> <location filename="../src/modules/partition/gui/PartitionViewStep.cpp" line="446"/>
@ -3804,7 +3804,28 @@ Output:
&lt;/ul&gt; &lt;/ul&gt;
&lt;p&gt;The vertical scrollbar is adjustable, current width set to 10.&lt;/p&gt;</source> &lt;p&gt;The vertical scrollbar is adjustable, current width set to 10.&lt;/p&gt;</source>
<translation type="unfinished"/> <translation>&lt;h3&gt;%1&lt;/h3&gt;
&lt;p&gt;QML Flickable RichText &lt;/p&gt;
&lt;p&gt; RichText QML 使 HTML
Flickable &lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;线&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&lt;s&gt;线&lt;/s&gt;&lt;/p&gt;
&lt;p&gt;:
&lt;code&gt;ls -l /home&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Intel CPU &lt;/li&gt;
&lt;li&gt;AMD CPU &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;10&lt;/p&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/welcomeq/release_notes.qml" line="85"/> <location filename="../src/modules/welcomeq/release_notes.qml" line="85"/>
@ -3818,7 +3839,8 @@ Output:
<location filename="../src/modules/welcomeq/welcomeq.qml" line="44"/> <location filename="../src/modules/welcomeq/welcomeq.qml" line="44"/>
<source>&lt;h3&gt;Welcome to the %1 &lt;quote&gt;%2&lt;/quote&gt; installer&lt;/h3&gt; <source>&lt;h3&gt;Welcome to the %1 &lt;quote&gt;%2&lt;/quote&gt; installer&lt;/h3&gt;
&lt;p&gt;This program will ask you some questions and set up %1 on your computer.&lt;/p&gt;</source> &lt;p&gt;This program will ask you some questions and set up %1 on your computer.&lt;/p&gt;</source>
<translation type="unfinished"/> <translation>&lt;h3&gt; %1 &lt;quote&gt;%2&lt;/quote&gt; &lt;/h3&gt;
&lt;p&gt; %1&lt;/p&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/modules/welcomeq/welcomeq.qml" line="71"/> <location filename="../src/modules/welcomeq/welcomeq.qml" line="71"/>

View File

@ -24,7 +24,7 @@ msgstr ""
#: src/modules/packages/main.py:59 src/modules/packages/main.py:68 #: src/modules/packages/main.py:59 src/modules/packages/main.py:68
#: src/modules/packages/main.py:78 #: src/modules/packages/main.py:78
msgid "Install packages." msgid "Install packages."
msgstr "Asenna paketteja." msgstr "Asenna paketit."
#: src/modules/packages/main.py:66 #: src/modules/packages/main.py:66
#, python-format #, python-format
@ -108,7 +108,7 @@ msgstr "Kuvan purkaminen epäonnistui \"{}\""
#: src/modules/unpackfs/main.py:399 #: src/modules/unpackfs/main.py:399
msgid "No mount point for root partition" msgid "No mount point for root partition"
msgstr "Ei liitoskohtaa juuri root-osiolle" msgstr "Ei liitoskohtaa juuri root osiolle"
#: src/modules/unpackfs/main.py:400 #: src/modules/unpackfs/main.py:400
msgid "globalstorage does not contain a \"rootMountPoint\" key, doing nothing" msgid "globalstorage does not contain a \"rootMountPoint\" key, doing nothing"

View File

@ -141,8 +141,23 @@ images:
# The slideshow is displayed during execution steps (e.g. when the # The slideshow is displayed during execution steps (e.g. when the
# installer is actually writing to disk and doing other slow things). # installer is actually writing to disk and doing other slow things).
#
# The slideshow can be a QML file (recommended) which can display
# arbitrary things -- text, images, animations, or even play a game --
# during the execution step. The QML **is** abruptly stopped when the
# execution step is done, though, so maybe a game isn't a great idea.
#
# The slideshow can also be a sequence of images (not recommended unless
# you don't want QML at all in your Calamares). The images are displayed
# at a rate of 1 every 2 seconds during the execution step.
#
# To configure a QML file, list a single filename:
# slideshow: "show.qml"
# To configure images, like the filenames (here, as an inline list):
# slideshow: [ "/etc/calamares/slideshow/0.png", "/etc/logo.png" ]
slideshow: "show.qml" slideshow: "show.qml"
# There are two available APIs for the slideshow:
# There are two available APIs for a QML slideshow:
# - 1 (the default) loads the entire slideshow when the installation- # - 1 (the default) loads the entire slideshow when the installation-
# slideshow page is shown and starts the QML then. The QML # slideshow page is shown and starts the QML then. The QML
# is never stopped (after installation is done, times etc. # is never stopped (after installation is done, times etc.
@ -151,6 +166,8 @@ slideshow: "show.qml"
# onLeave() in the root object. After the installation is done, # onLeave() in the root object. After the installation is done,
# the show is stopped (first by calling onLeave(), then destroying # the show is stopped (first by calling onLeave(), then destroying
# the QML components). # the QML components).
#
# An image slideshow does not need to have the API defined.
slideshowAPI: 2 slideshowAPI: 2

View File

@ -10,6 +10,20 @@ set( calamaresSources
progresstree/ProgressTreeView.cpp progresstree/ProgressTreeView.cpp
) )
if( NOT WITH_KF5DBus )
set( kdsagSources "" )
foreach( _s
kdsingleapplicationguard/kdsingleapplicationguard.cpp
kdsingleapplicationguard/kdsharedmemorylocker.cpp
kdsingleapplicationguard/kdtoolsglobal.cpp
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
)
list( APPEND kdsagSources ${CMAKE_SOURCE_DIR}/3rdparty/${_s} )
endforeach()
mark_thirdparty_code( ${kdsagSources} )
list( APPEND calamaresSources ${kdsagSources} )
endif()
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/src/libcalamares ${CMAKE_SOURCE_DIR}/src/libcalamares
${CMAKE_SOURCE_DIR}/src/libcalamaresui ${CMAKE_SOURCE_DIR}/src/libcalamaresui

View File

@ -22,6 +22,7 @@
#include "CalamaresWindow.h" #include "CalamaresWindow.h"
#include "Branding.h" #include "Branding.h"
#include "CalamaresConfig.h"
#include "DebugWindow.h" #include "DebugWindow.h"
#include "Settings.h" #include "Settings.h"
#include "ViewManager.h" #include "ViewManager.h"
@ -38,8 +39,10 @@
#include <QFile> #include <QFile>
#include <QFileInfo> #include <QFileInfo>
#include <QLabel> #include <QLabel>
#ifdef WITH_QML
#include <QQuickItem> #include <QQuickItem>
#include <QQuickWidget> #include <QQuickWidget>
#endif
#include <QTreeView> #include <QTreeView>
static inline int static inline int
@ -132,18 +135,6 @@ CalamaresWindow::getWidgetSidebar( QWidget* parent, int desiredWidth )
return sideBox; return sideBox;
} }
QWidget*
CalamaresWindow::getQmlSidebar( QWidget* parent, int )
{
CalamaresUtils::registerCalamaresModels();
QQuickWidget* w = new QQuickWidget( parent );
w->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
w->setResizeMode( QQuickWidget::SizeRootObjectToView );
w->setSource( QUrl(
CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) );
return w;
}
/** @brief Get a button-sized icon. */ /** @brief Get a button-sized icon. */
static inline QPixmap static inline QPixmap
getButtonIcon( const QString& name ) getButtonIcon( const QString& name )
@ -213,6 +204,19 @@ CalamaresWindow::getWidgetNavigation( QWidget* parent )
return navigation; return navigation;
} }
#ifdef WITH_QML
QWidget*
CalamaresWindow::getQmlSidebar( QWidget* parent, int )
{
CalamaresUtils::registerCalamaresModels();
QQuickWidget* w = new QQuickWidget( parent );
w->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
w->setResizeMode( QQuickWidget::SizeRootObjectToView );
w->setSource( QUrl(
CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) );
return w;
}
QWidget* QWidget*
CalamaresWindow::getQmlNavigation( QWidget* parent ) CalamaresWindow::getQmlNavigation( QWidget* parent )
{ {
@ -231,6 +235,19 @@ CalamaresWindow::getQmlNavigation( QWidget* parent )
return w; return w;
} }
#else
// Bogus to keep the linker happy
QWidget * CalamaresWindow::getQmlSidebar(QWidget* , int )
{
return nullptr;
}
QWidget * CalamaresWindow::getQmlNavigation(QWidget* )
{
return nullptr;
}
#endif
/**@brief Picks one of two methods to call /**@brief Picks one of two methods to call
* *
@ -243,16 +260,21 @@ flavoredWidget( Calamares::Branding::PanelFlavor flavor,
CalamaresWindow* w, CalamaresWindow* w,
QWidget* parent, QWidget* parent,
widgetMaker widget, widgetMaker widget,
widgetMaker qml, widgetMaker qml, // Only if WITH_QML is on
args... a ) args... a )
{ {
#ifndef WITH_QML
Q_UNUSED( qml )
#endif
// Member-function calling syntax is (object.*member)(args) // Member-function calling syntax is (object.*member)(args)
switch ( flavor ) switch ( flavor )
{ {
case Calamares::Branding::PanelFlavor::Widget: case Calamares::Branding::PanelFlavor::Widget:
return ( w->*widget )( parent, a... ); return ( w->*widget )( parent, a... );
#ifdef WITH_QML
case Calamares::Branding::PanelFlavor::Qml: case Calamares::Branding::PanelFlavor::Qml:
return ( w->*qml )( parent, a... ); return ( w->*qml )( parent, a... );
#endif
case Calamares::Branding::PanelFlavor::None: case Calamares::Branding::PanelFlavor::None:
return nullptr; return nullptr;
} }

View File

@ -252,6 +252,12 @@ main( int argc, char* argv[] )
cDebug() << " .. got" << m->name() << m->typeString() << m->interfaceString(); cDebug() << " .. got" << m->name() << m->typeString() << m->interfaceString();
if ( m->type() == Calamares::Module::Type::View ) if ( m->type() == Calamares::Module::Type::View )
{ {
if ( !qobject_cast< QApplication* >(aw) )
{
auto* replace_app = new QApplication( argc, argv );
replace_app->setQuitOnLastWindowClosed( true );
aw = replace_app;
}
mw = module.m_ui ? new QMainWindow() : nullptr; mw = module.m_ui ? new QMainWindow() : nullptr;
(void)new Calamares::Branding( module.m_branding ); (void)new Calamares::Branding( module.m_branding );

View File

@ -1,12 +1,8 @@
# libcalamares is the non-GUI part of Calamares, which includes handling # libcalamares is the non-GUI part of Calamares, which includes handling
# translations, configurations, logging, utilities, global storage, and (non-GUI) jobs. # translations, configurations, logging, utilities, global storage, and (non-GUI) jobs.
add_definitions( add_definitions( -DDLLEXPORT_PRO )
${QT_DEFINITIONS} include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
-DQT_SHARED
-DQT_SHAREDPOINTER_TRACK_POINTERS
-DDLLEXPORT_PRO
)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in
${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h ) ${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h )
@ -65,22 +61,6 @@ set( libSources
utils/Variant.cpp utils/Variant.cpp
utils/Yaml.cpp utils/Yaml.cpp
) )
set( _kdsagSources
kdsingleapplicationguard/kdsingleapplicationguard.cpp
kdsingleapplicationguard/kdsharedmemorylocker.cpp
kdsingleapplicationguard/kdtoolsglobal.cpp
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
)
set( kdsagSources "" )
foreach( _s ${_kdsagSources} )
list( APPEND kdsagSources ${CMAKE_SOURCE_DIR}/3rdparty/${_s} )
endforeach()
mark_thirdparty_code( ${kdsagSources} )
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
### OPTIONAL Python support ### OPTIONAL Python support
# #
@ -156,7 +136,7 @@ endif()
### LIBRARY ### LIBRARY
# #
# #
add_library( calamares SHARED ${libSources} ${kdsagSources} ) add_library( calamares SHARED ${libSources} )
set_target_properties( calamares set_target_properties( calamares
PROPERTIES PROPERTIES
VERSION ${CALAMARES_VERSION_SHORT} VERSION ${CALAMARES_VERSION_SHORT}

View File

@ -11,5 +11,6 @@
//cmakedefines for CMake variables (e.g. for optdepends) go here //cmakedefines for CMake variables (e.g. for optdepends) go here
#cmakedefine WITH_PYTHON #cmakedefine WITH_PYTHON
#cmakedefine WITH_PYTHONQT #cmakedefine WITH_PYTHONQT
#cmakedefine WITH_QML
#endif // CALAMARESCONFIG_H #endif // CALAMARESCONFIG_H

View File

@ -20,7 +20,7 @@
#ifndef DLLMACRO_H #ifndef DLLMACRO_H
#define DLLMACRO_H #define DLLMACRO_H
#include <QtCore/qglobal.h> #include <qglobal.h>
/* /*
* Mark symbols exported from Calamares non-GUI library with DLLEXPORT. * Mark symbols exported from Calamares non-GUI library with DLLEXPORT.

View File

@ -20,10 +20,10 @@
#ifndef PYTHONJOBAPI_H #ifndef PYTHONJOBAPI_H
#define PYTHONJOBAPI_H #define PYTHONJOBAPI_H
#include "qglobal.h" // For qreal
#include "utils/BoostPython.h" #include "utils/BoostPython.h"
#include <qglobal.h> // For qreal
namespace Calamares namespace Calamares
{ {
class PythonJob; class PythonJob;

View File

@ -41,6 +41,13 @@
#include <KOSRelease> #include <KOSRelease>
#endif #endif
[[noreturn]] static void
bail( const QString& descriptorPath, const QString& message )
{
cError() << "FATAL in" << descriptorPath << Logger::Continuation << Logger::NoQuote {} << message;
::exit( EXIT_FAILURE );
}
namespace Calamares namespace Calamares
{ {
@ -153,7 +160,7 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
QDir componentDir( componentDirectory() ); QDir componentDir( componentDirectory() );
if ( !componentDir.exists() ) if ( !componentDir.exists() )
{ {
bail( "Bad component directory path." ); bail( m_descriptorPath, "Bad component directory path." );
} }
QFile file( brandingFilePath ); QFile file( brandingFilePath );
@ -168,10 +175,12 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
m_componentName = QString::fromStdString( doc[ "componentName" ].as< std::string >() ); m_componentName = QString::fromStdString( doc[ "componentName" ].as< std::string >() );
if ( m_componentName != componentDir.dirName() ) if ( m_componentName != componentDir.dirName() )
bail( "The branding component name should match the name of the " bail( m_descriptorPath,
"The branding component name should match the name of the "
"component directory." ); "component directory." );
initSimpleSettings( doc ); initSimpleSettings( doc );
initSlideshowSettings( doc );
#ifdef WITH_KOSRelease #ifdef WITH_KOSRelease
// Copy the os-release information into a QHash for use by KMacroExpander. // Copy the os-release information into a QHash for use by KMacroExpander.
@ -194,17 +203,15 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
{ QStringLiteral( "VARIANT" ), relInfo.variant() }, { QStringLiteral( "VARIANT" ), relInfo.variant() },
{ QStringLiteral( "VARIANT_ID" ), relInfo.variantId() }, { QStringLiteral( "VARIANT_ID" ), relInfo.variantId() },
{ QStringLiteral( "LOGO" ), relInfo.logo() } } }; { QStringLiteral( "LOGO" ), relInfo.logo() } } };
auto expand = [ & ]( const QString& s ) -> QString { auto expand = [&]( const QString& s ) -> QString {
return KMacroExpander::expandMacros( s, relMap, QLatin1Char( '@' ) ); return KMacroExpander::expandMacros( s, relMap, QLatin1Char( '@' ) );
}; };
#else #else
auto expand = []( const QString& s ) -> QString { return s; }; auto expand = []( const QString& s ) -> QString { return s; };
#endif #endif
// Massage the strings, images and style sections. // Massage the strings, images and style sections.
loadStrings( m_strings, doc, "strings", expand ); loadStrings( m_strings, doc, "strings", expand );
loadStrings( m_images, doc, "images", [ & ]( const QString& s ) -> QString { loadStrings( m_images, doc, "images", [&]( const QString& s ) -> QString {
// See also image() // See also image()
const QString imageName( expand( s ) ); const QString imageName( expand( s ) );
QFileInfo imageFi( componentDir.absoluteFilePath( imageName ) ); QFileInfo imageFi( componentDir.absoluteFilePath( imageName ) );
@ -214,58 +221,19 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
// Not found, bail out with the filename used // Not found, bail out with the filename used
if ( icon.isNull() ) if ( icon.isNull() )
{ {
bail( QString( "Image file %1 does not exist." ).arg( imageFi.absoluteFilePath() ) ); bail( m_descriptorPath,
QString( "Image file %1 does not exist." ).arg( imageFi.absoluteFilePath() ) );
} }
return imageName; // Not turned into a path return imageName; // Not turned into a path
} }
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; } );
if ( doc[ "slideshow" ].IsSequence() )
{
QStringList slideShowPictures;
doc[ "slideshow" ] >> slideShowPictures;
for ( int i = 0; i < slideShowPictures.count(); ++i )
{
QString pathString = slideShowPictures[ i ];
QFileInfo imageFi( componentDir.absoluteFilePath( pathString ) );
if ( !imageFi.exists() )
{
bail( QString( "Slideshow file %1 does not exist." ).arg( imageFi.absoluteFilePath() ) );
}
slideShowPictures[ i ] = imageFi.absoluteFilePath();
}
//FIXME: implement a GenericSlideShow.qml that uses these slideShowPictures
}
else if ( doc[ "slideshow" ].IsScalar() )
{
QString slideshowPath = QString::fromStdString( doc[ "slideshow" ].as< std::string >() );
QFileInfo slideshowFi( componentDir.absoluteFilePath( slideshowPath ) );
if ( !slideshowFi.exists() || !slideshowFi.fileName().toLower().endsWith( ".qml" ) )
bail( QString( "Slideshow file %1 does not exist or is not a valid QML file." )
.arg( slideshowFi.absoluteFilePath() ) );
m_slideshowPath = slideshowFi.absoluteFilePath();
}
else
{
bail( "Syntax error in slideshow sequence." );
}
int api = doc[ "slideshowAPI" ].IsScalar() ? doc[ "slideshowAPI" ].as< int >() : -1;
if ( ( api < 1 ) || ( api > 2 ) )
{
cWarning() << "Invalid or missing *slideshowAPI* in branding file.";
api = 1;
}
m_slideshowAPI = api;
} }
catch ( YAML::Exception& e ) catch ( YAML::Exception& e )
{ {
CalamaresUtils::explainYamlException( e, ba, file.fileName() ); CalamaresUtils::explainYamlException( e, ba, file.fileName() );
bail( e.what() ); bail( m_descriptorPath, e.what() );
} }
QDir translationsDir( componentDir.filePath( "lang" ) ); QDir translationsDir( componentDir.filePath( "lang" ) );
@ -423,8 +391,11 @@ flavorAndSide( const YAML::Node& doc, const char* key, Branding::PanelFlavor& fl
static const NamedEnumTable< PanelFlavor > sidebarFlavorNames { static const NamedEnumTable< PanelFlavor > sidebarFlavorNames {
{ QStringLiteral( "widget" ), PanelFlavor::Widget }, { QStringLiteral( "widget" ), PanelFlavor::Widget },
{ QStringLiteral( "none" ), PanelFlavor::None }, { QStringLiteral( "none" ), PanelFlavor::None },
{ QStringLiteral( "hidden" ), PanelFlavor::None }, { QStringLiteral( "hidden" ), PanelFlavor::None }
#ifdef WITH_QML
,
{ QStringLiteral( "qml" ), PanelFlavor::Qml } { QStringLiteral( "qml" ), PanelFlavor::Qml }
#endif
}; };
static const NamedEnumTable< PanelSide > panelSideNames { static const NamedEnumTable< PanelSide > panelSideNames {
{ QStringLiteral( "left" ), PanelSide::Left }, { QStringLiteral( "left" ), PanelSide::Left },
@ -540,12 +511,62 @@ Branding::initSimpleSettings( const YAML::Node& doc )
} }
} }
void
[[noreturn]] void Branding::initSlideshowSettings( const YAML::Node& doc )
Branding::bail( const QString& message )
{ {
cError() << "FATAL in" << m_descriptorPath << Logger::Continuation << Logger::NoQuote {} << message; QDir componentDir( componentDirectory() );
::exit( EXIT_FAILURE );
if ( doc[ "slideshow" ].IsSequence() )
{
QStringList slideShowPictures;
doc[ "slideshow" ] >> slideShowPictures;
for ( int i = 0; i < slideShowPictures.count(); ++i )
{
QString pathString = slideShowPictures[ i ];
QFileInfo imageFi( componentDir.absoluteFilePath( pathString ) );
if ( !imageFi.exists() )
{
bail( m_descriptorPath,
QString( "Slideshow file %1 does not exist." ).arg( imageFi.absoluteFilePath() ) );
}
slideShowPictures[ i ] = imageFi.absoluteFilePath();
}
m_slideshowFilenames = slideShowPictures;
m_slideshowAPI = -1;
}
#ifdef WITH_QML
else if ( doc[ "slideshow" ].IsScalar() )
{
QString slideshowPath = QString::fromStdString( doc[ "slideshow" ].as< std::string >() );
QFileInfo slideshowFi( componentDir.absoluteFilePath( slideshowPath ) );
if ( !slideshowFi.exists() || !slideshowFi.fileName().toLower().endsWith( ".qml" ) )
bail( m_descriptorPath,
QString( "Slideshow file %1 does not exist or is not a valid QML file." )
.arg( slideshowFi.absoluteFilePath() ) );
m_slideshowPath = slideshowFi.absoluteFilePath();
// API choice is relevant for QML slideshow
int api = doc[ "slideshowAPI" ].IsScalar() ? doc[ "slideshowAPI" ].as< int >() : -1;
if ( ( api < 1 ) || ( api > 2 ) )
{
cWarning() << "Invalid or missing *slideshowAPI* in branding file.";
api = 1;
}
m_slideshowAPI = api;
}
#else
else if ( doc[ "slideshow" ].IsScalar() )
{
cWarning() << "Invalid *slideshow* setting, must be list of images.";
}
#endif
else
{
bail( m_descriptorPath, "Syntax error in slideshow sequence." );
}
} }
} // namespace Calamares } // namespace Calamares

View File

@ -22,8 +22,8 @@
#ifndef BRANDING_H #ifndef BRANDING_H
#define BRANDING_H #define BRANDING_H
#include "CalamaresConfig.h"
#include "DllMacro.h" #include "DllMacro.h"
#include "utils/NamedSuffix.h" #include "utils/NamedSuffix.h"
#include <QMap> #include <QMap>
@ -131,8 +131,11 @@ public:
enum class PanelFlavor enum class PanelFlavor
{ {
None, None,
Widget, Widget
#ifdef WITH_QML
,
Qml Qml
#endif
}; };
Q_ENUM( PanelFlavor ) Q_ENUM( PanelFlavor )
///@brief Where to place a panel (sidebar, navigation) ///@brief Where to place a panel (sidebar, navigation)
@ -165,8 +168,16 @@ public:
*/ */
QString translationsDirectory() const { return m_translationsPathPrefix; } QString translationsDirectory() const { return m_translationsPathPrefix; }
/** @brief Path to the slideshow QML file, if any. */ /** @brief Path to the slideshow QML file, if any. (API == 1 or 2)*/
QString slideshowPath() const { return m_slideshowPath; } QString slideshowPath() const { return m_slideshowPath; }
/// @brief List of pathnames of slideshow images, if any. (API == -1)
QStringList slideshowImages() const { return m_slideshowFilenames; }
/** @brief Which slideshow API to use for the slideshow?
*
* - 2 For QML-based slideshows loaded asynchronously (current)
* - 1 For QML-based slideshows, loaded when shown (legacy)
* - -1 For oldschool image-slideshows.
*/
int slideshowAPI() const { return m_slideshowAPI; } int slideshowAPI() const { return m_slideshowAPI; }
QPixmap image( Branding::ImageEntry imageEntry, const QSize& size ) const; QPixmap image( Branding::ImageEntry imageEntry, const QSize& size ) const;
@ -230,19 +241,29 @@ private:
static const QStringList s_imageEntryStrings; static const QStringList s_imageEntryStrings;
static const QStringList s_styleEntryStrings; static const QStringList s_styleEntryStrings;
[[noreturn]] void bail( const QString& message );
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;
/* The slideshow can be done in one of two ways:
* - as a sequence of images
* - as a QML file
* The slideshow: setting selects which one is used. If it is
* a list (of filenames) then it is a sequence of images, and otherwise
* it is a QML file which is run. (For QML, the slideshow API is
* important).
*/
QStringList m_slideshowFilenames;
QString m_slideshowPath; QString m_slideshowPath;
int m_slideshowAPI; int m_slideshowAPI;
QString m_translationsPathPrefix; QString m_translationsPathPrefix;
/** @brief Initialize the simple settings below */ /** @brief Initialize the simple settings below */
void initSimpleSettings( const YAML::Node& doc ); void initSimpleSettings( const YAML::Node& doc );
///@brief Initialize the slideshow settings, above
void initSlideshowSettings( const YAML::Node& doc );
bool m_welcomeStyleCalamares; bool m_welcomeStyleCalamares;
bool m_welcomeExpandingLogo; bool m_welcomeExpandingLogo;

View File

@ -14,15 +14,15 @@ set( calamaresui_SOURCES
utils/CalamaresUtilsGui.cpp utils/CalamaresUtilsGui.cpp
utils/ImageRegistry.cpp utils/ImageRegistry.cpp
utils/Paste.cpp utils/Paste.cpp
utils/Qml.cpp
viewpages/BlankViewStep.cpp viewpages/BlankViewStep.cpp
viewpages/ExecutionViewStep.cpp viewpages/ExecutionViewStep.cpp
viewpages/QmlViewStep.cpp viewpages/Slideshow.cpp
viewpages/ViewStep.cpp viewpages/ViewStep.cpp
widgets/ClickableLabel.cpp widgets/ClickableLabel.cpp
widgets/FixedAspectRatioLabel.cpp widgets/FixedAspectRatioLabel.cpp
widgets/PrettyRadioButton.cpp
widgets/WaitingWidget.cpp widgets/WaitingWidget.cpp
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp ${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
@ -44,10 +44,6 @@ if( WITH_PYTHON )
endif() endif()
if( WITH_PYTHONQT ) if( WITH_PYTHONQT )
include_directories(${PYTHON_INCLUDE_DIRS})
# *_DIRS because we also use extensions
include_directories(${PYTHONQT_INCLUDE_DIRS})
list( APPEND calamaresui_SOURCES list( APPEND calamaresui_SOURCES
modulesystem/PythonQtViewModule.cpp modulesystem/PythonQtViewModule.cpp
utils/PythonQtUtils.cpp utils/PythonQtUtils.cpp
@ -56,25 +52,33 @@ if( WITH_PYTHONQT )
viewpages/PythonQtGlobalStorageWrapper.cpp viewpages/PythonQtGlobalStorageWrapper.cpp
viewpages/PythonQtUtilsWrapper.cpp viewpages/PythonQtUtilsWrapper.cpp
) )
set( OPTIONAL_PYTHON_LIBRARIES endif()
${PYTHON_LIBRARIES}
${PYTHONQT_LIBRARIES} if( WITH_QML )
list( APPEND calamaresui_SOURCES
utils/Qml.cpp
viewpages/QmlViewStep.cpp
) )
endif() endif()
calamares_add_library( calamaresui calamares_add_library( calamaresui
SOURCES ${calamaresui_SOURCES} SOURCES ${calamaresui_SOURCES}
EXPORT_MACRO UIDLLEXPORT_PRO EXPORT_MACRO UIDLLEXPORT_PRO
LINK_PRIVATE_LIBRARIES
${OPTIONAL_PYTHON_LIBRARIES}
LINK_LIBRARIES LINK_LIBRARIES
Qt5::Svg Qt5::Svg
Qt5::QuickWidgets
RESOURCES libcalamaresui.qrc RESOURCES libcalamaresui.qrc
EXPORT CalamaresLibraryDepends EXPORT CalamaresLibraryDepends
VERSION ${CALAMARES_VERSION_SHORT} VERSION ${CALAMARES_VERSION_SHORT}
) )
if ( KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58 ) if( KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58 )
target_compile_definitions( calamaresui PRIVATE WITH_KOSRelease ) target_compile_definitions( calamaresui PRIVATE WITH_KOSRelease )
endif() endif()
if( WITH_PYTHONQT )
# *_DIRS because we also use extensions
target_include_directories( calamaresui PRIVATE ${PYTHON_INCLUDE_DIRS} ${PYTHONQT_INCLUDE_DIRS} )
target_link_libraries( calamaresui PRIVATE ${PYTHON_LIBRARIES} ${PYTHONQT_LIBRARIES} )
endif()
if( WITH_QML )
target_link_libraries( calamaresui PUBLIC Qt5::QuickWidgets )
endif()

View File

@ -20,12 +20,14 @@
#include "ExecutionViewStep.h" #include "ExecutionViewStep.h"
#include "Slideshow.h"
#include "Branding.h" #include "Branding.h"
#include "CalamaresConfig.h"
#include "Job.h" #include "Job.h"
#include "JobQueue.h" #include "JobQueue.h"
#include "Settings.h" #include "Settings.h"
#include "ViewManager.h" #include "ViewManager.h"
#include "modulesystem/Module.h" #include "modulesystem/Module.h"
#include "modulesystem/ModuleManager.h" #include "modulesystem/ModuleManager.h"
#include "utils/CalamaresUtilsGui.h" #include "utils/CalamaresUtilsGui.h"
@ -37,12 +39,28 @@
#include <QDir> #include <QDir>
#include <QLabel> #include <QLabel>
#include <QProgressBar> #include <QProgressBar>
#include <QQmlComponent>
#include <QQmlEngine>
#include <QQuickItem>
#include <QQuickWidget>
#include <QVBoxLayout> #include <QVBoxLayout>
static Calamares::Slideshow*
makeSlideshow( QWidget* parent )
{
const int api = Calamares::Branding::instance()->slideshowAPI();
switch ( api )
{
case -1:
return new Calamares::SlideshowPictures( parent );
#ifdef WITH_QML
case 1:
FALLTHRU;
case 2:
return new Calamares::SlideshowQML( parent );
#endif
default:
cWarning() << "Unknown Branding slideshow API" << api;
return new Calamares::SlideshowPictures( parent );
}
}
namespace Calamares namespace Calamares
{ {
@ -51,20 +69,14 @@ ExecutionViewStep::ExecutionViewStep( QObject* parent )
, m_widget( new QWidget ) , m_widget( new QWidget )
, m_progressBar( new QProgressBar ) , m_progressBar( new QProgressBar )
, m_label( new QLabel ) , m_label( new QLabel )
, m_qmlShow( new QQuickWidget ) , m_slideshow( makeSlideshow( m_widget ) )
, m_qmlComponent( nullptr )
, m_qmlObject( nullptr )
{ {
QVBoxLayout* layout = new QVBoxLayout( m_widget ); QVBoxLayout* layout = new QVBoxLayout( m_widget );
QVBoxLayout* innerLayout = new QVBoxLayout; QVBoxLayout* innerLayout = new QVBoxLayout;
m_progressBar->setMaximum( 10000 ); m_progressBar->setMaximum( 10000 );
m_qmlShow->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); layout->addWidget( m_slideshow->widget() );
m_qmlShow->setResizeMode( QQuickWidget::SizeRootObjectToView );
m_qmlShow->engine()->addImportPath( CalamaresUtils::qmlModulesDir().absolutePath() );
layout->addWidget( m_qmlShow );
CalamaresUtils::unmarginLayout( layout ); CalamaresUtils::unmarginLayout( layout );
layout->addLayout( innerLayout ); layout->addLayout( innerLayout );
@ -72,17 +84,7 @@ ExecutionViewStep::ExecutionViewStep( QObject* parent )
innerLayout->addWidget( m_progressBar ); innerLayout->addWidget( m_progressBar );
innerLayout->addWidget( m_label ); innerLayout->addWidget( m_label );
cDebug() << "QML import paths:" << Logger::DebugList( m_qmlShow->engine()->importPathList() );
if ( Branding::instance()->slideshowAPI() == 2 )
{
cDebug() << "QML load on startup, API 2.";
loadQmlV2();
}
connect( JobQueue::instance(), &JobQueue::progress, this, &ExecutionViewStep::updateFromJobQueue ); connect( JobQueue::instance(), &JobQueue::progress, this, &ExecutionViewStep::updateFromJobQueue );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 )
CALAMARES_RETRANSLATE( m_qmlShow->engine()->retranslate(); )
#endif
} }
@ -139,108 +141,10 @@ ExecutionViewStep::isAtEnd() const
return !JobQueue::instance()->isRunning(); return !JobQueue::instance()->isRunning();
} }
void
ExecutionViewStep::loadQmlV2()
{
if ( !m_qmlComponent && !Calamares::Branding::instance()->slideshowPath().isEmpty() )
{
m_qmlComponent = new QQmlComponent( m_qmlShow->engine(),
QUrl::fromLocalFile( Calamares::Branding::instance()->slideshowPath() ),
QQmlComponent::CompilationMode::Asynchronous );
connect( m_qmlComponent, &QQmlComponent::statusChanged, this, &ExecutionViewStep::loadQmlV2Complete );
}
}
/// @brief State-change of the slideshow, for changeSlideShowState()
enum class Slideshow
{
Start,
Stop
};
/** @brief Tells the slideshow we activated or left the show.
*
* If @p state is @c Slideshow::Start, calls suitable activation procedures.
* If @p state is @c Slideshow::Stop, calls deactivation procedures.
*
* Applies V1 and V2 QML activation / deactivation:
* - V1 loads the QML in @p widget on activation. Sets root object property
* *activatedInCalamares* as appropriate.
* - V2 calls onActivate() or onLeave() in the QML as appropriate. Also
* sets the *activatedInCalamares* property.
*/
static void
changeSlideShowState( Slideshow state, QQuickItem* slideshow, QQuickWidget* widget )
{
bool activate = state == Slideshow::Start;
if ( Branding::instance()->slideshowAPI() == 2 )
{
// The QML was already loaded in the constructor, need to start it
CalamaresUtils::callQMLFunction( slideshow, activate ? "onActivate" : "onLeave" );
}
else if ( !Calamares::Branding::instance()->slideshowPath().isEmpty() )
{
// API version 1 assumes onCompleted is the trigger
if ( activate )
{
widget->setSource( QUrl::fromLocalFile( Calamares::Branding::instance()->slideshowPath() ) );
}
// needs the root object for property setting, below
slideshow = widget->rootObject();
}
// V1 API has picked up the root object for use, V2 passed it in.
if ( slideshow )
{
static const char propertyName[] = "activatedInCalamares";
auto property = slideshow->property( propertyName );
if ( property.isValid() && ( property.type() == QVariant::Bool ) && ( property.toBool() != activate ) )
{
slideshow->setProperty( propertyName, activate );
}
}
}
void
ExecutionViewStep::loadQmlV2Complete()
{
if ( m_qmlComponent && m_qmlComponent->isReady() && !m_qmlObject )
{
cDebug() << "QML component complete, API 2";
// Don't do this again
disconnect( m_qmlComponent, &QQmlComponent::statusChanged, this, &ExecutionViewStep::loadQmlV2Complete );
QObject* o = m_qmlComponent->create();
m_qmlObject = qobject_cast< QQuickItem* >( o );
if ( !m_qmlObject )
{
delete o;
}
else
{
cDebug() << Logger::SubEntry << "Loading" << Calamares::Branding::instance()->slideshowPath();
// setContent() is public API, but not documented publicly.
// It is marked \internal in the Qt sources, but does exactly
// what is needed: sets up visual parent by replacing the root
// item, and handling resizes.
m_qmlShow->setContent(
QUrl::fromLocalFile( Calamares::Branding::instance()->slideshowPath() ), m_qmlComponent, m_qmlObject );
if ( ViewManager::instance()->currentStep() == this )
{
// We're alreay visible! Must have been slow QML loading, and we
// passed onActivate already.
changeSlideShowState( Slideshow::Start, m_qmlObject, m_qmlShow );
}
}
}
}
void void
ExecutionViewStep::onActivate() ExecutionViewStep::onActivate()
{ {
changeSlideShowState( Slideshow::Start, m_qmlObject, m_qmlShow ); m_slideshow->changeSlideShowState( Slideshow::Start );
JobQueue* queue = JobQueue::instance(); JobQueue* queue = JobQueue::instance();
foreach ( const QString& instanceKey, m_jobInstanceKeys ) foreach ( const QString& instanceKey, m_jobInstanceKeys )
@ -288,13 +192,7 @@ ExecutionViewStep::updateFromJobQueue( qreal percent, const QString& message )
void void
ExecutionViewStep::onLeave() ExecutionViewStep::onLeave()
{ {
changeSlideShowState( Slideshow::Stop, m_qmlObject, m_qmlShow ); m_slideshow->changeSlideShowState( Slideshow::Stop );
// API version 2 is explicitly stopped; version 1 keeps running
if ( Branding::instance()->slideshowAPI() == 2 )
{
delete m_qmlObject;
m_qmlObject = nullptr;
}
} }
} // namespace Calamares } // namespace Calamares

View File

@ -27,13 +27,12 @@
class QLabel; class QLabel;
class QObject; class QObject;
class QProgressBar; class QProgressBar;
class QQmlComponent;
class QQuickItem;
class QQuickWidget;
namespace Calamares namespace Calamares
{ {
class Slideshow;
class ExecutionViewStep : public ViewStep class ExecutionViewStep : public ViewStep
{ {
Q_OBJECT Q_OBJECT
@ -60,20 +59,14 @@ public:
void appendJobModuleInstanceKey( const QString& instanceKey ); void appendJobModuleInstanceKey( const QString& instanceKey );
public slots:
void loadQmlV2Complete();
private: private:
QWidget* m_widget; QWidget* m_widget;
QProgressBar* m_progressBar; QProgressBar* m_progressBar;
QLabel* m_label; QLabel* m_label;
QQuickWidget* m_qmlShow; Slideshow* m_slideshow;
QQmlComponent* m_qmlComponent;
QQuickItem* m_qmlObject; ///< The actual show
QStringList m_jobInstanceKeys; QStringList m_jobInstanceKeys;
void loadQmlV2(); ///< Loads the slideshow QML (from branding) for API version 2
void updateFromJobQueue( qreal percent, const QString& message ); void updateFromJobQueue( qreal percent, const QString& message );
}; };

View File

@ -0,0 +1,262 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@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 "Slideshow.h"
#include "Branding.h"
#include "utils/Dirs.h"
#include "utils/Logger.h"
#include "utils/Qml.h"
#include "utils/Retranslator.h"
#include <QLabel>
#include <QMutexLocker>
#ifdef WITH_QML
#include <QQmlComponent>
#include <QQmlEngine>
#include <QQuickItem>
#include <QQuickWidget>
#endif
#include <QTimer>
#include <chrono>
namespace Calamares
{
Slideshow::~Slideshow() {}
#ifdef WITH_QML
SlideshowQML::SlideshowQML( QWidget* parent )
: Slideshow( parent )
, m_qmlShow( new QQuickWidget )
, m_qmlComponent( nullptr )
, m_qmlObject( nullptr )
{
m_qmlShow->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
m_qmlShow->setResizeMode( QQuickWidget::SizeRootObjectToView );
m_qmlShow->engine()->addImportPath( CalamaresUtils::qmlModulesDir().absolutePath() );
cDebug() << "QML import paths:" << Logger::DebugList( m_qmlShow->engine()->importPathList() );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 )
CALAMARES_RETRANSLATE( if ( m_qmlShow ) { m_qmlShow->engine()->retranslate(); } )
#endif
if ( Branding::instance()->slideshowAPI() == 2 )
{
cDebug() << "QML load on startup, API 2.";
loadQmlV2();
}
}
SlideshowQML::~SlideshowQML()
{
delete m_qmlObject;
delete m_qmlComponent;
delete m_qmlShow;
}
QWidget*
SlideshowQML::widget()
{
return m_qmlShow;
}
void
SlideshowQML::loadQmlV2()
{
QMutexLocker l( &m_mutex );
if ( !m_qmlComponent && !Calamares::Branding::instance()->slideshowPath().isEmpty() )
{
m_qmlComponent = new QQmlComponent( m_qmlShow->engine(),
QUrl::fromLocalFile( Calamares::Branding::instance()->slideshowPath() ),
QQmlComponent::CompilationMode::Asynchronous );
connect( m_qmlComponent, &QQmlComponent::statusChanged, this, &SlideshowQML::loadQmlV2Complete );
}
}
void
SlideshowQML::loadQmlV2Complete()
{
QMutexLocker l( &m_mutex );
if ( m_qmlComponent && m_qmlComponent->isReady() && !m_qmlObject )
{
cDebug() << "QML component complete, API 2";
// Don't do this again
disconnect( m_qmlComponent, &QQmlComponent::statusChanged, this, &SlideshowQML::loadQmlV2Complete );
QObject* o = m_qmlComponent->create();
m_qmlObject = qobject_cast< QQuickItem* >( o );
if ( !m_qmlObject )
{
delete o;
}
else
{
cDebug() << Logger::SubEntry << "Loading" << Calamares::Branding::instance()->slideshowPath();
// setContent() is public API, but not documented publicly.
// It is marked \internal in the Qt sources, but does exactly
// what is needed: sets up visual parent by replacing the root
// item, and handling resizes.
m_qmlShow->setContent(
QUrl::fromLocalFile( Calamares::Branding::instance()->slideshowPath() ), m_qmlComponent, m_qmlObject );
if ( isActive() )
{
// We're alreay visible! Must have been slow QML loading, and we
// passed onActivate already.
changeSlideShowState( Slideshow::Start );
}
}
}
}
/*
* Applies V1 and V2 QML activation / deactivation:
* - V1 loads the QML in @p widget on activation. Sets root object property
* *activatedInCalamares* as appropriate.
* - V2 calls onActivate() or onLeave() in the QML as appropriate. Also
* sets the *activatedInCalamares* property.
*/
void
SlideshowQML::changeSlideShowState( Action state )
{
QMutexLocker l( &m_mutex );
bool activate = state == Slideshow::Start;
if ( Branding::instance()->slideshowAPI() == 2 )
{
// The QML was already loaded in the constructor, need to start it
CalamaresUtils::callQMLFunction( m_qmlObject, activate ? "onActivate" : "onLeave" );
}
else if ( !Calamares::Branding::instance()->slideshowPath().isEmpty() )
{
// API version 1 assumes onCompleted is the trigger
if ( activate )
{
m_qmlShow->setSource( QUrl::fromLocalFile( Calamares::Branding::instance()->slideshowPath() ) );
}
// needs the root object for property setting, below
m_qmlObject = m_qmlShow->rootObject();
}
// V1 API has picked up the root object for use, V2 passed it in.
if ( m_qmlObject )
{
static const char propertyName[] = "activatedInCalamares";
auto property = m_qmlObject->property( propertyName );
if ( property.isValid() && ( property.type() == QVariant::Bool ) && ( property.toBool() != activate ) )
{
m_qmlObject->setProperty( propertyName, activate );
}
}
if ( ( Branding::instance()->slideshowAPI() == 2 ) && ( state == Slideshow::Stop ) )
{
delete m_qmlObject;
m_qmlObject = nullptr;
}
m_state = state;
}
#endif
SlideshowPictures::SlideshowPictures( QWidget* parent )
: Slideshow( parent )
, m_label( new QLabel( parent ) )
, m_timer( new QTimer( this ) )
, m_imageIndex( 0 )
, m_images( Branding::instance()->slideshowImages() )
{
m_label->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
m_label->setAlignment( Qt::AlignCenter );
m_timer->setInterval( std::chrono::milliseconds( 2000 ) );
connect( m_timer, &QTimer::timeout, this, &SlideshowPictures::next );
}
SlideshowPictures::~SlideshowPictures()
{
delete m_timer;
delete m_label;
}
QWidget*
SlideshowPictures::widget()
{
return m_label;
}
void
SlideshowPictures::changeSlideShowState( Calamares::Slideshow::Action a )
{
QMutexLocker l( &m_mutex );
m_state = a;
if ( a == Slideshow::Start )
{
m_imageIndex = -1;
if ( m_images.count() < 1 )
{
m_label->setPixmap( QPixmap( ":/data/images/squid.svg" ) );
}
else
{
m_timer->start();
QTimer::singleShot( 0, this, &SlideshowPictures::next );
}
}
else
{
m_timer->stop();
}
}
void
SlideshowPictures::next()
{
QMutexLocker l( &m_mutex );
if ( m_imageIndex < 0 )
{
// Initialization, don't do the advance-by-one
m_imageIndex = 0;
}
else
{
m_imageIndex++;
if ( m_imageIndex >= m_images.count() )
{
m_imageIndex = 0;
}
}
if ( m_imageIndex >= m_images.count() )
{
// Unusual case: timer is running, but we have 0 images to display.
// .. this would have been caught in changeSlideShowState(), which
// .. special-cases 0 images.
return;
}
m_label->setPixmap( QPixmap( m_images.at( m_imageIndex ) ) );
}
} // namespace Calamares

View File

@ -0,0 +1,148 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@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/>.
*/
#ifndef LIBCALAMARESUI_SLIDESHOW_H
#define LIBCALAMARESUI_SLIDESHOW_H
#include "CalamaresConfig.h"
#include <QMutex>
#include <QStringList>
#include <QWidget>
class QLabel;
class QTimer;
#ifdef WITH_QML
class QQmlComponent;
class QQuickItem;
class QQuickWidget;
#endif
namespace Calamares
{
/** @brief API for Slideshow objects
*
* A Slideshow (subclass) object is created by the ExecutionViewStep
* and needs to manage its own configuration (e.g. from Branding).
* The slideshow is started and stopped when it becomes visible
* and when installation is over, by calling changeSlideShowState()
* as appropriate.
*/
class Slideshow : public QObject
{
Q_OBJECT
public:
/// @brief State-change of the slideshow, for changeSlideShowState()
enum Action
{
Start,
Stop
};
Slideshow( QWidget* parent = nullptr )
: QObject( parent )
{
}
virtual ~Slideshow();
/// @brief Is the slideshow being shown **right now**?
bool isActive() const { return m_state == Start; }
/** @brief The actual widget to show the user.
*
* Depending on the style of slideshow, this might be a QQuickWidget,
* or a QLabel, or something else entirely.
*/
virtual QWidget* widget() = 0;
/** @brief Tells the slideshow we activated or left the show.
*
* If @p state is @c Slideshow::Start, calls suitable activation procedures.
* If @p state is @c Slideshow::Stop, calls deactivation procedures.
*/
virtual void changeSlideShowState( Action a ) = 0;
protected:
QMutex m_mutex;
Action m_state = Stop;
};
#ifdef WITH_QML
/** @brief Slideshow using a QML file
*
* This is the "classic" slideshow in Calamares, which runs some QML
* while the installation is in progress. It is configured through
* Branding settings *slideshow* and *slideshowAPI*, showing the QML
* file from *slideshow*. The API version influences when and how the
* QML is loaded; version 1 does so only when the slideshow is activated,
* while version 2 does so asynchronously.
*/
class SlideshowQML : public Slideshow
{
Q_OBJECT
public:
SlideshowQML( QWidget* parent );
virtual ~SlideshowQML() override;
QWidget* widget() override;
void changeSlideShowState( Action a ) override;
public slots:
void loadQmlV2Complete();
void loadQmlV2(); ///< Loads the slideshow QML (from branding) for API version 2
private:
QQuickWidget* m_qmlShow;
QQmlComponent* m_qmlComponent;
QQuickItem* m_qmlObject; ///< The actual show
};
#endif
/** @brief Slideshow using images
*
* This is an "oldschool" slideshow, but new in Calamares, which
* displays static image files one-by-one. It is for systems that
* do not use QML at all. It is configured through the Branding
* setting *slideshow*. When using this widget, the setting must
* be a list of filenames; the API is set to -1.
*/
class SlideshowPictures : public Slideshow
{
Q_OBJECT
public:
SlideshowPictures( QWidget* parent );
virtual ~SlideshowPictures() override;
QWidget* widget() override;
virtual void changeSlideShowState( Action a ) override;
public slots:
void next();
private:
QLabel* m_label;
QTimer* m_timer;
int m_imageIndex;
QStringList m_images;
};
} // namespace Calamares
#endif

View File

@ -18,7 +18,10 @@
#include "ClickableLabel.h" #include "ClickableLabel.h"
#include <QApplication> #include <QApplication> // for doubleClickInterval()
namespace Calamares
{
ClickableLabel::ClickableLabel( QWidget* parent ) ClickableLabel::ClickableLabel( QWidget* parent )
@ -53,3 +56,5 @@ ClickableLabel::mouseReleaseEvent( QMouseEvent* event )
emit clicked(); emit clicked();
} }
} }
} // namespace Calamares

View File

@ -17,13 +17,25 @@
* along with Calamares. If not, see <http://www.gnu.org/licenses/>. * along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CLICKABLELABEL_H #ifndef LIBCALAMARESUI_CLICKABLELABEL_H
#define CLICKABLELABEL_H #define LIBCALAMARESUI_CLICKABLELABEL_H
#include <QElapsedTimer>
#include <QLabel> #include <QLabel>
#include <QTime>
class ClickableLabel : public QLabel #include "DllMacro.h"
namespace Calamares
{
/** @brief A Label where the whole label area is clickable
*
* When clicking anywhere on the Label (text, background, whatever)
* the signal clicked() is emitted. Use this as a buddy for radio
* buttons or other clickable things where you want mouse interaction
* with the label, to be the same as mouse interaction with the control.
*/
class UIDLLEXPORT ClickableLabel : public QLabel
{ {
Q_OBJECT Q_OBJECT
public: public:
@ -39,7 +51,9 @@ protected:
virtual void mouseReleaseEvent( QMouseEvent* event ) override; virtual void mouseReleaseEvent( QMouseEvent* event ) override;
private: private:
QTime m_time; QElapsedTimer m_time;
}; };
#endif // CLICKABLELABEL_H } // namespace Calamares
#endif // LIBCALAMARESUI_CLICKABLELABEL_H

View File

@ -21,11 +21,14 @@
#include "utils/CalamaresUtilsGui.h" #include "utils/CalamaresUtilsGui.h"
#include "widgets/ClickableLabel.h" #include "widgets/ClickableLabel.h"
#include <QButtonGroup>
#include <QComboBox> #include <QComboBox>
#include <QGridLayout> #include <QGridLayout>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLabel> #include <QLabel>
namespace Calamares
{
PrettyRadioButton::PrettyRadioButton( QWidget* parent ) PrettyRadioButton::PrettyRadioButton( QWidget* parent )
: QWidget( parent ) : QWidget( parent )
@ -45,10 +48,8 @@ PrettyRadioButton::PrettyRadioButton( QWidget* parent )
m_mainLayout->addWidget( m_label, 0, 1 ); m_mainLayout->addWidget( m_label, 0, 1 );
m_mainLayout->setContentsMargins( 0, 0, 0, 0 ); m_mainLayout->setContentsMargins( 0, 0, 0, 0 );
connect( m_label, &ClickableLabel::clicked, connect( m_label, &ClickableLabel::clicked, m_radio, &QRadioButton::click );
m_radio, &QRadioButton::click ); connect( m_radio, &QRadioButton::toggled, this, &PrettyRadioButton::toggleOptions );
connect( m_radio, &QRadioButton::toggled,
this, &PrettyRadioButton::toggleOptions );
} }
@ -80,17 +81,33 @@ PrettyRadioButton::iconSize() const
} }
QRadioButton* void
PrettyRadioButton::buttonWidget() const PrettyRadioButton::setChecked( bool checked )
{ {
return m_radio; m_radio->setChecked( checked );
} }
bool
PrettyRadioButton::isChecked() const
{
return m_radio->isChecked();
}
void
PrettyRadioButton::addToGroup( QButtonGroup* group, int id )
{
group->addButton( m_radio, id );
}
void void
PrettyRadioButton::addOptionsComboBox( QComboBox* box ) PrettyRadioButton::addOptionsComboBox( QComboBox* box )
{ {
if ( !box ) if ( !box )
{
return; return;
}
if ( !m_optionsLayout ) if ( !m_optionsLayout )
{ {
@ -105,12 +122,16 @@ PrettyRadioButton::addOptionsComboBox( QComboBox* box )
toggleOptions( m_radio->isChecked() ); toggleOptions( m_radio->isChecked() );
} }
m_optionsLayout->insertWidget( m_optionsLayout->count()-1, box ); m_optionsLayout->insertWidget( m_optionsLayout->count() - 1, box );
} }
void void
PrettyRadioButton::toggleOptions( bool toggle ) PrettyRadioButton::toggleOptions( bool toggle )
{ {
if ( m_optionsLayout ) if ( m_optionsLayout )
{
m_optionsLayout->parentWidget()->setVisible( toggle ); m_optionsLayout->parentWidget()->setVisible( toggle );
}
} }
} // namespace Calamares

View File

@ -16,41 +16,59 @@
* along with Calamares. If not, see <http://www.gnu.org/licenses/>. * along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef PRETTYRADIOBUTTON_H #ifndef LIBCALAMARESUI_PRETTYRADIOBUTTON_H
#define PRETTYRADIOBUTTON_H #define LIBCALAMARESUI_PRETTYRADIOBUTTON_H
#include "DllMacro.h"
#include <QRadioButton> #include <QRadioButton>
class ClickableLabel; class QButtonGroup;
class QComboBox; class QComboBox;
class QGridLayout; class QGridLayout;
class QHBoxLayout; class QHBoxLayout;
namespace Calamares
{
class ClickableLabel;
/** @brief A radio button with fancy label next to it. /** @brief A radio button with fancy label next to it.
*
* The fancy label is used so that the text alongside the radio
* button can word-wrap, be multi-line, and support rich text.
* *
* The radio button itself can be retrieved with buttonWidget(), * The radio button itself can be retrieved with buttonWidget(),
* and the whole behaves a lot like a label. Extra options can be * and the whole behaves a lot like a label. Extra options can be
* added to the display (options are hidden when the button is * added to the display (options are hidden when the button is
* not selected) with addOptionsComboBox(). * not selected) with addOptionsComboBox().
*/ */
class PrettyRadioButton : public QWidget class UIDLLEXPORT PrettyRadioButton : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit PrettyRadioButton( QWidget* parent = nullptr ); explicit PrettyRadioButton( QWidget* parent = nullptr );
virtual ~PrettyRadioButton() {} virtual ~PrettyRadioButton() { }
virtual void setText( const QString& text ); /// @brief Passes @p text on to the ClickableLabel
void setText( const QString& text );
virtual void setIconSize( const QSize& size ); // Icon applies to the radio-button part
void setIconSize( const QSize& size );
QSize iconSize() const;
void setIcon( const QIcon& icon );
virtual void setIcon( const QIcon& icon ); // Applies to the radio-button part
void setChecked( bool checked );
bool isChecked() const;
virtual QSize iconSize() const; /** @brief Adds the radio-button part to the given @p group
*
* For managing the pretty-radio-button in button groups like normal
* radio buttons, call addToGroup() rather that group->addButton().
*/
void addToGroup( QButtonGroup* group, int id = -1 );
virtual QRadioButton* buttonWidget() const; /// @brief Add an options drop-down to this button.
/** @brief Add an options drop-down to this button. */
void addOptionsComboBox( QComboBox* ); void addOptionsComboBox( QComboBox* );
protected slots: protected slots:
@ -64,4 +82,5 @@ protected:
QHBoxLayout* m_optionsLayout; QHBoxLayout* m_optionsLayout;
}; };
#endif // PRETTYRADIOBUTTON_H } // namespace Calamares
#endif // LIBCALAMARESUI_PRETTYRADIOBUTTON_H

View File

@ -57,7 +57,6 @@ def get_uuid():
:return: :return:
""" """
root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
partitions = libcalamares.globalstorage.value("partitions") partitions = libcalamares.globalstorage.value("partitions")
for partition in partitions: for partition in partitions:

View File

@ -20,6 +20,23 @@ efiMountOptions: umask=0077
# If a filesystem is on an SSD, add the following options. If a specific # If a filesystem is on an SSD, add the following options. If a specific
# filesystem is listed here, use those options, otherwise no additional # filesystem is listed here, use those options, otherwise no additional
# options are set (i.e. there is no *default* like in *mountOptions*). # options are set (i.e. there is no *default* like in *mountOptions*).
#
# This example configuration applies the *discard* option to most
# common filesystems on an SSD. This may not be the right option
# for your distribution. If you use a systemd timer to trim the
# SSD, it may interfere with the *discard* option. Opinions vary
# as to whether *discard* is worth the effort -- it depends on
# the usage pattern of the disk as well.
#
# ssdExtraMountOptions:
# ext4: discard
# jfs: discard
# xfs: discard
# swap: discard
# btrfs: discard,compress=lzo
#
# The standard configuration applies only lzo compression to btrfs
# and does nothing for other filesystems.
ssdExtraMountOptions: ssdExtraMountOptions:
btrfs: ssd,compress=zstd,commit=120 btrfs: ssd,compress=zstd,commit=120

View File

@ -0,0 +1,12 @@
# Special cases for grubcfg configuration tests:
# - 2.global specifies /tmp/calamares as the rootMountPath,
# so we end up editing files there. Create the directory
# beforehand, so the test doesn't blow up.
set(_grub_root /tmp/calamares/etc/default)
set(_grub_file ${_grub_root}/bogus)
add_test(
NAME make-grubcfg-dirs
COMMAND ${CMAKE_COMMAND} -E make_directory ${_grub_root}
)
set_tests_properties(load-grubcfg-2 PROPERTIES DEPENDS make-grubcfg-dirs)

View File

@ -1,3 +1,8 @@
if( NOT WITH_QML )
calamares_skip_module( "keyboardq (QML is not supported in this build)" )
return()
endif()
set( _keyboard ${CMAKE_CURRENT_SOURCE_DIR}/../keyboard ) set( _keyboard ${CMAKE_CURRENT_SOURCE_DIR}/../keyboard )
include_directories( ${_keyboard} ) include_directories( ${_keyboard} )

View File

@ -81,16 +81,16 @@ Config::setLocaleInfo( const QString& initialRegion, const QString& initialZone,
auto* region = m_regionList.find< TZRegion >( initialRegion ); auto* region = m_regionList.find< TZRegion >( initialRegion );
if ( region && region->zones().find< TZZone >( initialZone ) ) if ( region && region->zones().find< TZZone >( initialZone ) )
{ {
this->m_regionModel->setCurrentIndex( m_regionModel->indexOf( initialRegion ) ); m_regionModel->setCurrentIndex( m_regionModel->indexOf( initialRegion ) );
m_zonesModel->setList( region->zones() ); m_zonesModel->setList( region->zones() );
this->m_zonesModel->setCurrentIndex( m_zonesModel->indexOf( initialZone ) ); m_zonesModel->setCurrentIndex( m_zonesModel->indexOf( initialZone ) );
} }
else else
{ {
this->m_regionModel->setCurrentIndex( m_regionModel->indexOf( "America" ) ); m_regionModel->setCurrentIndex( m_regionModel->indexOf( "America" ) );
m_zonesModel->setList( m_zonesModel->setList(
static_cast< const TZRegion* >( m_regionModel->item( m_regionModel->currentIndex() ) )->zones() ); static_cast< const TZRegion* >( m_regionModel->item( m_regionModel->currentIndex() ) )->zones() );
this->m_zonesModel->setCurrentIndex( m_zonesModel->indexOf( "New_York" ) ); m_zonesModel->setCurrentIndex( m_zonesModel->indexOf( "New_York" ) );
} }
// Some distros come with a meaningfully commented and easy to parse locale.gen, // Some distros come with a meaningfully commented and easy to parse locale.gen,

View File

@ -1,3 +1,8 @@
if( NOT WITH_QML )
calamares_skip_module( "localeq (QML is not supported in this build)" )
return()
endif()
# When debugging the timezone widget, add this debugging definition # When debugging the timezone widget, add this debugging definition
# to have a debugging-friendly timezone widget, debug logging, # to have a debugging-friendly timezone widget, debug logging,
# and no intrusive timezone-setting while clicking around. # and no intrusive timezone-setting while clicking around.

View File

@ -1,3 +1,8 @@
if( NOT WITH_QML )
calamares_skip_module( "notesqml (QML is not supported in this build)" )
return()
endif()
calamares_add_plugin( notesqml calamares_add_plugin( notesqml
TYPE viewmodule TYPE viewmodule
EXPORT_MACRO PLUGINDLLEXPORT_PRO EXPORT_MACRO PLUGINDLLEXPORT_PRO

View File

@ -80,7 +80,6 @@ if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND
gui/PartitionSizeController.cpp gui/PartitionSizeController.cpp
gui/PartitionSplitterWidget.cpp gui/PartitionSplitterWidget.cpp
gui/PartitionViewStep.cpp gui/PartitionViewStep.cpp
gui/PrettyRadioButton.cpp
gui/ResizeVolumeGroupDialog.cpp gui/ResizeVolumeGroupDialog.cpp
gui/ScanningDialog.cpp gui/ScanningDialog.cpp
gui/ReplaceWidget.cpp gui/ReplaceWidget.cpp

View File

@ -241,7 +241,7 @@ PartitionModel::data( const QModelIndex& index, int role ) const
return partition->partitionPath(); return partition->partitionPath();
case PartitionPtrRole: case PartitionPtrRole:
return qVariantFromValue( (void*)partition ); return QVariant::fromValue( (void*)partition );
// Osprober roles: // Osprober roles:
case OsproberNameRole: case OsproberNameRole:

View File

@ -35,20 +35,19 @@
#include "PartitionBarsView.h" #include "PartitionBarsView.h"
#include "PartitionLabelsView.h" #include "PartitionLabelsView.h"
#include "PartitionSplitterWidget.h" #include "PartitionSplitterWidget.h"
#include "PrettyRadioButton.h"
#include "ReplaceWidget.h" #include "ReplaceWidget.h"
#include "ScanningDialog.h" #include "ScanningDialog.h"
#include "Branding.h"
#include "GlobalStorage.h" #include "GlobalStorage.h"
#include "JobQueue.h" #include "JobQueue.h"
#include "partition/PartitionIterator.h" #include "partition/PartitionIterator.h"
#include "partition/PartitionQuery.h" #include "partition/PartitionQuery.h"
#include "utils/CalamaresUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "utils/Retranslator.h" #include "utils/Retranslator.h"
#include "utils/Units.h" #include "utils/Units.h"
#include "widgets/PrettyRadioButton.h"
#include "Branding.h"
#include "utils/CalamaresUtilsGui.h"
#include <kpmcore/core/device.h> #include <kpmcore/core/device.h>
#include <kpmcore/core/partition.h> #include <kpmcore/core/partition.h>
@ -69,6 +68,7 @@ using PartitionActions::Choices::SwapChoice;
using CalamaresUtils::Partition::PartitionIterator; using CalamaresUtils::Partition::PartitionIterator;
using CalamaresUtils::Partition::isPartitionFreeSpace; using CalamaresUtils::Partition::isPartitionFreeSpace;
using CalamaresUtils::Partition::findPartitionByPath; using CalamaresUtils::Partition::findPartitionByPath;
using Calamares::PrettyRadioButton;
/** @brief Given a set of swap choices, return a sensible value from it. /** @brief Given a set of swap choices, return a sensible value from it.
* *
@ -259,14 +259,14 @@ ChoicePage::setupChoices()
m_alongsideButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionAlongside, m_alongsideButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionAlongside,
CalamaresUtils::Original, CalamaresUtils::Original,
iconSize ) ); iconSize ) );
m_grp->addButton( m_alongsideButton->buttonWidget(), Alongside ); m_alongsideButton->addToGroup( m_grp, Alongside );
m_eraseButton = new PrettyRadioButton; m_eraseButton = new PrettyRadioButton;
m_eraseButton->setIconSize( iconSize ); m_eraseButton->setIconSize( iconSize );
m_eraseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionEraseAuto, m_eraseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionEraseAuto,
CalamaresUtils::Original, CalamaresUtils::Original,
iconSize ) ); iconSize ) );
m_grp->addButton( m_eraseButton->buttonWidget(), Erase ); m_eraseButton->addToGroup( m_grp, Erase );
m_replaceButton = new PrettyRadioButton; m_replaceButton = new PrettyRadioButton;
@ -274,7 +274,7 @@ ChoicePage::setupChoices()
m_replaceButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionReplaceOs, m_replaceButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionReplaceOs,
CalamaresUtils::Original, CalamaresUtils::Original,
iconSize ) ); iconSize ) );
m_grp->addButton( m_replaceButton->buttonWidget(), Replace ); m_replaceButton->addToGroup( m_grp, Replace );
// Fill up swap options // Fill up swap options
// .. TODO: only if enabled in the config // .. TODO: only if enabled in the config
@ -294,7 +294,7 @@ ChoicePage::setupChoices()
CalamaresUtils::Original, CalamaresUtils::Original,
iconSize ) ); iconSize ) );
m_itemsLayout->addWidget( m_somethingElseButton ); m_itemsLayout->addWidget( m_somethingElseButton );
m_grp->addButton( m_somethingElseButton->buttonWidget(), Manual ); m_somethingElseButton->addToGroup( m_grp, Manual );
m_itemsLayout->addStretch(); m_itemsLayout->addStretch();
@ -1193,7 +1193,7 @@ force_uncheck(QButtonGroup* grp, PrettyRadioButton* button)
{ {
button->hide(); button->hide();
grp->setExclusive( false ); grp->setExclusive( false );
button->buttonWidget()->setChecked( false ); button->setChecked( false );
grp->setExclusive( true ); grp->setExclusive( true );
} }
@ -1288,8 +1288,8 @@ ChoicePage::setupActions()
m_replaceButton->hide(); m_replaceButton->hide();
m_alongsideButton->hide(); m_alongsideButton->hide();
m_grp->setExclusive( false ); m_grp->setExclusive( false );
m_replaceButton->buttonWidget()->setChecked( false ); m_replaceButton->setChecked( false );
m_alongsideButton->buttonWidget()->setChecked( false ); m_alongsideButton->setChecked( false );
m_grp->setExclusive( true ); m_grp->setExclusive( true );
} }
else if ( osproberEntriesForCurrentDevice.count() == 1 ) else if ( osproberEntriesForCurrentDevice.count() == 1 )

View File

@ -23,7 +23,6 @@
#include "ui_ChoicePage.h" #include "ui_ChoicePage.h"
#include <QWidget>
#include "core/OsproberEntry.h" #include "core/OsproberEntry.h"
#include "core/PartitionActions.h" #include "core/PartitionActions.h"
@ -31,17 +30,22 @@
#include <QMutex> #include <QMutex>
#include <QPointer> #include <QPointer>
#include <QSet> #include <QSet>
#include <QWidget>
class QBoxLayout; class QBoxLayout;
class QComboBox; class QComboBox;
class QLabel; class QLabel;
class QListView; class QListView;
namespace Calamares
{
class PrettyRadioButton;
}
class PartitionBarsView; class PartitionBarsView;
class PartitionSplitterWidget; class PartitionSplitterWidget;
class PartitionLabelsView; class PartitionLabelsView;
class PartitionCoreModule; class PartitionCoreModule;
class PrettyRadioButton;
class DeviceInfoWidget; class DeviceInfoWidget;
class Device; class Device;
@ -153,10 +157,10 @@ private:
QComboBox* m_drivesCombo; QComboBox* m_drivesCombo;
QButtonGroup* m_grp; QButtonGroup* m_grp;
PrettyRadioButton* m_alongsideButton; Calamares::PrettyRadioButton* m_alongsideButton;
PrettyRadioButton* m_eraseButton; Calamares::PrettyRadioButton* m_eraseButton;
PrettyRadioButton* m_replaceButton; Calamares::PrettyRadioButton* m_replaceButton;
PrettyRadioButton* m_somethingElseButton; Calamares::PrettyRadioButton* m_somethingElseButton;
QComboBox* m_eraseSwapChoiceComboBox; // UI, see also m_eraseSwapChoice QComboBox* m_eraseSwapChoiceComboBox; // UI, see also m_eraseSwapChoice
DeviceInfoWidget* m_deviceInfoWidget; DeviceInfoWidget* m_deviceInfoWidget;
@ -182,4 +186,4 @@ private:
QMutex m_coreMutex; QMutex m_coreMutex;
}; };
#endif // CHOICEPAGE_H #endif // CHOICEPAGE_H

View File

@ -0,0 +1,8 @@
# Special cases for rawfs tests
#
# - On FreeBSD, /proc/mounts doesn't exist (/proc is only about processes,
# and is rarely used). Expect the test to fail.
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
set_tests_properties(load-rawfs-1 PROPERTIES WILL_FAIL TRUE)
endif()

View File

@ -80,7 +80,6 @@ struct MaybeChecked
MaybeChecked& operator=( bool b ) MaybeChecked& operator=( bool b )
{ {
cDebug() << "Assigning" << b;
hasBeenChecked = true; hasBeenChecked = true;
value = b; value = b;
return *this; return *this;

View File

@ -1,6 +1,11 @@
# This is a re-write of the welcome module using QML view steps # This is a re-write of the welcome module using QML view steps
# instead of widgets. # instead of widgets.
if( NOT WITH_QML )
calamares_skip_module( "welcomeq (QML is not supported in this build)" )
return()
endif()
set( _welcome ${CMAKE_CURRENT_SOURCE_DIR}/../welcome ) set( _welcome ${CMAKE_CURRENT_SOURCE_DIR}/../welcome )
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ${CMAKE_CURRENT_SOURCE_DIR}/../../libcalamares ${_welcome} ) include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ${CMAKE_CURRENT_SOURCE_DIR}/../../libcalamares ${_welcome} )

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2020, Anke Boersma <demm@kaosx.us> * Copyright 2020, Anke Boersma <demm@kaosx.us>
* Copyright 2020, Adriaan de Groot <groot@kde.org>
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,6 +17,7 @@
* along with Calamares. If not, see <http://www.gnu.org/licenses/>. * along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/ */
import io.calamares.core 1.0
import io.calamares.ui 1.0 import io.calamares.ui 1.0
import QtQuick 2.7 import QtQuick 2.7
@ -27,41 +29,70 @@ Rectangle {
focus: true focus: true
Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor
anchors.fill: parent anchors.fill: parent
anchors.topMargin: 70 anchors.topMargin: 50
TextArea { TextArea {
id: recommended id: recommended
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 20 anchors.topMargin: 1
horizontalAlignment: TextEdit.AlignHCenter
width: 640 width: 640
font.pointSize: 12 font.pointSize: 11
textFormat: Text.RichText textFormat: Text.RichText
antialiasing: true antialiasing: true
activeFocusOnPress: false activeFocusOnPress: false
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: qsTr("<p>This computer does not satisfy some of the recommended requirements for setting up %1.</p> text: qsTr("<p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/>
<p>Setup can continue, but some features might be disabled.</p>").arg(Branding.string(Branding.VersionedName)) Setup can continue, but some features might be disabled.</p>").arg(Branding.string(Branding.VersionedName))
} }
TextArea { Rectangle {
width: 640
height: 360
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: recommended.bottom anchors.top: recommended.bottom
anchors.topMargin: 20 anchors.topMargin: 5
width: 640
background: Rectangle {
implicitWidth: 640
implicitHeight: 50
border.color: "#ff0000"
color: "#b0e0e6"
}
font.pointSize: 12
textFormat: Text.RichText
antialiasing: true
activeFocusOnPress: false
wrapMode: Text.WordWrap
text: qsTr("<p>The system is not connected to the internet.</p>")//.arg(requirementsModel) Component {
id: requirementsDelegate
Item {
width: 640
height: 35
Column {
anchors.centerIn: parent
Rectangle {
implicitWidth: 640
implicitHeight: 35
border.color: satisfied ? "#228b22" : "#ffa411"
color: satisfied ? "#f0fff0" : "#ffefd5"
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.margins: 20
source: satisfied ? "qrc:/data/images/yes.svgz" : "qrc:/data/images/information.svgz"
}
Text {
text: satisfied ? details : negatedText
anchors.centerIn: parent
font.pointSize: 11
}
}
}
}
}
ListView {
anchors.fill: parent
spacing: 5
model: config.requirementsModel
delegate: requirementsDelegate
}
} }
} }

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2020, Anke Boersma <demm@kaosx.us> * Copyright 2020, Anke Boersma <demm@kaosx.us>
* Copyright 2020, Adriaan de Groot <groot@kde.org>
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,6 +17,7 @@
* along with Calamares. If not, see <http://www.gnu.org/licenses/>. * along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/ */
import io.calamares.core 1.0
import io.calamares.ui 1.0 import io.calamares.ui 1.0
import QtQuick 2.7 import QtQuick 2.7
@ -27,41 +29,71 @@ Rectangle {
focus: true focus: true
Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor
anchors.fill: parent anchors.fill: parent
anchors.topMargin: 70 anchors.topMargin: 50
TextArea { TextArea {
id: required id: required
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 20 anchors.topMargin: 1
horizontalAlignment: TextEdit.AlignHCenter
width: 640 width: 640
font.pointSize: 12 font.pointSize: 11
textFormat: Text.RichText textFormat: Text.RichText
antialiasing: true antialiasing: true
activeFocusOnPress: false activeFocusOnPress: false
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: qsTr("<p>This computer does not satisfy the minimum requirements for setting up %1.</p> text: qsTr("<p>This computer does not satisfy the minimum requirements for installing %1.<br/>
<p>Setup cannot continue.</p>").arg(Branding.string(Branding.VersionedName)) Installation cannot continue.</p>").arg(Branding.string(Branding.VersionedName))
} }
TextArea { Rectangle {
width: 640
height: 360
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: required.bottom anchors.top: required.bottom
anchors.topMargin: 20 anchors.topMargin: 5
width: 640
background: Rectangle {
implicitWidth: 640
implicitHeight: 50
border.color: "#ff0000"
color: "#ffc0cb"
}
font.pointSize: 12
textFormat: Text.RichText
antialiasing: true
activeFocusOnPress: false
wrapMode: Text.WordWrap
text: qsTr("<p>The installer is not running with administrator rights.</p>")//.arg(requirementsModel) Component {
id: requirementsDelegate
Item {
width: 640
height: 35
Column {
anchors.centerIn: parent
Rectangle {
implicitWidth: 640
implicitHeight: 35
border.color: mandatory ? "#228b22" : "#ff0000"
color: mandatory ? "#f0fff0" : "#ffc0cb"
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.margins: 20
source: mandatory ? "qrc:/data/images/yes.svgz" : "qrc:/data/images/no.svgz"
}
Text {
text: mandatory ? details : negatedText
anchors.centerIn: parent
font.pointSize: 11
}
}
}
}
}
ListView {
anchors.fill: parent
spacing: 5
model: config.requirementsModel
delegate: requirementsDelegate
}
} }
} }

View File

@ -25,3 +25,40 @@ showReleaseNotesUrl: true
# branding.desc string) # branding.desc string)
# #
# showDonateUrl: https://kde.org/community/donations/ # showDonateUrl: https://kde.org/community/donations/
# Requirements checking. These are general, generic, things
# that are checked. They may not match with the actual requirements
# imposed by other modules in the system.
requirements:
# Amount of available disk, in GiB. Floating-point is allowed here.
# Note that this does not account for *usable* disk, so it is possible
# to pass this requirement, yet have no space to install to.
requiredStorage: 5.5
# Amount of available RAM, in GiB. Floating-point is allowed here.
requiredRam: 1.0
# To check for internet connectivity, Calamares does a HTTP GET
# on this URL; on success (e.g. HTTP code 200) internet is OK.
internetCheckUrl: http://google.com
# List conditions to check. Each listed condition will be
# probed in some way, and yields true or false according to
# the host system satisfying the condition.
#
# This sample file lists all the conditions that are known.
check:
- storage
- ram
- power
- internet
- root
- screen
# List conditions that **must** be satisfied (from the list
# of conditions, above) for installation to proceed.
# If any of these conditions are not met, the user cannot
# continue past the welcome page.
required:
# - storage
- ram
# - root

View File

@ -57,16 +57,10 @@ Page
} }
Recommended { Recommended {
property var required: "yes" //requirementsModel
property var satisfied: "yes" //satisfiedRequirements
property var requiredMet: (required != satisfied) ? true : false
visible: !config.requirementsModel.satisfiedRequirements visible: !config.requirementsModel.satisfiedRequirements
} }
Requirements { Requirements {
property var required: "yes" //requirementsModel
property var mandatory: "yes" //satisfiedMandatory
property var mandatoryMet: (required != mandatory) ? true : false
visible: !config.requirementsModel.satisfiedMandatory visible: !config.requirementsModel.satisfiedMandatory
} }