Skip to content

Commit

Permalink
Merge pull request #140 from formtapez/hemtt_restructure
Browse files Browse the repository at this point in the history
Module renamed and restructured for HEMTT building
  • Loading branch information
formtapez authored Apr 2, 2021
2 parents 45a8674 + 7396e6d commit 54ba9e0
Show file tree
Hide file tree
Showing 150 changed files with 50 additions and 126 deletions.
1 change: 1 addition & 0 deletions addons/main/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
opt\opt_server\addons\main
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/CARGO/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE CARGO
#include "\opt\opt_server\addons\main\macros.hpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/FIELDREPAIR/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE FIELDREPAIR
#include "\opt\opt_server\addons\main\macros.hpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/GELDZEIT/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE GELDZEIT
#include "\opt\opt_server\addons\main\macros.hpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion addons/opt/GPS/macros.hpp → addons/main/GPS/macros.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MODULE GPS
#include "\opt\opt\addons\opt\macros.hpp"
#include "\opt\opt_server\addons\main\macros.hpp"

#define COLOR_SIDE [0,0.3,0.6,1]
#define COLOR_OWN_GROUP [0.13, 0.54, 0.21, 1]
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/HUD/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE HUD
#include "\opt\opt_server\addons\main\macros.hpp"
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/LOGGING/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE LOGGING
#include "\opt\opt_server\addons\main\macros.hpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/REVIVE/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE REVIVE
#include "\opt\opt_server\addons\main\macros.hpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/RULES/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE RULES
#include "\opt\opt_server\addons\main\macros.hpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/SECTORCONTROL/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE SECTORCONTROL
#include "\opt\opt_server\addons\main\macros.hpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/SHOP/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE SHOP
#include "\opt\opt_server\addons\main\macros.hpp"
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/main/WEATHERTIME/macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MODULE WEATHERTIME
#include "\opt\opt_server\addons\main\macros.hpp"
4 changes: 2 additions & 2 deletions addons/opt/config.cpp → addons/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class CfgPatches {
weapons[] = {};
requiredVersion = 1.70;
author = "OPT";
authors[] = {"Raven"};
authorUrl = "";
authors[] = {"Raven", "Lord", "form"};
authorUrl = "https://opt4.net";
version = VERSION;
versionStr = QUOTE(VERSION);
versionAr[] = {VERSION_AR};
Expand Down
File renamed without changes.
24 changes: 1 addition & 23 deletions addons/opt/macros.hpp → addons/main/macros.hpp
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
#define PATH opt
#define PREFIX opt
#define MOD opt

// Define version information of this mod
#define MAJOR 1
#define MINOR 8
#define PATCHLVL 9
#define BUILD 124

#ifdef VERSION
#undef VERSION
#endif
#ifdef VERSION_AR
#undef VERSION_AR
#endif

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

// Do not release with this setting enabled!
#include "isDev.hpp"
// #define DEBUGFULL // Enable all debug methods
// #define ENABLEPERFORMANCECOUNTER // Enable performance counter for function calls
// #define ENABLEFUNCTIONTRACE // Enable SQF based function tracer
#include "script_version.hpp"

#define DISABLECOMPRESSION

Expand Down
2 changes: 1 addition & 1 deletion addons/opt/modules.hpp → addons/main/modules.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class CfgCLibModules
{
class PREFIX
{
path = "OPT\OPT\addons\OPT";
path = "opt\opt_server\addons\main";
dependency[] = {};

MODULE(GPS)
Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Define version information of this mod
#define MAJOR 1
#define MINOR 9
#define PATCHLVL 1
#define BUILD 0

#ifdef VERSION
#undef VERSION
#endif
#ifdef VERSION_AR
#undef VERSION_AR
#endif

#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
1 change: 0 additions & 1 deletion addons/opt/$PBOPREFIX$

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/CARGO/macros.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/FIELDREPAIR/macros.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/GELDZEIT/macros.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/HUD/macros.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/LOGGING/macros.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/REVIVE/macros.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/RULES/macros.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/SECTORCONTROL/macros.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/SHOP/macros.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions addons/opt/WEATHERTIME/macros.hpp

This file was deleted.

5 changes: 0 additions & 5 deletions addons/opt/isDev.hpp

This file was deleted.

77 changes: 4 additions & 73 deletions hemtt.toml
Original file line number Diff line number Diff line change
@@ -1,86 +1,17 @@
name = "OPT-ServerMod"
mainprefix = "opt"
modname = "opt"
prefix = ""
modname = "opt-server"
prefix = "opt_server"
author = "Operation Pandora Trigger"
sig_version = 3
version = "1.8.9.124"
reuse_private_key = false

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

check = [
"!version_set",
"!comment_isdev"
]

postbuild = [
"!version_unset",
"!uncomment_isdev"
]

releasebuild = [
"@zip opt_v{{semver.major}}.{{semver.minor}}.{{semver.patch}}.{{semver.build}}"
"@zip opt-servermod_v{{semver.major}}.{{semver.minor}}.{{semver.patch}}.{{semver.build}}"
]

key_name = "v{{semver.major}}.{{semver.minor}}.{{semver.patch}}.{{semver.build}}"
authority = "v{{semver.major}}.{{semver.minor}}.{{semver.patch}}.{{semver.build}}"

[scripts.version_set]
steps_linux = [
"sed -i -r -s 's/#define MAJOR 0/#define MAJOR {{semver.major}}/g' addons/opt/macros.hpp",
"sed -i -r -s 's/#define MINOR 0/#define MINOR {{semver.minor}}/g' addons/opt/macros.hpp",
"sed -i -r -s 's/#define PATCHLVL 0/#define PATCHLVL {{semver.patch}}/g' addons/opt/macros.hpp",
"sed -i -r -s 's/#define BUILD 0/#define BUILD {{semver.build}}/g' addons/opt/macros.hpp",
]
steps_windows = [
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '#define MAJOR 0', '#define MAJOR {{semver.major}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '#define MINOR 0', '#define MINOR {{semver.minor}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '#define PATCHLVL 0', '#define PATCHLVL {{semver.patch}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '#define BUILD 0', '#define BUILD {{semver.build}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
]

only_release = false
show_output = true

[scripts.version_unset]
steps_linux = [
"sed -i -r -s 's/#define MAJOR {{semver.major}}/#define MAJOR 0/g' addons/opt/macros.hpp",
"sed -i -r -s 's/#define MINOR {{semver.minor}}/#define MINOR 0/g' addons/opt/macros.hpp",
"sed -i -r -s 's/#define PATCHLVL {{semver.patch}}/#define PATCHLVL 0/g' addons/opt/macros.hpp",
"sed -i -r -s 's/#define BUILD {{semver.build}}/#define BUILD 0/g' addons/opt/macros.hpp",
]
steps_windows = [
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '#define MAJOR {{semver.major}}', '#define MAJOR 0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '#define MINOR {{semver.minor}}', '#define MINOR 0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '#define PATCHLVL {{semver.patch}}', '#define PATCHLVL 0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '#define BUILD {{semver.build}}', '#define BUILD 0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
]

only_release = false
show_output = true

[scripts.comment_isdev]
steps_linux = [
"sed -i -r -s 's:#define ISDEV:// #define ISDEV:g' addons/opt/macros.hpp",
]
steps_windows = [
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '#define ISDEV', '// #define ISDEV' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
]

only_release = false
show_output = true

[scripts.uncomment_isdev]
steps_linux = [
"sed -i -r -s 's:// #define ISDEV:#define ISDEV:g' addons/opt/macros.hpp",
]
steps_windows = [
"powershell -Command foreach ($f in 'addons/opt/macros.hpp') {(Get-Content $f) -replace '// #define ISDEV', '#define ISDEV' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
]

only_release = false
show_output = true
5 changes: 5 additions & 0 deletions mod.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "OPT Server-Mod";
actionName = "Website";
action = "https://opt4.net";
tooltip = "Operation Pandora Trigger";
author = "OPT Team";

0 comments on commit 54ba9e0

Please sign in to comment.