src/version.h

Mon, 27 Jun 2022 02:00:49 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Mon, 27 Jun 2022 02:00:49 +0300
changeset 270
1202b102a10b
parent 268
fb319526ba6c
child 272
9d52b119b3f5
permissions
-rw-r--r--

Fix qrc path in mainwindow.ui

1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 /*
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 * LDForge: LDraw parts authoring CAD
24
1a0faaaceb84 added license
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
3 * Copyright (C) 2013 - 2020 Teemu Piippo
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 *
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8 * (at your option) any later version.
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 *
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 * GNU General Public License for more details.
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 *
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 */
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 #pragma once
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 #include <QString>
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21
268
fb319526ba6c Define application name and version in CMakeLists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents: 250
diff changeset
22 constexpr char appName[] = APPNAME;
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
23
268
fb319526ba6c Define application name and version in CMakeLists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents: 250
diff changeset
24 constexpr struct {
fb319526ba6c Define application name and version in CMakeLists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents: 250
diff changeset
25 int major = VERSION_MAJOR;
fb319526ba6c Define application name and version in CMakeLists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents: 250
diff changeset
26 int minor = VERSION_MINOR;
fb319526ba6c Define application name and version in CMakeLists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents: 250
diff changeset
27 int patch = VERSION_PATCH;
fb319526ba6c Define application name and version in CMakeLists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents: 250
diff changeset
28 } APPVERSION;
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
29
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
30 enum BuildType {InternalBuild, ReleaseBuild};
250
2837b549e616 I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents: 24
diff changeset
31 constexpr BuildType BUILD_TYPE = InternalBuild;
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
32
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
33 #ifdef DEBUG
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
34 # undef RELEASE
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
35 #endif // DEBUG
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
36
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
37 #ifdef RELEASE
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
38 # undef DEBUG
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
39 #endif // RELEASE
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
40
268
fb319526ba6c Define application name and version in CMakeLists
Teemu Piippo <teemu.s.piippo@gmail.com>
parents: 250
diff changeset
41 const char *fullVersionString();
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
42 const QString& commitTimeString();

mercurial