mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Update Makefile, Place includes in include folder
This commit is contained in:
parent
6037daadde
commit
601432daa7
@ -10,3 +10,6 @@ trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
21
Makefile
21
Makefile
@ -1,14 +1,14 @@
|
||||
MAJOR = $(shell grep "^\#define[[:space:]]*MAJOR" addons/main/script_mod.hpp | egrep -m 1 -o '[[:digit:]]+')
|
||||
MINOR = $(shell grep "^\#define[[:space:]]*MINOR" addons/main/script_mod.hpp | egrep -m 1 -o '[[:digit:]]+')
|
||||
PATCH = $(shell grep "^\#define[[:space:]]*PATCHLVL" addons/main/script_mod.hpp | egrep -m 1 -o '[[:digit:]]+')
|
||||
BUILD = $(shell grep "^\#define[[:space:]]*BUILD" addons/main/script_mod.hpp | egrep -m 1 -o '[[:digit:]]+')
|
||||
VERSION = $(MAJOR).$(MINOR).$(PATCH)
|
||||
VERSION_FULL = $(VERSION).$(BUILD)
|
||||
PREFIX = ace
|
||||
BIN = @ace
|
||||
ZIP = ace3
|
||||
CBA = tools/cba
|
||||
FLAGS = -i $(CBA) -w unquoted-string -w redefinition-wo-undef
|
||||
FLAGS = -i include -w unquoted-string -w redefinition-wo-undef
|
||||
|
||||
MAJOR = $(shell grep "^\#define[[:space:]]*MAJOR" addons/main/script_version.hpp | egrep -m 1 -o '[[:digit:]]+')
|
||||
MINOR = $(shell grep "^\#define[[:space:]]*MINOR" addons/main/script_version.hpp | egrep -m 1 -o '[[:digit:]]+')
|
||||
PATCH = $(shell grep "^\#define[[:space:]]*PATCHLVL" addons/main/script_version.hpp | egrep -m 1 -o '[[:digit:]]+')
|
||||
BUILD = $(shell grep "^\#define[[:space:]]*BUILD" addons/main/script_version.hpp | egrep -m 1 -o '[[:digit:]]+')
|
||||
VERSION = $(MAJOR).$(MINOR).$(PATCH)
|
||||
VERSION_FULL = $(VERSION).$(BUILD)
|
||||
|
||||
$(BIN)/addons/$(PREFIX)_%.pbo: addons/%
|
||||
@mkdir -p $(BIN)/addons
|
||||
@ -28,7 +28,7 @@ all: $(patsubst addons/%, $(BIN)/addons/$(PREFIX)_%.pbo, $(wildcard addons/*)) \
|
||||
$(patsubst optionals/%, $(BIN)/optionals/$(PREFIX)_%.pbo, $(wildcard optionals/*))
|
||||
|
||||
filepatching:
|
||||
"$(MAKE)" $(MAKEFLAGS) FLAGS="-i $(CBA) -w unquoted-string -p"
|
||||
"$(MAKE)" $(MAKEFLAGS) FLAGS="-w unquoted-string -p"
|
||||
|
||||
$(BIN)/keys/%.biprivatekey:
|
||||
@mkdir -p $(BIN)/keys
|
||||
@ -60,7 +60,8 @@ release:
|
||||
@"$(MAKE)" clean
|
||||
@"$(MAKE)" $(MAKEFLAGS) signatures
|
||||
@echo " ZIP ace3_$(VERSION).zip"
|
||||
@cp *.dll LICENSE README.md AUTHORS.txt logo_ace3_ca.paa mod.cpp meta.cpp $(BIN)
|
||||
@cp *.dll AUTHORS.txt LICENSE logo_ace3_ca.paa meta.cpp mod.cpp README.md docs/README_DE.md docs/README_PL.md $(BIN)
|
||||
@cp -r optionals/userconfig $(BIN)/optionals
|
||||
@zip -r $(ZIP)_$(VERSION).zip $(BIN) &> /dev/null
|
||||
|
||||
.PHONY: release
|
||||
|
@ -354,6 +354,27 @@ Author:
|
||||
------------------------------------------- */
|
||||
#define MESSAGE_WITH_TITLE(TITLE,MESSAGE) LOG_SYS_FILELINENUMBERS(TITLE,MESSAGE)
|
||||
|
||||
/* -------------------------------------------
|
||||
Macro: RETDEF()
|
||||
If a variable is undefined, return the default value. Otherwise, return the
|
||||
variable itself.
|
||||
|
||||
Parameters:
|
||||
VARIABLE - the variable to check
|
||||
DEFAULT_VALUE - the default value to use if variable is undefined
|
||||
|
||||
Example:
|
||||
(begin example)
|
||||
// _var is undefined
|
||||
hintSilent format ["_var=%1", RETDEF(_var,5)]; // "_var=5"
|
||||
_var = 7;
|
||||
hintSilent format ["_var=%1", RETDEF(_var,5)]; // "_var=7"
|
||||
(end example)
|
||||
Author:
|
||||
654wak654
|
||||
------------------------------------------- */
|
||||
#define RETDEF(VARIABLE,DEFAULT_VALUE) (if (isNil {VARIABLE}) then [{DEFAULT_VALUE}, {VARIABLE}])
|
||||
|
||||
/* -------------------------------------------
|
||||
Macro: RETNIL()
|
||||
If a variable is undefined, return the value nil. Otherwise, return the
|
||||
@ -365,13 +386,13 @@ Parameters:
|
||||
Example:
|
||||
(begin example)
|
||||
// _var is undefined
|
||||
hintSilent format ["_var=%1", RETNIL(_var) ]; // "_var=any"
|
||||
hintSilent format ["_var=%1", RETNIL(_var)]; // "_var=any"
|
||||
(end example)
|
||||
|
||||
Author:
|
||||
Alef (see CBA issue #8514)
|
||||
------------------------------------------- */
|
||||
#define RETNIL(VARIABLE) if (isNil{VARIABLE}) then {nil} else {VARIABLE}
|
||||
#define RETNIL(VARIABLE) RETDEF(VARIABLE,nil)
|
||||
|
||||
/* -------------------------------------------
|
||||
Macros: TRACE_n()
|
||||
@ -1039,7 +1060,7 @@ Parameters:
|
||||
Author:
|
||||
Spooner
|
||||
------------------------------------------- */
|
||||
#define IS_META_SYS(VAR,TYPE) (if (isNil {VAR}) then { false } else { (VAR) isEqualType TYPE })
|
||||
#define IS_META_SYS(VAR,TYPE) (if (isNil {VAR}) then {false} else {(VAR) isEqualType TYPE})
|
||||
#define IS_ARRAY(VAR) IS_META_SYS(VAR,[])
|
||||
#define IS_BOOL(VAR) IS_META_SYS(VAR,false)
|
||||
#define IS_CODE(VAR) IS_META_SYS(VAR,{})
|
||||
@ -1057,7 +1078,7 @@ Author:
|
||||
|
||||
#define IS_BOOLEAN(VAR) IS_BOOL(VAR)
|
||||
#define IS_FUNCTION(VAR) IS_CODE(VAR)
|
||||
#define IS_INTEGER(VAR) if ( IS_SCALAR(VAR) ) then { (floor(VAR) == (VAR)) } else { false }
|
||||
#define IS_INTEGER(VAR) (if (IS_SCALAR(VAR)) then {floor (VAR) == (VAR)} else {false})
|
||||
#define IS_NUMBER(VAR) IS_SCALAR(VAR)
|
||||
|
||||
#define FLOAT_TO_STRING(num) (str parseNumber (str (_this%_this) + str floor abs _this) + "." + (str (abs _this-floor abs _this) select [2]) + "0")
|
@ -50,7 +50,11 @@ weaponAssembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_x
|
||||
weaponDisassembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDisassembled"")"; \
|
||||
weaponDeployed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDeployed"")"; \
|
||||
weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")"; \
|
||||
reloaded = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_reloaded"")";
|
||||
reloaded = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_reloaded"")"; \
|
||||
firedMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_firedMan"")"; \
|
||||
turnIn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_turnIn"")"; \
|
||||
turnOut = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_turnOut"")"; \
|
||||
deleted = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_deleted"")";
|
||||
|
||||
|
||||
/*
|
||||
@ -99,4 +103,8 @@ weaponAssembled = ""; \
|
||||
weaponDisassembled = ""; \
|
||||
weaponDeployed = ""; \
|
||||
weaponRested = ""; \
|
||||
reloaded = "";
|
||||
reloaded = ""; \
|
||||
firedMan = ""; \
|
||||
turnIn = ""; \
|
||||
turnOut = ""; \
|
||||
deleted = "";
|
@ -1 +0,0 @@
|
||||
x\cba\addons\main
|
@ -1 +0,0 @@
|
||||
x\cba\addons\xeh
|
Loading…
Reference in New Issue
Block a user