tis-dev-cpp

5.11-2
Dev-C ++ is an integrated development environment (IDE) for programming in C and C ++ for Windows operating systems
252 downloads
Download

  Description 

  • package : tis-dev-cpp
  • version : 5.11-2
  • architecture : all
  • categories : Development
  • maintainer : WAPT Team,Tranquil IT,Kismath ADELEKE,Rayene GUIASSA
  • description : Dev-C ++ is an integrated development environment (IDE) for programming in C and C ++ for Windows operating systems
  • locale : all
  • target_os : windows
  • min_wapt_version : 1.7
  • sources : https://sourceforge.net/projects/dev-cpp
  • installed_size : 371949568
  • impacted_process : devcpp,devcppPortable
  • description_fr : Dev-C ++ est un environnement de développement intégré (IDE) permettant de programmer en C et en C ++ pour les systèmes d'exploitation Windows
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Colin Laplace,Mike Berg,Hongli Lai,Yiannis Mandravellos
  • licence : GPLv3
  • signature_date : 2021-04-30T09:24:18.812047
  • Homepage : https://www.bloodshed.net/

  Setup.py 

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

# Defining variables
bin_contains = 'Dev-Cpp'
silent_args = '/S'
app_uninstallkey = 'Dev-C++'


def install():
    # Initializing variables
    package_version = control.get_software_version()
    bin_name = glob.glob('*%s*' % bin_contains)[0]

    # Installing the package
    print("Installing: %s" % bin_name)
    install_exe_if_needed(bin_name,
        silentflags=silent_args,
        key=app_uninstallkey,
        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
    project_repo = 'orwelldevcpp'
    url_api = 'https://sourceforge.net/projects/%s/best_release.json' % project_repo

    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))
    for download in json_load['platform_releases']:
        if bin_contains in json_load['platform_releases'][download]['filename']:
            url_dl = json_load['platform_releases'][download]['url']
            version = json_load['platform_releases'][download]['filename'].split(' ')[-4]
            latest_bin = json_load['platform_releases'][download]['filename'].split('/')[-1]
            break

    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 and version_from_file != '':
            print("Changing version to the version number of the binary, from: %s to: %s" % (version, version_from_file))
            os.rename(latest_bin,bin_name_sub % version_from_file)
            version = version_from_file

    # Changing version of the package
    control.version = '%s-%s' % (version, control.version.split('-', 1)[-1])
    control.save_control_to_wapt()

    # 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_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


def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg','zip'], 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://orwelldevcpp.blogspot.com/



No changelog.txt.
									
  manifest.sha256