swift
Loading...
Searching...
No Matches
buildconfig.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2016 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_CONFIG_BUILDCONFIG_H
7#define SWIFT_CONFIG_BUILDCONFIG_H
8
9#include <QStringList>
10#include <QVersionNumber>
11
12namespace swift::config
13{
16 {
17 public:
19 static constexpr bool isCompiledWithP3DSupport(); // defined in buildconfig_gen.inc.in
20
22 static constexpr bool isCompiledWithFGSupport(); // defined in buildconfig_gen.inc.in
23
25 static constexpr bool isCompiledWithMSFSSupport(); // defined in buildconfig_gen.inc.in
26
28 static constexpr bool isCompiledWithMSFS2024Support(); // defined in buildconfig_gen.inc.in
29
32
34 static constexpr bool isCompiledWithXPlaneSupport(); // defined in buildconfig_gen.inc.in
35
37 static constexpr bool isDebugBuild();
38
40 static constexpr bool isReleaseBuild();
41
44
46 static constexpr bool isRunningOnWindowsNtPlatform();
47
49 static constexpr bool isRunningOnMacOSPlatform();
50
52 static constexpr bool isRunningOnLinuxPlatform();
53
55 static constexpr bool isRunningOnUnixPlatform();
56
58 static const QString &getPlatformString();
59
61 static const QString &compiledWithInfo();
62
65
68
71
72#ifdef SWIFT_VATSIM_SUPPORT
74 static int vatsimClientId(); // defined in buildconfig_gen.cpp.in
75
77 static const QString &vatsimPrivateKey(); // defined in buildconfig_gen.cpp.in
78#endif
79
81 static const QString &backtraceToken(); // defined in buildconfig_gen.cpp.in
82
84 static const QString &gitHubRepoUrl();
85
87 static const QString &gitHubRepoApiUrl();
88
90 static const QString &gitHeadSha1();
91
93 static const QString &buildDateAndTime();
94
96 static const QVersionNumber &getVersion();
97
99 static const QString &getVersionString();
100
103
106
109
112 static int buildWordSize();
113
114 private:
116 static constexpr int versionMajor(); // defined in buildconfig_gen.inc.in
117
119 static constexpr int versionMinor(); // defined in buildconfig_gen.inc.in
120
122 static int versionRevision(); // defined in buildconfig_gen.cpp.in
123 };
124} // namespace swift::config
125
126// inline definitions of constexpr methods
127#define IN_BUILDCONFIG_H
128#include "buildconfig.inc"
129#undef IN_BUILDCONFIG_H
130
131#endif // SWIFT_CONFIG_BUILDCONFIG_H
Build configuration, also used to secure VATSIM key.
Definition buildconfig.h:16
static constexpr bool isDebugBuild()
Debug build?
static const QString & gitHeadSha1()
Returns SHA-1 of git HEAD at build time.
static const QString & swiftGuiExecutableName()
Executable name for swift GUI, no(!) appendix.
static constexpr bool isCompiledWithMsFlightSimulatorSupport()
Compiled with any MS Flight Simulator support (P3D, MSFS, MSFS24).
static const QString & getVersionString()
Version as QVersionNumber.
static const QVersionNumber & getVersion()
Version as QVersionNumber.
static const QString & getPlatformString()
Info such as Win32, Win64, macOS, Linux.
static constexpr bool isReleaseBuild()
Release build?
static constexpr bool isRunningOnUnixPlatform()
Running on Unix (Linux or Mac OS X) platform.
static const QString & getShortVersionString()
Version as QVersionNumber.
static constexpr bool isRunningOnMacOSPlatform()
Running on MacOS platform?
static constexpr bool isCompiledWithMSFSSupport()
with MSFS support?
static const QString & backtraceToken()
Backtrace token for minidump uploads.
static constexpr bool isCompiledWithFGSupport()
with FG support?
static bool isLocalDeveloperDebugBuild()
Local build for developers.
static const QString & buildDateAndTime()
Returns the build date and time as string.
static constexpr bool isRunningOnWindowsNtPlatform()
Running on Windows NT platform?
static constexpr bool isCompiledWithMSFS2024Support()
with MSFS2024 support?
static const QStringList & getBuildAbiParts()
Build ABI parts as in http://doc.qt.io/qt-5/qsysinfo.html#buildAbi.
static constexpr bool isRunningOnLinuxPlatform()
Running on Linux platform?
static const QString & compiledWithInfo()
Info string about compilation.
static const QString & swiftDataExecutableName()
Executable name for swift data, no(!) appendix.
static const QString & gitHubRepoUrl()
GitHub repository URL.
static const QString & gitHubRepoApiUrl()
GitHub Packages REST API URL.
static const QString & swiftCoreExecutableName()
Executable name for swift core, no(!) appendix.
static constexpr bool isCompiledWithXPlaneSupport()
with XPlane support?
static constexpr bool isCompiledWithP3DSupport()
with P3D support?
static int buildWordSize()
Whether this swift application is build as 32 or 64bit application.
static const QString & getVersionStringPlatform()
Version as QVersionNumber plus platform info.