swift
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 
12 namespace swift::config
13 {
16  {
17  public:
19  static constexpr bool isCompiledWithFs9Support(); // defined in buildconfig_gen.inc.in
20 
22  static constexpr bool isCompiledWithFsxSupport(); // defined in buildconfig_gen.inc.in
23 
25  static constexpr bool isCompiledWithP3DSupport(); // defined in buildconfig_gen.inc.in
26 
28  static constexpr bool isCompiledWithFGSupport(); // defined in buildconfig_gen.inc.in
29 
31  static constexpr bool isCompiledWithMSFSSupport(); // defined in buildconfig_gen.inc.in
32 
34  static constexpr bool isCompiledWithMSFS2024Support(); // defined in buildconfig_gen.inc.in
35 
37  static constexpr bool isCompiledWithFsuipcSupport(); // defined in buildconfig_gen.inc.in
38 
40  static constexpr bool isCompiledWithMsFlightSimulatorSupport();
41 
43  static constexpr bool isCompiledWithXPlaneSupport(); // defined in buildconfig_gen.inc.in
44 
46  static constexpr bool isDebugBuild();
47 
49  static constexpr bool isReleaseBuild();
50 
53 
55  static constexpr bool isRunningOnWindowsNtPlatform();
56 
58  static constexpr bool isRunningOnMacOSPlatform();
59 
61  static constexpr bool isRunningOnLinuxPlatform();
62 
64  static constexpr bool isRunningOnUnixPlatform();
65 
67  static const QString &getPlatformString();
68 
70  static const QString &compiledWithInfo();
71 
73  static const QString &swiftGuiExecutableName();
74 
76  static const QString &swiftCoreExecutableName();
77 
79  static const QString &swiftDataExecutableName();
80 
81 #ifdef SWIFT_VATSIM_SUPPORT
83  static int vatsimClientId(); // defined in buildconfig_gen.cpp.in
84 
86  static const QString &vatsimPrivateKey(); // defined in buildconfig_gen.cpp.in
87 #endif
88 
90  static const QString &backtraceToken(); // defined in buildconfig_gen.cpp.in
91 
93  static const QString &gitHubRepoUrl();
94 
96  static const QString &gitHubRepoApiUrl();
97 
99  static const QString &gitHeadSha1();
100 
102  static const QString &buildDateAndTime();
103 
105  static const QVersionNumber &getVersion();
106 
108  static const QString &getVersionString();
109 
111  static const QString &getShortVersionString();
112 
114  static const QString &getVersionStringPlatform();
115 
117  static const QStringList &getBuildAbiParts();
118 
121  static int buildWordSize();
122 
123  private:
125  static constexpr int versionMajor(); // defined in buildconfig_gen.inc.in
126 
128  static constexpr int versionMinor(); // defined in buildconfig_gen.inc.in
129 
131  static int versionRevision(); // defined in buildconfig_gen.cpp.in
132  };
133 } // namespace swift::config
134 
135 // inline definitions of constexpr methods
136 #define IN_BUILDCONFIG_H
137 #include "buildconfig.inc"
138 #undef IN_BUILDCONFIG_H
139 
140 #endif // SWIFT_CONFIG_BUILDCONFIG_H
Build configuration, also used to secure VATSIM key.
Definition: buildconfig.h:16
static const QString & getPlatformString()
Info such as Win32, Win64, macOS, Linux.
static constexpr bool isDebugBuild()
Debug build?
static const QString & buildDateAndTime()
Returns the build date and time as string.
static constexpr bool isCompiledWithFs9Support()
with FS9 support?
static constexpr bool isCompiledWithMsFlightSimulatorSupport()
Compiled with any MS Flight Simulator support (P3D, FSX, FS9)
static constexpr bool isReleaseBuild()
Release build?
static const QVersionNumber & getVersion()
Version as QVersionNumber.
static constexpr bool isRunningOnUnixPlatform()
Running on Unix (Linux or Mac OS X) platform.
static constexpr bool isRunningOnMacOSPlatform()
Running on MacOS platform?
static const QString & getShortVersionString()
Version as QVersionNumber.
static const QString & gitHubRepoApiUrl()
GitHub Packages REST API URL.
static constexpr bool isCompiledWithMSFSSupport()
with MSFS support?
static const QString & getVersionString()
Version as QVersionNumber.
static constexpr bool isCompiledWithFsxSupport()
with FSX support?
static constexpr bool isCompiledWithFGSupport()
with FG support?
static bool isLocalDeveloperDebugBuild()
Local build for developers.
static constexpr bool isRunningOnWindowsNtPlatform()
Running on Windows NT platform?
static const QString & gitHubRepoUrl()
GitHub repository URL.
static constexpr bool isCompiledWithMSFS2024Support()
with MSFS2024 support?
static const QString & swiftCoreExecutableName()
Executable name for swift core, no(!) appendix.
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 isRunningOnLinuxPlatform()
Running on Linux platform?
static const QString & swiftDataExecutableName()
Executable name for swift data, no(!) appendix.
static const QString & backtraceToken()
Backtrace token for minidump uploads.
static constexpr bool isCompiledWithFsuipcSupport()
with FSUIPC support?
static const QString & compiledWithInfo()
Info string about compilation.
static const QStringList & getBuildAbiParts()
Build ABI parts as in http://doc.qt.io/qt-5/qsysinfo.html#buildAbi.
static const QString & getVersionStringPlatform()
Version as QVersionNumber plus platform info.
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.