[libcalamares] Take ownership of the versioning headers
- The sources were in src/calamares but processed and generated in libcalamares, which is weird at best. - Generate an "extended" version header. - Use the extended version in the logger and nowhere else. - While here, minor coding style cleanups The overall change here means that after running CMake, only Logger.cpp needs to be rebuilt (if the extended version has changed) and not a handful of other files that don't need the full version number, but do happen to include CalamaresVersion.h
This commit is contained in:
parent
9568fc082f
commit
38b347f8f2
@ -27,8 +27,10 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h )
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../calamares/CalamaresVersion.h.in
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersion.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h )
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersionX.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersionX.h )
|
||||
|
||||
set( OPTIONAL_PRIVATE_LIBRARIES "" )
|
||||
set( OPTIONAL_PUBLIC_LIBRARIES "" )
|
||||
|
@ -3,6 +3,7 @@
|
||||
* SPDX-FileCopyrightText: 2010-2011 Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
@ -18,15 +19,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* License-Filename: LICENSE
|
||||
*
|
||||
*/
|
||||
|
||||
#include "Logger.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include "CalamaresVersionX.h"
|
||||
#include "utils/Dirs.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
@ -35,10 +33,10 @@
|
||||
#include <QTime>
|
||||
#include <QVariant>
|
||||
|
||||
#include "CalamaresVersion.h"
|
||||
#include "utils/Dirs.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#define LOGFILE_SIZE 1024 * 256
|
||||
static constexpr const int LOGFILE_SIZE = 1024 * 256;
|
||||
|
||||
static std::ofstream logfile;
|
||||
static unsigned int s_threshold =
|
||||
|
Loading…
Reference in New Issue
Block a user