Add emscripten-releases support for release tags (#243)
* Structures emscripten-releases-tags.txt to mention the latest release, and then a list of all previous releases. * Adds a new release for 1.38.33. * If the manifest has emscripten_releases_hash, then we write out emscripten-version.txt with the proper version. We start with the hash, and check if there is a released version for it, if so we emit that, otherwise we emit the hash. * Windows zipfile fix.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"latest": "0ea08ee8a5f0524b4c9ac94de4f161ceeacb3e74"
|
||||
"latest": "1.38.33",
|
||||
"releases": {
|
||||
"1.38.33": "3b8cff670e9233a6623563add831647e8689a86b"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
36
emsdk
36
emsdk
@@ -475,6 +475,9 @@ def unzip(source_filename, dest_dir, unpack_even_if_exists=False):
|
||||
if not os.path.isdir(d): os.mkdir(d)
|
||||
else:
|
||||
tmp_dst_filename = os.path.join(unzip_to_dir, member.filename)
|
||||
parent_dir = os.path.dirname(fix_potentially_long_windows_pathname(final_dst_filename))
|
||||
if parent_dir and not os.path.exists(parent_dir):
|
||||
os.makedirs(parent_dir)
|
||||
os.rename(fix_potentially_long_windows_pathname(tmp_dst_filename), fix_potentially_long_windows_pathname(final_dst_filename))
|
||||
|
||||
if common_subdir:
|
||||
@@ -1501,11 +1504,17 @@ class Tool(object):
|
||||
if dst_file: success = True
|
||||
else: success = False
|
||||
|
||||
if success and hasattr(self, 'custom_install_script'):
|
||||
if self.custom_install_script == 'build_optimizer': success = build_optimizer_tool(self)
|
||||
elif self.custom_install_script == 'build_fastcomp': pass # 'build_fastcomp' is a special one that does the download on its own, others do the download manually.
|
||||
elif self.custom_install_script == 'build_binaryen': success = build_binaryen_tool(self)
|
||||
else: raise Exception('Unknown custom_install_script command "' + self.custom_install_script + '"!')
|
||||
if success:
|
||||
if hasattr(self, 'custom_install_script'):
|
||||
if self.custom_install_script == 'build_optimizer': success = build_optimizer_tool(self)
|
||||
elif self.custom_install_script == 'build_fastcomp': pass # 'build_fastcomp' is a special one that does the download on its own, others do the download manually.
|
||||
elif self.custom_install_script == 'build_binaryen': success = build_binaryen_tool(self)
|
||||
else: raise Exception('Unknown custom_install_script command "' + self.custom_install_script + '"!')
|
||||
|
||||
# Install an emscripten-version.txt file if told to.
|
||||
if hasattr(self, 'emscripten_releases_hash'):
|
||||
emscripten_version_file_path = os.path.join(to_native_path(self.expand_vars(self.activated_path)), 'emscripten-version.txt')
|
||||
open(emscripten_version_file_path, 'w').write('"%s"' % get_emscripten_release_version(self.emscripten_releases_hash))
|
||||
|
||||
if not success:
|
||||
print("Installation failed!")
|
||||
@@ -1666,7 +1675,20 @@ def find_latest_waterfall_sdk(which):
|
||||
|
||||
def find_latest_releases_sdk(which):
|
||||
releases_info = load_releases_info()
|
||||
return 'sdk-releases-%s-%s-64bit' % (which, releases_info['latest'])
|
||||
latest = releases_info['latest']
|
||||
ident = releases_info['releases'][latest]
|
||||
return 'sdk-releases-%s-%s-64bit' % (which, ident)
|
||||
|
||||
|
||||
# Given a git hash in emscripten-releases, find the emscripten
|
||||
# version for it. There may not be one if this is not the hash of
|
||||
# a release, in which case we just use the hash.
|
||||
def get_emscripten_release_version(emscripten_releases_hash):
|
||||
releases_info = load_releases_info()
|
||||
for key, value in dict(releases_info['releases']).items():
|
||||
if value == emscripten_releases_hash:
|
||||
return key
|
||||
return emscripten_releases_hash
|
||||
|
||||
|
||||
# Finds the best-matching python tool for use.
|
||||
@@ -1875,7 +1897,7 @@ def load_releases_info():
|
||||
# Get a list of tags for emscripten-releases.
|
||||
def load_releases_tags():
|
||||
info = load_releases_info()
|
||||
return list(info.values())
|
||||
return list(info['releases'].values())
|
||||
|
||||
|
||||
def is_string(s):
|
||||
|
||||
@@ -217,11 +217,12 @@
|
||||
"bitness": 64,
|
||||
"linux_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/linux/%releases-tag%/wasm-binaries.tbz2",
|
||||
"osx_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/mac/%releases-tag%/wasm-binaries.tbz2",
|
||||
"windows_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/windows/%releases-tag%/wasm-binaries.tbz2",
|
||||
"windows_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/win/%releases-tag%/wasm-binaries.zip",
|
||||
"zipfile_prefix": "%releases-tag%-",
|
||||
"install_path": "upstream/%releases-tag%",
|
||||
"activated_path": "%installation_dir%/emscripten",
|
||||
"activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%'"
|
||||
"activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%'",
|
||||
"emscripten_releases_hash": "%releases-tag%"
|
||||
},
|
||||
{
|
||||
"id": "releases",
|
||||
@@ -229,11 +230,12 @@
|
||||
"bitness": 64,
|
||||
"linux_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/linux/%releases-tag%/wasm-binaries.tbz2",
|
||||
"osx_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/mac/%releases-tag%/wasm-binaries.tbz2",
|
||||
"windows_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/windows/%releases-tag%/wasm-binaries.zip",
|
||||
"windows_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/win/%releases-tag%/wasm-binaries.zip",
|
||||
"zipfile_prefix": "%releases-tag%-",
|
||||
"install_path": "fastcomp/%releases-tag%",
|
||||
"activated_path": "%installation_dir%/emscripten",
|
||||
"activated_cfg": "LLVM_ROOT='%installation_dir%/fastcomp/bin';BINARYEN_ROOT='%installation_dir%'"
|
||||
"activated_cfg": "LLVM_ROOT='%installation_dir%/fastcomp/bin';BINARYEN_ROOT='%installation_dir%'",
|
||||
"emscripten_releases_hash": "%releases-tag%"
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user