Bug 1259782 - Define zip archive path prefix argument; r?ted
To support generating zip archives with more flexibility.
MozReview-Commit-ID: LmAgAXUfn3x
--- a/build/docs/toolchains.rst
+++ b/build/docs/toolchains.rst
@@ -43,19 +43,22 @@ Be sure to follow these install instruct
1. Choose a ``Custom`` installation and click ``Next``
2. Select ``Programming Languages`` -> ``Visual C++`` (make sure all sub items are
selected)
3. Under ``Windows and Web Development`` uncheck everything except
``Universal Windows App Development Tools`` and the items under it
(should be ``Tools (1.2)...`` and the ``Windows 10 SDK``).
Once Visual Studio 2015 Community has been installed, from a checkout
-of mozilla-central, run the following to produce a ZIP archive::
+of mozilla-central, run something like the following to produce a ZIP
+archive::
- $ ./mach python build/windows_toolchain.py create-zip vs2015.zip
+ $ ./mach python build/windows_toolchain.py create-zip vs2015u2
+
+The produced archive will be the argument to ``create-zip`` + ``.zip``.
Firefox for Android with Gradle
===============================
To build Firefox for Android with Gradle in automation, archives
containing both the Gradle executable and a Maven repository
comprising the exact build dependencies are produced and uploaded to
an internal Mozilla server. The build automation will download,
--- a/build/windows_toolchain.py
+++ b/build/windows_toolchain.py
@@ -232,23 +232,23 @@ def write_zip(zip_path, prefix=None):
sha256_path = mozpath.join(prefix, sha256_path)
zip.add(sdk_path, SDK_RELEASE.encode('utf-8'))
zip.add(sha256_path, sha256_manifest)
if __name__ == '__main__':
if len(sys.argv) != 3:
- print('usage: %s create-zip <filename.zip>' % sys.argv[0])
+ print('usage: %s create-zip <path-prefix>' % sys.argv[0])
sys.exit(1)
assert sys.argv[1] == 'create-zip'
- destzip = sys.argv[2]
- # TODO make prefix a CLI argument
- write_zip(destzip, prefix='vs2015u1')
+ prefix = os.path.basename(sys.argv[2])
+ destzip = '%s.zip' % sys.argv[2]
+ write_zip(destzip, prefix=prefix)
sha1 = hashlib.sha1()
sha256 = hashlib.sha256()
sha512 = hashlib.sha512()
with open(destzip, 'rb') as fh:
data = fh.read()
sha1.update(data)