Skip to content

Commit

Permalink
Hemtt 191 (#10)
Browse files Browse the repository at this point in the history
* hemtt 1.9.1

* VS Code  Run Build Task Ctrl+Shift+B

* fix info

* remove .hemtt/* from ignore

* Update Github CI

* Add missing .vscode/* to gitignore

* Add exemption to .gitignore for vscode tasks.json

* Add missing parts to hemtt project.toml for debug

* Add missing newline to project.toml

* Add post release zip rename build hook

---------

Co-authored-by: mjc4wilton <[email protected]>
  • Loading branch information
ampersand38 and mjc4wilton authored Nov 25, 2023
1 parent e232b69 commit 087d868
Show file tree
Hide file tree
Showing 20 changed files with 183 additions and 215 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Build using HEMTT
uses: arma-actions/hemtt@master
with:
command: build --release --ci
uses: actions/checkout@v3
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
run: mv .hemttout/build .hemttout/@bocr
- name: Upload Artifact
uses: actions/upload-artifact@v2-preview
uses: actions/upload-artifact@v3
with:
name: BOCR-${{ github.sha }}-nobin
path: releases/BOCR_*.zip
path: .hemttout/@*
19 changes: 11 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
release/*
releases/*
keys/*
.hemtt/local
*.biprivatekey
*.cache
*.exe
*.log
*.pbo
texHeaders.bin
*.swp
*.swo
*.biprivatekey
*.swp
.vscode/*
!.vscode/tasks.json
.hemttout/*
keys/*
release/*
releases/*
texHeaders.bin
Thumbs.db
*.exe

ArmaScriptCompiler.pdb
libcsqfvm.dll
9 changes: 9 additions & 0 deletions .hemtt/hooks/post_release/01_rename_zip.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
let releases = HEMTT_RFS.join("releases");

let src = releases.join(HEMTT.project().prefix() + "-" + HEMTT.project().version().to_string() + ".zip");
let dst = releases.join(HEMTT.project().name().to_lower() + "_" + HEMTT.project().version().to_string() + ".zip");

print("Moving zip to " + dst);
if !src.move(dst) {
warn("Failed to move " + src + " to " + dst + " (maybe --no-archive?)");
}
45 changes: 45 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name = "BackpackOnChestRedux"
mainprefix = "x"
prefix = "bocr"
author = "DerZade, mjc4wilton"

[properties]
author = "DerZade, mjc4wilton"
url = "https://github.com/mjc4wilton/BackpackOnChestRedux"

[files]
include = [
"*.dll",
"*.so",
"mod.cpp",
"README.md",
"AUTHORS.txt",
"LICENSE",
"logo_bocr_ca.paa",
"meta.cpp"
]
exclude = [
".vscode",
"*.sqfc",
]

[asc]
enabled = true
exclude = [
"/initsettings.sqf",
"/initkeybinds.sqf",
"/xeh_prep.sqf",
"dev",
]

[hemtt.config]
preset = "Hemtt"

[hemtt.release]
folder = "bocr"

[hemtt.launch.default]
workshop = [
"450814997", # CBA_A3's Workshop ID
"463939057", # ACE3's Workshop ID
]
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"command": "hemtt build",
"windows": {
"command": "hemtt build"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
4 changes: 2 additions & 2 deletions addons/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author = "";
authors[] = {"ACE Team", "Glowbal"};
authorUrl = "http://ace3mod.com";
authors[] = {"DerZade", "mjc4wilton"};
authorUrl = "https://github.com/mjc4wilton/BackpackOnChestRedux";
VERSION_CONFIG;
};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "script_version.hpp"

#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
#define VERSION MAJOR.MINOR
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD

// MINIMAL required version for the Mod. Components can specify others..
Expand Down
55 changes: 0 additions & 55 deletions hemtt.toml

This file was deleted.

1 change: 1 addition & 0 deletions include/x/cba/addons/main/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x\cba\addons\main
1 change: 0 additions & 1 deletion include/x/cba/addons/main/script_macros.hpp

This file was deleted.

34 changes: 18 additions & 16 deletions include/x/cba/addons/main/script_macros_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Provide a solid structure that can be dynamic and easy editable (Which sometimes means we cannot adhere to Aim #1 ;-)
An example is the path that is built from defines. Some available in this file, others in mods and addons.
Follows Standard:
Follows Standard:
Object variables: PREFIX_COMPONENT
Main-object variables: PREFIX_main
Paths: MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SCRIPTNAME.sqf
Expand All @@ -29,6 +29,10 @@
and include your mod's script_macros.hpp
In your scripts you can then include the addon's component.hpp with relative path)
use in subcomponents (subconfigs)
define SUBCOMPONENT and include parent component's script_component.hpp
currently only supported by SUBADDON, additional macros may be added in the future
TODO:
- Try only to use 1 string type " vs '
- Evaluate double functions, and simplification
Expand All @@ -54,6 +58,10 @@
#define ADDON DOUBLES(PREFIX,COMPONENT)
#define MAIN_ADDON DOUBLES(PREFIX,main)

#ifdef SUBCOMPONENT
#define SUBADDON DOUBLES(ADDON,SUBCOMPONENT)
#endif

/* -------------------------------------------
Macro: VERSION_CONFIG
Define CBA Versioning System config entries.
Expand Down Expand Up @@ -857,15 +865,10 @@ Macro: ISNILS()
#define COMPILE_SCRIPT(var1) compileScript ['PATHTO_SYS(PREFIX,COMPONENT_F,var1)']


#define VERSIONING_SYS(var1) class CfgSettings \
{ \
class CBA \
{ \
class Versioning \
{ \
class var1 \
{ \
}; \
#define VERSIONING_SYS(var1) class CfgSettings { \
class CBA { \
class Versioning { \
class var1 {}; \
}; \
}; \
};
Expand Down Expand Up @@ -1032,12 +1035,9 @@ Macro: PATHTO_FNC()
#define QQEFUNC(var1,var2) QUOTE(QEFUNC(var1,var2))

#ifndef PRELOAD_ADDONS
#define PRELOAD_ADDONS class CfgAddons \
{ \
class PreloadAddons \
{ \
class ADDON \
{ \
#define PRELOAD_ADDONS class CfgAddons { \
class PreloadAddons { \
class ADDON { \
list[]={ QUOTE(ADDON) }; \
}; \
}; \
Expand Down Expand Up @@ -1275,9 +1275,11 @@ Macro: xSTRING()
#define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2))
#define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1))
#define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2))
#define SUBCSTRING(var1) QUOTE(TRIPLES($STR,SUBADDON,var1))

#define LLSTRING(var1) localize QUOTE(TRIPLES(STR,ADDON,var1))
#define LELSTRING(var1,var2) localize QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2))
#define LSUBLSTRING(var1) localize QUOTE(TRIPLES(STR,SUBADDON,var1))
#endif


Expand Down
5 changes: 0 additions & 5 deletions include/x/cba/addons/main/script_macros_config.hpp

This file was deleted.

82 changes: 0 additions & 82 deletions include/x/cba/addons/main/script_macros_mission.hpp

This file was deleted.

1 change: 1 addition & 0 deletions include/x/cba/addons/xeh/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x\cba\addons\xeh
2 changes: 0 additions & 2 deletions include/x/cba/addons/xeh/script_eventhandlers.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions include/x/cba/addons/xeh/script_macros_common.hpp

This file was deleted.

Loading

0 comments on commit 087d868

Please sign in to comment.