Tranquil IT recrute Tranquil IT recrute

tis-tortoisesvn

Version : 1.9.26806-6

Download
  • package : tis-tortoisesvn
  • editor :
  • version : 1.9.26806-6
  • licence :
  • architecture : all
  • locale :
  • description : Outil de versioning SVN Subversion intégré à l'explorateur Windows
  • description_fr :
  • min_os_version :
  • max_os_version :
  • min_wapt_version :
  • installed_size :
  • impacted_process :
  • signature_date : 20170720-155712
  • maintainer : TIS <technique@tranquil-it-systems.fr>

setup.py


from setuphelpers import *
import platform
import glob


uninstallkey = []

# additional options for msi install cusomization
msi_properties = {'ADDLOCAL':'CLI'}

def install_msi_if_needed(msi,min_version=None,killbefore=[],accept_returncodes=[0,1603,3010],timeout=300,properties={}):
    """Install silently the supplied msi file, and add the uninstall key to
    global uninstall key list

    uninstall key, min_version and silent flags are guessed from msi file.

    Raises an error if, after the msi install, the uninstall key is not found in registry.

    The matching is done on key

    Args:
        msi (str) : path to the MSI file
        min_version (str) : if installed version is equal or gretaer than this, don't install
                            if not provided, guess it from exe setup file properties.
        kill_before (list of str) : processes to kill before setup, to avoid file locks
                                    issues.
        accept_returncodes (list of int) : return codes which are acceptable and don't raise exception
        timeout int) : maximum run time of command in seconds bfore the child is killed and error is raised.
        properties (dict) : map (key=value) of properties for specific msi installation.

    Returns:
        None

    """
    if not isfile(msi):
        error('msi file %s not found in package' % msi)
    key = get_msi_properties(msi)['ProductCode']
    # will try to add key in the caller's (setup.py) uninstallkey list
    import inspect
    caller_globals = inspect.stack()[1][0].f_globals
    WAPT = caller_globals.get('WAPT',None)
    force = WAPT and WAPT.options.force

    if not min_version:
        min_version = getproductprops(msi)['version']

    if need_install(key,min_version=min_version,force=force):
        if killbefore:
            killalltasks(killbefore)
        props = ' '.join(["%s=%s" % (k,v) for (k,v) in properties.iteritems()])
        run(r'msiexec /norestart /q /i "%s" %s' % (msi,props),accept_returncodes=accept_returncodes,timeout=timeout)
        if not installed_softwares(uninstallkey=key):
            error('MSI %s has been installed but the uninstall key %s can not be found' % (msi,key))
    else:
        print('MSI %s already installed. Skipping msiexec' % msi)
    if key:
        if 'uninstallkey' in caller_globals and not key in caller_globals['uninstallkey']:
            caller_globals['uninstallkey'].append(key)


def find_msis():
    """Returns msi filename and properties"""
    if iswin64():
        allmsi = glob.glob('*x64*.msi')
    else:
        allmsi = glob.glob('*win32*.msi')

    result = []
    for msi in allmsi:
        # uninstallkey is in msi db
        props = get_msi_properties(msi)
        result.append((msi,props))
    return result


def update_control(entry):
    """Magic Callback to update control version data at build step"""
    (version,packaging) = entry.version.split('-',1)
    msis = find_msis()
    # use first msi's version for the package version
    version = msis[0][1]['ProductVersion']
    entry.version = "%s-%s"%(version,packaging)


def install():
    killalltasks(['TortoiseProc.exe','TSVNCache.exe'])


    # calc package prefix from current package name
    default_prefix = control.package.split('-',1)[0]
    msi45_package = '%s-msi-4.5'%default_prefix

    # tortoisesvn installer requires newest version of msi on Windows XP
    if platform.win32_ver()[0] == 'XP' and not installed_softwares('KB942288-v3'):
        if WAPT.is_available(msi45_package):
            WAPT.install(msi45_package)
        else:
            Exception('%s is not avaible'%msi45_package)


    msis = find_msis()
    for (msi,props) in msis:
        install_msi_if_needed(msi,properties=msi_properties)

			

Changelog

"""{% trans %}No changelog.{% endtrans %}"""
			

manifest.sha256

[["WAPT/icon.png", "af22ffab9f39e29286075b3ad95c4ee1a40c24a150bec41176965386d61f0750"], ["WAPT/certificate.crt", "20f25d6b242159077345379865f8e0d84bdc9e4764190f1aa6cb3816bcabd341"], ["WAPT/wapt.psproj", "bc34bb5f85d78dffc7effd37bd0639580a0e140c155973c04d79eb9aa31eb57a"], ["TortoiseSVN-1.9.2.26806-win32-svn-1.9.2.msi", "35aac8547ff72446206257c60f1a49b7011fe914dc931c9e08889071bc41266b"], ["msioptions.txt", "4fb53f1489da9db3155bf58fed285e4f80ed779a0b70f20248b3907ba5d66288"], ["setup.py", "ef57dc3684fe306f2e897a1d4a5f61e05c678ba28886caa3850e5d686d7de148"], ["WAPT/control", "ff54e31c9b564307bebc47a497716045c5d1a0c64acd53a6805098e8647155ba"], ["TortoiseSVN-1.9.2.26806-x64-svn-1.9.2.msi", "02501138e1b04888a4e708a3d9f4de2f6cd727fde9192a35ce530ca22d787da8"]]