forked from CBATeam/CBA_A3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e94a90
commit 876b9b2
Showing
21 changed files
with
118 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,6 @@ Thumbs.db | |
*# | ||
|
||
tools/ndocs-project/Data/* | ||
|
||
ArmaScriptCompiler.exe | ||
*.sqfc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
class Extended_PreStart_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preStart)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); | ||
}; | ||
}; | ||
|
||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
|
||
class Extended_PreStart_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preStart)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); | ||
}; | ||
}; | ||
|
||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preInit)); | ||
clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); | ||
clientInit = QUOTE(call COMPILE_SCRIPT(XEH_preClientInit)); | ||
}; | ||
}; | ||
|
||
class Extended_PostInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_postInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
class Extended_PreStart_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preStart)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); | ||
}; | ||
}; | ||
|
||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); | ||
}; | ||
}; | ||
|
||
class Extended_PostInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_postInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
class Extended_PreStart_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preStart)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); | ||
}; | ||
}; | ||
|
||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
class Extended_PreStart_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preStart)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); | ||
}; | ||
}; | ||
|
||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_preInit)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); | ||
}; | ||
}; | ||
|
||
class Extended_PostInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_FILE(XEH_postInit)); | ||
serverInit = QUOTE(call COMPILE_FILE(XEH_postInitServer)); | ||
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); | ||
serverInit = QUOTE(call COMPILE_SCRIPT(XEH_postInitServer)); | ||
clientInit = QUOTE(call COMPILE_SCRIPT(XEH_postInitClient)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"inputDirs": [ | ||
"P:/x/cba/addons/" | ||
], | ||
"includePaths": [ | ||
"P:/" | ||
], | ||
"excludeList": [ | ||
"\\initsettings.sqf", | ||
"\\initkeybinds.sqf", | ||
"\\xeh_prep.sqf", | ||
"\\backwards_comp.sqf", | ||
"settings\\gui_createCategory.sqf" | ||
], | ||
"outputDir": "P:/", | ||
"workerThreads": 12 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import os | ||
import sys | ||
import subprocess | ||
|
||
# Handle script being called from either base or /tools folder (e.g. hemmt will run from base) | ||
addon_base_path = os.getcwd() | ||
if os.path.basename(addon_base_path) == "tools": | ||
addon_base_path = os.path.dirname(addon_base_path) | ||
|
||
|
||
def cleanup(): | ||
count = 0 | ||
for root, _dirs, files in os.walk(os.path.join(addon_base_path, "addons")): | ||
for file in files: | ||
if file.endswith(".sqfc"): | ||
os.remove(os.path.join(root, file)) | ||
count += 1 | ||
print("cleaned [{} sqfc files]".format(count)) | ||
|
||
|
||
def build(verbose): | ||
compiler_exe = os.path.join(addon_base_path, "ArmaScriptCompiler.exe") | ||
if not os.path.isfile(compiler_exe): | ||
print("Warning: ArmaScriptCompiler.exe not found in base folder - skipping compiling") | ||
return | ||
# raise FileNotFoundError("ArmaScriptCompiler not found") | ||
ret = subprocess.call([compiler_exe], cwd=addon_base_path, stdout=verbose) | ||
print("compiled [ret {}]".format(ret)) | ||
|
||
|
||
def main(argv): | ||
# print("compile_sqf.py [Base: {}]".format(addon_base_path)) | ||
if ("cleanup" in argv) or (len(argv) < 2): | ||
cleanup() | ||
if ("build" in argv) or (len(argv) < 2): | ||
build("verbose" in argv) | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main(sys.argv)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters