Skip to content

Commit

Permalink
Switch to HEMTT v1 (#196)
Browse files Browse the repository at this point in the history
* Remove old hemtt binary from project files

* Remove two leftover files from removed debug component

* Update script_debug.hpp

HEMTT 1.0 does not like `/* */` as macro, use semicolon to have same functionality

* Fix config issues

Remove autoquote and additional comma

* Update .gitignore

* Add HEMTT 1.0 configuration files

* Add hemtt.launch config

Neat!

* Remove unused Publish.ps1

* Replace Set-Version.ps1 with RHAI hook

* Use version without build hash in mod.cpp

* Switch to HEMTT v1 in Windows 2022

* Re-enable binarization for nightvision p3d

* Add ace launch profile

* Apply cargo clippy suggestions

* Fix arma.build workflow

* Add SOGPF launch profile

* Do not generate SQFC for settings files

These are not valid SQF standalone

* Do not generate SQFC for settings and keybind files

These are not valid SQF standalone

* Update CBA script_macros_common.hpp

* Add WW2 launch config

* Fix duplicated macros

* Fix duplicate macros in BI defines

* Add SQFC support
  • Loading branch information
veteran29 authored Oct 7, 2023
1 parent 1edfc79 commit 81edc1b
Show file tree
Hide file tree
Showing 49 changed files with 206 additions and 174 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@ jobs:
continue-on-error: true # No failure due to many false-positives

build:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Pull Arma3Tools
run: |
echo ${{ secrets.CR_PAT }} | docker login -u ${{ secrets.CR_USER }} --password-stdin ghcr.io
docker pull ghcr.io/armaforces/arma3tools:latest
docker pull ghcr.io/armaforces/arma3tools:v2
- name: Build using HEMTT
run: |
docker run -v "$(pwd):c:/workdir" -e CI=$True ghcr.io/armaforces/arma3tools:latest hemtt build --release --ci --time
docker run -v "$(pwd):c:/workdir" -e CI=$True ghcr.io/armaforces/arma3tools:v2 hemtt release
- uses: actions/upload-artifact@v2
with:
name: armaforces_mods
path: releases/*.zip
path: |
releases/*.zip
!releases/afm-latest.zip
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build_addon:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Set VERSION env
run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Build output
addons/*.pbo
keys/*
.hemttout/*

# Releases
releases/*
Expand Down
14 changes: 14 additions & 0 deletions .hemtt/hooks/post_release/set_version.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

let modCpp = HEMTT_OUTPUT
.join("mod.cpp")
.open_file()
.read()
;

modCpp.replace("0.0.0", `${HEMTT_PROJECT_VERSION_MAJOR}.${HEMTT_PROJECT_VERSION_MINOR}.${HEMTT_PROJECT_VERSION_PATCH}`);

HEMTT_OUTPUT
.join("mod.cpp")
.create_file()
.write(modCpp)
;
74 changes: 74 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

name = "ArmaForces Mods"
mainprefix = "z"
prefix = "afm"

[files]
include = [
"LICENSE",
"mod.cpp",
"README.md",
"armaforces_mods_x64.dll",
]

exclude = ["*.psd", "*.png", "*.tga"]

[properties]
author = "ArmaForces"

[version]
path = "addons/main/script_version.hpp"

[asc]
exclude = [
"initSettings.sqf",
"initKeybinds.sqf",
"initSettingsChannelNames.sqf",
]

[hemtt.launch]
workshop = [
"450814997", # CBA_A3
"2369477168", # ADT
]
parameters = [
"-name=dev",
"-window",
]

[hemtt.launch.ace]
workshop = [
"450814997", # CBA_A3
"2369477168", # ADT
"463939057", # ACE
]
parameters = [
"-name=dev",
"-window",
]

[hemtt.launch.vn]
workshop = [
"450814997", # CBA_A3
"2369477168", # ADT
]
parameters = [
"-name=dev",
"-window",
]
dlc = [
"S.O.G. Prairie Fire",
]

[hemtt.launch.ww2]
workshop = [
"450814997", # CBA_A3
"2369477168", # ADT
]
parameters = [
"-name=dev",
"-window",
]
dlc = [
"Spearhead 1944",
]
6 changes: 3 additions & 3 deletions addons/acre/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
4 changes: 2 additions & 2 deletions addons/ai_disembark/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
6 changes: 3 additions & 3 deletions addons/back_to_game/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
6 changes: 3 additions & 3 deletions addons/common/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
2 changes: 0 additions & 2 deletions addons/common/ui/RscModal.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "script_component.hpp"

class RscText;
class RscTitle;
class RscButtonMenuOK;
Expand Down
1 change: 0 additions & 1 deletion addons/common/ui/script_component.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions addons/curator/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
Empty file removed addons/debug/XEH_PREP.hpp
Empty file.
2 changes: 0 additions & 2 deletions addons/debug/XEH_preStart.sqf

This file was deleted.

6 changes: 3 additions & 3 deletions addons/debug_console/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

Expand Down
6 changes: 3 additions & 3 deletions addons/extension/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
6 changes: 3 additions & 3 deletions addons/extension_attendance/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
8 changes: 4 additions & 4 deletions addons/extension_main_menu/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

class Extended_DisplayLoad_EventHandlers {
class RscDisplayMain {
ADDON = QUOTE(with uiNamespace do {\
[_this select 0] call COMPILE_FILE(XEH_mainDisplay);\
[_this select 0] call COMPILE_SCRIPT(XEH_mainDisplay);\
});
};
};
6 changes: 3 additions & 3 deletions addons/fatigue/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
6 changes: 3 additions & 3 deletions addons/flags/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
2 changes: 1 addition & 1 deletion addons/flags/FlagsVanilla.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ class GVAR(Russia): Flag_White_F {
displayName = "Flag (Russia)";

class EventHandlers {
init = '(_this select 0) setFlagTexture "\A3\UI_F_Enoch\Data\CfgMarkers\Russia_CA.paa"';
init = "(_this select 0) setFlagTexture '\A3\UI_F_Enoch\Data\CfgMarkers\Russia_CA.paa'";
};
};
4 changes: 2 additions & 2 deletions addons/friendly_fire/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
4 changes: 2 additions & 2 deletions addons/fries/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
Loading

0 comments on commit 81edc1b

Please sign in to comment.