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

compile sqf scripts to bytecode before packaging #184

Merged
merged 2 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}