tis-freecad

0.19.1-8
FreeCAD is a free and open-source (under the LGPLv2+ license) general-purpose parametric 3D CAD modeler and a building information modeling (BIM) software with finite-element-method (FEM) support. FreeCAD is intended for mechanical engineering product design but also expands to a wider range of uses around engineering, such as architecture or electrical engineering.
7222 downloads
Download
default icon

  Description 

  • package : tis-freecad
  • version : 0.19.1-8
  • architecture : x64
  • categories : Media,Utilities
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : FreeCAD is a free and open-source (under the LGPLv2+ license) general-purpose parametric 3D CAD modeler and a building information modeling (BIM) software with finite-element-method (FEM) support. FreeCAD is intended for mechanical engineering product design but also expands to a wider range of uses around engineering, such as architecture or electrical engineering.
  • locale : all
  • target_os : windows
  • min_wapt_version : 1.7
  • sources : https://github.com/FreeCAD/FreeCAD/releases
  • installed_size : 1788391424
  • impacted_process : FreeCAD
  • description_fr : FreeCAD est un logiciel de modélisation 3D libre pour la CAO, IAO, PLM, orientée vers le génie mécanique et le design de produits, mais qui vise également d'autres disciplines, telles que l'architecture ou d'autres branches de l'ingénierie.
  • description_pl : FreeCAD jest parametrycznym modelerem CAD/CAE.
  • description_de : FreeCAD ist ein 3D CAD/CAE-Programm für parametrisches Modellieren. Es dient primär zum Entwerfen von technischen Objekten, kann aber auch zum Modellieren von anderen 3D Objekten genutzt werden, wo Präzision und Kontrolle über die Modellhistorie gefragt sind.
  • description_es : FreeCAD es una aplicación de modelado paramétrico CAD/CAE. Esta primeramente hecha para diseño mecánico, pero también sirve a muchos otros usos donde donde necesitas modelado 3D con precisión y control sobre historial de modelado.
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Jürgen Riegel,Werner Mayer,Yorik van Havre
  • licence : LGPLv2+
  • signature_date : 2021-04-12T11:33:38.424205
  • Homepage : https://www.freecadweb.org/

  Setup.py 

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

uninstallkey = []

# Defining variables
bin_name_sub = 'FreeCAD-%s-WIN-x64-installer.exe'
silent_args = '/S'


def install():
    # Initializing variables
    package_version = control.get_software_version()
    bin_name = bin_name_sub % package_version
    version_key = package_version.replace('.','')
    app_uninstallkey = 'FreeCAD%s' % version_key

    # 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
    git_repo = 'FreeCAD/FreeCAD'
    url_api = 'https://api.github.com/repos/%s/releases/latest' % git_repo
    bin_end = bin_name_sub.split('.')[-1]
    bin_contains = bin_name_sub.split('%s')[-1].split('.')[0]

    # Getting latest version from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load['assets']:
        if download['name'].split('/')[-1].endswith(bin_end):
            if bin_contains in download['name']:
                url_dl = download['browser_download_url']
                break

    version = json_load['tag_name'].replace('v', '')
    latest_bin = bin_name_sub % 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).split(' ')[-1]
        if version != version_from_file and version_from_file != '':
            print("Changing version to the version number of the binary")
            os.rename(latest_bin,bin_name_sub % version_from_file)
            version = version_from_file

    # Changing version of the package
    if control.get_software_version() != version:
        print("Changing package version to: %s in WAPT\\control" % control.version)
    else:
        print("Keeping package version to: %s in WAPT\\control" % control.version)
    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():
    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 get_version_from_binary(filename, parameter='ProductVersion'):
    if filename.endswith('.msi'):
        return get_msi_properties(filename)[parameter]
    else:
        return get_file_properties(filename)[parameter]


def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg'], 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://tracker.freecadweb.org/changelog_page.php



No changelog.txt.
									
  manifest.sha256