Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionals moved into launchable mod folders #5038

Merged
merged 5 commits into from
Dec 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ havena <silveredenis@gmail.com>
Hawkins
Head <brobergsebastian@gmail.com>
Hybrid V
john681611 <john681611@hotmail.com>
Karneck <dschultz26@hotmail.com>
Kavinsky <nmunozfernandez@gmail.com>
Keithen <Keithen.Neu@gmail.com>
Expand Down
6 changes: 4 additions & 2 deletions tools/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,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))
Expand Down
36 changes: 9 additions & 27 deletions tools/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)