From c29c24093c30fcfea8c67a75d8dc692fbc4f2e45 Mon Sep 17 00:00:00 2001 From: Ryan Lucia Date: Sun, 3 Dec 2023 13:01:44 -0800 Subject: [PATCH] Add a build option to tag official releases --- meson.build | 3 +++ meson_options.txt | 1 + src/version.cpp | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/meson.build b/meson.build index c93670e56..d1d8adb3d 100644 --- a/meson.build +++ b/meson.build @@ -58,6 +58,9 @@ conf.set_quoted('P_LOCALE', localedir) if get_option('credit') != '' conf.set_quoted('BUILD_CREDIT', get_option('credit')) endif +if get_option('official_release') + conf.set('AEGI_OFFICIAL_RELEASE', 1) +endif conf.set('WITH_UPDATE_CHECKER', get_option('enable_update_checker')) deps = [] diff --git a/meson_options.txt b/meson_options.txt index 3bc0461cd..a6f3e7d11 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -19,6 +19,7 @@ option('local_boost', type: 'boolean', value: false, description: 'Force using l option('wx_version', type: 'string', value: '3.0.0', description: 'The minimum wxWidgets version to use') option('credit', type: 'string', value: '', description: 'Build credit shown in program title') +option('official_release', type: 'boolean', value: false, description: 'Set on official builds') option('enable_update_checker', type: 'boolean', value: false, description: 'Enable the update checker') option('update_server', type: 'string', value: 'updates.aegisub.org', description: 'Server to use for the update checker') diff --git a/src/version.cpp b/src/version.cpp index a612b439c..3af933770 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -67,7 +67,11 @@ const char *GetAegisubBuildCredit() { #endif bool GetIsOfficialRelease() { +#ifdef AEGI_OFFICIAL_RELEASE + return AEGI_OFFICIAL_RELEASE; +#else return false; +#endif } const char *GetVersionNumber() {