tis-notepadplusplus

7.8.4-1
Notepad++ is a text editor and source code editor for use with Microsoft Windows
36626 downloads
Download

  Description 

  • package : tis-notepadplusplus
  • version : 7.8.4-1
  • architecture : x86
  • categories : Office,Development
  • maintainer : Tranquil IT,Jimmy PELÉ
  • description : Notepad++ is a text editor and source code editor for use with Microsoft Windows
  • locale : all
  • target_os : windows
  • min_wapt_version : 1.5
  • sources : https://notepad-plus-plus.org/downloads/
  • installed_size : 8957952
  • impacted_process : notepad++.exe
  • description_fr : Notepad++ est un éditeur de texte libre générique, fonctionnant sous Windows
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Don Ho
  • licence : GPL
  • signature_date : 2020-02-27T21:37:05.811366
  • Homepage : https://notepad-plus-plus.org/

  Setup.py 

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

uninstallkey = []

# Declaring specific app values (TO CHANGE)
bin_name_string = 'npp.%s.Installer.exe'
silent_inst_arg = '/S'
uninstall_key = 'Notepad++'


def install():
    print('installing %s' % control.asrequirement())

    # Specific app values
    package_version = control['version'].split('-',1)[0]

	# Getting the used storage on programfiles before installation (place it on the top)
    get_disk_free_space_before = get_disk_free_space(programfiles)

    install_exe_if_needed(bin_name_string % package_version
        ,silentflags=silent_inst_arg
        ,key=uninstall_key
        ,min_version=package_version)

	# Return used storage of the installation. (place it on the bottom)
    get_disk_free_space_after = get_disk_free_space(programfiles)
    free_space_after_diff = get_disk_free_space_before - get_disk_free_space_after
    print ("Storage used: " + str(free_space_after_diff))


def session_setup():
    print('Session setup for %s' % control.asrequirement())
    print('Disabling : update check')

    #C:\Users\jpadmin\AppData\Roaming\Notepad++
    app_roam_appdata = makepath(application_data,'Notepad++')
    conf_file_loc = makepath(app_roam_appdata,'config.xml')

    if not isdir(app_roam_appdata):
        mkdirs(app_roam_appdata)


    if not isfile(conf_file_loc):
        xml_data_conf = ur"""<?xml version="1.0" encoding="Windows-1252" ?>
<NotepadPlus>
    <GUIConfigs>
        <GUIConfig name="ToolBar" visible="yes">standard</GUIConfig>
        <GUIConfig name="StatusBar">show</GUIConfig>
        <GUIConfig name="TabBar" dragAndDrop="yes" drawTopBar="yes" drawInactiveTab="yes" reduce="yes" closeButton="yes" doubleClick2Close="no" vertical="no" multiLine="no" hide="no" quitOnEmpty="no" />
        <GUIConfig name="ScintillaViewsSplitter">vertical</GUIConfig>
        <GUIConfig name="UserDefineDlg" position="undocked">hide</GUIConfig>
        <GUIConfig name="TabSetting" replaceBySpace="no" size="4" />
        <GUIConfig name="AppPosition" x="192" y="170" width="1100" height="700" isMaximized="no" />
        <GUIConfig name="noUpdate" intervalDays="15" nextUpdateDate="20191024">yes</GUIConfig>
        <GUIConfig name="Auto-detection">yes</GUIConfig>
        <GUIConfig name="CheckHistoryFiles">no</GUIConfig>
        <GUIConfig name="TrayIcon">no</GUIConfig>
        <GUIConfig name="MaitainIndent">yes</GUIConfig>
        <GUIConfig name="TagsMatchHighLight" TagAttrHighLight="yes" HighLightNonHtmlZone="no">yes</GUIConfig>
        <GUIConfig name="RememberLastSession">yes</GUIConfig>
        <GUIConfig name="DetectEncoding">yes</GUIConfig>
        <GUIConfig name="NewDocDefaultSettings" format="0" encoding="4" lang="0" codepage="-1" openAnsiAsUTF8="yes" />
        <GUIConfig name="langsExcluded" gr0="0" gr1="0" gr2="0" gr3="0" gr4="0" gr5="0" gr6="0" gr7="0" gr8="0" gr9="0" gr10="0" gr11="0" gr12="0" langMenuCompact="yes" />
        <GUIConfig name="Print" lineNumber="yes" printOption="3" headerLeft="" headerMiddle="" headerRight="" footerLeft="" footerMiddle="" footerRight="" headerFontName="" headerFontStyle="0" headerFontSize="0" footerFontName="" footerFontStyle="0" footerFontSize="0" margeLeft="0" margeRight="0" margeTop="0" margeBottom="0" />
        <GUIConfig name="Backup" action="0" useCustumDir="no" dir="" isSnapshotMode="yes" snapshotBackupTiming="7000" />
        <GUIConfig name="TaskList">yes</GUIConfig>
        <GUIConfig name="MRU">yes</GUIConfig>
        <GUIConfig name="URL">2</GUIConfig>
        <GUIConfig name="globalOverride" fg="no" bg="no" font="no" fontSize="no" bold="no" italic="no" underline="no" />
        <GUIConfig name="auto-completion" autoCAction="3" triggerFromNbChar="1" autoCIgnoreNumbers="yes" funcParams="yes" />
        <GUIConfig name="auto-insert" parentheses="no" brackets="no" curlyBrackets="no" quotes="no" doubleQuotes="no" htmlXmlTag="no" />
        <GUIConfig name="sessionExt"></GUIConfig>
        <GUIConfig name="workspaceExt"></GUIConfig>
        <GUIConfig name="MenuBar">show</GUIConfig>
        <GUIConfig name="Caret" width="1" blinkRate="600" />
        <GUIConfig name="ScintillaGlobalSettings" enableMultiSelection="no" />
        <GUIConfig name="openSaveDir" value="0" defaultDirPath="" />
        <GUIConfig name="titleBar" short="no" />
        <GUIConfig name="stylerTheme" path="%s\Notepad++\stylers.xml" />
        <GUIConfig name="wordCharList" useDefault="yes" charsAdded="" />
        <GUIConfig name="delimiterSelection" leftmostDelimiter="40" rightmostDelimiter="41" delimiterSelectionOnEntireDocument="no" />
        <GUIConfig name="multiInst" setting="0" />
        <GUIConfig name="MISC" fileSwitcherWithoutExtColumn="no" backSlashIsEscapeCharacterForSql="yes" newStyleSaveDlg="yes" isFolderDroppedOpenFiles="no" docPeekOnTab="no" docPeekOnMap="no" />
        <GUIConfig name="searchEngine" searchEngineChoice="2" searchEngineCustom="" />
        <GUIConfig name="SmartHighLight" matchCase="no" wholeWordOnly="yes" useFindSettings="no" onAnotherView="no">yes</GUIConfig>
        <GUIConfig name="ScintillaPrimaryView" lineNumberMargin="show" bookMarkMargin="show" indentGuideLine="show" folderMarkStyle="box" lineWrapMethod="aligned" currentLineHilitingShow="show" scrollBeyondLastLine="no" disableAdvancedScrolling="no" wrapSymbolShow="hide" Wrap="no" borderEdge="yes" edge="no" edgeNbColumn="80" zoom="0" zoom2="0" whiteSpaceShow="hide" eolShow="hide" borderWidth="2" smoothFont="no" />
        <GUIConfig name="DockingManager" leftWidth="200" rightWidth="200" topHeight="200" bottomHeight="200">
            <ActiveTabs cont="0" activeTab="-1" />
            <ActiveTabs cont="1" activeTab="-1" />
            <ActiveTabs cont="2" activeTab="-1" />
            <ActiveTabs cont="3" activeTab="-1" />
        </GUIConfig>
    </GUIConfigs>
    <FindHistory nbMaxFindHistoryPath="10" nbMaxFindHistoryFilter="10" nbMaxFindHistoryFind="10" nbMaxFindHistoryReplace="10" matchWord="no" matchCase="no" wrap="yes" directionDown="yes" fifRecuisive="yes" fifInHiddenFolder="no" dlgAlwaysVisible="no" fifFilterFollowsDoc="no" fifFolderFollowsDoc="no" searchMode="0" transparencyMode="1" transparency="150" dotMatchesNewline="no" isSearch2ButtonsMode="no" />
    <History nbMaxFile="10" inSubMenu="no" customLength="-1">
        <File filename="C:\waptdev\waptdev-test\ccleaner\setup.py" />
    </History>
    <ProjectPanels>
        <ProjectPanel id="0" workSpaceFile="" />
        <ProjectPanel id="1" workSpaceFile="" />
        <ProjectPanel id="2" workSpaceFile="" />
    </ProjectPanels>
</NotepadPlus>
""" % user_appdata()


        file_open = open(conf_file_loc,'w')
        file_open.write(xml_data_conf)
        file_open.close()

    else:
        import xml.etree.ElementTree as ET
        xml_data_conf_tree = ET.parse(conf_file_loc)
        xml_data_conf = xml_data_conf_tree.getroot()

        for GUIConfig in xml_data_conf.iter('GUIConfig'):
            if GUIConfig.get('name') == 'noUpdate':
                if GUIConfig.text=='no':
                    GUIConfig.text='yes'
                    xml_data_conf_tree.write(conf_file_loc)


def update_package():
    print('Update package content from upstream binary sources')

    import requests,re
    from waptpackage import PackageEntry

    # Update transition from BeautifulSoup 3 to 4
    try:
        import BeautifulSoup
    except:
        import bs4 as BeautifulSoup

    # Specific app values
    app_name = control.name
    url = 'https://github.com/notepad-plus-plus/notepad-plus-plus/releases'

    # Get Proxy informations from WAPT settings
    proxies = {}
    if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxies = {'http':proxywapt,'https':proxywapt}

    verify=True
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    current_version = pe['version'].split('-',1)[0]
    verify=True

    # Get latest version number from official website
    page = requests.get(url + '/latest',headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'},verify=verify).text
    bs = BeautifulSoup.BeautifulSoup(page)
    # bs = BeautifulSoup.BeautifulSoup(page,features="html.parser") # For bs4 only
    bs_raw_string = str(bs.find('span',{'class':'css-truncate-target'}).text)
    vversion = bs_raw_string
    version = vversion.replace('v','')
    vmajeur = version.split('.',1)[0]

    print('Latest ' + app_name + ' version is: ' + version)

    #https://notepad-plus-plus.org/repository/7.x/7.7.1/npp.7.7.1.Installer.exe

    url_dl = ("http://download.notepad-plus-plus.org/repository/" + vmajeur + ".x/" + version +  '/' + bin_name_string % version)

    print(url_dl)
    print('Download url is: ' + url_dl)

    latest_bin = bin_name_string % version

    # Deleting outdated binaries
    for actual_bin in glob.glob('*.exe') or glob.glob('*.msi'):
        if actual_bin != latest_bin :
            print(actual_bin + ' Deleted')
            remove_file(actual_bin)

    # Downloading latest binaires
    if not isfile(latest_bin):
        print('Downloading ' + url_dl)
        wget(url_dl,latest_bin,proxies=proxies)

		# Change version of the package
        pe = PackageEntry()
        pe.load_control_from_wapt(os.getcwd())

        pe.version = version + '-0'
        pe.save_control_to_wapt(os.getcwd())
        print ('Update package done. You can now build-upload your package')
    else:
        print ('This package is already up-to-date')


if __name__ == '__main__':
    update_package()


										

  Changelog 



https://notepad-plus-plus.org/news/v771-released/
									
  manifest.sha256