From b8677b5b70c6bf843685a0ae474745b66886b7ab Mon Sep 17 00:00:00 2001 From: john681611 Date: Sun, 26 Mar 2017 18:35:04 +0100 Subject: [PATCH 1/3] Optionals moved into launchable mod folders when using make.py --- AUTHORS.txt | 1 + tools/make.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index dcf94277cca..09a69de49ce 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -83,6 +83,7 @@ Harakhti havena Hawkins Head +john681611 Karneck Kavinsky Kllrt diff --git a/tools/make.py b/tools/make.py index 053af8297c6..9eee0df7d91 100644 --- a/tools/make.py +++ b/tools/make.py @@ -436,12 +436,14 @@ def cleanup_optionals(mod): try: 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) - 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) 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)): #print("Preserving {}".format(file_name)) From 3259e338ee4c92d6ad650e0e3822d28a25d40d2f Mon Sep 17 00:00:00 2001 From: john681611 Date: Sun, 26 Mar 2017 19:25:42 +0100 Subject: [PATCH 2/3] added '@' prefix --- tools/make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make.py b/tools/make.py index 9eee0df7d91..de43197a692 100644 --- a/tools/make.py +++ b/tools/make.py @@ -436,7 +436,7 @@ def cleanup_optionals(mod): try: file_name = "{}{}.pbo".format(pbo_name_prefix,dir_name) - folder= "{}{}".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) dst_file_path = os.path.join(release_dir, project, "optionals",folder,"addons",file_name) From 6864e292aeb7945120ff62016731bbf2cc16fdd7 Mon Sep 17 00:00:00 2001 From: john681611 Date: Sun, 26 Mar 2017 19:49:54 +0100 Subject: [PATCH 3/3] Simplify publish.py --- tools/publish.py | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/tools/publish.py b/tools/publish.py index 02ed225d826..bd4f4f83894 100644 --- a/tools/publish.py +++ b/tools/publish.py @@ -45,20 +45,6 @@ def find_bi_tools(): else: 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): cmd = [publisherTool_path, "update", "/id:{}".format(modID), "/changeNoteFile:{}".format(changeNotes), "/path:{}".format(folder)] @@ -105,30 +91,26 @@ def main(argv): return 0 - + #ACE Main - http://steamcommunity.com/sharedfiles/filedetails/?id=463939057 # 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 - 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 - folder = buildCompatFolder("@ace_compat_rhs_afrf3", ["ace_compat_rhs_afrf3.*"]) - publishFolder(folder, "773131200", changelog_path) + publishFolder(os.path.join(ace_optionals_dir,"@ace_compat_rhs_afrf3"), "773131200", changelog_path) #RHS Compat GREF - http://steamcommunity.com/sharedfiles/filedetails/?id=884966711 - folder = buildCompatFolder("@ace_compat_rhs_gref3", ["ace_compat_rhs_gref3.*"]) - publishFolder(folder, "884966711", changelog_path) + publishFolder(os.path.join(ace_optionals_dir,"@ace_compat_rhs_gref3"), "884966711", changelog_path) #ADR97 (p90)- http://steamcommunity.com/sharedfiles/filedetails/?id=773136286 - folder = buildCompatFolder("@ace_adr97_compat", ["ace_compat_adr_97.*"]) - publishFolder(folder, "773136286", changelog_path) + publishFolder(os.path.join(ace_optionals_dir,"@ace_compat_adr_97"), "773136286", changelog_path) if __name__ == "__main__": main(sys.argv) -