tis-wixedit

0.7.6.14-5
WiXEdit is an editor for XML source files for the Windows Installer XML (WiX) toolset to build MSI and MSM setup packages.
2533 downloads
Download
View on luti logo
tis-wixedit icon

  Description 

  • package : tis-wixedit
  • version : 0.7.6.14-5
  • architecture : all
  • categories : Utilities
  • maintainer : WAPT Team,Tranquil IT,Kenan KILICARSLAN
  • description : WiXEdit is an editor for XML source files for the Windows Installer XML (WiX) toolset to build MSI and MSM setup packages.
  • locale : all
  • target_os : windows
  • min_wapt_version : 1.7
  • sources : https://api.github.com/repos/WixEdit/WixEdit/releases/latest
  • installed_size : 28856320
  • impacted_process : WixEdit.exe
  • description_fr : WiXEdit est un éditeur de fichiers sources XML pour le set d'outils XML (WiX) de Windows Installer permettant de créer des paquets d'installation MSI et MSM.
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Jasper Keuper and contributors
  • licence : MIT
  • signature_date : 2021-12-20T10:59:12.239225
  • Homepage : https://wixedit.github.io/
  • Depends :

  Setup.py 

# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
import json

uninstallkey = []

# Defining variables
bin_name_string = 'wixedit-%s.msi'
app_name = 'WixEdit'


def install():
    # Initializing variables
    package_version = control.version.split('-')[0]
    bin_name = bin_name_string % package_version

    # Installing the package
    print('Installing: %s' % bin_name)
    install_msi_if_needed(bin_name,
        min_version=package_version)


def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    git_repo = 'WixEdit/WixEdit'
    url_api = 'https://api.github.com/repos/%s/releases/latest' % git_repo
    bin_end = bin_name_string.split('%s')[-1]

    # Getting latest version from official sources
    print('API used is: ' + url_api)
    json_load = json.loads(wgets(url_api,proxies=proxies))

    for download in json_load['assets']:
        if download['name'].endswith(bin_end):
            url_dl = download['browser_download_url']
            break

    version = json_load['tag_name'].replace('v','')
    latest_bin = bin_name_string % version

    print("Latest %s version is: %s" % (app_name,version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print('Downloading: %s' % latest_bin)
        wget(url_dl,latest_bin,proxies=proxies)

        # Checking version from file
        version_from_file = get_version_from_binary(latest_bin)
        if version != version_from_file:
            os.rename(latest_bin,bin_name_string % version_from_file)
            version = version_from_file

        # Changing version of the package
        control.version = '%s-%s' % (version, int(control.version.split('-')[-1])+1)
        control.save_control_to_wapt()
        print('Changing package version to: %s in WAPT\\control' % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version)




def get_proxies():
    import platform
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def get_version_from_binary(filename, parameter='ProductVersion'):
    if filename.endswith('.msi'):
        return get_msi_properties(filename)[parameter]
    else:
        return get_file_properties(filename)[parameter]


def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg'], list_filename_contain=None):
    if type(list_extensions) != list:
        list_extensions = [list_extensions]
    if list_filename_contain:
        if type(list_filename_contain) != list:
            list_filename_contain = [list_filename_contain]
    list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*%s' % file_ext):
            if not version in bin_in_dir:
                remove_file(bin_in_dir)
            if list_filename_contain:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        remove_file(bin_in_dir)





										

  Changelog 



Changelog software url : https://wixedit.github.io/changelog/



No changelog.txt.
									
  manifest.sha256