diff --git a/ci/travis-config.sh b/ci/travis-config.sh new file mode 100644 index 000000000..85e6a9790 --- /dev/null +++ b/ci/travis-config.sh @@ -0,0 +1,12 @@ +# Build configuration on Travis. +# +# Defines a CMAKE_ARGS variable for use with cmake +# +# This file is sourced by travis.sh, and exports the variables +# to the environment. +CMAKE_ARGS="\ + -DWEBVIEW_FORCE_WEBKIT=1 \ + -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ + -DWITH_PYTHONQT=OFF" + +export CMAKE_ARGS diff --git a/ci/travis-continuous.sh b/ci/travis-continuous.sh index 02994be74..42cfb4bd3 100755 --- a/ci/travis-continuous.sh +++ b/ci/travis-continuous.sh @@ -12,4 +12,4 @@ test -f $SRCDIR/CMakeLists.txt || exit 1 cd $BUILDDIR || exit 1 -cmake -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON $SRCDIR && make -j2 && make install DESTDIR=/build/INSTALL_ROOT +cmake $CMAKE_ARGS $SRCDIR && make -j2 && make install DESTDIR=/build/INSTALL_ROOT diff --git a/ci/travis-coverity.sh b/ci/travis-coverity.sh index 07da4ce1a..c9495cf56 100755 --- a/ci/travis-coverity.sh +++ b/ci/travis-coverity.sh @@ -21,7 +21,7 @@ tar xvf coverity_tool.tar.gz -C "$BUILDDIR/coveritytool" --strip-components 2 export PATH="$BUILDDIR/coveritytool/bin:$PATH" -cmake -DCMAKE_BUILD_TYPE=Debug -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON $SRCDIR || exit 1 +cmake -DCMAKE_BUILD_TYPE=Debug $CMAKE_ARGS $SRCDIR || exit 1 cov-build --dir cov-int make -j2 tar caf calamares-ci.tar.xz cov-int diff --git a/ci/travis.sh b/ci/travis.sh index c8ac49f5d..364923b9e 100755 --- a/ci/travis.sh +++ b/ci/travis.sh @@ -12,6 +12,8 @@ test -d "$D" || exit 1 test -x "$D/travis-continuous.sh" || exit 1 test -x "$D/travis-coverity.sh" || exit 1 +test -f "$D/travis-common.sh" && . "$D/travis-config.sh" + if test "$TRAVIS_EVENT_TYPE" = "cron" ; then exec "$D/travis-coverity.sh" else diff --git a/src/branding/README.md b/src/branding/README.md index f85ad8f67..1d816911e 100644 --- a/src/branding/README.md +++ b/src/branding/README.md @@ -44,6 +44,15 @@ file) should be enclosed in this form for translations text: qsTr("This is an example text.") ``` +If you use CMake for preparing branding for packaging, the macro +`calamares_add_branding_subdirectory()`` (see also *Project Layout*, +below) will convert the source `.ts` files to their compiled form). +If you are packaging the branding by hand, use +``` + lrelease file_en.ts [file_en_GB.ts ..] +``` +with all the language suffixes to *file*. + ## Presentation The default QML classes provided by Calamares can be used for a simple @@ -105,13 +114,6 @@ will have a top-level `CMakeLists.txt` that includes some boilerplate to find Calamares, and then adds a subdirectory which contains the actual branding component. -Adding the subdirectory can be done as follows: - - - If the directory contains files only, and optionally has a single - subdirectory lang/ which contains the translation files for the - component, then `calamares_add_branding_subdirectory()` can be - used, which takes only the name of the subdirectory. - The file layout in a typical branding component repository is: ``` @@ -127,9 +129,19 @@ The file layout in a typical branding component repository is: ... ``` +Adding the subdirectory can be done as follows: + + - If the directory contains files only, and optionally has a single + subdirectory lang/ which contains the translation files for the + component, then `calamares_add_branding_subdirectory()` can be + used, which takes only the name of the subdirectory. - If the branding component has many files which are organized into subdirectories, use the SUBDIRECTORIES argument to the CMake function to additionally install files from those subdirectories. For example, if the component places all of its images in an `img/` subdirectory, then call `calamares_add_branding_subdirectory( ... SUBDIRECTORIES img)`. It is a bad idea to include `lang/` in the SUBDIRECTORIES list. + - The `.ts` files from the `lang/` subdirectory need be be compiled + to `.qm` files before being installed. The CMake macro's do this + automatically. For manual packaging, use `lrelease` to compile + the files. diff --git a/src/modules/displaymanager/main.py b/src/modules/displaymanager/main.py index 8db57b669..1b5b5c6f1 100644 --- a/src/modules/displaymanager/main.py +++ b/src/modules/displaymanager/main.py @@ -386,6 +386,7 @@ def run(): If a displaymanager is in the list but not installed, a debugging message is printed and the entry ignored. """ + displaymanagers = None if "displaymanagers" in libcalamares.job.configuration: displaymanagers = libcalamares.job.configuration["displaymanagers"] diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp index ebc40a03d..4a353efb4 100644 --- a/src/modules/partition/core/DeviceList.cpp +++ b/src/modules/partition/core/DeviceList.cpp @@ -98,8 +98,7 @@ erase(DeviceList& l, DeviceList::iterator& it) { Device* p = *it; auto r = l.erase( it ); - if (p) - delete p; + delete p; return r; } diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index 147212cbe..84ca219e8 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -666,7 +666,11 @@ PartitionCoreModule::scanForLVMPVs() // Update LVM::pvList LvmDevice::scanSystemLVM( physicalDevices ); +#ifdef WITH_KPMCOREGT33 + for ( auto p : LVM::pvList::list() ) +#else for ( auto p : LVM::pvList ) +#endif { m_lvmPVs << p.partition().data();