Optionals moved into launchable mod folders (#5038)

* Optionals moved into launchable mod folders
when using make.py

* added '@' prefix

* Simplify publish.py
This commit is contained in:
John Harvey 2017-12-31 19:12:42 +00:00 committed by PabstMirror
parent 7d7d37409e
commit 13be39d0eb
3 changed files with 14 additions and 29 deletions

View File

@ -89,6 +89,7 @@ havena <silveredenis@gmail.com>
Hawkins Hawkins
Head <brobergsebastian@gmail.com> Head <brobergsebastian@gmail.com>
Hybrid V Hybrid V
john681611 <john681611@hotmail.com>
Karneck <dschultz26@hotmail.com> Karneck <dschultz26@hotmail.com>
Kavinsky <nmunozfernandez@gmail.com> Kavinsky <nmunozfernandez@gmail.com>
Keithen <Keithen.Neu@gmail.com> Keithen <Keithen.Neu@gmail.com>

View File

@ -422,12 +422,14 @@ def cleanup_optionals(mod):
try: try:
file_name = "{}{}.pbo".format(pbo_name_prefix,dir_name) file_name = "{}{}.pbo".format(pbo_name_prefix,dir_name)
folder= "@{}{}".format(pbo_name_prefix,dir_name)
src_file_path = os.path.join(release_dir, project, "addons", file_name) src_file_path = os.path.join(release_dir, project, "addons", file_name)
dst_file_path = os.path.join(release_dir, project, "optionals", file_name) dst_file_path = os.path.join(release_dir, project, "optionals",folder,"addons",file_name)
sigFile_name = "{}.{}.bisign".format(file_name,key_name) sigFile_name = "{}.{}.bisign".format(file_name,key_name)
src_sig_path = os.path.join(release_dir, project, "addons", sigFile_name) src_sig_path = os.path.join(release_dir, project, "addons", sigFile_name)
dst_sig_path = os.path.join(release_dir, project, "optionals", sigFile_name) dst_sig_path = os.path.join(release_dir, project, "optionals",folder,"addons", sigFile_name)
if (os.path.isfile(src_file_path)): if (os.path.isfile(src_file_path)):
#print("Preserving {}".format(file_name)) #print("Preserving {}".format(file_name))

View File

@ -45,20 +45,6 @@ def find_bi_tools():
else: else:
raise Exception("BadTools","Arma 3 Tools are not installed correctly or the P: drive needs to be created.") raise Exception("BadTools","Arma 3 Tools are not installed correctly or the P: drive needs to be created.")
def buildCompatFolder(folderName, copyFileNames):
compatRelease_dir = os.path.join(release_dir, folderName)
if os.path.exists(compatRelease_dir):
shutil.rmtree(compatRelease_dir)
os.makedirs(compatRelease_dir)
os.makedirs(os.path.join(compatRelease_dir, "addons"))
print("Adding files for folder {}".format(folderName))
for copyFileName in copyFileNames:
for file in os.listdir(ace_optionals_dir):
if fnmatch.fnmatch(file, copyFileName):
print(" Copying: {}".format(file))
shutil.copyfile(os.path.join(ace_optionals_dir, file), os.path.join(compatRelease_dir, "addons", file))
return compatRelease_dir
def publishFolder(folder,modID,changeNotes): def publishFolder(folder,modID,changeNotes):
cmd = [publisherTool_path, "update", "/id:{}".format(modID), "/changeNoteFile:{}".format(changeNotes), "/path:{}".format(folder)] cmd = [publisherTool_path, "update", "/id:{}".format(modID), "/changeNoteFile:{}".format(changeNotes), "/path:{}".format(folder)]
@ -105,30 +91,26 @@ def main(argv):
return 0 return 0
#ACE Main - http://steamcommunity.com/sharedfiles/filedetails/?id=463939057 #ACE Main - http://steamcommunity.com/sharedfiles/filedetails/?id=463939057
# Note: command line publisher doesn't like our file structure, just upload this one manually # Note: command line publisher doesn't like our file structure, just upload this one manually
#RHS Compat USA - http://steamcommunity.com/sharedfiles/filedetails/?id=773125288 #RHS Compat USA - http://steamcommunity.com/sharedfiles/filedetails/?id=773125288
folder = buildCompatFolder("@ace_compat_rhs_usf3", ["ace_compat_rhs_usf3.*"])
publishFolder(folder, "773125288", changelog_path) publishFolder(os.path.join(ace_optionals_dir,"@ace_compat_rhs_usf3"), "773125288", changelog_path)
#RHS Compat Russians - http://steamcommunity.com/sharedfiles/filedetails/?id=773131200 #RHS Compat Russians - http://steamcommunity.com/sharedfiles/filedetails/?id=773131200
folder = buildCompatFolder("@ace_compat_rhs_afrf3", ["ace_compat_rhs_afrf3.*"]) publishFolder(os.path.join(ace_optionals_dir,"@ace_compat_rhs_afrf3"), "773131200", changelog_path)
publishFolder(folder, "773131200", changelog_path)
#RHS Compat GREF - http://steamcommunity.com/sharedfiles/filedetails/?id=884966711 #RHS Compat GREF - http://steamcommunity.com/sharedfiles/filedetails/?id=884966711
folder = buildCompatFolder("@ace_compat_rhs_gref3", ["ace_compat_rhs_gref3.*"]) publishFolder(os.path.join(ace_optionals_dir,"@ace_compat_rhs_gref3"), "884966711", changelog_path)
publishFolder(folder, "884966711", changelog_path)
#ADR97 (p90)- http://steamcommunity.com/sharedfiles/filedetails/?id=773136286 #ADR97 (p90)- http://steamcommunity.com/sharedfiles/filedetails/?id=773136286
folder = buildCompatFolder("@ace_adr97_compat", ["ace_compat_adr_97.*"]) publishFolder(os.path.join(ace_optionals_dir,"@ace_compat_adr_97"), "773136286", changelog_path)
publishFolder(folder, "773136286", changelog_path)
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv) main(sys.argv)