Remove explicit name for versions

This commit is contained in:
Alexander Bock
2025-07-25 09:19:52 +02:00
parent 4228ddd66b
commit 6aec8e9338
9 changed files with 13 additions and 20 deletions
-1
View File
@@ -37,7 +37,6 @@ set(OPENSPACE_RELEASE_BUILD OFF)
set(OPENSPACE_VERSION_MAJOR)
set(OPENSPACE_VERSION_MINOR)
set(OPENSPACE_VERSION_PATCH)
set(OPENSPACE_VERSION_STRING)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_common.cmake)
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/message_macros.cmake)
@@ -382,9 +382,7 @@ LauncherWindow::LauncherWindow(bool profileEnabled, const Configuration& globalC
{
QLabel* versionLabel = new QLabel(centralWidget);
versionLabel->setVisible(true);
versionLabel->setText(
QString::fromStdString(std::string(OPENSPACE_VERSION_STRING_FULL))
);
versionLabel->setText(QString::fromStdString(std::string(OPENSPACE_VERSION)));
versionLabel->setObjectName("version-info");
versionLabel->setGeometry(geometry::VersionString);
}
@@ -134,7 +134,7 @@ NotificationWindow::NotificationWindow(QWidget* parent)
std::string URL = std::format(
"https://raw.githubusercontent.com/OpenSpace/Notifications/refs/heads/master/"
"{}.txt",
OPENSPACE_IS_RELEASE_BUILD ? OPENSPACE_VERSION_NUMBER : "master"
OPENSPACE_IS_RELEASE_BUILD ? OPENSPACE_VERSION : "master"
);
_request = std::make_unique<HttpMemoryDownload>(
@@ -77,7 +77,7 @@ void KameleonDocumentationTask::perform(const Task::ProgressCallback & progressC
ghoul::Dictionary dictionary;
dictionary.setValue("kameleon", std::move(kameleonDictionary));
dictionary.setValue("version", std::string(OPENSPACE_VERSION_NUMBER));
dictionary.setValue("version", std::string(OPENSPACE_VERSION));
dictionary.setValue("input", _inputPath.string());
std::string json = ghoul::formatJson(dictionary);
+1 -1
View File
@@ -420,7 +420,7 @@ void OpenSpaceEngine::initialize() {
}
LINFOC("OpenSpace Version", std::string(OPENSPACE_VERSION_STRING_FULL));
LINFOC("OpenSpace Version", std::string(OPENSPACE_VERSION));
LINFOC("Commit", std::string(OPENSPACE_GIT_FULL));
// Register modules
+3 -3
View File
@@ -1238,7 +1238,7 @@ void RenderEngine::renderVersionInformation() {
if (global::versionChecker->hasLatestVersionInfo()) {
VersionChecker::SemanticVersion ver = global::versionChecker->latestVersion();
std::string versionString = std::string(OPENSPACE_VERSION_STRING_FULL);
std::string versionString = std::string(OPENSPACE_VERSION);
const VersionChecker::SemanticVersion current {
OPENSPACE_VERSION_MAJOR,
OPENSPACE_VERSION_MINOR,
@@ -1259,11 +1259,11 @@ void RenderEngine::renderVersionInformation() {
);
}
else {
versionBox = _fontVersionInfo->boundingBox(OPENSPACE_VERSION_STRING_FULL);
versionBox = _fontVersionInfo->boundingBox(OPENSPACE_VERSION);
FR::defaultRenderer().render(
*_fontVersionInfo,
glm::vec2(fontResolution().x - versionBox.x - 10.f, 5.f),
OPENSPACE_VERSION_STRING_FULL,
OPENSPACE_VERSION,
glm::vec4(0.5f, 0.5f, 0.5f, 1.f)
);
}
+1 -1
View File
@@ -65,7 +65,7 @@ void VersionChecker::requestLatestVersion(const std::string& url) {
std::string fullUrl = std::format(
"{}?client_version={}&commit_hash={}&operating_system={}&profile={}",
url, OPENSPACE_VERSION_NUMBER, OPENSPACE_GIT_COMMIT, operatingSystem, profile
url, OPENSPACE_VERSION, OPENSPACE_GIT_COMMIT, operatingSystem, profile
);
if (_request) {
+2 -6
View File
@@ -41,9 +41,7 @@ constexpr uint8_t OPENSPACE_VERSION_MAJOR = @OPENSPACE_VERSION_MAJOR@;
constexpr uint8_t OPENSPACE_VERSION_MINOR = @OPENSPACE_VERSION_MINOR@;
constexpr uint8_t OPENSPACE_VERSION_PATCH = @OPENSPACE_VERSION_PATCH@;
constexpr std::string_view OPENSPACE_VERSION_NUMBER = "@OPENSPACE_VERSION_MAJOR@.@OPENSPACE_VERSION_MINOR@.@OPENSPACE_VERSION_PATCH@";
constexpr std::string_view OPENSPACE_VERSION_STRING = "@OPENSPACE_VERSION_STRING@";
constexpr std::string_view OPENSPACE_VERSION_STRING_FULL = "@OPENSPACE_VERSION_MAJOR@.@OPENSPACE_VERSION_MINOR@.@OPENSPACE_VERSION_PATCH@ (@OPENSPACE_VERSION_STRING@)";
constexpr std::string_view OPENSPACE_VERSION = "@OPENSPACE_VERSION_MAJOR@.@OPENSPACE_VERSION_MINOR@.@OPENSPACE_VERSION_PATCH@";
#else // ^^^^ OPENSPACE_RELEASE_BUILD || !OPENSPACE_RELEASE_BUILD vvvv
@@ -53,9 +51,7 @@ constexpr uint8_t OPENSPACE_VERSION_MAJOR = std::numeric_limits<uint8_t>::max();
constexpr uint8_t OPENSPACE_VERSION_MINOR = std::numeric_limits<uint8_t>::max();
constexpr uint8_t OPENSPACE_VERSION_PATCH = std::numeric_limits<uint8_t>::max();
constexpr std::string_view OPENSPACE_VERSION_NUMBER = "";
constexpr std::string_view OPENSPACE_VERSION_STRING = "";
constexpr std::string_view OPENSPACE_VERSION_STRING_FULL = "";
constexpr std::string_view OPENSPACE_VERSION = "";
#endif // OPENSPACE_RELEASE_BUILD
+3 -3
View File
@@ -37,7 +37,7 @@ set(OPENSPACE_VERSION_NUMBER
)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "OpenSpace ${OPENSPACE_VERSION_NUMBER}")
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME} ${OPENSPACE_VERSION_NUMBER} ${OPENSPACE_VERSION_STRING}"
"${CPACK_PACKAGE_NAME} ${OPENSPACE_VERSION_NUMBER}"
)
set(CPACK_STRIP_FILES 1)
@@ -74,11 +74,11 @@ if (WIN32)
set(CPACK_GENERATOR ZIP)
# Need backslash for correct subdirectory paths
set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}\\\\apps\\\\OpenSpace\\\\openspace.png")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}\\\\${OPENSPACE_VERSION_NUMBER} ${OPENSPACE_VERSION_STRING}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}\\\\${OPENSPACE_VERSION_NUMBER}")
else ()
set(CPACK_GENERATOR TGZ)
set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/apps/OpenSpace/openspace.png")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${OPENSPACE_VERSION_NUMBER} ${OPENSPACE_VERSION_STRING}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${OPENSPACE_VERSION_NUMBER}")
endif ()
option(OPENSPACE_CREATE_INSTALLER "Create an OpenSpace installer from the package" OFF)