Skip to content

Commit

Permalink
compile sqf scripts to bytecode before packaging (#184)
Browse files Browse the repository at this point in the history
* compile sqf scripts to bytecode before packaging

* up version
  • Loading branch information
diwako authored Apr 27, 2021
1 parent de88517 commit b3d8f2f
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ releases/
releases/*
keys/*
.hemtt/local
*.pdb
*.exe
*.sqfc
*.bat
3 changes: 3 additions & 0 deletions addons/indicators/include/getIndicatorStyles.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef MAINPREFIX
#include "..\script_component.hpp"
#endif
private _configs = "true" configClasses (configFile >> "diwako_dui_indicator_style");
private _missionConfigs = "true" configClasses (missionConfigFile >> "diwako_dui_indicator_style");
if (isNil "_missionConfigs") then {
Expand Down
3 changes: 3 additions & 0 deletions addons/main/include/getColorStyles.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef MAINPREFIX
#include "..\script_component.hpp"
#endif
private _configs = "true" configClasses (configFile >> "diwako_dui_colors");
private _missionConfigs = "true" configClasses (missionConfigFile >> "diwako_dui_colors");
if (isNil "_missionConfigs") then {
Expand Down
3 changes: 3 additions & 0 deletions addons/main/include/getIconStyles.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef MAINPREFIX
#include "..\script_component.hpp"
#endif
private _configs = "true" configClasses (configFile >> "diwako_dui_icon_style");
private _missionConfigs = "true" configClasses (missionConfigFile >> "diwako_dui_icon_style");
if (isNil "_missionConfigs") then {
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 @@ -8,7 +8,7 @@
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
#define VERSION_PLUGIN MAJOR.MINOR.PATCHLVL.BUILD

#define REQUIRED_VERSION 1.94
#define REQUIRED_VERSION 2.04

#ifdef COMPONENT_BEAUTIFIED
#define COMPONENT_NAME QUOTE(DUI - COMPONENT_BEAUTIFIED)
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 1
#define MINOR 9
#define PATCHLVL 1
#define PATCHLVL 2
#define BUILD 1
3 changes: 3 additions & 0 deletions addons/nametags/settings.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef MAINPREFIX
#include "script_component.hpp"
#endif
private _cat = format ["%1 - %2",localize "STR_dui_mod", localize "STR_dui_addon_nametags"];

private _curCat = localize "STR_dui_cat_general";
Expand Down
3 changes: 3 additions & 0 deletions addons/radar/include/getPointerStyles.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef MAINPREFIX
#include "..\script_component.hpp"
#endif
private _configs = "true" configClasses (configFile >> QGVAR(pointers));
private _missionConfigs = "true" configClasses (missionConfigFile >> QGVAR(pointers));
if (isNil "_missionConfigs") then {
Expand Down
24 changes: 21 additions & 3 deletions hemtt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,40 @@ exclude = [
"*.png",
"*.tga"
]
# postbuild = ["!sign","!copy"]
# prebuild = ["!compile_scripts"]
# postbuild = ["!sign","!copy","!remove_compiled_scripts"]

releasebuild = [
"@zip @{{prefix}}"
]

[scripts.copy]
foreach = true
only_release = true
only_release = false
steps = [
"COPY {{target}} D:\\SteamLibrary\\steamapps\\common\\\"Arma 3\"\\@diwako_dui\\addons\\",
"COPY {{target}}.diwako_dui.bisign D:\\SteamLibrary\\steamapps\\common\\\"Arma 3\"\\@diwako_dui\\addons\\"
]

[scripts.sign]
foreach = true
only_release = true
only_release = false
steps = [
"G:\\\"Program Files (x86)\"\\Steam\\steamapps\\common\\\"Arma 3 Tools\"\\DSSignFile\\DSSignFile.exe diwako_dui.biprivatekey {{target}}"
]

[scripts.compile_scripts]
steps_windows = [
"echo 'Compile Arma Scripts'",
"ArmaScriptCompiler"
]
only_release = false
show_output = true

[scripts.remove_compiled_scripts]
steps_windows = [
"echo 'remove Compiled Scripts'",
"powershell -Command Remove-Item './addons/*' -Recurse -Include *.sqfc"
]
only_release = false
show_output = true
7 changes: 7 additions & 0 deletions sqfc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"inputDirs": ["P:/z/diwako_dui/addons"],
"includePaths": ["P:/"],
"excludeList": [],
"outputDir": "P:/",
"workerThreads": 0
}

0 comments on commit b3d8f2f

Please sign in to comment.