Tools - Add script to update HEMTT include folder (#8134)

This commit is contained in:
PabstMirror 2021-04-20 05:28:11 -05:00 committed by GitHub
parent 5aa6e564e0
commit 28cad69947
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 22 deletions

View File

@ -98,6 +98,14 @@
#define IGUI_ERROR_RGB IGUI_ERROR_RGB_R, IGUI_ERROR_RGB_G, IGUI_ERROR_RGB_B #define IGUI_ERROR_RGB IGUI_ERROR_RGB_R, IGUI_ERROR_RGB_G, IGUI_ERROR_RGB_B
#define IGUI_ERROR_COLOR {IGUI_ERROR_RGB,IGUI_ERROR_RGB_A} #define IGUI_ERROR_COLOR {IGUI_ERROR_RGB,IGUI_ERROR_RGB_A}
//--- IGUI Tactical ping color
#define IGUI_TACTPING_RGB_R "(profilenamespace getvariable ['IGUI_TACTPING_RGB_R',1.0])"
#define IGUI_TACTPING_RGB_G "(profilenamespace getvariable ['IGUI_TACTPING_RGB_G',0.8])"
#define IGUI_TACTPING_RGB_B "(profilenamespace getvariable ['IGUI_TACTPING_RGB_B',0.2])"
#define IGUI_TACTPING_RGB_A "(profilenamespace getvariable ['IGUI_TACTPING_RGB_A',1.0])"
#define IGUI_TACTPING_RGB IGUI_TACTPING_RGB_R, IGUI_TACTPING_RGB_G, IGUI_TACTPING_RGB_B
#define IGUI_TACTPING_COLOR {IGUI_TACTPING_RGB,IGUI_TACTPING_RGB_A}
//--- HUD Text color (obsolete defines; ToDo: Replace with IGUI_TEXT_COLOR and IGUI_BCG_COLOR) //--- HUD Text color (obsolete defines; ToDo: Replace with IGUI_TEXT_COLOR and IGUI_BCG_COLOR)
#define CA_UI_HUD IGUI_TEXT_COLOR #define CA_UI_HUD IGUI_TEXT_COLOR
@ -213,7 +221,6 @@
#define COLOR_TASK_ICON_CUSTOM_A 0.5 #define COLOR_TASK_ICON_CUSTOM_A 0.5
#define COLOR_TASK_ICON_CUSTOM_RGBA COLOR_TASK_ICON_CUSTOM_RGB,COLOR_TASK_ICON_CUSTOM_A #define COLOR_TASK_ICON_CUSTOM_RGBA COLOR_TASK_ICON_CUSTOM_RGB,COLOR_TASK_ICON_CUSTOM_A
#define COLOR_TASK_BACKGROUND_UNASSIGNED_RGB 1,1,1 #define COLOR_TASK_BACKGROUND_UNASSIGNED_RGB 1,1,1
#define COLOR_TASK_BACKGROUND_UNASSIGNED_A 1 #define COLOR_TASK_BACKGROUND_UNASSIGNED_A 1
#define COLOR_TASK_BACKGROUND_UNASSIGNED_RGBA COLOR_TASK_BACKGROUND_UNASSIGNED_RGB,COLOR_TASK_BACKGROUND_UNASSIGNED_A #define COLOR_TASK_BACKGROUND_UNASSIGNED_RGBA COLOR_TASK_BACKGROUND_UNASSIGNED_RGB,COLOR_TASK_BACKGROUND_UNASSIGNED_A

View File

@ -187,3 +187,4 @@
#endif /* DIK_ESCAPE */ #endif /* DIK_ESCAPE */

View File

@ -1,3 +1,6 @@
#ifndef _RESINCL_HPP
#define _RESINCL_HPP
/*******************/ /*******************/
/* Tactical menu */ /* Tactical menu */
/*******************/ /*******************/
@ -3168,3 +3171,6 @@ enum
#define HZ_VEH_CMDTRRT_TOTAL 31 #define HZ_VEH_CMDTRRT_TOTAL 31
#define HZ_TANK_BOTH_TRACKS 32 #define HZ_TANK_BOTH_TRACKS 32
#endif

View File

@ -197,7 +197,7 @@ Author:
------------------------------------------- */ ------------------------------------------- */
#ifdef DEBUG_MODE_FULL #ifdef DEBUG_MODE_FULL
#define LOG(MESSAGE) LOG_SYS_FILELINENUMBERS('LOG',MESSAGE) #define LOG(MESSAGE) LOG_SYS('LOG',MESSAGE)
#define LOG_1(MESSAGE,ARG1) LOG(FORMAT_1(MESSAGE,ARG1)) #define LOG_1(MESSAGE,ARG1) LOG(FORMAT_1(MESSAGE,ARG1))
#define LOG_2(MESSAGE,ARG1,ARG2) LOG(FORMAT_2(MESSAGE,ARG1,ARG2)) #define LOG_2(MESSAGE,ARG1,ARG2) LOG(FORMAT_2(MESSAGE,ARG1,ARG2))
#define LOG_3(MESSAGE,ARG1,ARG2,ARG3) LOG(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) #define LOG_3(MESSAGE,ARG1,ARG2,ARG3) LOG(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3))
@ -265,7 +265,7 @@ Author:
------------------------------------------- */ ------------------------------------------- */
#ifdef DEBUG_MODE_NORMAL #ifdef DEBUG_MODE_NORMAL
#define WARNING(MESSAGE) LOG_SYS_FILELINENUMBERS('WARNING',MESSAGE) #define WARNING(MESSAGE) LOG_SYS('WARNING',MESSAGE)
#define WARNING_1(MESSAGE,ARG1) WARNING(FORMAT_1(MESSAGE,ARG1)) #define WARNING_1(MESSAGE,ARG1) WARNING(FORMAT_1(MESSAGE,ARG1))
#define WARNING_2(MESSAGE,ARG1,ARG2) WARNING(FORMAT_2(MESSAGE,ARG1,ARG2)) #define WARNING_2(MESSAGE,ARG1,ARG2) WARNING(FORMAT_2(MESSAGE,ARG1,ARG2))
#define WARNING_3(MESSAGE,ARG1,ARG2,ARG3) WARNING(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) #define WARNING_3(MESSAGE,ARG1,ARG2,ARG3) WARNING(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3))
@ -304,7 +304,7 @@ Example:
Author: Author:
Spooner Spooner
------------------------------------------- */ ------------------------------------------- */
#define ERROR(MESSAGE) LOG_SYS_FILELINENUMBERS('ERROR',MESSAGE) #define ERROR(MESSAGE) LOG_SYS('ERROR',MESSAGE)
#define ERROR_1(MESSAGE,ARG1) ERROR(FORMAT_1(MESSAGE,ARG1)) #define ERROR_1(MESSAGE,ARG1) ERROR(FORMAT_1(MESSAGE,ARG1))
#define ERROR_2(MESSAGE,ARG1,ARG2) ERROR(FORMAT_2(MESSAGE,ARG1,ARG2)) #define ERROR_2(MESSAGE,ARG1,ARG2) ERROR(FORMAT_2(MESSAGE,ARG1,ARG2))
#define ERROR_3(MESSAGE,ARG1,ARG2,ARG3) ERROR(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) #define ERROR_3(MESSAGE,ARG1,ARG2,ARG3) ERROR(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3))
@ -1812,9 +1812,9 @@ Author:
/* ------------------------------------------- /* -------------------------------------------
Macro: FILE_EXISTS Macro: FILE_EXISTS
Check if a file exists on machines with interface Check if a file exists
Reports "false" if the file does not exist and throws an error in RPT. Reports "false" if the file does not exist.
Parameters: Parameters:
FILE - Path to the file FILE - Path to the file
@ -1828,17 +1828,4 @@ Example:
Author: Author:
commy2 commy2
------------------------------------------- */ ------------------------------------------- */
#define FILE_EXISTS(FILE) (call {\ #define FILE_EXISTS(FILE) (fileExists (FILE))
private _return = false;\
isNil {\
private _control = (uiNamespace getVariable ["RscDisplayMain", displayNull]) ctrlCreate ["RscHTML", -1];\
if (isNull _control) then {\
_return = loadFile (FILE) != "";\
} else {\
_control htmlLoad (FILE);\
_return = ctrlHTMLLoaded _control;\
ctrlDelete _control;\
};\
};\
_return\
})

View File

@ -54,7 +54,9 @@ reloaded = "call cba_xeh_fnc_reloaded"; \
firedMan = "call cba_xeh_fnc_firedMan"; \ firedMan = "call cba_xeh_fnc_firedMan"; \
turnIn = "call cba_xeh_fnc_turnIn"; \ turnIn = "call cba_xeh_fnc_turnIn"; \
turnOut = "call cba_xeh_fnc_turnOut"; \ turnOut = "call cba_xeh_fnc_turnOut"; \
deleted = "call cba_xeh_fnc_deleted"; deleted = "call cba_xeh_fnc_deleted"; \
disassembled = "call cba_xeh_fnc_disassembled"; \
Suppressed = "call cba_xeh_fnc_Suppressed";
/* /*
MACRO: DELETE_EVENTHANDLERS MACRO: DELETE_EVENTHANDLERS
@ -107,4 +109,6 @@ reloaded = ""; \
firedMan = ""; \ firedMan = ""; \
turnIn = ""; \ turnIn = ""; \
turnOut = ""; \ turnOut = ""; \
deleted = ""; deleted = ""; \
disassembled = ""; \
Suppressed = "";

21
tools/updateIncludes.py Normal file
View File

@ -0,0 +1,21 @@
# PabstMirror - Overwrites all files in /include with updated version from a p-drive
import os
import shutil
include_base_path = os.path.join(os.path.dirname(os.getcwd()), "include")
p_drive_path = "P:\\"
if not os.path.exists(p_drive_path):
raise Exception("No P-drive")
for root, _dirs, files in os.walk(include_base_path):
relative_path = os.path.relpath(root, include_base_path)
for file in files:
if file == "$PBOPREFIX$":
continue
file_r_path = os.path.join(include_base_path, relative_path, file)
file_v_path = os.path.join(p_drive_path, relative_path, file)
if not os.path.isfile(file_v_path):
raise Exception("Missing p-drive file {}".format(file_v_path))
shutil.copyfile(file_v_path, file_r_path)