Page 1 of 1

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

Published: July 24, 2024 - 11:43
by Zanef57
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 4134 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.

Re: Misunderstanding of the update_package function on V2.5

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

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

Regards,

Denis

Re: Misunderstanding of the update_package function on V2.5

Published: July 24, 2024 - 11:57 AM
by Zanef57
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

Re: Misunderstanding of the update_package function on V2.5

Published: July 24, 2024 - 12:02 PM
by dcardon
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

Re: Misunderstanding of the update_package function on V2.5

Published: July 24, 2024 - 12:07 PM
by Zanef57
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?

Re: Misunderstanding of the update_package function on V2.5

Published: July 24, 2024 - 12:31
by Zanef57
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()`.

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

Published: July 24, 2024 - 12:49 PM
by dcardon
Hello again Jeremy,

thank you for the feedback :-)

. Best regards,

Denis