tis-freecad

0.18.4-3
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.18.4-3
  • architecture : x86
  • categories : Media,Utilities
  • maintainer : WAPT Team,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.5
  • sources : https://github.com/FreeCAD/FreeCAD/releases
  • installed_size : 826376192
  • impacted_process : FreeCAD.exe
  • 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-01-05T15:12:43.504962
  • Homepage : https://www.freecadweb.org/

  Setup.py 

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

#FreeCAD0184rev18542        FreeCAD 0.18.4rev18542      0.18.4rev18542      "C:\Program Files\FreeCAD 0.18\Uninstall-FreeCAD.exe"

uninstallkey = []

# Declaring specific app values (TO CHANGE)
bin_name_string = 'FreeCAD-%s-x32-installer.exe'
bin_name_joker = 'FreeCAD-*-x32-installer.exe'
silent_arguments = '/S'
suffix_dl_link = '-WIN-x32-installer.exe'


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

    # Declaring specific app values
    package_version = control.version.split('-',1)[0]
    soft_name = control.name
    uninstallkey_freecad = 'FreeCAD' + get_file_properties(glob.glob(bin_name_joker)[0])['FileVersion'].replace('.','')

    def get_version_software(key):
        return key['version'].split('rev')[0]


    # Uninstalling older versions
    check_installed = installed_softwares(soft_name)
    #print(check_installed)
    for uninstall in check_installed:
    	if 'FreeCAD Team' in uninstall['publisher']:
    		if uninstall['version'] < package_version:
    			print('Removing %s' % uninstall['name'])
    			cmd = uninstall_cmd(uninstall['key'])
    			run(cmd)

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

    # Installing the package
    install_exe_if_needed(bin_name_string % package_version
        ,silentflags=silent_arguments
        ,key=uninstallkey_freecad
        ,min_version=package_version
        ,get_version=get_version_software)

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


def update_package():
    print('Download/Update package content from upstream binary sources')
    # Getting proxy informations from WAPT settings
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    
    # Checking version from file
    url = 'https://www.freecadweb.org/downloads.php?lang=fr'
    for bs_search in bs_find_all(url, 'a', 'class', 'btn btn-primary rounded-pill my-1', proxies=proxies):
        if bs_search['href'].split('/')[-1].endswith(suffix_dl_link):
            version = bs_search['href'].split('/')[-2]
            latest_bin = bs_search['href'].split('/')[-1]
            url_dl = bs_search['href']
            break
    
    # Downloading binary
    if not isfile(latest_bin):
        print('Downloading ' + url_dl)
        wget(url_dl,latest_bin,proxies=proxies)

    # rename binary
    os.rename(latest_bin,bin_name_string % version)
    

    # Changing version of the package
    control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
    control.save_control_to_wapt()
    print('Changing version to: %s in WAPT\\control' % control.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 bs_find_all(url, element, attribute=None, value=None, headers=None, proxies=None, features='html.parser', **kwargs):
    """"You may need to use a header for some websites. For example: headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0'}
    """
    import requests
    page = requests.get(url, proxies=proxies, headers=headers, **kwargs).text
    try:
        import bs4 as BeautifulSoup
        soup = BeautifulSoup.BeautifulSoup(page, features=features)
    except:
        import BeautifulSoup
        soup = BeautifulSoup.BeautifulSoup(page)
    if value:
        return soup.findAll(element,{attribute:value})
    else:
        return soup.findAll(element)
										

  Changelog 



https://www.freecadweb.org/wiki/Release_notes_0.18
									
  manifest.sha256