Firefox packages

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

January 27, 2017 - 07:07

Hello,

Apparently Firefox 52 will be the last version compatible with XP. I'm currently using a dst-firefox package for XP and Win7. Would it be a good idea, in your opinion, to adapt Simon Fonteneau's "all-in-one-package" to recreate this dst-firefox package? Depending on the detected OS, I would include the installation of "dst-firefox-stable" for Win7 and later, and the installation of "dst-firefox-esr" for XP/Vista. I suppose I would need to uninstall Firefox 52 on XP before installing the ESR version.
Alternatively, is there a better way to keep Firefox up-to-date on XP PCs?

https://wapt.lesfourmisduweb.org/detail ... 4_all.wapt
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

January 27, 2017 - 10:25

One of the solutions that can be implemented is indeed a somewhat all-in-one-package solution.

Something like that.

Code: Select all

if windows_version() <= Version('5.2') :
       if WAPT.is_installed('tis-firefox-esr'):
             WAPT.forget_packages('tis-firefox-esr')
       WAPT.install('tis-firefox-esr-xp')
else:
       WAPT.install('tis-firefox-esr')
It's also good to know that in the new version of WAPT, certain fields will be supported, which will greatly simplify management:

https://www.wapt.fr/fr/doc/CreationPaqu ... os-version
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

March 28, 2017 - 3:05 PM

I've prepared a sort of meta-package called "dst-firefox" which will replace the current dst-firefox, which is the stable version of Firefox. Before uploading it and potentially causing problems on many PCs, could you tell me if this code seems correct?

Code: Select all

# -*- coding: UTF-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    # Je déclare cette fonction pour indiquer de ne pas basculer le paquet "manage-my-wapt" en erreur si une erreur survient lors du lancement de WAPT.install(nompackage) et donc continer le script
    def action_for_wapt_package(nompackage,action='install'):
        if action == 'install':
            if WAPT.is_available(nompackage) :
                try :
                    WAPT.install(nompackage)
                except:
                    pass
            else :
                error("%s is unavailable" % nompackage)
        if action == 'remove':
            try :
                WAPT.remove(nompackage)
            except:
                pass
        if action == 'forget':
            if WAPT.is_installed(nompackage) :
                WAPT.forget_packages(nompackage)

    # Récupération du préfix du package et je stock la variable dans prefixpkg, je ne connai pas votre préfix et je suppose donc que votre préfix est le même que celui de manage-my-wapt
    prefixpkg = control.package.split('-',1)[0]

    # Si la version de windows est inférieur à Win 7, on installe firefox-esr, sinon firefox-stable
    if windows_version()<Version('6.0'):
         action_for_wapt_package('%s-firefox-esr'% prefixpkg, action='install')
    action_for_wapt_package('%s-firefox-stable'% prefixpkg, action='install')

def uninstall():
    if windows_version()<Version('6.0'):
         action_for_wapt_package('%s-firefox-esr'% prefixpkg, action='remove')
    action_for_wapt_package('%s-firefox-stable'% prefixpkg, action='remove')
I don't know if the uninstall part is necessary?
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

March 28, 2017 - 5:23 PM

There is no else:

Code: Select all

    if windows_version()<Version('6.0'):
         action_for_wapt_package('%s-firefox-esr'% prefixpkg, action='install')
    action_for_wapt_package('%s-firefox-stable'% prefixpkg, action='install')
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

March 29, 2017 - 08:14

Thank you so much! I'm glad I asked because I hadn't noticed that error at all.
Locked