mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Merge branch 'indev' into launcher_rework
This commit is contained in:
commit
da2cc3b7c4
@ -1,5 +1,6 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import json
|
import json
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
@ -38,14 +39,28 @@ def RecursiveComputeChecksum(directoryPath):
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Save the checksums to a manifest file
|
# Save the checksums to a manifest file
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
def CreateManifest(checksums, outManifestFile):
|
def CreateManifest(version, checksums, outManifestFile):
|
||||||
|
manifest = {
|
||||||
|
"version": version,
|
||||||
|
"assets": checksums
|
||||||
|
}
|
||||||
with open(outManifestFile, "w") as jsonFile:
|
with open(outManifestFile, "w") as jsonFile:
|
||||||
json.dump(checksums, jsonFile, indent=4)
|
json.dump(manifest, jsonFile, indent=4)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
print("Usage: bld_man.py <versionNum>")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
try:
|
||||||
|
version = int(sys.argv[1])
|
||||||
|
except ValueError:
|
||||||
|
print("Version must be an integer")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
workingDirectory = os.getcwd()
|
workingDirectory = os.getcwd()
|
||||||
outManifestFile = "manifest.json"
|
outManifestFile = "patch_manifest.json"
|
||||||
|
|
||||||
checksums = RecursiveComputeChecksum(workingDirectory)
|
checksums = RecursiveComputeChecksum(workingDirectory)
|
||||||
CreateManifest(checksums, outManifestFile)
|
CreateManifest(version, checksums, outManifestFile)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user