tis-bitwarden

1.24.4-5
Bitwarden is a freemium and open source password manager under the AGPL license, which allows you to generate and store passwords in a secure manner. These elements are protected by a single password called "master password"
9282 downloads
Download

  Description 

  • package : tis-bitwarden
  • version : 1.24.4-5
  • architecture : all
  • categories : Security
  • maintainer : WAPT Team, Tranquil IT, Jimmy PELÉ, Simon Fonteneau
  • description : Bitwarden is a freemium and open source password manager under the AGPL license, which allows you to generate and store passwords in a secure manner. These elements are protected by a single password called "master password"
  • locale : all
  • target_os : windows
  • min_wapt_version :
  • sources : https://github.com/bitwarden/desktop/releases
  • installed_size :
  • impacted_process : Bitwarden
  • description_fr : Bitwarden est un gestionnaire de mots de passe freemium et open source sous licence AGPL, qui permet de générer et de conserver des mots de passe de manière sécurisée. Ces éléments sont protégés par un seul et unique mot de passe appelé « mot de passe maître »
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : 8bit Solutions LLC
  • licence : AGPL-3.0 (d) and GPL-3.0
  • signature_date : 2021-01-26T14:13:00.605903
  • Homepage : https://bitwarden.com

  Setup.py 

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

uninstallkey = []

# 173a9bac-6f0d-50c4-8202-4744c69d091a      Bitwarden       1.19.0      "C:\Program Files\Bitwarden\Uninstall Bitwarden.exe" /allusers 

# Defining variables
bin_name_string = 'Bitwarden-Installer-%s.exe'
silent_args = '/S'
app_uninstallkey = ''


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

    # Installing the package
    print('Installing: %s' % bin_name)
    install_exe_if_needed(bin_name
        ,silentflags=silent_args
        ,key=app_uninstallkey
        ,min_version=package_version)

    # Removing desktop shortcut
    remove_desktop_shortcut(control.name)


def uninstall():
    # Uninstalling the package
    run('"%s" %s %s' % (makepath(programfiles,'Bitwarden','Uninstall Bitwarden.exe'),'/allusers',silent_args))


def update_package():
    print('Downloading/Updating package content from upstream binary sources')

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


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

    for download in json_load['assets']:
        if download['name'].startswith(bin_start):
            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 is_version_different(version,version_from_file):
            rename_filename_version(latest_bin,version,version_from_file)

        # Changing version of the package
        update_control_version(version)
        print('Changing version to: %s in WAPT\\control' % control.version)

    # Deleting outdated binaries
    remove_outdated_binary(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 update_control_version(version=control.version.split('-')[0]):
    control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
    control.save_control_to_wapt()

def is_version_different(version_x,version_y):
    if version_x == '':
        return False
    if version_y == '':
        return False
    if Version(version_x) != Version(version_y):
        return True
    else:
        return False

def remove_outdated_binary(version,list_extensions=('exe','msi','deb','rpm','dmg','pkg')):
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*.%s' % file_ext):
            if not version in bin_in_dir:
                print('Outdated binary: %s Removed' % bin_in_dir)
                remove_file(bin_in_dir)

def rename_filename_version(filename,old_version,new_version):
    old_filename = filename
    new_filename = filename.replace(old_version,new_version)
    if isfile(new_filename):
        remove_file(new_filename)
    os.rename(old_filename,new_filename)

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


def get_proxies_from_wapt_console():
    proxies = {}
    if platform.system() == 'Windows':
        waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
    else:
        waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
    if isfile(waptconsole_ini_path):
        proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
        if proxy_wapt:
            proxies = {'http': proxy_wapt, 'https': proxy_wapt}
    return proxies

										

  Changelog 



Changelog software url : https://github.com/bitwarden/desktop/releases



No changelog.txt.
									
  manifest.sha256