[SOLVED] Misunderstanding of the update_package function on V2.5

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
Zanef57
Messages: 6
Registration: February 21, 2023 - 3:50 PM

July 24, 2024 - 11:43

Good morning,

I no longer understand how to update my packages on WAPT since the latest version.

To summarize:

-I already have an existing package that launches an MSI.
-I want to update this package with a new MSI.
-I modified the install() function for the new package

In my recollection, I also had to implement the update_package function if the package existed for various specific cases, but it no longer works.
wapt package.jpg
wapt.jpg package (75.85 KB) Viewed 4133 times

Code: Select all

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

uninstallkey = []

def install():
    if is64():
        install_msi_if_needed("EditorV10.x64.msi")
        run(r'REG IMPORT association.reg')
    if is32():
        install_msi_if_needed("EditorV10.x86.msi")
        run(r'REG IMPORT association.reg')
        
def update_package():
    print("ok")
So maybe I haven't understood something or I've been doing it wrong from the beginning, but now I'm wondering.

Thank you for your answers.
Last edited by Zanef57 on July 24, 2024 - 12:39 PM, edited 1 time.
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 24, 2024 - 11:53

Hello Jeremy,

what is your Wapt version, edition, OS, etc. (see forum rules)?

Regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Zanef57
Messages: 6
Registration: February 21, 2023 - 3:50 PM

July 24, 2024 - 11:57

dcardon wrote: July 24, 2024 - 11:53 AM Hello Jeremy,

Wapt version, edition, OS, etc. (see forum rules).

Regards,

Denis
My apologies.

WAPT: 2.5.5.15640
Edition: Discovery
Client OS: WIN 11
Server OS: Windows Server 2022
IDE: VSCODE
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 24, 2024 - 12:02

Hi again Jeremy,

there's no need to run `update_package` in your case since the function isn't implemented. The `update_package` function automates package updates by automatically downloading binaries from the publisher's website when a new version is available.

I think the function you're looking for is `build-upload`. This function was recently removed from the PyScripter/VS Code IDE because it caused quite a few problems due to different execution contexts. The new recommended method for performing a build-upload is to drag and drop the package onto the private repository tab in the console.

There have been several threads about this on the forum recently.

Best regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Zanef57
Messages: 6
Registration: February 21, 2023 - 3:50 PM

July 24, 2024 - 12:07

dcardon wrote: Jul 24, 2024 - 12:02 PM Hi again Jeremy,

there's no need to run `update_package` in your case since the function isn't implemented. The `update_package` function automates package updates by automatically downloading binaries from the publisher's website when a new version is available.

I think the function you're looking for is `build-upload`. This function was recently removed from the PyScripter/VS Code IDE because it caused quite a few problems due to the different execution contexts. The new recommended method for `build-upload` is to drag and drop the package onto the private repository tab in the console.

There have been several threads about this on the forum recently.

Best regards,

Denis
Thank you for your reply, but I think I'm having trouble expressing myself or I don't have the right vocabulary.
I did see the notes on the forum about the build-upload function disappearing and that it now works with drag and drop.

My question is, how does the package update work?

If I upload my new package to my private repository, which function is launched to upgrade the package?
The install() function or the update_package() function?
Zanef57
Messages: 6
Registration: February 21, 2023 - 3:50 PM

July 24, 2024 - 12:31

I have my answer; I created a dummy package for testing.

During drag and drop, the client machine correctly displays "UP TO UPGRADE" as before.
However, the function that is called to update my package is indeed `install()`.
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 24, 2024 - 12:49

Hello again Jeremy,

thank you for the feedback :-)

. Best regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked