2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2020-08-10 18:21:42 +02:00
|
|
|
*
|
2020-05-30 16:15:03 +02:00
|
|
|
* SPDX-FileCopyrightText: 2013-2016 Teo Mrnjavac <teo@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
2020-08-10 18:21:42 +02:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2019-04-29 12:22:24 +02:00
|
|
|
*
|
|
|
|
* Originally from Tomahawk, portions:
|
2020-05-30 16:15:03 +02:00
|
|
|
* SPDX-FileCopyrightText: 2010-2011 Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
|
|
|
* SPDX-FileCopyrightText: 2010-2011 Leo Franchi <lfranchi@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2010-2012 Jeff Mitchell <jeff@tomahawk-player.org>
|
2019-04-29 12:22:24 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2019-04-29 12:22:24 +02:00
|
|
|
*
|
2020-05-30 16:15:03 +02:00
|
|
|
*
|
2019-04-29 12:22:24 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef UTILS_DIRS_H
|
|
|
|
#define UTILS_DIRS_H
|
|
|
|
|
|
|
|
#include "DllMacro.h"
|
|
|
|
|
|
|
|
#include <QDir>
|
|
|
|
|
2023-09-11 20:13:15 +02:00
|
|
|
namespace Calamares
|
2019-04-29 12:22:24 +02:00
|
|
|
{
|
2019-08-04 21:22:54 +02:00
|
|
|
/**
|
|
|
|
* @brief appDataDir returns the directory with common application data.
|
|
|
|
* Defaults to CMAKE_INSTALL_FULL_DATADIR (usually /usr/share/calamares).
|
|
|
|
*/
|
|
|
|
DLLEXPORT QDir appDataDir();
|
2019-04-29 12:22:24 +02:00
|
|
|
|
2019-08-04 21:22:54 +02:00
|
|
|
/**
|
|
|
|
* @brief appLogDir returns the directory for Calamares logs.
|
|
|
|
* Defaults to QStandardPaths::CacheLocation (usually ~/.cache/Calamares).
|
|
|
|
*/
|
|
|
|
DLLEXPORT QDir appLogDir();
|
2019-04-29 12:22:24 +02:00
|
|
|
|
2019-08-04 21:22:54 +02:00
|
|
|
/**
|
|
|
|
* @brief systemLibDir returns the system's lib directory.
|
|
|
|
* Defaults to CMAKE_INSTALL_FULL_LIBDIR (usually /usr/lib64 or /usr/lib).
|
|
|
|
*/
|
|
|
|
DLLEXPORT QDir systemLibDir();
|
2019-04-29 12:22:24 +02:00
|
|
|
|
2019-08-04 21:22:54 +02:00
|
|
|
/**
|
|
|
|
* Override app data dir. Only for testing purposes.
|
|
|
|
*/
|
|
|
|
DLLEXPORT void setAppDataDir( const QDir& dir );
|
|
|
|
DLLEXPORT bool isAppDataDirOverridden();
|
2019-04-29 12:22:24 +02:00
|
|
|
|
2019-08-04 21:22:54 +02:00
|
|
|
/** @brief Setup extra config and data dirs from the XDG variables.
|
|
|
|
*/
|
|
|
|
DLLEXPORT void setXdgDirs();
|
|
|
|
/** @brief Are any extra directories configured? */
|
|
|
|
DLLEXPORT bool haveExtraDirs();
|
|
|
|
/** @brief XDG_CONFIG_DIRS, each guaranteed to end with / */
|
|
|
|
DLLEXPORT QStringList extraConfigDirs();
|
|
|
|
/** @brief XDG_DATA_DIRS, each guaranteed to end with / */
|
|
|
|
DLLEXPORT QStringList extraDataDirs();
|
2023-09-11 20:13:15 +02:00
|
|
|
} // namespace Calamares
|
2019-04-29 12:22:24 +02:00
|
|
|
|
|
|
|
#endif
|