From a8ac2cd7efb8c1717013b4c513cd473585add46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 01:04:35 +0300 Subject: [PATCH 01/39] Add emsdk manifest entries for downloading Firefox. --- .gitignore | 1 + emsdk.py | 93 ++++++++++++++++++++++++++++++++++++++++++++- emsdk_manifest.json | 27 +++++++++++++ 3 files changed, 119 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d181c30d5a..0477fa957b 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ __pycache__ /mingw /spidermonkey /binaryen +/firefox diff --git a/emsdk.py b/emsdk.py index 392bbdb518..d3a931c659 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1257,6 +1257,86 @@ def build_ccache(tool): return success +def mozdownload_firefox(tool): + debug_print('mozdownload_firefox(' + str(tool) + ')') + + # Use mozdownload to figure out what version of Firefox we are looking to get. + from mozdownload import FactoryScraper + if WINDOWS: + extension = 'exe' + else: + extension = 'zip' + + if tool.version == 'daily': + scraper = FactoryScraper('daily', extension=extension) + else: + scraper = FactoryScraper('release', version=tool.version, extension=extension, locale='en-US') + print(scraper.url) + print(scraper.filename) + + firefox_version = scraper.filename.split("firefox-")[1].split(".en-US")[0] + print(f'Target Firefox version: {firefox_version}') + if tool.version in ['latest', 'daily']: + pretend_version_dir = os.path.normpath(tool.installation_path()) + orig_version = tool.version + tool.version = firefox_version + root = os.path.normpath(tool.installation_path()) + tool.version = orig_version + else: + pretend_version_dir = None + root = os.path.normpath(tool.installation_path()) + + print(root) + + # Check if already installed + firefox_exe = os.path.join(root, exe_suffix('firefox')) + if os.path.isfile(firefox_exe): + return True + + filename = scraper.download() + print(filename) + + os.makedirs(root, exist_ok=True) + + if extension == 'exe': + # Uncompress the NSIS installer to 'install' Firefox + run(['C:\\Program Files\\7-Zip\\7z.exe', 'x', '-y', filename, f'-o{root}']) + + core_dir = os.path.join(root, 'core') + if os.path.isdir(core_dir): + for f in os.listdir(core_dir): + shutil.move(os.path.join(core_dir, f), os.path.dirname(core_dir)) + + os.remove(filename) + + # Write a policy file that prevents Firefox from auto-updating itself. + os.makedirs(os.path.join(root, 'distribution'), exist_ok=True) + open(os.path.join(root, 'distribution', 'policies.json'), 'w').write('''{ + "policies": { + "AppAutoUpdate": false, + "DisableAppUpdate": true + } +}''') + + if os.path.isfile(firefox_exe) and pretend_version_dir: + print(pretend_version_dir) + os.makedirs(pretend_version_dir, exist_ok=True) + open(os.path.join(pretend_version_dir, 'actual.txt'), 'w').write(os.path.relpath(root, EMSDK_PATH)) + + # If we didn't get a Firefox executable, then installation failed. + return os.path.isfile(firefox_exe) + + +def is_firefox_installed(tool): + actual_file = os.path.join(tool.installation_dir(), 'actual.txt') + if not os.path.isfile(actual_file): + return False + + actual_installation_dir = sdk_path(open(actual_file).read()) + firefox_exe = os.path.join(actual_installation_dir, exe_suffix('firefox')) + return os.path.isfile(firefox_exe) + + # Finds the newest installed version of a given tool def find_latest_installed_tool(name): for t in reversed(tools): @@ -1683,6 +1763,12 @@ def expand_vars(self, str): str = str.replace('%cmake_build_type_on_win%', (decide_cmake_build_type(self) + '/') if WINDOWS else '') if '%installation_dir%' in str: str = str.replace('%installation_dir%', sdk_path(self.installation_dir())) + if '%actual_installation_dir%' in str: + actual_file = os.path.join(self.installation_dir(), 'actual.txt') + if os.path.isfile(actual_file): + str = str.replace('%actual_installation_dir%', sdk_path(open(actual_file).read())) + else: + str = str.replace('%actual_installation_dir%', '__NOT_INSTALLED__') if '%generator_prefix%' in str: str = str.replace('%generator_prefix%', cmake_generator_prefix()) str = str.replace('%.exe%', '.exe' if WINDOWS else '') @@ -1833,6 +1919,8 @@ def is_installed(self, skip_version_check=False): if hasattr(self, 'custom_is_installed_script'): if self.custom_is_installed_script == 'is_binaryen_installed': return is_binaryen_installed(self) + elif self.custom_is_installed_script == 'is_firefox_installed': + return is_firefox_installed(self) else: raise Exception('Unknown custom_is_installed_script directive "' + self.custom_is_installed_script + '"!') @@ -1968,7 +2056,8 @@ def install_tool(self): 'build_llvm': build_llvm, 'build_ninja': build_ninja, 'build_ccache': build_ccache, - 'download_node_nightly': download_node_nightly + 'download_node_nightly': download_node_nightly, + 'mozdownload_firefox': mozdownload_firefox } if hasattr(self, 'custom_install_script') and self.custom_install_script in custom_install_scripts: success = custom_install_scripts[self.custom_install_script](self) @@ -1986,7 +2075,7 @@ def install_tool(self): if hasattr(self, 'custom_install_script'): if self.custom_install_script == 'emscripten_npm_install': success = emscripten_npm_install(self, self.installation_path()) - elif self.custom_install_script in ('build_llvm', 'build_ninja', 'build_ccache', 'download_node_nightly'): + elif self.custom_install_script in ('build_llvm', 'build_ninja', 'build_ccache', 'download_node_nightly', 'mozdownload_firefox'): # 'build_llvm' is a special one that does the download on its # own, others do the download manually. pass diff --git a/emsdk_manifest.json b/emsdk_manifest.json index f50ea69d47..e8310efdd7 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -341,6 +341,33 @@ "activated_env": "EMSDK_PYTHON=%installation_dir%/bin/python3;SSL_CERT_FILE=%installation_dir%/lib/python3.13/site-packages/certifi/cacert.pem" }, + { + "id": "firefox", + "version": "65.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, + { + "id": "firefox", + "version": "latest", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "custom_install_script": "mozdownload_firefox", + "custom_is_installed_script": "is_firefox_installed" + }, + { + "id": "firefox", + "version": "daily", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "custom_install_script": "mozdownload_firefox", + "custom_is_installed_script": "is_firefox_installed" + }, + { "id": "emscripten", "version": "tag-%tag%", From 45112a3b36f5529934cefaaf1100249c3405ea49 Mon Sep 17 00:00:00 2001 From: juj Date: Sun, 28 Sep 2025 01:23:48 +0300 Subject: [PATCH 02/39] Add support for installing Firefox on Linux --- emsdk.py | 29 ++++++++++++++++++++++++----- emsdk_manifest.json | 3 +++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/emsdk.py b/emsdk.py index d3a931c659..a40cebe63d 100644 --- a/emsdk.py +++ b/emsdk.py @@ -20,6 +20,7 @@ import subprocess import sys import sysconfig +import tarfile import zipfile if os.name == 'nt': try: @@ -1265,7 +1266,9 @@ def mozdownload_firefox(tool): if WINDOWS: extension = 'exe' else: - extension = 'zip' + # Even when we ask .tar.xz, we might sometimes get .tar.bz2, depending on what is available + # on Firefox servers for the particular version. So prepare to handle both further down below. + extension = 'tar.xz' if tool.version == 'daily': scraper = FactoryScraper('daily', extension=extension) @@ -1302,10 +1305,26 @@ def mozdownload_firefox(tool): # Uncompress the NSIS installer to 'install' Firefox run(['C:\\Program Files\\7-Zip\\7z.exe', 'x', '-y', filename, f'-o{root}']) - core_dir = os.path.join(root, 'core') - if os.path.isdir(core_dir): - for f in os.listdir(core_dir): - shutil.move(os.path.join(core_dir, f), os.path.dirname(core_dir)) + collapse_subdir = os.path.join(root, 'core') + else: + collapse_subdir = os.path.join(root, 'firefox') + + if filename.endswith('tar.bz2'): + with tarfile.open(filename, "r:bz2") as tar: + tar.extractall(path=root) + elif filename.endswith('tar.xz'): + with tarfile.open(filename, "r:xz") as tar: + tar.extractall(path=root) + + + if collapse_subdir and os.path.isdir(collapse_subdir): + # Rename the parent subdirectory first, since we will be handling a nested `firefox/firefox/` + collapse = collapse_subdir + '_bkp_renamed' + os.rename(collapse_subdir, collapse) + # Move all files up by one directory + for f in os.listdir(collapse): + shutil.move(os.path.join(collapse, f), os.path.dirname(collapse)) + os.remove(filename) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index e8310efdd7..fdc2ca04ac 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -346,6 +346,7 @@ "version": "65.0", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, @@ -354,6 +355,7 @@ "version": "latest", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox", "custom_is_installed_script": "is_firefox_installed" @@ -363,6 +365,7 @@ "version": "daily", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox", "custom_is_installed_script": "is_firefox_installed" From e64ba767ae2e0f4f0bda98d06a9506c6eeab07e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 11:38:00 +0300 Subject: [PATCH 03/39] Add git branch markers --- emsdk_manifest.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index fdc2ca04ac..2d44f01ce1 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -355,6 +355,7 @@ "version": "latest", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox", @@ -365,6 +366,7 @@ "version": "daily", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox", From 8c0b743b1ded95f782d0a6bdbeccb073a2de395f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 11:43:28 +0300 Subject: [PATCH 04/39] Fix daily path --- emsdk.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index a40cebe63d..38fc94dbbc 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1277,7 +1277,11 @@ def mozdownload_firefox(tool): print(scraper.url) print(scraper.filename) - firefox_version = scraper.filename.split("firefox-")[1].split(".en-US")[0] + if tool.version == 'daily': + firefox_version = os.path.basename(scraper.filename).split(".en-US")[0] + else: + firefox_version = os.path.basename(scraper.filename).split("firefox-")[1].split(".en-US")[0] + print(f'Target Firefox version: {firefox_version}') if tool.version in ['latest', 'daily']: pretend_version_dir = os.path.normpath(tool.installation_path()) From 4dd06a2d03c3bfd86619ffabd48c9a2ac12388a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 11:55:05 +0300 Subject: [PATCH 05/39] Autoinstall mozdownload --- emsdk.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emsdk.py b/emsdk.py index 38fc94dbbc..24805516f7 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1261,6 +1261,9 @@ def build_ccache(tool): def mozdownload_firefox(tool): debug_print('mozdownload_firefox(' + str(tool) + ')') + # Install mozdownload into the current python interpreter so that it can be imported. + subprocess.check_call([sys.executable, "-m", "pip", "install", "mozdownload"]) + # Use mozdownload to figure out what version of Firefox we are looking to get. from mozdownload import FactoryScraper if WINDOWS: From 6c58b2a72d9b1a9ceee8a6cb40762e1aa1dbd64c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 12:07:55 +0300 Subject: [PATCH 06/39] Add firefox 90.0 --- emsdk_manifest.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 2d44f01ce1..f42a2979d1 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -350,6 +350,15 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, + { + "id": "firefox", + "version": "90.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, { "id": "firefox", "version": "latest", From b48c9335bc154a741bcca36d9d5420334d7417be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 12:09:31 +0300 Subject: [PATCH 07/39] Firefox 120 --- emsdk_manifest.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index f42a2979d1..e12a555fa9 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -359,6 +359,15 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, + { + "id": "firefox", + "version": "120.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, { "id": "firefox", "version": "latest", From bd4cab3f9432126edc7935e3fba130b47e3bac27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 12:23:41 +0300 Subject: [PATCH 08/39] Add Firefox 130 --- emsdk_manifest.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index e12a555fa9..b0a6bd7c83 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -368,6 +368,15 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, + { + "id": "firefox", + "version": "130.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, { "id": "firefox", "version": "latest", From c5fbe8a6154d3314f74732096911f9c7022b6916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 12:26:20 +0300 Subject: [PATCH 09/39] Add Firefox 125 --- emsdk_manifest.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index b0a6bd7c83..d9b0c3ffab 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -377,6 +377,15 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, + { + "id": "firefox", + "version": "125.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, { "id": "firefox", "version": "latest", From 9ce1de9054f84647beb1cda80279477c07374d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 12:31:50 +0300 Subject: [PATCH 10/39] 125.0.1 --- emsdk_manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index d9b0c3ffab..c4d97852aa 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -379,7 +379,7 @@ }, { "id": "firefox", - "version": "125.0", + "version": "125.0.1", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", From 801073c65118e7d38e41fcd81ebb671b87963306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 12:47:32 +0300 Subject: [PATCH 11/39] Add 122.0 --- emsdk_manifest.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index c4d97852aa..d81077bcc0 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -386,6 +386,15 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, + { + "id": "firefox", + "version": "122.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, { "id": "firefox", "version": "latest", From 8ebe2eb2a684ca453d6de43abfa3c433d0ab7215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 13:26:23 +0300 Subject: [PATCH 12/39] MacOS support --- emsdk.py | 55 ++++++++++++++++++++++++++++++++------------- emsdk_manifest.json | 16 +++++++++++++ 2 files changed, 55 insertions(+), 16 deletions(-) diff --git a/emsdk.py b/emsdk.py index 24805516f7..7e3e24db39 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1268,6 +1268,8 @@ def mozdownload_firefox(tool): from mozdownload import FactoryScraper if WINDOWS: extension = 'exe' + elif MACOS: + extension = 'dmg' else: # Even when we ask .tar.xz, we might sometimes get .tar.bz2, depending on what is available # on Firefox servers for the particular version. So prepare to handle both further down below. @@ -1299,30 +1301,39 @@ def mozdownload_firefox(tool): print(root) # Check if already installed - firefox_exe = os.path.join(root, exe_suffix('firefox')) + exe_dir = os.path.join(root, 'Contents', 'MacOS') if MACOS else root + firefox_exe = os.path.join(exe_dir, exe_suffix('firefox')) if os.path.isfile(firefox_exe): return True filename = scraper.download() print(filename) - os.makedirs(root, exist_ok=True) + if not MACOS: + os.makedirs(root, exist_ok=True) if extension == 'exe': # Uncompress the NSIS installer to 'install' Firefox run(['C:\\Program Files\\7-Zip\\7z.exe', 'x', '-y', filename, f'-o{root}']) - collapse_subdir = os.path.join(root, 'core') - else: - collapse_subdir = os.path.join(root, 'firefox') - - if filename.endswith('tar.bz2'): + if filename.endswith('.tar.bz2'): with tarfile.open(filename, "r:bz2") as tar: tar.extractall(path=root) - elif filename.endswith('tar.xz'): + collapse_subdir = os.path.join(root, 'firefox') + elif filename.endswith('.tar.xz'): with tarfile.open(filename, "r:xz") as tar: tar.extractall(path=root) - + collapse_subdir = os.path.join(root, 'firefox') + elif filename.endswith('.dmg'): + mount_point = '/Volumes/Firefox' + if os.path.exists(mount_point): + raise Exception('Previous mount of Firefox already exists, unable to proceed.') + run(['hdiutil', 'attach', filename]) + shutil.copytree(os.path.join(mount_point, 'Firefox.app'), root) + run(['hdiutil', 'detach', mount_point]) + collapse_subdir = None + elif filename.endswith('.exe'): + collapse_subdir = os.path.join(root, 'core') if collapse_subdir and os.path.isdir(collapse_subdir): # Rename the parent subdirectory first, since we will be handling a nested `firefox/firefox/` @@ -1332,12 +1343,15 @@ def mozdownload_firefox(tool): for f in os.listdir(collapse): shutil.move(os.path.join(collapse, f), os.path.dirname(collapse)) - os.remove(filename) # Write a policy file that prevents Firefox from auto-updating itself. - os.makedirs(os.path.join(root, 'distribution'), exist_ok=True) - open(os.path.join(root, 'distribution', 'policies.json'), 'w').write('''{ + if MACOS: + distribution_path = os.path.join(root, 'Contents', 'Resources', 'distribution') + else: + distribution_path = os.path.join(root, 'distribution') + os.makedirs(distribution_path, exist_ok=True) + open(os.path.join(distribution_path, 'policies.json'), 'w').write('''{ "policies": { "AppAutoUpdate": false, "DisableAppUpdate": true @@ -1846,21 +1860,30 @@ def installation_dir(self): # Returns the configuration item that needs to be added to .emscripten to make # this Tool active for the current user. def activated_config(self): - if not hasattr(self, 'activated_cfg'): + if MACOS and hasattr(self, 'mac_activated_cfg'): + activated_cfg = self.mac_activated_cfg + elif hasattr(self, 'activated_cfg'): + activated_cfg = self.activated_cfg + else: return {} + config = OrderedDict() - expanded = to_unix_path(self.expand_vars(self.activated_cfg)) + expanded = to_unix_path(self.expand_vars(activated_cfg)) for specific_cfg in expanded.split(';'): name, value = specific_cfg.split('=') config[name] = value.strip("'") return config def activated_environment(self): - if hasattr(self, 'activated_env'): - return self.expand_vars(self.activated_env).split(';') + if MACOS and hasattr(self, 'mac_activated_env'): + activated_env = self.mac_activated_env + elif hasattr(self, 'activated_env'): + activated_env = self.activated_env else: return [] + return self.expand_vars(activated_env).split(';') + def compatible_with_this_arch(self): if hasattr(self, 'arch'): if self.arch != ARCH: diff --git a/emsdk_manifest.json b/emsdk_manifest.json index d81077bcc0..833fbe4521 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -348,6 +348,8 @@ "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, { @@ -357,6 +359,8 @@ "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, { @@ -366,6 +370,8 @@ "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, { @@ -375,6 +381,8 @@ "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, { @@ -384,6 +392,8 @@ "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, { @@ -393,6 +403,8 @@ "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, { @@ -403,6 +415,8 @@ "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox", "custom_is_installed_script": "is_firefox_installed" }, @@ -414,6 +428,8 @@ "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox", "custom_is_installed_script": "is_firefox_installed" }, From fd0aeb7ef093d6f163319ab13c0cb93836ee3789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 13:26:59 +0300 Subject: [PATCH 13/39] Add Firefox 123.0 --- emsdk_manifest.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 833fbe4521..39139c14b1 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -407,6 +407,17 @@ "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, + { + "id": "firefox", + "version": "123.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, { "id": "firefox", "version": "latest", From 6003b3e42a011b4e4d5b608233ce1f16e345823c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 13:34:01 +0300 Subject: [PATCH 14/39] Fix is_firefox_installed on MacOS. --- emsdk.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index 7e3e24db39..e0b0431913 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1373,7 +1373,8 @@ def is_firefox_installed(tool): return False actual_installation_dir = sdk_path(open(actual_file).read()) - firefox_exe = os.path.join(actual_installation_dir, exe_suffix('firefox')) + exe_dir = os.path.join(actual_installation_dir, 'Contents', 'MacOS') if MACOS else actual_installation_dir + firefox_exe = os.path.join(exe_dir, exe_suffix('firefox')) return os.path.isfile(firefox_exe) From 65521c77af53748f49401bf643c22872672fc6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 13:42:28 +0300 Subject: [PATCH 15/39] Add Firefox 100.0 and 110.0 --- emsdk_manifest.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 39139c14b1..22630a6d11 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -363,6 +363,28 @@ "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, + { + "id": "firefox", + "version": "100.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, + { + "id": "firefox", + "version": "110.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, { "id": "firefox", "version": "120.0", From 8a3b8285fdee59e9f5dd6d7061efd3eca06a8b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 14:34:54 +0300 Subject: [PATCH 16/39] Add Firefox esr --- emsdk_manifest.json | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 22630a6d11..bce458996a 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -374,6 +374,72 @@ "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, + { + "id": "firefox", + "version": "68.12.0esr", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, + { + "id": "firefox", + "version": "78.15.0esr", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, + { + "id": "firefox", + "version": "91.13.0esr", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, + { + "id": "firefox", + "version": "102.15.1esr", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, + { + "id": "firefox", + "version": "115.28.0esr", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, + { + "id": "firefox", + "version": "128.14.0esr", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, { "id": "firefox", "version": "110.0", From 3377c89cc505b799284ab4ca0a386a4269d26186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 14:42:52 +0300 Subject: [PATCH 17/39] Only attempt mozdownload reinstall if mozdownload import does not work. --- emsdk.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/emsdk.py b/emsdk.py index e0b0431913..fa784c667d 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1261,11 +1261,14 @@ def build_ccache(tool): def mozdownload_firefox(tool): debug_print('mozdownload_firefox(' + str(tool) + ')') - # Install mozdownload into the current python interpreter so that it can be imported. - subprocess.check_call([sys.executable, "-m", "pip", "install", "mozdownload"]) - # Use mozdownload to figure out what version of Firefox we are looking to get. - from mozdownload import FactoryScraper + try: + from mozdownload import FactoryScraper + except: + # Install mozdownload into the current python interpreter so that it can be imported. + subprocess.check_call([sys.executable, "-m", "pip", "install", "mozdownload"]) + from mozdownload import FactoryScraper + if WINDOWS: extension = 'exe' elif MACOS: From 651644921bef4f8a6e218e876030ca4f56705f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 15:50:19 +0300 Subject: [PATCH 18/39] flake --- emsdk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emsdk.py b/emsdk.py index fa784c667d..e405661c43 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1264,7 +1264,7 @@ def mozdownload_firefox(tool): # Use mozdownload to figure out what version of Firefox we are looking to get. try: from mozdownload import FactoryScraper - except: + except ModuleNotFoundError: # Install mozdownload into the current python interpreter so that it can be imported. subprocess.check_call([sys.executable, "-m", "pip", "install", "mozdownload"]) from mozdownload import FactoryScraper @@ -1290,7 +1290,7 @@ def mozdownload_firefox(tool): else: firefox_version = os.path.basename(scraper.filename).split("firefox-")[1].split(".en-US")[0] - print(f'Target Firefox version: {firefox_version}') + print('Target Firefox version: ' + firefox_version) if tool.version in ['latest', 'daily']: pretend_version_dir = os.path.normpath(tool.installation_path()) orig_version = tool.version From bf39cf7c209c169136971119f9d60eb677289f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 16:04:20 +0300 Subject: [PATCH 19/39] Fix MacOS for Firefox Nightly --- emsdk.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index e405661c43..c5c4d75f3f 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1329,10 +1329,19 @@ def mozdownload_firefox(tool): collapse_subdir = os.path.join(root, 'firefox') elif filename.endswith('.dmg'): mount_point = '/Volumes/Firefox' + # If a previous mount point exists, detach it first + if os.path.exists(mount_point): + run(['hdiutil', 'detach', mount_point]) + # Abort if detaching was not successful if os.path.exists(mount_point): raise Exception('Previous mount of Firefox already exists, unable to proceed.') + firefox_dir = os.path.join(mount_point, 'Firefox.app') + if not os.path.isdir(firefox_dir): + firefox_dir = os.path.join(mount_point, 'Firefox Nightly.app') + if not os.path.isdir(firefox_dir): + raise Exception('Unable to find Firefox directory inside app image.') run(['hdiutil', 'attach', filename]) - shutil.copytree(os.path.join(mount_point, 'Firefox.app'), root) + shutil.copytree(firefox_dir, root) run(['hdiutil', 'detach', mount_point]) collapse_subdir = None elif filename.endswith('.exe'): From ec0cf2b6c5548752c1e712e7d16889fcc19b24d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 16:06:39 +0300 Subject: [PATCH 20/39] Fix attach --- emsdk.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index c5c4d75f3f..d3dc541965 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1335,12 +1335,13 @@ def mozdownload_firefox(tool): # Abort if detaching was not successful if os.path.exists(mount_point): raise Exception('Previous mount of Firefox already exists, unable to proceed.') + + run(['hdiutil', 'attach', filename]) firefox_dir = os.path.join(mount_point, 'Firefox.app') if not os.path.isdir(firefox_dir): firefox_dir = os.path.join(mount_point, 'Firefox Nightly.app') if not os.path.isdir(firefox_dir): raise Exception('Unable to find Firefox directory inside app image.') - run(['hdiutil', 'attach', filename]) shutil.copytree(firefox_dir, root) run(['hdiutil', 'detach', mount_point]) collapse_subdir = None From 2687a33a316eee64581fef1e7b88febaf0355f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 16:24:18 +0300 Subject: [PATCH 21/39] fix 2 --- emsdk.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/emsdk.py b/emsdk.py index d3dc541965..bebded3b78 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1328,7 +1328,8 @@ def mozdownload_firefox(tool): tar.extractall(path=root) collapse_subdir = os.path.join(root, 'firefox') elif filename.endswith('.dmg'): - mount_point = '/Volumes/Firefox' + mount_point = '/Volumes/Firefox Nightly' if tool.version == 'daily' else '/Volumes/Firefox' + app_name = 'Firefox.app' if tool.version == 'daily' else 'Firefox Nightly.app' # If a previous mount point exists, detach it first if os.path.exists(mount_point): run(['hdiutil', 'detach', mount_point]) @@ -1337,9 +1338,7 @@ def mozdownload_firefox(tool): raise Exception('Previous mount of Firefox already exists, unable to proceed.') run(['hdiutil', 'attach', filename]) - firefox_dir = os.path.join(mount_point, 'Firefox.app') - if not os.path.isdir(firefox_dir): - firefox_dir = os.path.join(mount_point, 'Firefox Nightly.app') + firefox_dir = os.path.join(mount_point, app_name) if not os.path.isdir(firefox_dir): raise Exception('Unable to find Firefox directory inside app image.') shutil.copytree(firefox_dir, root) From 7d9ac48f9fccf1eeb81ed545990ab19cd5e34cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 16:25:56 +0300 Subject: [PATCH 22/39] daily -> nightly (they are the same) --- emsdk.py | 12 ++++++------ emsdk_manifest.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/emsdk.py b/emsdk.py index bebded3b78..4104bb0470 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1278,20 +1278,20 @@ def mozdownload_firefox(tool): # on Firefox servers for the particular version. So prepare to handle both further down below. extension = 'tar.xz' - if tool.version == 'daily': - scraper = FactoryScraper('daily', extension=extension) + if tool.version == 'nightly': + scraper = FactoryScraper('nightly', extension=extension) else: scraper = FactoryScraper('release', version=tool.version, extension=extension, locale='en-US') print(scraper.url) print(scraper.filename) - if tool.version == 'daily': + if tool.version == 'nightly': firefox_version = os.path.basename(scraper.filename).split(".en-US")[0] else: firefox_version = os.path.basename(scraper.filename).split("firefox-")[1].split(".en-US")[0] print('Target Firefox version: ' + firefox_version) - if tool.version in ['latest', 'daily']: + if tool.version in ['latest', 'nightly']: pretend_version_dir = os.path.normpath(tool.installation_path()) orig_version = tool.version tool.version = firefox_version @@ -1328,8 +1328,8 @@ def mozdownload_firefox(tool): tar.extractall(path=root) collapse_subdir = os.path.join(root, 'firefox') elif filename.endswith('.dmg'): - mount_point = '/Volumes/Firefox Nightly' if tool.version == 'daily' else '/Volumes/Firefox' - app_name = 'Firefox.app' if tool.version == 'daily' else 'Firefox Nightly.app' + mount_point = '/Volumes/Firefox Nightly' if tool.version == 'nightly' else '/Volumes/Firefox' + app_name = 'Firefox.app' if tool.version == 'nightly' else 'Firefox Nightly.app' # If a previous mount point exists, detach it first if os.path.exists(mount_point): run(['hdiutil', 'detach', mount_point]) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index bce458996a..0f46f53f6f 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -521,7 +521,7 @@ }, { "id": "firefox", - "version": "daily", + "version": "nightly", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", From faac8488177bba966487ee9195f09dba6fb1b92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 16:31:08 +0300 Subject: [PATCH 23/39] Add 140.3.1esr --- emsdk.py | 2 +- emsdk_manifest.json | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index 4104bb0470..05fe58cd89 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1291,7 +1291,7 @@ def mozdownload_firefox(tool): firefox_version = os.path.basename(scraper.filename).split("firefox-")[1].split(".en-US")[0] print('Target Firefox version: ' + firefox_version) - if tool.version in ['latest', 'nightly']: + if tool.version in ['latest', 'latest-esr', 'nightly']: pretend_version_dir = os.path.normpath(tool.installation_path()) orig_version = tool.version tool.version = firefox_version diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 0f46f53f6f..7e9dc8d251 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -440,6 +440,17 @@ "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox" }, + { + "id": "firefox", + "version": "140.3.1esr", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox" + }, { "id": "firefox", "version": "110.0", @@ -519,6 +530,19 @@ "custom_install_script": "mozdownload_firefox", "custom_is_installed_script": "is_firefox_installed" }, + { + "id": "firefox", + "version": "latest-esr", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", + "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox", + "custom_is_installed_script": "is_firefox_installed" + }, { "id": "firefox", "version": "nightly", From a273a9b5914acaa786f580790c446b60a2224b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 16:36:09 +0300 Subject: [PATCH 24/39] nightly->daily --- emsdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index 05fe58cd89..69c659198f 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1279,7 +1279,7 @@ def mozdownload_firefox(tool): extension = 'tar.xz' if tool.version == 'nightly': - scraper = FactoryScraper('nightly', extension=extension) + scraper = FactoryScraper('daily', extension=extension) else: scraper = FactoryScraper('release', version=tool.version, extension=extension, locale='en-US') print(scraper.url) From ab1547e8166d899e949dca911c9f57b4830d7d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 16:37:49 +0300 Subject: [PATCH 25/39] Fix typo --- emsdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index 69c659198f..de19c82ee7 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1329,7 +1329,7 @@ def mozdownload_firefox(tool): collapse_subdir = os.path.join(root, 'firefox') elif filename.endswith('.dmg'): mount_point = '/Volumes/Firefox Nightly' if tool.version == 'nightly' else '/Volumes/Firefox' - app_name = 'Firefox.app' if tool.version == 'nightly' else 'Firefox Nightly.app' + app_name = 'Firefox Nightly.app' if tool.version == 'nightly' else 'Firefox.app' # If a previous mount point exists, detach it first if os.path.exists(mount_point): run(['hdiutil', 'detach', mount_point]) From 9c1bdf5d7f48e5cc443abcd05891bc76d16eaf9d Mon Sep 17 00:00:00 2001 From: juj Date: Sun, 28 Sep 2025 16:50:41 +0300 Subject: [PATCH 26/39] Fix mac cfg --- emsdk.py | 1 + emsdk_manifest.json | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/emsdk.py b/emsdk.py index de19c82ee7..a38e7a6dd0 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1307,6 +1307,7 @@ def mozdownload_firefox(tool): exe_dir = os.path.join(root, 'Contents', 'MacOS') if MACOS else root firefox_exe = os.path.join(exe_dir, exe_suffix('firefox')) if os.path.isfile(firefox_exe): + print(firefox_exe + ' is already installed, skipping..') return True filename = scraper.download() diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 7e9dc8d251..1e468defbc 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -525,8 +525,8 @@ "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox", "custom_is_installed_script": "is_firefox_installed" }, @@ -538,8 +538,8 @@ "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox", "custom_is_installed_script": "is_firefox_installed" }, @@ -551,8 +551,8 @@ "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "mozdownload_firefox", "custom_is_installed_script": "is_firefox_installed" }, From d78bb89cdf78912572d5f16589bbc460a4dcd3d0 Mon Sep 17 00:00:00 2001 From: juj Date: Sun, 28 Sep 2025 16:54:29 +0300 Subject: [PATCH 27/39] Fix save version --- emsdk.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/emsdk.py b/emsdk.py index a38e7a6dd0..f9d579de4e 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1303,11 +1303,18 @@ def mozdownload_firefox(tool): print(root) + def save_pretend_version(): + if os.path.isfile(firefox_exe) and pretend_version_dir: + print(pretend_version_dir) + os.makedirs(pretend_version_dir, exist_ok=True) + open(os.path.join(pretend_version_dir, 'actual.txt'), 'w').write(os.path.relpath(root, EMSDK_PATH)) + # Check if already installed exe_dir = os.path.join(root, 'Contents', 'MacOS') if MACOS else root firefox_exe = os.path.join(exe_dir, exe_suffix('firefox')) if os.path.isfile(firefox_exe): print(firefox_exe + ' is already installed, skipping..') + save_pretend_version() return True filename = scraper.download() @@ -1371,10 +1378,7 @@ def mozdownload_firefox(tool): } }''') - if os.path.isfile(firefox_exe) and pretend_version_dir: - print(pretend_version_dir) - os.makedirs(pretend_version_dir, exist_ok=True) - open(os.path.join(pretend_version_dir, 'actual.txt'), 'w').write(os.path.relpath(root, EMSDK_PATH)) + save_pretend_version() # If we didn't get a Firefox executable, then installation failed. return os.path.isfile(firefox_exe) From 1cc37cd545bed48b678cbb24b35db79ec3511368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 17:12:37 +0300 Subject: [PATCH 28/39] no f --- emsdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index f9d579de4e..164f8657f8 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1325,7 +1325,7 @@ def save_pretend_version(): if extension == 'exe': # Uncompress the NSIS installer to 'install' Firefox - run(['C:\\Program Files\\7-Zip\\7z.exe', 'x', '-y', filename, f'-o{root}']) + run(['C:\\Program Files\\7-Zip\\7z.exe', 'x', '-y', filename, '-o' + root]) if filename.endswith('.tar.bz2'): with tarfile.open(filename, "r:bz2") as tar: From ac87ea127f7854ce6a66356da9eeb242d48fed4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 17:15:02 +0300 Subject: [PATCH 29/39] Add Firefox beta --- emsdk.py | 2 +- emsdk_manifest.json | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index 164f8657f8..82cc2e17ba 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1291,7 +1291,7 @@ def mozdownload_firefox(tool): firefox_version = os.path.basename(scraper.filename).split("firefox-")[1].split(".en-US")[0] print('Target Firefox version: ' + firefox_version) - if tool.version in ['latest', 'latest-esr', 'nightly']: + if tool.version in ['latest', 'latest-esr', 'latest-beta', 'nightly']: pretend_version_dir = os.path.normpath(tool.installation_path()) orig_version = tool.version tool.version = firefox_version diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 1e468defbc..765ecd6b3b 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -543,6 +543,19 @@ "custom_install_script": "mozdownload_firefox", "custom_is_installed_script": "is_firefox_installed" }, + { + "id": "firefox", + "version": "latest-beta", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", + "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "mozdownload_firefox", + "custom_is_installed_script": "is_firefox_installed" + }, { "id": "firefox", "version": "nightly", From fe8c557e617389f0940379624ac5b9beb9a704f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sun, 28 Sep 2025 17:17:43 +0300 Subject: [PATCH 30/39] ImportError --- emsdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index 82cc2e17ba..daa56e827a 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1264,7 +1264,7 @@ def mozdownload_firefox(tool): # Use mozdownload to figure out what version of Firefox we are looking to get. try: from mozdownload import FactoryScraper - except ModuleNotFoundError: + except ImportError: # Install mozdownload into the current python interpreter so that it can be imported. subprocess.check_call([sys.executable, "-m", "pip", "install", "mozdownload"]) from mozdownload import FactoryScraper From 214c810540e69350bd62b1a8fcb8d7aab0ae2644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Mon, 29 Sep 2025 15:42:59 +0300 Subject: [PATCH 31/39] Cleanup --- emsdk.py | 63 +++++++++++++++---------- emsdk_manifest.json | 112 +++++--------------------------------------- 2 files changed, 51 insertions(+), 124 deletions(-) diff --git a/emsdk.py b/emsdk.py index daa56e827a..022da9a9e1 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1258,14 +1258,14 @@ def build_ccache(tool): return success -def mozdownload_firefox(tool): - debug_print('mozdownload_firefox(' + str(tool) + ')') +def download_firefox(tool): + debug_print('download_firefox(' + str(tool) + ')') - # Use mozdownload to figure out what version of Firefox we are looking to get. + # Use mozdownload to acquire Firefox versions. try: from mozdownload import FactoryScraper except ImportError: - # Install mozdownload into the current python interpreter so that it can be imported. + # If mozdownload is not available, invoke pip to install it. subprocess.check_call([sys.executable, "-m", "pip", "install", "mozdownload"]) from mozdownload import FactoryScraper @@ -1274,16 +1274,15 @@ def mozdownload_firefox(tool): elif MACOS: extension = 'dmg' else: - # Even when we ask .tar.xz, we might sometimes get .tar.bz2, depending on what is available - # on Firefox servers for the particular version. So prepare to handle both further down below. + # N.b. on Linux even when we ask .tar.xz, we might sometimes get .tar.bz2, + # depending on what is available on Firefox servers for the particular + # version. So prepare to handle both further down below. extension = 'tar.xz' if tool.version == 'nightly': scraper = FactoryScraper('daily', extension=extension) else: scraper = FactoryScraper('release', version=tool.version, extension=extension, locale='en-US') - print(scraper.url) - print(scraper.filename) if tool.version == 'nightly': firefox_version = os.path.basename(scraper.filename).split(".en-US")[0] @@ -1301,24 +1300,26 @@ def mozdownload_firefox(tool): pretend_version_dir = None root = os.path.normpath(tool.installation_path()) - print(root) - - def save_pretend_version(): + # For moving installer packages, e.g. "nightly", "latest", "latest-esr", + # store a text file to specify the actual installation directory. + def save_actual_version(): if os.path.isfile(firefox_exe) and pretend_version_dir: print(pretend_version_dir) os.makedirs(pretend_version_dir, exist_ok=True) open(os.path.join(pretend_version_dir, 'actual.txt'), 'w').write(os.path.relpath(root, EMSDK_PATH)) # Check if already installed + print('Firefox installation root directory: ' + root) exe_dir = os.path.join(root, 'Contents', 'MacOS') if MACOS else root firefox_exe = os.path.join(exe_dir, exe_suffix('firefox')) if os.path.isfile(firefox_exe): print(firefox_exe + ' is already installed, skipping..') - save_pretend_version() + save_actual_version() return True + print('Downloading Firefox from ' + scraper.url) filename = scraper.download() - print(filename) + print('Finished downloading ' + filename) if not MACOS: os.makedirs(root, exist_ok=True) @@ -1327,42 +1328,56 @@ def save_pretend_version(): # Uncompress the NSIS installer to 'install' Firefox run(['C:\\Program Files\\7-Zip\\7z.exe', 'x', '-y', filename, '-o' + root]) - if filename.endswith('.tar.bz2'): - with tarfile.open(filename, "r:bz2") as tar: - tar.extractall(path=root) - collapse_subdir = os.path.join(root, 'firefox') - elif filename.endswith('.tar.xz'): - with tarfile.open(filename, "r:xz") as tar: + if '.tar.' in filename:.endswith('.tar.bz2') or filename.endswith('.tar.xz'): + if filename.endswith('.tar.bz2'): + tar_type = 'r:bz2' + elif filename.endswith('.tar.xz'): + tar_type = 'r:xz' + else: + raise Exception('Unknown archive type!') + + with tarfile.open(filename, tar_type) as tar: tar.extractall(path=root) collapse_subdir = os.path.join(root, 'firefox') + elif filename.endswith('.dmg'): mount_point = '/Volumes/Firefox Nightly' if tool.version == 'nightly' else '/Volumes/Firefox' app_name = 'Firefox Nightly.app' if tool.version == 'nightly' else 'Firefox.app' + # If a previous mount point exists, detach it first if os.path.exists(mount_point): run(['hdiutil', 'detach', mount_point]) + # Abort if detaching was not successful if os.path.exists(mount_point): - raise Exception('Previous mount of Firefox already exists, unable to proceed.') + raise Exception('Previous mount of Firefox already exists at "' + mount_point + '", unable to proceed.') + # Mount the archive run(['hdiutil', 'attach', filename]) firefox_dir = os.path.join(mount_point, app_name) if not os.path.isdir(firefox_dir): - raise Exception('Unable to find Firefox directory inside app image.') + raise Exception('Unable to find Firefox directory "' + firefox_dir + '" inside app image.') + + # And install by copying the files from the archive shutil.copytree(firefox_dir, root) run(['hdiutil', 'detach', mount_point]) collapse_subdir = None + elif filename.endswith('.exe'): + # NSIS installer package has a core/ directory, remove it as redundant. collapse_subdir = os.path.join(root, 'core') + # Remove a redundant subdirectory by moving installed files up one directory. if collapse_subdir and os.path.isdir(collapse_subdir): # Rename the parent subdirectory first, since we will be handling a nested `firefox/firefox/` collapse = collapse_subdir + '_bkp_renamed' os.rename(collapse_subdir, collapse) + # Move all files up by one directory for f in os.listdir(collapse): shutil.move(os.path.join(collapse, f), os.path.dirname(collapse)) + # Original installer is now done. os.remove(filename) # Write a policy file that prevents Firefox from auto-updating itself. @@ -1378,7 +1393,7 @@ def save_pretend_version(): } }''') - save_pretend_version() + save_actual_version() # If we didn't get a Firefox executable, then installation failed. return os.path.isfile(firefox_exe) @@ -2124,7 +2139,7 @@ def install_tool(self): 'build_ninja': build_ninja, 'build_ccache': build_ccache, 'download_node_nightly': download_node_nightly, - 'mozdownload_firefox': mozdownload_firefox + 'download_firefox': download_firefox } if hasattr(self, 'custom_install_script') and self.custom_install_script in custom_install_scripts: success = custom_install_scripts[self.custom_install_script](self) @@ -2142,7 +2157,7 @@ def install_tool(self): if hasattr(self, 'custom_install_script'): if self.custom_install_script == 'emscripten_npm_install': success = emscripten_npm_install(self, self.installation_path()) - elif self.custom_install_script in ('build_llvm', 'build_ninja', 'build_ccache', 'download_node_nightly', 'mozdownload_firefox'): + elif self.custom_install_script in ('build_llvm', 'build_ninja', 'build_ccache', 'download_node_nightly', 'download_firefox'): # 'build_llvm' is a special one that does the download on its # own, others do the download manually. pass diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 765ecd6b3b..8f499d9b6c 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -350,29 +350,7 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" - }, - { - "id": "firefox", - "version": "90.0", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" - }, - { - "id": "firefox", - "version": "100.0", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" + "custom_install_script": "download_firefox" }, { "id": "firefox", @@ -383,7 +361,7 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" + "custom_install_script": "download_firefox" }, { "id": "firefox", @@ -394,7 +372,7 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" + "custom_install_script": "download_firefox" }, { "id": "firefox", @@ -405,7 +383,7 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" + "custom_install_script": "download_firefox" }, { "id": "firefox", @@ -416,7 +394,7 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" + "custom_install_script": "download_firefox" }, { "id": "firefox", @@ -427,7 +405,7 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" + "custom_install_script": "download_firefox" }, { "id": "firefox", @@ -438,7 +416,7 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" + "custom_install_script": "download_firefox" }, { "id": "firefox", @@ -449,73 +427,7 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" - }, - { - "id": "firefox", - "version": "110.0", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" - }, - { - "id": "firefox", - "version": "120.0", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" - }, - { - "id": "firefox", - "version": "130.0", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" - }, - { - "id": "firefox", - "version": "125.0.1", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" - }, - { - "id": "firefox", - "version": "122.0", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" - }, - { - "id": "firefox", - "version": "123.0", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox" + "custom_install_script": "download_firefox" }, { "id": "firefox", @@ -527,7 +439,7 @@ "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox", + "custom_install_script": "download_firefox", "custom_is_installed_script": "is_firefox_installed" }, { @@ -540,7 +452,7 @@ "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox", + "custom_install_script": "download_firefox", "custom_is_installed_script": "is_firefox_installed" }, { @@ -553,7 +465,7 @@ "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox", + "custom_install_script": "download_firefox", "custom_is_installed_script": "is_firefox_installed" }, { @@ -566,7 +478,7 @@ "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "mozdownload_firefox", + "custom_install_script": "download_firefox", "custom_is_installed_script": "is_firefox_installed" }, From 538cdab95be30a061441fbeab602e0562d828cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Mon, 29 Sep 2025 15:44:50 +0300 Subject: [PATCH 32/39] Fix typo --- emsdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index 022da9a9e1..7a4e72d459 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1328,7 +1328,7 @@ def save_actual_version(): # Uncompress the NSIS installer to 'install' Firefox run(['C:\\Program Files\\7-Zip\\7z.exe', 'x', '-y', filename, '-o' + root]) - if '.tar.' in filename:.endswith('.tar.bz2') or filename.endswith('.tar.xz'): + if '.tar.' in filename: if filename.endswith('.tar.bz2'): tar_type = 'r:bz2' elif filename.endswith('.tar.xz'): From ab8744aa4ce80a8e50d5b295c79ea83de17e1b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Wed, 1 Oct 2025 13:53:42 +0300 Subject: [PATCH 33/39] Rename config field for browsers --- emsdk_manifest.json | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 8f499d9b6c..6aecd85ac2 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -346,9 +346,9 @@ "version": "65.0", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox" }, @@ -357,9 +357,9 @@ "version": "68.12.0esr", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox" }, @@ -368,9 +368,9 @@ "version": "78.15.0esr", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox" }, @@ -379,9 +379,9 @@ "version": "91.13.0esr", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox" }, @@ -390,9 +390,9 @@ "version": "102.15.1esr", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox" }, @@ -401,9 +401,9 @@ "version": "115.28.0esr", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox" }, @@ -412,9 +412,9 @@ "version": "128.14.0esr", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox" }, @@ -423,9 +423,9 @@ "version": "140.3.1esr", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox" }, @@ -435,9 +435,9 @@ "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", - "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox", "custom_is_installed_script": "is_firefox_installed" @@ -448,9 +448,9 @@ "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", - "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox", "custom_is_installed_script": "is_firefox_installed" @@ -461,9 +461,9 @@ "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", - "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox", "custom_is_installed_script": "is_firefox_installed" @@ -474,9 +474,9 @@ "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "git_branch": "dummy field, to instruct emsdk to attempt to reinstall this tool even if it is installed, to check for new version", - "activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%actual_installation_dir%/firefox%.exe%", "activated_env": "EMTEST_BROWSER=%actual_installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%actual_installation_dir%/Contents/MacOS/firefox%.exe%", "custom_install_script": "download_firefox", "custom_is_installed_script": "is_firefox_installed" From cdb956d7dd4e7b7d6ca1fe79d342b6cf89280aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Thu, 2 Oct 2025 16:02:10 +0300 Subject: [PATCH 34/39] Set Firefox 79 as the minimum supported version --- emsdk_manifest.json | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 6aecd85ac2..b1a6f7a653 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -343,29 +343,7 @@ { "id": "firefox", - "version": "65.0", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "download_firefox" - }, - { - "id": "firefox", - "version": "68.12.0esr", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "download_firefox" - }, - { - "id": "firefox", - "version": "78.15.0esr", + "version": "79.0", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", From 199f4c9048c8e57fe8bde68c4add95bbe1d2475a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Thu, 2 Oct 2025 19:44:54 +0300 Subject: [PATCH 35/39] Revert "Set Firefox 79 as the minimum supported version" This reverts commit cdb956d7dd4e7b7d6ca1fe79d342b6cf89280aac. --- emsdk_manifest.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index b1a6f7a653..6aecd85ac2 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -343,7 +343,29 @@ { "id": "firefox", - "version": "79.0", + "version": "65.0", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "download_firefox" + }, + { + "id": "firefox", + "version": "68.12.0esr", + "bitness": 64, + "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", + "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", + "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", + "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", + "custom_install_script": "download_firefox" + }, + { + "id": "firefox", + "version": "78.15.0esr", "bitness": 64, "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", From 4e59bf92c6ebc0fc86a1850d26a8052660002d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sat, 4 Oct 2025 00:14:12 +0300 Subject: [PATCH 36/39] Remove the redundant temp directory after move --- emsdk.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/emsdk.py b/emsdk.py index 7a4e72d459..a545bbccf3 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1370,13 +1370,16 @@ def save_actual_version(): # Remove a redundant subdirectory by moving installed files up one directory. if collapse_subdir and os.path.isdir(collapse_subdir): # Rename the parent subdirectory first, since we will be handling a nested `firefox/firefox/` - collapse = collapse_subdir + '_bkp_renamed' + collapse = collapse_subdir + '_temp_renamed' os.rename(collapse_subdir, collapse) # Move all files up by one directory for f in os.listdir(collapse): shutil.move(os.path.join(collapse, f), os.path.dirname(collapse)) + # The root directory should now be empty + os.rmdir(collapse) + # Original installer is now done. os.remove(filename) From 886e67fa1bf3e46261d02df9ee4fa44479307a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sat, 4 Oct 2025 00:34:48 +0300 Subject: [PATCH 37/39] Add Linux ARM64 download support --- emsdk.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emsdk.py b/emsdk.py index a545bbccf3..5a22a09bdc 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1279,10 +1279,14 @@ def download_firefox(tool): # version. So prepare to handle both further down below. extension = 'tar.xz' + platform = None + if LINUX and 'arm' in ARCH: + platform = 'linux-arm64' + if tool.version == 'nightly': - scraper = FactoryScraper('daily', extension=extension) + scraper = FactoryScraper('daily', extension=extension, locale='en-US', platform=platform) else: - scraper = FactoryScraper('release', version=tool.version, extension=extension, locale='en-US') + scraper = FactoryScraper('release', extension=extension, locale='en-US', platform=platform, version=tool.version) if tool.version == 'nightly': firefox_version = os.path.basename(scraper.filename).split(".en-US")[0] From bf8924d6fa8668e4b855acd2a4154d405449f1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sat, 4 Oct 2025 13:48:29 +0300 Subject: [PATCH 38/39] Remove Firefox 65 --- emsdk_manifest.json | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 6aecd85ac2..139d369f18 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -341,17 +341,6 @@ "activated_env": "EMSDK_PYTHON=%installation_dir%/bin/python3;SSL_CERT_FILE=%installation_dir%/lib/python3.13/site-packages/certifi/cacert.pem" }, - { - "id": "firefox", - "version": "65.0", - "bitness": 64, - "url": "downloaded via mozdownload script, but a dummy directive is placed here so emsdk understands this Tool to be downloaded from the web", - "activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/firefox%.exe%", - "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", - "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "download_firefox" - }, { "id": "firefox", "version": "68.12.0esr", From 4d5276bcefd9224980956fa3b8ede7fbcc3fb4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sat, 4 Oct 2025 13:51:45 +0300 Subject: [PATCH 39/39] Hide old Firefox versions from install list by default --- emsdk_manifest.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 139d369f18..d8b5a23f30 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -350,7 +350,8 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "download_firefox" + "custom_install_script": "download_firefox", + "is_old": true }, { "id": "firefox", @@ -361,7 +362,8 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "download_firefox" + "custom_install_script": "download_firefox", + "is_old": true }, { "id": "firefox", @@ -372,7 +374,8 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "download_firefox" + "custom_install_script": "download_firefox", + "is_old": true }, { "id": "firefox", @@ -383,7 +386,8 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "download_firefox" + "custom_install_script": "download_firefox", + "is_old": true }, { "id": "firefox", @@ -394,7 +398,8 @@ "activated_env": "EMTEST_BROWSER=%installation_dir%/firefox%.exe%", "mac_activated_cfg": "EMSDK_ACTIVATED_TEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", "mac_activated_env": "EMTEST_BROWSER=%installation_dir%/Contents/MacOS/firefox%.exe%", - "custom_install_script": "download_firefox" + "custom_install_script": "download_firefox", + "is_old": true }, { "id": "firefox",