Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building with HEMTT v1.0+ #1565

Merged
merged 25 commits into from
Aug 29, 2023
Merged

Add support for building with HEMTT v1.0+ #1565

merged 25 commits into from
Aug 29, 2023

Conversation

PabstMirror
Copy link
Contributor

@PabstMirror PabstMirror commented Jan 15, 2023

  • todo fleximenu

Need to look at hemtt mangling multiline code @BrettMayson

onLoad="\" \n "(_this select 0) call cba_settings_fnc_openSettingsMenu;\" \n "(_this select 0) closeDisplay 0;";
expression="\" \n "                            if (isNil 'CBA_fnc_setCallsign') then {\" \n "                                _this setGroupID [_value];\" \n "                            } else {\" \n "                                [_this, _value] call CBA_fnc_setCallsign;\" \n "                            };\" \n "                        ";
onKeyDown="\" \n "if ((_this select 1) in [0x1C    , 0x9C    ]) then {\" \n "['cba_events_chatMessageSent', [ctrlText ((_this select 0) displayctrl 101), _this select 0]] call CBA_fnc_localEvent;\" \n "};\" \n "false";
onLoad="\" \n "                        params ['_ctrlYear'];\" \n "                        for '_y' from 1900 to 2050 do {\" \n "                            _ctrlYear lbSetValue [_ctrlYear lbAdd str _y, _y];\" \n "                        };\" \n "                        _ctrlYear lbSetCurSel 53;\" \n "                    ";

configDiff.txt

@PabstMirror
Copy link
Contributor Author

@BrettMayson on current branch with Alpha 12

...
binarizing cba_optic_big_pip.p3d
(runs for about 2 minutes on a single thread)
error: Preprocessor error: Unexpected EOF

.hemtt/project.toml Outdated Show resolved Hide resolved
@PabstMirror
Copy link
Contributor Author

PabstMirror commented Jan 20, 2023

@BrettMayson - Alpha 13

  • Still ends with error: Preprocessor error: Unexpected EOF - not sure what file
    edit: just looking at AppData\Local\Temp\hemtt\DEV_CBA_A3\asc\source\addons\ and it seems to be failing somewhere in events
  • If I delete "\include\a3\functions_f\debug\fn_isdebugconsoleallowed.sqf" I still get include error
error: Preprocessor error: `#include` target `[Token { symbol: Escape, source: Position { start: (317, (8, 15)), end: (318, (8, 16)), path: "/addons/diagnostic/fnc_isDebugConsoleAllowed.sqf"

but I have "diagnostic/fnc_isdebugconsoleallowed.sqf", in exclude.
This is on windows so it might not be matching slashes correctly?

@jonpas jonpas changed the title Hemtt Compatiblity HEMTT v1 Compatiblity May 14, 2023
@jonpas jonpas changed the title HEMTT v1 Compatiblity Adapt to HEMTT v1 May 16, 2023
@jonpas jonpas added this to the Ongoing milestone May 16, 2023
@jonpas jonpas added the Tools label May 16, 2023
@@ -1,14 +1,5 @@
#include "script_component.hpp"

#define private 0 // hidden
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the only one used in one place, I removed those defines, should be fine?

@@ -17,14 +17,14 @@ class RscTitles {
};

class TitleBackground: RscText {
idc = IDC_PROGRESSBAR_BACKGROUND;
// idc = IDC_PROGRESSBAR_BACKGROUND;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was undefined. Important?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think just used for background color

@jonpas
Copy link
Member

jonpas commented May 16, 2023

Multiline config code mangling is still happening as in the original comment.

1581723c1581694
< 	onKeyDown="if ((_this select 1) in [0x1C, 0x9C]) then { ['cba_events_chatMessageSent', [ctrlText ((_this select 0) displayctrl 101), _this select 0]] call CBA_fnc_localEvent; }; false";
---
> 	onKeyDown="" \n "if ((_this select 1) in [0x1C    , 0x9C    ]) then {" \n "['cba_events_chatMessageSent', [ctrlText ((_this select 0) displayctrl 101), _this select 0]] call CBA_fnc_localEvent;" \n "};" \n "false";
1840165c1840136
< 					onLoad=" params ['_ctrlYear']; for '_y' from 1900 to 2050 do { _ctrlYear lbSetValue [_ctrlYear lbAdd str _y, _y]; }; _ctrlYear lbSetCurSel 53; ";
---
> 					onLoad="\" \n "                        params ['_ctrlYear'];\" \n "                        for '_y' from 1900 to 2050 do {\" \n "                            _ctrlYear lbSetValue [_ctrlYear lbAdd str _y, _y];\" \n "                        };\" \n "                        _ctrlYear lbSetCurSel 53;\" \n "                    ";
1844014c1843985
< 						expression=" if (isNil 'CBA_fnc_setCallsign') then { _this setGroupID [_value]; } else { [_this, _value] call CBA_fnc_setCallsign; }; ";
---
> 						expression="\" \n "                            if (isNil 'CBA_fnc_setCallsign') then {\" \n "                                _this setGroupID [_value];\" \n "                            } else {\" \n "                                [_this, _value] call CBA_fnc_setCallsign;\" \n "                            };\" \n "                        ";
2605908c2605879
< 	onLoad="(_this select 0) call cba_settings_fnc_openSettingsMenu; (_this select 0) closeDisplay 0;";
---
> 	onLoad="" \n "(_this select 0) call cba_settings_fnc_openSettingsMenu;" \n "(_this select 0) closeDisplay 0;";

We could also just function those?

Everything else seems to be fixed.

config_mikero_to_hemtt_diff.txt


The only other thing "missing" is date formatting in Rhai for the automatic set of build number.

@jonpas
Copy link
Member

jonpas commented May 20, 2023

Only those multi-line config differences remain. Somebody should check them in-game instead of the diag_exportConfig though.

@jonpas
Copy link
Member

jonpas commented Jun 26, 2023

First config diff in in-game Config Viewer / getText:

onKeyDown = "
if ((_this select 1) in [0x1C    , 0x9C    ]) then {
['cba_events_chatMessageSent', [ctrlText ((_this select 0) displayctrl 101), _this select 0]] call CBA_fnc_localEvent;
};
false";

image

  • \n is not visually visible, but when pasting it anywhere, it pastes with new lines.
  • `"cba_events_chatMessageSent" is thrown on chat Enter key correctly, so functionally it works.

Second config diff in in-game Config Viewer / getText::

onLoad = "\
                        params ['_ctrlYear'];\
                        for '_y' from 1900 to 2050 do {\
                            _ctrlYear lbSetValue [_ctrlYear lbAdd str _y, _y];\
                        };\
                        _ctrlYear lbSetCurSel 53;\
                    ";

Here, \ remains visible, because the entire thing is quoted using " instead of the macro QUOTE/#.

After switching it to use QUOTE macro (and subsequent ARR_n) it is the same as first config diff:

  • 1900 to 2050 years show up in Eden dropdown.
  • Callsign setting has not been verified.

Exact same thing as on second diff happens on third diff.


Fourth config diff has the same story as the first.

onLoad = "
(_this select 0) call cba_settings_fnc_openSettingsMenu;
(_this select 0) closeDisplay 0;"
  • Settings menu does not open correctly from the main menu, but the same thing happens on stable build!

I think this can be merged now, as there don't appear to be any issues with how HEMTT preprocesses those config entries?

@veteran29
Copy link
Member

Made an issue for incorrect multiline string parsing BrettMayson/HEMTT#531

@jonpas
Copy link
Member

jonpas commented Aug 10, 2023

@PabstMirror Is there a point in keeping old hemtt.toml? Does it even work still with changes for new HEMTT?

@PabstMirror
Copy link
Contributor Author

I like keeping old hemtt around for just packing file patching builds fast

@PabstMirror PabstMirror changed the title Adapt to HEMTT v1 Add support for building with HEMTT v1.0+ Aug 29, 2023
@PabstMirror PabstMirror modified the milestones: Ongoing, 3.15.9 Aug 29, 2023
@jonpas jonpas merged commit 66264b9 into master Aug 29, 2023
4 checks passed
@jonpas jonpas deleted the hemmit10test branch August 29, 2023 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants