tis-firefox-multi
132.0.1-20
Mozilla Firefox, is a free and open-source web browser - The package is multi-language and pre-configured
27636 downloads
See build result See VirusTotal scan
Description
- package : tis-firefox-multi
- name : Mozilla Firefox Multi-Language
- version : 132.0.1-20
- categories : Internet
- maintainer : WAPT Team, Tranquil IT, Jimmy PELÉ, Amel FRADJ
- installed_size : 220643328
- editor : Mozilla Foundation,Mozilla Corporation
- licence : MPL 2.0
- signature_date : 2024-11-12T16:01:41.000000
- size : 77.81 Mo
- locale : all
- target_os : windows
- impacted_process : firefox
- architecture : x64
- Homepage : https://www.mozilla.org/
- Conflicts :
control
package : tis-firefox-multi
version : 132.0.1-20
architecture : x64
section : base
priority : optional
name : Mozilla Firefox Multi-Language
categories : Internet
maintainer : WAPT Team, Tranquil IT, Jimmy PELÉ, Amel FRADJ
description : Mozilla Firefox, is a free and open-source web browser - The package is multi-language and pre-configured
depends :
conflicts : tis-firefox, tis-firefox-esr, tis-firefox-esr-multi, tis-config-for-firefox, tis-config-firefox
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 2.3
sources : https://www.mozilla.org/firefox/all/#product-desktop-release
installed_size : 220643328
impacted_process : firefox
description_fr : Mozilla Firefox, est un navigateur web gratuit et open source - Le paquet est multilingue et préconfiguré
description_pl : Mozilla Firefox, jest darmową i otwartą przeglądarką internetową - Pakiet jest wielojęzyczny i wstępnie skonfigurowany
description_de : Mozilla Firefox, ist ein kostenloser und quelloffener Webbrowser - Das Paket ist mehrsprachig und vorkonfiguriert
description_es : Mozilla Firefox, es un navegador web gratuito y de código abierto - El paquete es multilingüe y está preconfigurado
description_pt : Mozilla Firefox, é um navegador web gratuito e de código aberto - O pacote é multilingue e pré-configurado
description_it : Mozilla Firefox è un browser web gratuito e open-source - Il pacchetto è multilingue e preconfigurato
description_nl : Mozilla Firefox, is een gratis en open-source webbrowser - Het pakket is meertalig en voorgeconfigureerd
description_ru : Mozilla Firefox - это бесплатный веб-браузер с открытым исходным кодом - Пакет является многоязычным и предварительно настроенным
audit_schedule :
editor : Mozilla Foundation,Mozilla Corporation
keywords : web,browser,navigateur,firefox,mozilla
licence : MPL 2.0
homepage : https://www.mozilla.org/
package_uuid : 630611c9-669a-40a2-986b-a9e62f16672f
valid_from :
valid_until :
forced_install_on :
changelog : https://www.mozilla.org/firefox/releases/
min_os_version : 10.0
max_os_version :
icon_sha256sum : 2dc82eade364831757e067169d0039e6e0c9b693f343ea9a62db709eb1942c9e
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date : 2024-11-12T16:01:41.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature : X13jbGpjQNVEwNswD/NsnE8eL5pzl/5TREnmKSuXpIUDZiMJ6FuTaJqFQ1Vm6k0k5NwcIKgR+tEynV3g1JmAnCrq8Q3IVzOQW6q7VFqk8Ql5CjuV0XJeMZRtmXudkCgs1raWgn4XFR2gBXYj3xiYFJAT1VC5Z+s0um3BURT4GDrqo96WSqfUThp4nR74F8aaUZ2e4+dYLNvWTAwnYz1+T3o/E+fzJGdOxGkYv0BEb3tzyEsBHxd3ahMVO3qkz2fuHyUocwr32nLALlWYL/tOkW5RJpAnh/V8/cRgwJ/AVfcYPHiByHXBvh6IDpGllgyVqGu3Syb2vdIJvtqWg0SPHA==
Setup.py
# -*- coding: UTF-8 -*-
from setuphelpers import *
import time
# Installation procedure: https://firefox-source-docs.mozilla.org/browser/installer/windows/installer/FullConfig.html
# Configuration procedure: https://support.mozilla.org/kb/customizing-firefox-using-policiesjson
dist_dir = "distribution"
dist_path = makepath(programfiles, "Mozilla Firefox", dist_dir)
ext_dir = "extensions"
ext_path = makepath(dist_path, ext_dir)
policies_file = "policies.json"
policies_path = makepath(dist_path, policies_file)
list_pre_installed_lang = ["fr", "en-GB", "es-ES", "de", "it"] # Reminder: 'en-US' will be native
def install():
bin_name = glob.glob("Firefox_Setup_*.exe")[0]
app_uninstallkey = "Mozilla Firefox %s (%s en-US)" % (control.get_software_version(), control.architecture)
# Uninstalling others versions
for uninstall in installed_softwares(name="Mozilla Firefox"):
if not control.architecture in uninstall["name"] or "ESR" in uninstall["name"]:
print("Removing: %s" % (uninstall["name"]))
killalltasks(control.get_impacted_process_list())
run(uninstall_cmd(uninstall["key"]))
time.sleep(15) # Required for Firefox
# Installing the software
install_exe_if_needed(
bin_name,
silentflags="/S /PreventRebootRequired=false /TaskbarShortcut=false /DesktopShortcut=false /StartMenuShortcut=true /MaintenanceService=false /RegisterDefaultAgent=false /RemoveDistributionDir=false /OptionalExtensions=false",
key=app_uninstallkey,
min_version=control.get_software_version(),
)
# Making sure that Mozilla Maintenance Service is not installed
for uninstall in installed_softwares(name="Mozilla Maintenance Service"):
print("Removing: %s" % (uninstall["name"]))
run(uninstall_cmd(uninstall["key"]))
# Removing policies from registry since it bypass the policies.json file (source: https://support.mozilla.org/bm/questions/1236197)
ffox_policies_reg_path = r"SOFTWARE\Policies\Mozilla\Firefox"
if reg_key_exists(HKEY_LOCAL_MACHINE, ffox_policies_reg_path):
registry_deletekey(HKEY_LOCAL_MACHINE, ffox_policies_reg_path, "", force=True, recursive=True)
# Adding distribution folder for language packs, dictionaries, extensions and configuration
if isdir(dist_path):
remove_tree(dist_path)
mkdirs(dist_path)
filecopyto(makepath(basedir, policies_file), dist_path)
copytree2(makepath(basedir, ext_dir), ext_path)
# Changing default language
data = json_load_file(policies_path)
my_lang = get_language()
for select_lang in list_pre_installed_lang:
if my_lang in select_lang:
if select_lang == "en-GB":
select_lang = "en-US"
default_lang = {"RequestedLocales": ["%s" % select_lang]}
data["policies"].update(default_lang)
json_write_file(policies_path, data, indent=2)
update_package.py
# -*- coding: UTF-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import requests
import waptlicences
dist_dir = "distribution"
dist_path = makepath(programfiles, "Mozilla Firefox", dist_dir)
ext_dir = "extensions"
ext_path = makepath(dist_path, ext_dir)
policies_file = "policies.json"
policies_path = makepath(dist_path, policies_file)
list_pre_installed_lang = ["fr", "en-GB", "es-ES", "de", "it"] # Reminder: 'en-US' will be native
def update_package():
# Declaring local variables
package_updated = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
arch_dict = {"x64": "win64", "x86": "win", "all": "win"}
policies_content = json_load_file(policies_file)
# Getting the latest version from official sources
download_url = requests.head(f"https://download.mozilla.org/?product=firefox-latest-ssl&os={arch_dict[control.architecture]}&lang=en-US", proxies=proxies).headers["Location"]
latest_bin = download_url.rsplit("/", 1)[-1].replace("%20", "_")
latest_bin_extension = latest_bin.rsplit('.', 1)[-1]
version = download_url.split("/")[-4]
# Downloading the latest binaries
print("Latest %s version is: %s" % (app_name, version))
print("Download URL is: %s" % download_url)
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
else:
print("Binary is present: %s" % latest_bin)
expected_issuer = "Mozilla Corporation"
sign_name = waptlicences.check_exe_signing_certificate(latest_bin)[0]
if sign_name != expected_issuer:
error(f'Bad issuer {sign_name} != {expected_issuer} ')
# Changing the version of the package
if Version(version) > Version(control.get_software_version()):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
package_updated = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.set_software_version(version)
control.save_control_to_wapt()
# Deleting outdated binaries
for f in glob.glob(f'*.{latest_bin_extension}'):
if f != latest_bin:
remove_file(f)
# Remove existing extensions folder
if isdir(ext_dir):
remove_tree(ext_dir)
download_firefox_language_pack(policies_content, proxies)
download_firefox_dictionnary(policies_content, proxies)
# Downloading ublock origin extensions
wget("https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi", makepath(ext_dir, "ublock-origin.xpi"), proxies=proxies)
print(f"Creating {policies_file} file for language packs, dictionaries, extensions, and configuration")
if isfile(policies_file):
remove_file(policies_file)
json_write_file(policies_file, policies_content, indent=4)
# Validate or not the update-package-sources
return package_updated
def download_firefox_language_pack(policies_content, proxies):
url_api_lp = "https://services.addons.mozilla.org/api/v3/addons/language-tools/?app=firefox&type=language"
print("API used for language packs is: %s" % url_api_lp)
version_major = control.version.split("-")[0].split(".")[0]
for lang in list_pre_installed_lang:
# Retrieved the download url of the language pack
json_read = wgets(url_api_lp, proxies=proxies, as_json=True)
for lp in json_read["results"]:
if lp["target_locale"] == lang:
url_lp = lp["url"] + "versions/"
break
# DEBUG : print the download url of language pack
print(f"URL language pack: {url_lp}")
# Loop through the available versions for the language pack
for download_lp in bs_find_all(url_lp, "a", "class", "InstallButtonWrapper-download-link", proxies=proxies):
if version_major in download_lp["href"]:
url_dl_lp = download_lp.get("href")
break
# Check if a valid URL for the language pack was found
if not url_dl_lp:
print(f"No valid download link found for language pack: {lang}")
continue
lp_name = f"{lang}_language_pack.xpi"
print(f"Download URL for language pack in {lang} is: {url_dl_lp}")
print("Downloading: " + lp_name)
wget(url_dl_lp, makepath(ext_dir, lp_name), proxies=proxies)
ext_settings_content = {
f"langpack-{lang}@firefox.mozilla.org": {
"install_url": f"file://{ext_path}\\{lang}_language_pack.xpi",
"installation_mode": "force_installed"
}
}
policies_content["policies"]["ExtensionSettings"].update(ext_settings_content)
def download_firefox_dictionnary(policies_content, proxies):
url_api_dict_lang = "https://services.addons.mozilla.org/api/v3/addons/language-tools/?app=firefox&type=dictionary"
print("API used for language dictionaries is: " + url_api_dict_lang)
for lang in list_pre_installed_lang:
if lang == "de":
lang = "de-DE"
json_read = wgets(url_api_dict_lang, proxies=proxies, as_json=True)
for dict_lang in json_read["results"]:
if dict_lang["target_locale"] == lang:
url_dl_dict_lang = f"https://addons.mozilla.org/firefox/downloads/latest/{dict_lang['slug']}/latest.xpi"
ext_add_on_id = dict_lang["guid"]
break
dict_lang_name = f"{lang}_dictionary.xpi"
print(f"Download URL for dictionary in {lang} is: {url_dl_dict_lang}")
print("Downloading: " + dict_lang_name)
wget(url_dl_dict_lang, makepath(ext_dir, dict_lang_name), proxies=proxies)
ext_settings_dictionaries_content = {
ext_add_on_id: {
"install_url": f"file://{ext_path}\\{dict_lang_name}",
"installation_mode": "force_installed"
}
}
policies_content["policies"]["ExtensionSettings"].update(ext_settings_dictionaries_content)
9c10e9e5fb0a0eea33ca5424f66e3843351897043c194d5460c3ed06457f8ddb : Firefox_Setup_132.0.1.exe
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
0cb997f8e750029142701ef45be14d698a6b162099b5a2f2b018cc74ec0558f4 : WAPT/control
2dc82eade364831757e067169d0039e6e0c9b693f343ea9a62db709eb1942c9e : WAPT/icon.png
00ef6eb3c10171a87fb22ab6e516846678b73c56ae828cc19d11e32e43b8457a : extensions/de-DE_dictionary.xpi
8be731eb415204999f64923da51ec2ea4f3419eb0e79a64e916bc67c0e4ef0f9 : extensions/de_language_pack.xpi
55ce2b7c97ad3165c9d63daea15375d86609046eb68966d80a13d25b35f64555 : extensions/en-GB_dictionary.xpi
89012e4c465cb4ff15dfc312222cc0d7a6febf6684b97274c88635234a1160f1 : extensions/en-GB_language_pack.xpi
645e6070be16e9fe422ffcf1789325f0dd6494c3c57548c4deb717262fb59b72 : extensions/es-ES_dictionary.xpi
f12cf2ceeb2f3f1289ed0ce5ddd6157df1242d703bacbb06a4822aed2309375c : extensions/es-ES_language_pack.xpi
e0e90b88b177dc1b268b019c8672eb1be943f12e174ad474dbdc46f0e6fbaa6f : extensions/fr_dictionary.xpi
15c46b35d588d7750decd62abfe1fb886b0384f273c5bda50beed1413ab9abe6 : extensions/fr_language_pack.xpi
90b173ffdde34a77108152a5ff51879767b1dd84e0aa0dfb7b2bab94cd2e7f53 : extensions/it_dictionary.xpi
e49c388c3d96b43072531e119ab4095d2b049e6a8fde542a55169803201875b7 : extensions/it_language_pack.xpi
e2cda9b2a1b0a7f6e5ef0da9f87f28df52f8560587ba2e51a3003121cfb81600 : extensions/ublock-origin.xpi
36123bd51cf5f6920a948887017af02166c399a933b89ecf4b400352a067527d : luti.json
3a37e4ea9440af02fca3ecdc28e661b517f5179b49531f2c7f7aa4c1849456b8 : policies.json
b6254f2cab222444081ad31f05818d8b20587c3f676aec81fa13f59683805972 : setup.py
9557380735e97ccd7e1f1a53886ae169118c83d24d6cf4a258e49a6a6054bcb9 : update_package.py