tis-keepass
Version : 2.39-1
- package : tis-keepass
- editor :
- version : 2.39-1
- licence :
- architecture : all
- locale :
- description : KeePass2
- description_fr :
- min_os_version :
- max_os_version :
- min_wapt_version :
- installed_size :
- impacted_process :
- signature_date : 20180507-175417
- maintainer : Simon Fonteneau
setup.py
# -*- coding: utf-8 -*- from setuphelpers import * uninstallkey = [] def install(): print('installing keepass') versionpaquet = control['version'].split('-',1)[0] install_exe_if_needed('KeePass-%s-Setup.exe' % versionpaquet,silentflags='/VERYSILENT',key='KeePassPasswordSafe2_is1',min_version=versionpaquet,killbefore=['KeePass.exe']) keysoftinfo=installed_softwares('KeePassPasswordSafe2_is1') for info in keysoftinfo : installlocation = info['install_location'] if isfile(makepath(installlocation,'Languages','French.lngx')): remove_file(makepath(installlocation,'Languages','French.lngx')) filecopyto('French.lngx',makepath(installlocation,'Languages','French.lngx')) def session_setup(): if not isdir(makepath(application_data,'KeePass')): mkdirs(makepath(application_data,'KeePass')) config=makepath(application_data,'KeePass','KeePass.config.xml') if not isfile(config): data = ur"""<?xml version="1.0" encoding="utf-8"?> <Configuration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Meta> <PreferUserConfiguration>false</PreferUserConfiguration> <OmitItemsWithDefaultValues>true</OmitItemsWithDefaultValues> </Meta> <Application> <LanguageFile>French.lngx</LanguageFile> <LastUpdateCheck>2017-06-13T19:44:53Z</LastUpdateCheck> <LastUsedFile> <Path /> <CredProtMode>Obf</CredProtMode> <CredSaveMode>NoSave</CredSaveMode> </LastUsedFile> <MostRecentlyUsed> <MaxItemCount>12</MaxItemCount> <Items /> </MostRecentlyUsed> <WorkingDirectories /> <Start> <CheckForUpdate>false</CheckForUpdate> <CheckForUpdateConfigured>true</CheckForUpdateConfigured> </Start> <FileOpening /> <FileClosing /> <TriggerSystem> <Triggers /> </TriggerSystem> </Application> <Logging /> <MainWindow> <X>309</X> <Y>81</Y> <Width>662</Width> <Height>513</Height> <SplitterHorizontalFrac>0.8333</SplitterHorizontalFrac> <SplitterVerticalFrac>0.25</SplitterVerticalFrac> <Layout>Default</Layout> <ToolBar /> <EntryView /> <TanView /> <EntryListColumnCollection> <Column> <Type>Title</Type> <Width>90</Width> </Column> <Column> <Type>UserName</Type> <Width>90</Width> </Column> <Column> <Type>Password</Type> <Width>90</Width> <HideWithAsterisks>true</HideWithAsterisks> </Column> <Column> <Type>Url</Type> <Width>90</Width> </Column> <Column> <Type>Notes</Type> <Width>90</Width> </Column> </EntryListColumnCollection> <EntryListColumnDisplayOrder>0 1 2 3 4</EntryListColumnDisplayOrder> <ListSorting> <Order>Ascending</Order> </ListSorting> </MainWindow> <UI> <TrayIcon /> <Hiding /> <StandardFont> <Family>Microsoft Sans Serif</Family> <Size>8.25</Size> <GraphicsUnit>Point</GraphicsUnit> <Style>Regular</Style> <OverrideUIDefault>false</OverrideUIDefault> </StandardFont> <PasswordFont> <Family>Courier New</Family> <Size>8.25</Size> <GraphicsUnit>Point</GraphicsUnit> <Style>Regular</Style> <OverrideUIDefault>false</OverrideUIDefault> </PasswordFont> <BannerStyle>WinVistaBlack</BannerStyle> <DataEditorFont> <Family>Microsoft Sans Serif</Family> <Size>8.25</Size> <GraphicsUnit>Point</GraphicsUnit> <Style>Regular</Style> <OverrideUIDefault>false</OverrideUIDefault> </DataEditorFont> <UIFlags>0</UIFlags> <KeyCreationFlags>0</KeyCreationFlags> <KeyPromptFlags>0</KeyPromptFlags> </UI> <Security> <WorkspaceLocking> <LockAfterTime>0</LockAfterTime> <LockAfterGlobalTime>0</LockAfterGlobalTime> </WorkspaceLocking> <Policy /> <MasterPassword> <MinimumLength>0</MinimumLength> <MinimumQuality>0</MinimumQuality> </MasterPassword> </Security> <Native /> <PasswordGenerator> <AutoGeneratedPasswordsProfile> <GeneratorType>CharSet</GeneratorType> <Length>20</Length> <CharSetRanges>ULD_______</CharSetRanges> </AutoGeneratedPasswordsProfile> <LastUsedProfile> <GeneratorType>CharSet</GeneratorType> <Length>20</Length> <CharSetRanges>ULD_______</CharSetRanges> </LastUsedProfile> <UserProfiles /> </PasswordGenerator> <Defaults> <OptionsTabIndex>4</OptionsTabIndex> <SearchParameters> <ComparisonMode>InvariantCultureIgnoreCase</ComparisonMode> </SearchParameters> <KeySources /> </Defaults> <Integration> <HotKeyGlobalAutoType>393281</HotKeyGlobalAutoType> <HotKeySelectedAutoType>0</HotKeySelectedAutoType> <HotKeyShowWindow>393291</HotKeyShowWindow> <HotKeyEntryMenu>0</HotKeyEntryMenu> <UrlSchemeOverrides> <BuiltInOverridesEnabled>1</BuiltInOverridesEnabled> <CustomOverrides /> </UrlSchemeOverrides> <AutoTypeAbortOnWindows /> <ProxyType>System</ProxyType> <ProxyAuthType>Auto</ProxyAuthType> </Integration> <Custom /> </Configuration>""" else: fichier = open(config, "r") data = fichier.read() fichier.close() #force french if not '<LanguageFile>' in data: languagefile=ur"""<Application> <LanguageFile>French.lngx</LanguageFile>""" data = data.replace('<Application>',languagefile) # disable update if '<CheckForUpdate>true</CheckForUpdate>' in data : data = data.replace('<CheckForUpdate>true</CheckForUpdate>','<CheckForUpdate>false</CheckForUpdate>') fichier = open(config, "w") fichier.write(data) fichier.close() def update_package(): from zipfile import * import requests,urlparse url = requests.head('https://sourceforge.net/projects/keepass/files/latest/download?source=files',proxies={}).headers['Location'] dstzip = requests.head(url,proxies={}).headers['Location'] filename = urlparse.unquote(dstzip.rsplit('/',1)[1]) print filename vers = filename.replace('KeePass-','').replace('.zip','') filenameexe = "KeePass-%s-Setup.exe" %vers dstexe = dstzip.replace(filename,filenameexe) print ("Latest Version : " + vers) exes = glob.glob('*.exe') for fn in exes: if fn != filenameexe: remove_file(fn) if not isfile(filenameexe): print('Downloading %s '%(filenameexe)) wget(dstexe,filenameexe) else: print('Already up to date, skipped') os.chdir(os.path.dirname(__file__)) from waptpackage import PackageEntry pe = PackageEntry() pe.load_control_from_wapt(os.getcwd()) pe.version = vers + '-0' pe.save_control_to_wapt(os.getcwd()) try: print('Try Download KeePass-%s-French.zip' % vers) wget('https://downloads.sourceforge.net/keepass/KeePass-%s-French.zip' % vers, 'KeePass-%s-French.zip' % vers) except: error('Le fichier de traduction pour la langue francaise pour la version ' + vers + ' de keepass ne semble pas disponnible') zip = ZipFile('KeePass-%s-French.zip' % vers) zip.extractall(path='.') zip.close() remove_file('KeePass-%s-French.zip' % vers) if __name__ == '__main__': update_package()
Changelog
"""{% trans %}No changelog.{% endtrans %}"""
manifest.sha256
[["WAPT/icon.png", "a2ecc1ccd99ee0adbb67cef1219d7a379577057f1c7fdb68284d3ffa4a8cfc81"], ["WAPT/certificate.crt", "13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779"], ["WAPT/wapt.psproj", "324f014e8690c45eb9cc515b7b8bf77b5ca20a7e2e283f7d1964197786696fae"], ["French.lngx", "2f4e611a366bcd0661a2db1732bf20a4ada216bb08824a8ddbe9a8b9a225f26f"], ["setup.py", "0169cb3be66e7235b06d98391220c1f38e3835f30ad261f29b560178d202f6db"], ["KeePass-2.39-Setup.exe", "b61db93244b9594633d2e6854497c58076f93a26a0c8cbeb4d65f16ded74c578"], ["WAPT/control", "7e295e89fe34069321cbe042c1377168dafa6e1928945bd474e402d1a0bb92c5"]]