mirror of
https://github.com/acemod/ACE3.git
synced 2025-07-25 04:42:48 +00:00
Extension changes for Medical Rewrite and Linux compilation (#6909)
* Fix Medical HandleDamageWounds memory leak (#6809) * Use strncpy and disable MSVC unsafe warnings (#7171) * Set 64-bit correctly from generator string, Disable SSE2 flag on 64-bit (non-existent) * Tweaks for Linux extensions (#5762) * Tweak CMakeLists for Linux compilation * Conform SQF extensions check for Linux server extensions support * Add *.so to tools * Split extension check into Windows and Linux * Disable Medical extension loading for now * Add client/server separation to extension loading * Add Arma config documentation on extension creation
This commit is contained in:
@ -67,9 +67,7 @@ class ACE_Rsc_Control_Base {
|
||||
#include "CompassControl.hpp"
|
||||
#include "CfgUIGrids.hpp"
|
||||
|
||||
class ACE_Extensions {
|
||||
extensions[] = {};
|
||||
};
|
||||
class ACE_Extensions {};
|
||||
|
||||
class ACE_Tests {
|
||||
vehicleTransportInventory = QPATHTOF(dev\test_vehicleInventory.sqf);
|
||||
|
@ -67,38 +67,43 @@ if (!(_oldCompats isEqualTo [])) then {
|
||||
};
|
||||
|
||||
///////////////
|
||||
// check dlls
|
||||
// check extensions
|
||||
///////////////
|
||||
if (toLower (productVersion select 6) in ["linux", "osx"]) then {
|
||||
INFO("Operating system does not support DLL file format");
|
||||
private _platform = toLower (productVersion select 6);
|
||||
if (!isServer && {_platform in ["linux", "osx"]}) then {
|
||||
// Linux and OSX client ports do not support extensions at all
|
||||
INFO("Operating system does not support extensions");
|
||||
} else {
|
||||
{
|
||||
private _versionEx = _x callExtension "version";
|
||||
private _extension = configName _x;
|
||||
private _isWindows = _platform == "windows" && {getNumber (_x >> "windows") == 1};
|
||||
private _isLinux = _platform == "linux" && {getNumber (_x >> "linux") == 1};
|
||||
private _isClient = hasInterface && {getNumber (_x >> "client") == 1};
|
||||
private _isServer = !hasInterface && {getNumber (_x >> "server") == 1};
|
||||
|
||||
if (_versionEx == "") then {
|
||||
private _extension = ".dll";
|
||||
if ((_isWindows || _isLinux) && {_isClient || _isServer}) then {
|
||||
private _versionEx = _extension callExtension "version";
|
||||
if (_versionEx == "") then {
|
||||
private _extensionFile = _extension;
|
||||
if (productVersion select 7 == "x64") then {
|
||||
_extensionFile = format ["%1_x64", _extensionFile];
|
||||
};
|
||||
|
||||
if (productVersion select 7 == "x64") then {
|
||||
_extension = "_x64.dll";
|
||||
private _platformExt = [".dll", ".so"] select (_platform == "linux");
|
||||
_extensionFile = format ["%1%2", _extensionFile, _platformExt];
|
||||
|
||||
private _errorMsg = format ["Extension %1 not found.", _extensionFile];
|
||||
ERROR(_errorMsg);
|
||||
|
||||
if (hasInterface) then {
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
};
|
||||
} else {
|
||||
// Print the current extension version
|
||||
INFO_2("Extension version: %1: %2",_extension,_versionEx);
|
||||
};
|
||||
|
||||
if (productVersion select 6 == "Linux") then {
|
||||
_extension = ".so";
|
||||
};
|
||||
|
||||
private _errorMsg = format ["Extension %1%2 not found.", _x, _extension];
|
||||
|
||||
ERROR(_errorMsg);
|
||||
|
||||
if (hasInterface) then {
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
};
|
||||
} else {
|
||||
// Print the current extension version
|
||||
INFO_2("Extension version: %1: %2",_x,_versionEx);
|
||||
};
|
||||
false
|
||||
} count getArray (configFile >> "ACE_Extensions" >> "extensions");
|
||||
} forEach ("true" configClasses (configFile >> "ACE_Extensions"));
|
||||
};
|
||||
|
||||
///////////////
|
||||
|
Reference in New Issue
Block a user