Page 1 of 1

[RESOLVED] Package for EdrawMax - Updated 08/2025

Published: August 7, 2025 - 12:55 PM
by bastien30
Good morning,

I had shared a package for Wondershare EdrawMax software but the update-package no longer works because they have changed their site.
Here is a new version that works.

setup.py:

Code: Select all

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

def install():
    appver = control.get_software_version()
    appname = control.name
    install_exe_if_needed(r'edrawmax_%s.exe' % appver, silentflags=r'/VERYSILENT /NORESTART /ACCEPTEULA', min_version=appver, name=appname)
    remove_desktop_shortcut(appname)

def session_setup():
    appname = control.name
    remove_user_desktop_shortcut(appname)
    
def update_package():
    appver = control.get_software_version()
    url = control.changelog
    latest_version = None
    for col in bs_find_all(url, "h2", "class", "mb-3"):
        if "Windows" in col.text:
            latest_version = col.text.split("Windows V")[1].split(" ")[0]
            break

    if not latest_version:
        error(r'Error fetching latest version from website !')
    else:
        # Installers for all versions are availables here: https://support.wondershare.com/how-tos/wondershare/product-download.html
        # It seems all installers contains "full5371" in file name
        latest_url = r'https://download.edrawsoft.com/cbs_down/edraw-max_64bit_%s_full5371.exe' % latest_version
        print(r'Latest version : %s' % latest_version)
        print(r'Latest url : %s' % latest_url)

    if Version(latest_version, 3) > Version(appver, 3):
        installer = r'edrawmax_latest.exe'
        installer_version = r'edrawmax_%s.exe'
        wget(latest_url, installer)
        # Get full version from binary
        bin_version = get_version_from_binary(installer)
        if Version(bin_version, 3) != Version(latest_version, 3):
            error(r'Error : binary version and website version are not the same !')
        else:
            # Renaming installer with full version
            os.rename(installer, installer_version % bin_version)
            # Changing version of the package
            control.version = '%s-%s'%(bin_version, control.version.split('-')[-1])
            control.save_control_to_wapt()
            print('Changing version to: %s in WAPT\\control' % control.version)
            remove_outdated_binaries(bin_version)
    else:
        print("Already up to date")
control:

Code: Select all

package           : xxx-edraw_max
version           : 14.5.4.1333-104
architecture      : x64
section           : base
priority          : optional
name              : Wondershare EdrawMax
categories        : Utilities
maintainer        : XXXX
description       : Edraw Max est un logiciel de diagramme d'affaires et technique en 2D qui aide à créer des diagrammes de flux, des organigrammes, des cartes mentales, des diagrammes de réseau, des plans d'étage, des diagrammes de flux de travail, des graphiques d'affaires et des diagrammes d'ingénierie.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 
sources           : https://www.edrawsoft.com/download-edrawmax.html
installed_size    : 
impacted_process  : EdrawMax,EdrawMaxTray
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : EdrawSoft Co.,Ltd.
keywords          : 
licence           : proprietary_restricted
homepage          : https://edrawmax.wondershare.com/
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://edrawmax.wondershare.com/whats-new.html
min_os_version    : 
max_os_version    :

Re: [SOLVED] Package for EdrawMax - Update 08/2025

Published: August 7, 2025 - 3:49 PM
by italbot
Hello,

On our end, the update_package has already been modified and is functional, but the installation is no longer silent, which is why this package is not up to date on the store. If you have any information that could help us resolve this issue, please let us know. Thank you.

Sincerely,

Ingrid

Re: [SOLVED] Package for EdrawMax - Update 08/2025

Published: August 7, 2025 - 4:16 PM
by bastien30
Hello,

On my end the installation is very quiet, I deployed it on several machines today...

And I did not change the command line parameters which were already in the old package.

Re: [SOLVED] Package for EdrawMax - Update 08/2025

Published: August 7, 2025 - 5:25 PM
by italbot
Strange, on our end, whether as admin or system account, the installation fails because it doesn't proceed silently; a popup appears asking for confirmation. And on Luti, the installation times out.
Did you perform the installations using wapt packages in the console?

Regards,
Ingrid

Re: [SOLVED] Package for EdrawMax - Update 08/2025

Published: August 7, 2025 - 5:37 PM
by bastien30
I just successfully installed the WAPT package via the command line (admin user) and the console (system user).
Both worked silently.

Did you download the full offline installer? It looks like you're using the online installer at first glance.
See the latest_url variable in my package above.

Re: [SOLVED] Package for EdrawMax - Update 08/2025

Published: August 8, 2025 - 10:22
by italbot
Hello,

Yes, we were not retrieving the correct binary, thank you for reporting it :)
. The changes have been made, the package will now be updated.

Have a good day.

Best regards,
Ingrid