Skip to content

Commit

Permalink
Add HEMTT Build Hooks to disable isDev on Release Builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jokoho48 committed Sep 22, 2023
1 parent 6a7870a commit c9e960a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .hemtt/hooks/post_build/set_is_dev.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Read the current contents of the mod.cpp
// file from the project source

if (HEMTT.is_release()) {
let macro_path = HEMTT_VFS
.join("addons")
.join("Streamator")
.join("macros.hpp");
let macro_hpp = macro_path
.open_file()
.read();

macro_hpp.replace("// #define ISDEV", "#define ISDEV");

macro_path
.create_file()
.write(macro_hpp);
}
18 changes: 18 additions & 0 deletions .hemtt/hooks/pre_build/set_is_dev.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Read the current contents of the mod.cpp
// file from the project source

if (HEMTT.is_release()) {
let macro_path = HEMTT_VFS
.join("addons")
.join("Streamator")
.join("macros.hpp");
let macro_hpp = macro_path
.open_file()
.read();

macro_hpp.replace("#define ISDEV", "// #define ISDEV");

macro_path
.create_file()
.write(macro_hpp);
}

0 comments on commit c9e960a

Please sign in to comment.