Commit 4e92a50c authored by Legodev's avatar Legodev

fixed typo

parent 98b40433
import os
import subprocess
from pathlib import Path
from utils.findconfigfiles import findconfigfiles
from utils.getdependencylist import getdependencylist
......@@ -7,6 +8,7 @@ from utils.createaddonmakefiledependencies import createmakefilealldependencies,
repo = "Client_Files"
branch = "PreRelease"
createMakefile = True
sourcePath = Path("P:/")
if os.name != 'nt':
......@@ -19,23 +21,30 @@ sourceAddonsPath = projectPath
destinationpath = sourcePath / branch / repo / "Addons"
addonlist = [x for x in os.listdir(sourceAddonsPath) if os.path.isdir(sourceAddonsPath / x)]
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(createmakefilealldependencies(destinationpath, addonlist), file=f)
if createMakefile:
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(createmakefilealldependencies(destinationpath, addonlist), file=f)
for addon in addonlist:
dependencies = []
configfiles = findconfigfiles(sourceAddonsPath / addon)
sourceAddonPath = sourceAddonsPath / addon
for configfile in configfiles:
dependencies += [x for x in getdependencylist(configfile) if
x in addonlist and not x in dependencies]
print("", file=f)
print(createaddonmakefiledependencies(addon, sourceAddonPath, destinationpath, dependencies), file=f)
print('\t{}'.format(createaddonbuildercmd(projectPath, sourceAddonPath, namespace,
addon, destinationpath, keypath)[1]), file=f)
else:
for addon in addonlist:
dependencies = []
configfiles = findconfigfiles(sourceAddonsPath / addon)
sourceAddonPath = sourceAddonsPath / addon
for configfile in configfiles:
dependencies += [x for x in getdependencylist(configfile) if
x in addonlist and not x in dependencies]
print("", file=f)
print(createaddonmakefiledependencies(addon, sourceAddonsPath, destinationpath, dependencies), file=f)
print('\t{}'.format(createaddonbuildercmd(projectPath, sourceAddonPath, namespace,
addon, destinationpath, keypath)), file=f)
subprocess.call(createaddonbuildercmd(projectPath, sourceAddonPath, namespace,
addon, destinationpath, keypath)[0])
\ No newline at end of file
......@@ -15,4 +15,4 @@ def createaddonbuildercmd(projectPath, sourceAddonsPath, namespace, addon, desti
"${KEYPATH}",
"${PROJECTPATH}")
return cmdshell
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