Merge pull request #3513 from acemod/cbaVersioning

Add CBA 2.3.1 to versioning check
This commit is contained in:
Thomas Kooi 2016-03-08 19:21:36 +01:00
commit bfe738ba80
3 changed files with 26 additions and 0 deletions

View File

@ -19,6 +19,18 @@ private _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "version
ACE_LOGINFO_1("ACE is version %1.",_version);
//CBA Versioning check - close main display if using incompatible version
private _cbaVersionAr = getArray (configFile >> "CfgPatches" >> "cba_main" >> "versionAr");
private _cbaRequiredAr = (getArray (configFile >> "CfgSettings" >> "CBA" >> "Versioning" >> "ACE" >> "dependencies" >> "CBA")) select 1;
ACE_LOGINFO_2("CBA is version %1 [min required %2]",_cbaVersionAr,_cbaRequiredAr);
if ([_cbaRequiredAr, _cbaVersionAr] call cba_versioning_fnc_version_compare) then {
private _errorMsg = format ["CBA Version [%1] is outdated [required %2]", _cbaVersionAr, _cbaRequiredAr];
ACE_LOGERROR(_errorMsg);
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
};
//private _addons = activatedAddons; // broken with High-Command module, see #2134
private _addons = "true" configClasses (configFile >> "CfgPatches");//
_addons = _addons apply {toLower configName _x};//

View File

@ -588,3 +588,16 @@ class CfgMods {
#include "CfgModuleCategories.hpp"
#include "CfgVehicleClasses.hpp"
class CfgSettings {
class CBA {
class Versioning {
class ACE {
class dependencies {
CBA[] = {"cba_main", REQUIRED_CBA_VERSION, "true"};
};
};
};
};
};

View File

@ -13,3 +13,4 @@
// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 1.56
#define REQUIRED_CBA_VERSION {2,3,1}