tis-putty 0.68-3

  • package : tis-putty
  • version : 0.68-3
  • description : Putty ssh client
  • maintainer : Simon Fonteneau
  • date : 2018-02-27 19:06:55

setup.py

#!/usr/bin/python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
#    This file is part of WAPT
#    Copyright (C) 2013  Tranquil IT Systems http://www.tranquil.it
#    WAPT aims to help Windows systems administrators to deploy
#    setup and update applications on users PC.
#
#    WAPT is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    WAPT is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with WAPT.  If not, see <http://www.gnu.org/licenses/>.
#
# -----------------------------------------------------------------------

from setuphelpers import *
import winshell
import time
import os


uninstallkey=[]



def remove_putty_if_install_with_exe():
    if uninstall_key_exists('PuTTY_is1'):
        killalltasks('putty.exe')
        #uninstaller cannot be silenced by design (cf putty.iss), so we remove stuff by hand
        #run('"%s" /VERYSILENT /SUPPRESSMSGBOXES' % os.path.join(programfiles32,'putty','unins000.exe'))
        if isdir(install_location('PuTTY_is1')):
            remove_tree(install_location('PuTTY_is1'))
        registry_delete(HKEY_LOCAL_MACHINE,'SOFTWARE\Classes\PuTTYPrivateKey',None)
        if iswin64():
            registry_delete(HKEY_LOCAL_MACHINE,'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\PuTTY_is1',None)
        else:
            registry_delete(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PuTTY_is1',None)
        putty_link = makepath(winshell.programs(common=1),'PuTTY')
        if isdir(putty_link):
            remove_tree(putty_link)
        unregister_uninstall('Putty_is1')


def install():

    remove_putty_if_install_with_exe()

    versionsoft = control['version'].split('-',1)[0]

    if iswin64():
        install_msi_if_needed('putty-64bit-%s-installer.msi' % versionsoft,min_version=versionsoft,killbefore=['putty.exe'])
    else:
        install_msi_if_needed('putty-%s-installer.msi' % versionsoft,min_version=versionsoft,killbefore=['putty.exe'])




    

Changelog

No changelog
    

manifest.sha256

[["WAPT/icon.png", "bdbd3f9eeaf348ed5cebd9be91ff76e19b0866341dc4f26fbb725894b4516877"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "bc34bb5f85d78dffc7effd37bd0639580a0e140c155973c04d79eb9aa31eb57a"], ["removeputty.bat", "3b23eab5cd908c64b7cde2bfb066412ae1cf6cf531feff3b8205513ecd27b6a2"], ["putty-64bit-0.68-installer.msi", "ed33504af4b91244e7b6026cf90d45e9c2d3bdc6f1656163b0b41d1dae19bc41"], ["putty-0.68-installer.msi", "3979670a28d93780d330d1361c0062c543b7e77c7dd96dcab61c65f9d163843b"], ["setup.py", "72bab3112fb6c881a5cb31dee54afefef76382d3a23136ed3e9efccb345178fe"], ["WAPT/control", "2eefe34b8b484f5afe208013cff9d316d4b923fbef2c6905057f8a7bc2db46a3"]]