Skip to content

Commit

Permalink
Merge pull request #3513 from acemod/cbaVersioning
Browse files Browse the repository at this point in the history
Add CBA 2.3.1 to versioning check
  • Loading branch information
thojkooi committed Mar 8, 2016
2 parents ddd8187 + 53a36f8 commit bfe738b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions addons/common/functions/fnc_checkFiles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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};//
Expand Down
13 changes: 13 additions & 0 deletions addons/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"};
};
};
};
};
};

1 change: 1 addition & 0 deletions addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit bfe738b

Please sign in to comment.