tis-freecad icon

FreeCAD

Paquet d’installation silencieuse pour FreeCAD

1.0.1-14

  • package: tis-freecad
  • name: FreeCAD
  • version: 1.0.1-14
  • categories: Media,Utilities
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ,Jordan ARNAUD
  • editor: Jürgen Riegel,Werner Mayer,Yorik van Havre
  • licence: LGPLv2+
  • locale: all
  • target_os: linux
  • impacted_process: FreeCAD
  • architecture: x64
  • signature_date:
  • size: 847.51 Mo
  • installed_size: 1.79 Go
  • homepage : https://www.freecadweb.org/

package           : tis-freecad
version           : 1.0.1-14
architecture      : x64
section           : base
priority          : optional
name              : FreeCAD
categories        : Media,Utilities
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ,Jordan ARNAUD
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.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : linux
min_wapt_version  : 2.3
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    : O FreeCAD é um modelador CAD 3D paramétrico de uso geral e de código aberto (sob a licença LGPLv2+) e um software de modelação de informação de edifícios (BIM) com suporte de método de elementos finitos (FEM). O FreeCAD destina-se à concepção de produtos de engenharia mecânica, mas também se expande para uma gama mais vasta de utilizações em torno da engenharia, tais como arquitectura ou engenharia eléctrica
description_it    : FreeCAD è un modellatore CAD 3D parametrico di uso generale, gratuito e open source (con licenza LGPLv2+) e un software di modellazione delle informazioni edilizie (BIM) con supporto del metodo degli elementi finiti (FEM). FreeCAD è destinato alla progettazione di prodotti per l'ingegneria meccanica, ma si estende anche a una gamma più ampia di utilizzi nell'ambito dell'ingegneria, come l'architettura o l'ingegneria elettrica
description_nl    : FreeCAD is een vrije en open-source (onder de LGPLv2+ licentie) general-purpose parametrische 3D CAD modeler en een BIM (Building Information Modeling) software met finite-element-method (FEM) ondersteuning. FreeCAD is bedoeld voor werktuigbouwkundig productontwerp, maar kan ook worden gebruikt voor een breder scala aan toepassingen rond techniek, zoals architectuur of elektrotechniek
description_ru    : FreeCAD - это бесплатный и открытый (по лицензии LGPLv2+) параметрический 3D CAD-моделировщик общего назначения и программное обеспечение для информационного моделирования зданий (BIM) с поддержкой метода конечных элементов (МКЭ). FreeCAD предназначен для проектирования изделий машиностроения, но также расширяет сферу применения до более широкого круга областей машиностроения, таких как архитектура или электротехника
audit_schedule    : 
editor            : Jürgen Riegel,Werner Mayer,Yorik van Havre
keywords          : 3D,CAD,parametric,modeler,building,mechanical,engineering,desig,architecture,electrical
licence           : LGPLv2+
homepage          : https://www.freecadweb.org/
package_uuid      : 2a70dc5f-383c-49cc-b0a5-940d845c96e2
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://tracker.freecadweb.org/changelog_page.php
min_os_version    : 10.12
max_os_version    : 
icon_sha256sum    : f7ac1685a4006bb7f10d38ad3a1fdcb560a7ac59a38cb700f0e9c1cb1e8e8ccb
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-05-20T15:06:10.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : rWjXZG2LES6zz9zDC1QfGTF2AcaG8wIazXUNg+Xnm4L4yKZuiSHGQLod7VYd2d61qDofQntg/ziatx60gguzoAaqNPDRYx8YgxdzJgE28rlHwUtiG+y6PMM3+0jDNAJ3chFOi2oBAXK8hc27Vq1nZRVA+lga1DnkIMkL6EJDbzfCd82WqL37XWLqzgeEVESC7Suq5K54mYPM0jUGR2feBe35FkiHB4w7dLTn/B6RrsjRTPdMB7zx1pzD6rALkkcIwNXCKw5KJGo5FkDoMDM+wqBaxwa7wx72j68KxTjd1mkICMRSDjs4XWm+uZH3VmoATwwsfbXDOzIZVsta8WUKkQ==

# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2024
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *
from iniparse import ConfigParser
import os


def install():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    appimage = glob.glob("*.AppImage")[0]
    install_appimage(appimage,install_dir)

def uninstall():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    uninstall_appimage(install_dir)

def install_appimage(appimage,install_dir,binaliasname=None):
    run('chmod a+x ./' + appimage)

    if isdir(install_dir):
        uninstall_appimage(install_dir)

    mkdirs(install_dir)

    name_appimage = appimage.split('/')[-1]
    filecopyto(appimage, makepath(install_dir, name_appimage))
    run('"./%s" --appimage-extract' % appimage)
    

    for desktop in glob.glob(makepath('squashfs-root','*.desktop')):
 
        desktop_cp = ConfigParser()
        desktop_cp.optionxform = str
        desktop_file = open(desktop, encoding="utf-8")
        desktop_cp.readfp(desktop_file)
        bin_path = desktop_cp.get('Desktop Entry',"Exec")

        newbin_path = install_dir + '/' + name_appimage
        if ' %' in bin_path:
            newbin_path = newbin_path + ' %' + bin_path.split(' %',1)[1]

        icon_path = desktop_cp.get('Desktop Entry',"Icon")

        srcicon = makepath('squashfs-root',icon_path +'.svg')
        if not isfile(srcicon):
            srcicon = makepath('squashfs-root',icon_path +'.png')

        if not isfile(srcicon):
            lstglob = glob.glob(makepath('squashfs-root','*.svg'))
            if lstglob :
                srcicon=lstglob[0]

        if not isfile(srcicon):
            lstglob = glob.glob(makepath('squashfs-root','*.png'))
            if lstglob :
                srcicon=lstglob[0]
            else:
                srcicon = None

        if srcicon:            
            new_icon = install_dir + '/' + srcicon.split('/')[-1]
            filecopyto(srcicon,new_icon)
            desktop_cp.set('Desktop Entry',"Icon",new_icon) 

        desktop_cp.set('Desktop Entry',"Exec",newbin_path)
       
        with open(desktop, 'w', encoding="utf-8") as f:
            desktop_cp.write(f)

        pathdesk = makepath(install_dir,desktop.split('/')[-1])
        filecopyto(desktop, pathdesk)
        run('chown root:root "%s" ' % pathdesk)

    for f in glob.glob(makepath(install_dir,'*.desktop')):
        run('ln -sf "%s" "/usr/share/applications/%s"' % (f,f.split('/')[-1]))

    if binaliasname :
        run(f"ln -sf {install_dir}/{name_appimage} /usr/bin/{binaliasname}")

    remove_tree('squashfs-root')

def uninstall_appimage(install_dir):

    if not glob.glob(makepath(install_dir,'*.desktop')):
        error('.desktop not found')

    for f in glob.glob(makepath(install_dir,'*.desktop')):
        deskfile = f.split('/')[-1]
        system_desktop = makepath("/","usr","share","applications",deskfile)
        if isfile(system_desktop):
            remove_file(system_desktop)
    remove_tree(install_dir)

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


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    api_url = "https://api.github.com/repos/FreeCAD/FreeCAD/releases/latest"
    download_dict = {
        "windows-x64": "-Windows-x86_64-installer-1.exe",
        "macos-arm": "-macOS-arm64-py311.dmg",
        "macos-x64": "-macOS-x86_64-py311.dmg",
        "linux-arm64": "-Linux-aarch64-py311.AppImage",
        "linux-x64": "-Linux-x86_64-py311.AppImage",
    }

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = json.loads(wgets(api_url, proxies=proxies))
    for to_download in json_load["assets"]:
        if download_dict[control.target_os + "-" + ensure_list(control.architecture)[0]] in to_download["name"]:
            download_url = to_download["browser_download_url"]
            version = json_load["tag_name"]
            latest_bin = to_download["name"]
            break

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Deleting outdated binaries
    remove_outdated_binaries(latest_bin)
    # arch_list = ensure_list(control.architecture)
    # remove_outdated_binaries(version, filename_contains=("x64" if "x64" in arch_list else "x86" if "x86" in arch_list else []))

    # Checking version from file
    if get_os_name() == "Windows" and "windows" in control.target_os.lower():
        version_from_file = get_version_from_binary(latest_bin).rsplit(" ", 1)[-1]
        if Version(version_from_file, 4) == Version(version, 4):
            print(f"INFO: Binary file version ({version_from_file}) corresponds to online version ({version})")
        else:
            error(f"ERROR: Binary file version ({version_from_file}) do NOT corresponds to online version ({version})")

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating update-package-sources
    return package_updated

    # # Changing version of the package and validating update-package-sources
    # return complete_control_version(control, version)

5a3fc405771b4fbb5f270110d055bc135123c9fc91bb7dbb5d068ac7fbe50f6e : FreeCAD_1.0.1-conda-Linux-x86_64-py311.AppImage
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
54e740807caa7be26763d54638edb3f895068e968519ce321cf232dd85c54877 : WAPT/control
f7ac1685a4006bb7f10d38ad3a1fdcb560a7ac59a38cb700f0e9c1cb1e8e8ccb : WAPT/icon.png
e3d1a3b30c179107c9bce7a8e8f5fac2528b07454234f3415d60bb401be46051 : luti.json
223fa6ca0b4ed15f7d1a2e29893619511e043c7907d145e8c8991405677bb4e1 : setup.py
ca3094e5580a6f7afd110ce7a90074eb7727ffc8a2129e05b4fdf2acf2df2d06 : update_package.py