Firefox ESR is back in the old directory now

master
Daniel Berteaud 4 years ago
parent 303e7a3b15
commit d3cf54da01
  1. 8
      WAPT/control
  2. 34
      setup.py

@ -1,5 +1,5 @@
package : fws-firefox-config
version : 7
version : 8
architecture : all
section : base
priority : optional
@ -31,13 +31,13 @@ editor :
keywords :
licence : MIT
homepage : https://www.firewall-services.com/
package_uuid : fee7efec-d482-4299-aeee-1aa35e7f3d3d
package_uuid : dd1c288d-e2fd-43f5-9f2d-849dc15e5ef4
valid_from :
valid_until :
forced_install_on :
changelog :
signer : Daniel Berteaud
signer_fingerprint: 3c9415559e2dedbc4390e3faa2c28d3b67265baa5b35902d2764d9e41c3b3f0a
signature : q1R2Da2W0Fq87PeVSNAwwrl+6CzPDytgOwTR39tZAghIbtBOLcbcz84HKPOzSIfewGBViFhC3LDSxlMmeeGWzFhWRieCBMFVcGWhCNTPcELBsgBzm4gNpvlpWRcPXA0v1biTtT3fJBjQSgJveoNriT/sOZy9bjtJWQXYQkjrSSfbyyalGMM/1ckpvYX7QRwrt8pqWGpqoKWsAHdqFVtDc2npBSyhRkMojVD0ZsxR3Y552DUWuO57DRF3PuDETRq3oXZr1kvgr5gj/G3Y/ngJJjLCwFRvbMVjSp4Tau/MNjqOqOoV4zCKFPJEJ9TDsH0dSoNRGdtce5dua3p8dfjIlQ==
signature_date : 2020-08-27T18:19:20.042000
signature : 24FN7k5kRBnajsDIrVdtGYjXwE9KDrLpvHoihXukLJuZSH8OROHAclkv5xAzFk+UlbReqaW1Sd32TFo+kqV+ikA1a/7HwBQbM9v52taHoUy+ERFtIEjnBkk4i0wIUy5MgM7XLPeB5nAt8niuYGHVWPWWafFZE60xzdc5aDOp/nMg6Ms+JQjRsTOYpvQ944cKZM8Bg0iZP0KBXksji1LcZtsgzMSmum4L0h4/o308ss0JPxtX4WHE2nhD+fwo/uJLxrD0wrmBpEYDI1ukTr72YqBUGyPzaYOiLEMw9qNXFkzrqMY0owjKoz9XcyGgJGgL0ptn+uCZWgMFRbAcHn42xw==
signature_date : 2020-09-25T11:07:54.165000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,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,signer,signer_fingerprint,signature_date,signed_attributes

@ -18,20 +18,13 @@ if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(m
variables.update(yaml.safe_load(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read())))
def install():
if isdir(makepath(programfiles,'Mozilla Firefox ESR')):
dest=makepath(programfiles,'Mozilla Firefox ESR')
elif isdir(makepath(programfiles,'Mozilla Firefox')):
dest=makepath(programfiles,'Mozilla Firefox')
else:
error('Firefox installation dir not found')
filecopyto('autoconf.js',makepath(dest,'defaults','pref'))
filecopyto('override.ini',dest)
filecopyto('autoconf.js',makepath(programfiles,'Mozilla Firefox','defaults','pref'))
filecopyto('override.ini',makepath(programfiles,'Mozilla Firefox'))
jinja2 = Environment(
loader=FileSystemLoader(os.getcwd()),
trim_blocks=True
)
open(makepath(dest,'firefox.cfg'),'w').write(
open(makepath(programfiles,'Mozilla Firefox','firefox.cfg'),'w').write(
jinja2.get_template('firefox.cfg.j2').render(
firefox_config_url = variables['firefox_config_url'],
firefox_config_append_domain = variables['firefox_config_append_domain']
@ -39,24 +32,15 @@ def install():
)
def uninstall():
for dir in ['Mozilla Firefox', 'Mozilla Firefox ESR']:
remove_file(makepath(programfiles,dir,'defaults','pref','autoconf.js'))
remove_file(makepath(programfiles,dir,'override.ini'))
remove_file(makepath(programfiles,dir,'firefox.cfg'))
remove_file(makepath(programfiles,'Mozilla Firefox','defaults','pref','autoconf.js'))
remove_file(makepath(programfiles,'Mozilla Firefox','override.ini'))
remove_file(makepath(programfiles,'Mozilla Firefox','firefox.cfg'))
def audit():
if isdir(makepath(programfiles,'Mozilla Firefox ESR')):
dest=makepath(programfiles,'Mozilla Firefox ESR')
elif isdir(makepath(programfiles,'Mozilla Firefox')):
dest=makepath(programfiles,'Mozilla Firefox')
else:
print('Firefox installation dir not found')
return "ERROR"
if (
not isfile(makepath(dest,'defaults','pref','autoconf.js')) or
not isfile(makepath(dest,'override.ini')) or
not isfile(makepath(dest,'firefox.cfg'))
not isfile(makepath(programfiles,'Mozilla Firefox','defaults','pref','autoconf.js')) or
not isfile(makepath(programfiles,'Mozilla Firefox','override.ini')) or
not isfile(makepath(programfiles,'Mozilla Firefox','firefox.cfg'))
):
print('At least one config file is missing')
return "ERROR"

Loading…
Cancel
Save