Commit 9b91b926 authored by Legodev's avatar Legodev

write and use file include list

parent 537066bb
......@@ -22,12 +22,17 @@ destinationpath = sourcePath / branch / repo / "Addons"
addonlist = [x for x in os.listdir(sourceAddonsPath) if os.path.isdir(sourceAddonsPath / x)]
if createMakefile:
with open(projectPath / "includes.txt", "w") as f:
print("*.pac;*.paa;*.rtm;*.sq?;*.bikb;*.fsm;*.wss;*.ogg;*.fxy;"
"*.csv;*.html;*.xml;*.lip;*.ext;*.dbf;*.prj;*.shx;*.shp", file=f)
with open("Makefile", "w") as f:
print('ADDONBUILDEREXEPATH={}'.format(addonBuilderExePath), file=f)
print('SOURCEADDONSPATH={}'.format(sourceAddonsPath), file=f)
print('DESTINATIONPATH={}'.format(destinationpath), file=f)
print('PROJECTPATH={}'.format(projectPath), file=f)
print('KEYPATH={}'.format(keypath), file=f)
print('INCLUDELIST={}'.format(projectPath / "includes.txt"), file=f)
print(createmakefilealldependencies(destinationpath, addonlist), file=f)
for addon in addonlist:
......@@ -47,4 +52,4 @@ else:
for addon in addonlist:
sourceAddonPath = sourceAddonsPath / addon
subprocess.call(createaddonbuildercmd(projectPath, sourceAddonPath, namespace,
addon, destinationpath, keypath)[0])
\ No newline at end of file
addon, destinationpath, keypath)[0])
......@@ -7,12 +7,14 @@ addonBuilderExePath = arma3ToolsPath / "AddonBuilder/AddonBuilder.exe"
def createaddonbuildercmd(projectPath, sourceAddonsPath, namespace, addon, destinationpath, keypath):
sourceAddonPath = sourceAddonsPath / addon
cmd = (str(addonBuilderExePath), str(sourceAddonPath), str(destinationpath), '-clear', '-sign="{}"'.format(keypath),
'-project="{}"'.format(projectPath), '-binarizeAllTextures')
'-project="{}"'.format(projectPath), '-include={}'.format(projectPath / "includes.txt"),'-binarizeAllTextures')
cmdshell = '"{}" "{}" "{}" -clear -sign="{}" -project="{}" -binarizeAllTextures'.format("${ADDONBUILDEREXEPATH}",
"${SOURCEADDONSPATH}/" + addon,
"${DESTINATIONPATH}",
"${KEYPATH}",
"${PROJECTPATH}")
cmdshell = '"{}" "{}" "{}" -clear -sign="{}" -project="{}" -include="{}" -binarizeAllTextures' \
''.format("${ADDONBUILDEREXEPATH}",
"${SOURCEADDONSPATH}/" + addon,
"${DESTINATIONPATH}",
"${KEYPATH}",
"${PROJECTPATH}",
"${INCLUDELIST}")
return cmd, cmdshell
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment