tis-mockoon-portable icon

Mockoon

Paquet d’installation silencieuse pour Mockoon

9.6.1-1
Development
Development

Les paquets PREPROD sont des paquets construits via LUTI. Ils restent généralement 5 jours en PREPROD, après quoi un deuxième scan VirusTotal est effectué pour vérifier que le status n'a pas changé.
Si le paquet réussit ce dernier contrôle, il est promu en PROD et publié sur le store.

  • package: tis-mockoon-portable
  • name: Mockoon
  • version: 9.6.1-1
  • categories: Development
  • maintainer: WAPT Team,Tranquil IT,Amel FRADJ
  • licence: opensource_free,wapt_public
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 106.70 Mo
  • homepage : https://mockoon.com/

package           : tis-mockoon-portable
version           : 9.6.1-1
architecture      : x64
section           : base
priority          : optional
name              : Mockoon
categories        : Development
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : Mockoon is the fastest and easiest way to run dummy APIs locally. No remote deployment, no account required, free and open source
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Mockoon est le moyen le plus simple et le plus rapide d'exécuter des API fictives localement. Aucun déploiement à distance, aucun compte requis, gratuit et open source
description_pl    : Mockoon to najprostszy i najszybszy sposób na lokalne uruchamianie fikcyjnych interfejsów API. Nie wymaga zdalnego wdrażania, nie wymaga konta, jest darmowy i open source
description_de    : Mockoon ist der einfachste und schnellste Weg, um fiktive APIs lokal auszuführen. Kein Remote Deployment, kein Konto erforderlich, kostenlos und Open Source
description_es    : Mockoon es la forma más fácil y rápida de ejecutar API ficticias localmente. Sin despliegue remoto, sin necesidad de cuenta, gratuito y de código abierto
description_pt    : O Mockoon é a forma mais fácil e rápida de executar APIs fictícias localmente. Sem implantação remota, sem necessidade de conta, gratuito e de código aberto
description_it    : Mockoon è il modo più semplice e veloce per eseguire API fittizie a livello locale. Nessuna distribuzione remota, nessun account richiesto, gratuito e open source
description_nl    : Mockoon is de eenvoudigste en snelste manier om dummy API's lokaal uit te voeren. Geen implementatie op afstand, geen account nodig, gratis en open source
description_ru    : Mockoon - это самый простой и быстрый способ локального запуска фиктивных API. Никакого удаленного развертывания, не требуется учетная запись, бесплатно и с открытым исходным кодом
audit_schedule    : 
editor            : 
keywords          : 
licence           : opensource_free,wapt_public
homepage          : https://mockoon.com/
package_uuid      : 7779e171-f739-4898-8436-41b0ff2518a7
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : ba94c62bc25f306ed36d91217e4ba8251c77b572940b59d21227df7c8b277c39
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-04-02T08:29:45.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         : rIF/HM9+ElcGrEWYXVbg0rkCJIV9ENIxLwff0UAYHl3tT3uKbN4ipe4iZxEcMqYtwOHS4lIlX45zmbxEnUrPf+e++0dZeZ99yiMb/uWNfDrcuZwqgbbpNU2kpWeFPwLr/wHEpbmeGFbFuFpJ4KWSc/YLTar1SkEZ/3apFk0/Z3vKDjaRnxU79KIKk0XbddfModhjV8GfGQ2bcJ8r26M/kKi/tRvgUW56ECXIYqxDckjHRh5a1BLXTQlQOnklmVB8zkxFG/tqLLwgt9snSbAIuyDjv7J2GLYx1p3TQnCGIXC3SG52bVplmbGPZgwKdi2X/fsMVKGcuCz4woM7dIJ0xQ==

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

app_name = "mockoon"
uninstall_dir = makepath(os.environ['LOCALAPPDATA'], 'Programs', app_name)  # Target the correct directory
uninstall_exe_name = "Uninstall Mockoon.exe"  # Name of the uninstall executable

def install():
    bin_name = glob.glob('*.exe')[0]  # Find the .exe file in the current directory
    app_path = makepath(uninstall_dir, bin_name)  # Define the target path for the .exe
    
    # Installing the software
    killalltasks(ensure_list(control.impacted_process))
    
    if isdir(uninstall_dir) and force:  # If the directory exists and 'force' is enabled, remove it
        remove_tree(uninstall_dir)
    
    mkdirs(uninstall_dir)  # Create the target directory if necessary
    filecopyto(bin_name, app_path)  # Copy the .exe file to the target directory
    
    

    # Identify the path of the installed Mockoon executable
    installed_executable = find_installed_executable(app_name)

    # Create shortcuts to the installed executable, not the installer
    if installed_executable:
        create_desktop_shortcut(app_name, target=installed_executable)
        create_programs_menu_shortcut(app_name, target=installed_executable)

def find_installed_executable(app_name):
    """
    Find the installed Mockoon executable in the installation folder.
    """
    installed_paths = installed_softwares(app_name)
    if installed_paths:
        # Search for the executable in the installed paths
        for software in installed_paths:
            path = software.get('install_location', '')
            exe_files = glob.glob(makepath(path, '*.exe'))  # Search for .exe files in the installation directory
            if exe_files:
                return exe_files[0]  # Return the first .exe found
    return None

def uninstall():
    # Uninstalling the software
    killalltasks(ensure_list(control.impacted_process))

    # Complete path to the uninstall executable
    uninstall_path = makepath(uninstall_dir, uninstall_exe_name)
    
    if isfile(uninstall_path):  # Check if the uninstall file exists
        # Run the uninstall program in silent mode
        print(f"Uninstalling Mockoon via: {uninstall_path}")
        run(f'"{uninstall_path}" ')  # Use /S for silent uninstallation if supported
        wait_uninstallkey_absent(app_name, max_loop=600)
    else:
        print(f"Uninstall file not found: {uninstall_path}")
    
    # Remove remaining files
    if isdir(uninstall_dir):
        remove_tree(uninstall_dir)

    # Remove shortcuts
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)

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

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def update_package():
    result = False
    proxies = get_proxies()

    if not proxies:
        proxies = get_proxies_from_wapt_console()

    git_repo = "mockoon/mockoon"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo
    dict_arch={
        "x64" :"mockoon.setup"
    }
    # 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["assets"]:
        if download["name"].endswith('.exe') and dict_arch[control.architecture] in download["name"]:
            url_dl = download["browser_download_url"]
            version = json_load["tag_name"].replace("v", "")
            latest_bin = download["name"]
            break


    for f in glob.glob('*.exe'):
        if get_version_from_binary(f) < version :
            remove_file(f)

    # 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 = get_version_from_binary(latest_bin)

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        result = True
        control.version = "%s-%s" % (Version(version), control.version.split("-", 1)[-1])
        # control.set_software_version(Version(version))
        control.save_control_to_wapt()

    # Validating update-package-sources
    return result

01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
e8e8844a0d0192c335ec4265db2c62e59c1f1dc272408840e5c19a10923e7bd7 : WAPT/control
ba94c62bc25f306ed36d91217e4ba8251c77b572940b59d21227df7c8b277c39 : WAPT/icon.png
1c9f4ed3370451aa676dc45a800c52de20e53b313bf460bc0ab89893c30ea6ec : luti.json
a25e2a71972e9c867840bae11903e8170abf4a9da36da7d62214e8963c1edd83 : mockoon.setup.9.6.1.exe
83a5f2ee9ff1a78a42f54b8ffe96139344ee57a50b1c9f36b15a1795a127724e : setup.py
7179f13e99a18e4f91aaace2f2f52e9f90fc5a450f4f5a2eef0908f04a966b09 : update_package.py