Skip to content

Commit

Permalink
cba 3.15.5 and update make.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Jul 22, 2021
1 parent 9132467 commit fb9a7fa
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 47 deletions.
5 changes: 0 additions & 5 deletions addons/main/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
#include "\x\cba\addons\main\script_macros_common.hpp"
#include "\x\cba\addons\xeh\script_xeh.hpp"

// nextcba
#ifndef COMPILE_SCRIPT
#define COMPILE_SCRIPT(var1) compileScript ['PATHTO_SYS(PREFIX,COMPONENT_F,var1)']
#endif

// Default versioning level
#define DEFAULT_VERSIONING_LEVEL 2

Expand Down
4 changes: 2 additions & 2 deletions addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD

// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 2.02
#define REQUIRED_CBA_VERSION {3,15,2}
#define REQUIRED_VERSION 2.04
#define REQUIRED_CBA_VERSION {3,15,5}

#ifdef COMPONENT_BEAUTIFIED
#define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED)
Expand Down
40 changes: 0 additions & 40 deletions tools/compile_sqf.py

This file was deleted.

28 changes: 28 additions & 0 deletions tools/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ def main(argv):
make_target = "DEFAULT" # Which section in make.cfg to use for the build
new_key = True # Make a new key and use it to sign?
quiet = False # Suppress output from build tool?
sqfc_compiling = True

# Parse arguments
if "help" in argv or "-h" in argv or "--help" in argv:
Expand Down Expand Up @@ -1183,6 +1184,25 @@ def main(argv):
print_error("\nFailed to delete {}".format(os.path.join(obsolete_check_path,file)))
pass

# Always cleanup old sqfc
for root, _dirs, files in os.walk(module_root_parent):
for file in files:
if file.endswith(".sqfc"):
os.remove(os.path.join(root, file))
if sqfc_compiling:
print_blue("\nCompiling to sqfc...")
try:
compiler_exe = os.path.join(module_root_parent, "ArmaScriptCompiler.exe")
if not os.path.isfile(compiler_exe):
raise Exception("ArmaScriptCompiler.exe not found in base folder")
# compile new sqfc
ret = subprocess.call([compiler_exe], cwd=module_root_parent, stdout=False)
if ret != 0:
raise Exception("ArmaScriptCompiler.exe returned {}".format(ret))
except Exception as e:
print_yellow("sqfc_compiling error detected: {}".format(e))
# raise

# For each module, prep files and then build.
print_blue("\nBuilding...")
for module in modules:
Expand Down Expand Up @@ -1434,6 +1454,14 @@ def main(argv):
except:
print_error("ERROR: Could not delete pboProject temp files.")

if sqfc_compiling:
print_blue("\nCleaning up sqfc...")
# cleanup all old sqfc
for root, _dirs, files in os.walk(module_root_parent):
for file in files:
if file.endswith(".sqfc"):
os.remove(os.path.join(root, file))

# Make release
if make_release_zip:
release_name = "{}_{}".format(zipPrefix, project_version.rsplit(".", 1)[0])
Expand Down

0 comments on commit fb9a7fa

Please sign in to comment.