From 4dd10ff21dab4b0908bee0c78e554e98f4f6d68c Mon Sep 17 00:00:00 2001 From: MiszczuZPolski <71414303+MiszczuZPolski@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:05:44 +0200 Subject: [PATCH] General - Implement CBA versioning system (#609) **When merged this pull request will:** - Title ### IMPORTANT - [Development Guidelines](https://ace3.acemod.org/wiki/development/) are read, understood and applied. - Title of this PR uses our standard template `Component - Add|Fix|Improve|Change|Make|Remove {changes}`. --- addons/main/CfgSettings.hpp | 13 +++++++++++++ addons/main/config.cpp | 2 ++ addons/main/script_mod.hpp | 5 +++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 addons/main/CfgSettings.hpp diff --git a/addons/main/CfgSettings.hpp b/addons/main/CfgSettings.hpp new file mode 100644 index 000000000..fc9449dc7 --- /dev/null +++ b/addons/main/CfgSettings.hpp @@ -0,0 +1,13 @@ +class CfgSettings { + class CBA { + class Versioning { + class PREFIX { + class dependencies { + //KAT will hard exit if this is missing + CBA[] = {"cba_main", REQUIRED_CBA_VERSION, "(true)"}; + ACE[] = {"ace_main", REQUIRED_ACE_VERSION, "(true)"}; + }; + }; + }; + }; +}; diff --git a/addons/main/config.cpp b/addons/main/config.cpp index 6ce767932..23ee200d4 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -29,3 +29,5 @@ class CfgMods { description = "Issue Tracker: https://github.com/Tomcat-SG/KAM/issues"; }; }; + +#include "CfgSettings.hpp" diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 670aa5518..2aa02162e 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -12,8 +12,9 @@ #define VERSION_CONFIG version = MAJOR.MINOR; versionStr = QUOTE(MAJOR.MINOR.PATCH); versionAr[] = {MAJOR,MINOR,PATCH} // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 2.14 -#define REQUIRED_CBA_VERSION {3,15,7} +#define REQUIRED_VERSION 2.18 +#define REQUIRED_CBA_VERSION {3,18,0} +#define REQUIRED_ACE_VERSION {3,18,0} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(KAT - COMPONENT_BEAUTIFIED)