[RESOLVED] Package for Orca

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
bastien30
Messages: 38
Registration: March 8, 2024 - 3:21 PM

December 16, 2024 - 10:36

Good morning,

Here is a package for Orca (MSI editor).

setup.py:

Code: Select all

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

"""
Package version is corresponding to Windows SDK version because :
- Orca is only distributed through Windows SDK
- Orca installer does not have a ProductVersion
- Orca does not have a public changelog
- Orca is listed in registry with Windows SDK version
"""

sdk_dir = r'winsdk'
sdk_installers_dir = makepath(sdk_dir, "Installers")
orca_bin_path = makepath(sdk_installers_dir, r'Orca-x86_en-us.msi')

def install():
    appver = control.get_software_version()
    install_msi_if_needed(orca_bin_path, min_version=appver)

def update_package():
    appver = control.get_software_version()
    url = control.sources
    binary = r'winsdksetup.exe'

    # Checking latest version of SDK from release notes -> not reliable, version seems wrong on website
    # changelog_section = bs_find(url, "div", "id", "faq-section-2")
    # for version in bs_find(changelog_section, "summary", "class", "details-summary"):
    #     latest_version = version.split("Build ")[1].split(" ")[0]

    # Download latest binary to check version
    for link in bs_find_all(url, "a", "href"):
        if r'Download the installer' in link.text:
            url_dl = link["href"]
            break
    wget(url_dl, binary)
    latest_version = get_version_from_binary(binary)

    if Version(latest_version) > Version(appver):
        print(r'Latest version is %s' % latest_version)

        # Remove old SDK directory
        if isdir(sdk_dir):
            remove_tree(sdk_dir)

        # Extract needed features to get Orca
        run(r'%s /features OptionId.MSIInstallTools /quiet /norestart /layout %s' % (binary, sdk_dir))
        while isrunning(r'winsdksetup.exer'):
            time.sleep(2)

        # Remove useless dotNetFx installer(s) to reduce package size
        for dotnet_bin in glob.glob(r'%s\dotNetFx*' % sdk_installers_dir):
            remove_file(dotnet_bin)

        # Changing version of the package
        control.version = '%s-%s'%(latest_version, control.version.split('-')[-1])
        control.save_control_to_wapt()
        print('Changing version to: %s in WAPT\\control' % control.version)
    else:
        print("Already up to date")

    # Remove useless installer
    remove_file(binary)
control:

Code: Select all

package           : xxx-orca
version           : 10.1.26100.1742-0
architecture      : all
section           : base
priority          : optional
name              : Orca
categories        : System and network
maintainer        : XXXX
description       : Orca est un éditeur de tables de base de données permettant de créer et d'éditer des packages Windows Installer (MSI) et des modules de fusion. L'outil fournit une interface graphique pour la validation, mettant en évidence les entrées particulières où se produisent des erreurs de validation ou des avertissements. (upok)
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 
sources           : https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/
installed_size    : 
impacted_process  : orca
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : Microsoft
keywords          : 
licence           : proprietary_free
homepage          : https://learn.microsoft.com/en-us/windows/win32/msi/orca-exe
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
fschelfaut
Messages: 30
Registration: Nov 7, 2024 - 12:22

December 17, 2024 - 4:36 PM

Hi Bastien,

thanks for sharing the code!

I've added Orca to the WAPT store; it will be available in 5 days.
In the meantime, you can find the pre-production build here

, Flavien.
Locked