1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #99590 from Calinou/version-double-build-name

Add `double` to the version full build string when using a double-precision build
This commit is contained in:
Rémi Verschelde
2025-03-28 14:31:23 +01:00
2 changed files with 28 additions and 4 deletions

View File

@@ -62,17 +62,22 @@
#define GODOT_VERSION_HEX 0x10000 * GODOT_VERSION_MAJOR + 0x100 * GODOT_VERSION_MINOR + GODOT_VERSION_PATCH #define GODOT_VERSION_HEX 0x10000 * GODOT_VERSION_MAJOR + 0x100 * GODOT_VERSION_MINOR + GODOT_VERSION_PATCH
// Describes the full configuration of that Godot version, including the version number, // Describes the full configuration of that Godot version, including the version number,
// the status (beta, stable, etc.) and potential module-specific features (e.g. mono). // the status (beta, stable, etc.), potential module-specific features (e.g. mono)
// Example: "3.1.4.stable.mono" // and double-precision status.
// Example: "3.1.4.stable.mono.double"
#ifdef REAL_T_IS_DOUBLE
#define GODOT_VERSION_FULL_CONFIG GODOT_VERSION_NUMBER "." GODOT_VERSION_STATUS GODOT_VERSION_MODULE_CONFIG ".double"
#else
#define GODOT_VERSION_FULL_CONFIG GODOT_VERSION_NUMBER "." GODOT_VERSION_STATUS GODOT_VERSION_MODULE_CONFIG #define GODOT_VERSION_FULL_CONFIG GODOT_VERSION_NUMBER "." GODOT_VERSION_STATUS GODOT_VERSION_MODULE_CONFIG
#endif
// Similar to GODOT_VERSION_FULL_CONFIG, but also includes the (potentially custom) GODOT_VERSION_BUILD // Similar to GODOT_VERSION_FULL_CONFIG, but also includes the (potentially custom) GODOT_VERSION_BUILD
// description (e.g. official, custom_build, etc.). // description (e.g. official, custom_build, etc.).
// Example: "3.1.4.stable.mono.official" // Example: "3.1.4.stable.mono.double.official"
#define GODOT_VERSION_FULL_BUILD GODOT_VERSION_FULL_CONFIG "." GODOT_VERSION_BUILD #define GODOT_VERSION_FULL_BUILD GODOT_VERSION_FULL_CONFIG "." GODOT_VERSION_BUILD
// Same as above, but prepended with Godot's name and a cosmetic "v" for "version". // Same as above, but prepended with Godot's name and a cosmetic "v" for "version".
// Example: "Godot v3.1.4.stable.official.mono" // Example: "Godot v3.1.4.stable.official.mono.double"
#define GODOT_VERSION_FULL_NAME GODOT_VERSION_NAME " v" GODOT_VERSION_FULL_BUILD #define GODOT_VERSION_FULL_NAME GODOT_VERSION_NAME " v" GODOT_VERSION_FULL_BUILD
// Git commit hash, generated at build time in `core/version_hash.gen.cpp`. // Git commit hash, generated at build time in `core/version_hash.gen.cpp`.

View File

@@ -53,6 +53,7 @@ enum DownloadsAvailability {
DOWNLOADS_AVAILABLE, DOWNLOADS_AVAILABLE,
DOWNLOADS_NOT_AVAILABLE_IN_OFFLINE_MODE, DOWNLOADS_NOT_AVAILABLE_IN_OFFLINE_MODE,
DOWNLOADS_NOT_AVAILABLE_FOR_DEV_BUILDS, DOWNLOADS_NOT_AVAILABLE_FOR_DEV_BUILDS,
DOWNLOADS_NOT_AVAILABLE_FOR_DOUBLE_BUILDS,
}; };
static DownloadsAvailability _get_downloads_availability() { static DownloadsAvailability _get_downloads_availability() {
@@ -69,6 +70,10 @@ static DownloadsAvailability _get_downloads_availability() {
return DOWNLOADS_NOT_AVAILABLE_FOR_DEV_BUILDS; return DOWNLOADS_NOT_AVAILABLE_FOR_DEV_BUILDS;
} }
#ifdef REAL_T_IS_DOUBLE
return DOWNLOADS_NOT_AVAILABLE_FOR_DOUBLE_BUILDS;
#endif
if (network_mode == EditorSettings::NETWORK_OFFLINE) { if (network_mode == EditorSettings::NETWORK_OFFLINE) {
return DOWNLOADS_NOT_AVAILABLE_IN_OFFLINE_MODE; return DOWNLOADS_NOT_AVAILABLE_IN_OFFLINE_MODE;
} }
@@ -739,6 +744,20 @@ void ExportTemplateManager::popup_manager() {
enable_online_hb->hide(); enable_online_hb->hide();
} break; } break;
case DOWNLOADS_NOT_AVAILABLE_FOR_DOUBLE_BUILDS: {
current_missing_label->set_text(TTR("Export templates are missing. Install them from a file."));
mirrors_list->clear();
mirrors_list->add_item(TTR("No templates for double-precision builds"), 0);
mirrors_list->set_disabled(true);
mirrors_list->set_tooltip_text(TTR("Official export templates aren't available for double-precision builds."));
mirror_options_button->set_disabled(true);
download_current_button->set_disabled(true);
download_current_button->set_tooltip_text(TTR("Official export templates aren't available for double-precision builds."));
}
} }
popup_centered(Size2(720, 280) * EDSCALE); popup_centered(Size2(720, 280) * EDSCALE);