tis-rcedit icon

RCEdit

Silent install package for RCEdit

2.0.0

  • package: tis-rcedit
  • name: RCEdit
  • version: 2.0.0
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Joffrey Le Piquet
  • locale: all
  • target_os: windows
  • impacted_process: rcedit
  • architecture: x64
  • signature_date:
  • size: 435.84 Ko

package           : tis-rcedit
version           : 2.0.0
architecture      : x64
section           : base
priority          : optional
name              : RCEdit
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Joffrey Le Piquet
description       : Command line tool to edit resources of exe file on Windows.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.5
sources           : https://github.com/electron/rcedit/releases
installed_size    : 
impacted_process  : rcedit
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : a8290430-c567-4dfd-a170-d8c5412feae5
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 9cfd986b7703a6880d17ab82e925593dc98b591acbcb8af3677da96c748eeead
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-08-13T09:00:25.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         : x9t+Q2iYVv03eNV+Ao29Mp4ZDyiANPo1wT8Rn3IVFuteY2CpuDog+YHqYdZQsffBV0UbYN0Okq//NcL6Ui2SboOBsxfkO6ZH2hZB6NaS/GFl+NMVvFGttWMWesDyZsSNp4PBh5FGpx/297xy9QU4ep5c1rxw3DWB02LjkAQ5Y7dbRgOQJfACKzk3L6cm/D8Qe9jhy/8v9YazPa21JN3tQ7AJXTRzrlHs0SQCCOUsF6L76pMk9JeDxLzxbKcJnrDis64M2jNbrvTk6dwmAaNpnZ0IEe6UXHyJ1EHOVlsIZwfiRX+x0jUrvqOPzFyaDgS/xlaGHHLJzlUn3WjkMMWrzQ==

from setuphelpers import *

app_name = "Rcedit"
app_dir=makepath(programfiles,"rcedit")
app_path=makepath(app_dir,"rcedit.exe")

def get_installed_version(app_path):
    return get_file_properties(app_path).get("FileVersion", "")

def install():
    # # Installing the software
    bin_name = glob.glob("*.exe")[0]
    if isdir(app_dir) and force:
        remove_tree(app_dir)

    mkdirs(app_dir)

    filecopyto(bin_name,app_path)

    add_to_system_path(app_dir)

def audit():
    # Auditing software
    audit_status = "OK"
    installed_version = Version(get_installed_version(app_path),3)
    if Version(installed_version) < Version(control.get_software_version()) and audit_version:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, control.get_software_version()))
        audit_status = "WARNING"
    elif isdir(app_dir) and not dir_is_empty(app_dir):
        print("%s (%s) is installed" % (app_name, installed_version))
        audit_status = "OK"
    else:
        print("%s is not installed" % app_name)
        audit_status = "ERROR"
    return audit_status

def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir):
        remove_tree(app_dir)

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


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/electron/rcedit/releases/latest"
    update_dict = {
        "windows-x64": "x64.exe",
        "windows-x86": "-x86.exe",
    }

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = wgets(api_url, proxies=proxies, as_json=True)
    version = json_load["name"].replace("v", "")
    for to_download in json_load["assets"]:
        if update_dict[control.target_os + "-" + ensure_list(control.architecture)[0]] in to_download["name"]:
            download_url = to_download["browser_download_url"]
            latest_bin = "rcedit.exe"
            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)
        if Version(version_from_file, 3) == Version(version, 3):
            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, 3) > Version(control.get_software_version(), 3):
        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)

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
708c06e46e7e17b03b8b7ea42cdbcba0b9a1b51409e8fb24de88dddb8c5af6d8 : WAPT/control
9cfd986b7703a6880d17ab82e925593dc98b591acbcb8af3677da96c748eeead : WAPT/icon.png
60640742638c81033d42d5f09b309e5babb30d63db2b497907fbdcc1541c1638 : luti.json
3e7801db1a5edbec91b49a24a094aad776cb4515488ea5a4ca2289c400eade2a : rcedit.exe
22ca96924f650900dc524592b62ba363aded9cd4a061a10da830f816b519ac9f : setup.py
38545fb5a4627a271c256b3805b93134bb132eae425dfbca7a16d43f40f3dcd8 : update_package.py