Page 1 of 1

Fix uninstall CodeBlocks

Published: April 28, 2026 - 1:11 PM
by Olivier Schmitt
Good morning,

In https://wapt.tranquil.it/store/fr/tis-codeblocks
It is stated:

Code: Select all

def install():
    bin_name = glob.glob("codeblocks-*mingw-setup.exe")[0]

    if isdir(app_path):
        uninstall()
....

Code: Select all

def uninstall():
    run(f'"{makepath(app_path, "uninstall.exe")}" /S')
It seems there was a probable bug in the previous version which did not put uninstall.exe in the directory.

Can you replace the function? def uninstall(): by this one:

Code: Select all

def uninstall():
    uninstall_bin = makepath(app_path, "uninstall.exe")
    if isfile(uninstall_bin):
        run(f'"{uninstall_bin}" /S')
    if isdir(app_path):
        remove_tree(app_path)
(To be tested)

It is also possible to add:

Code: Select all

    impacted_process_list = control.impacted_process.split(",")
    killalltasks(impacted_process_list)
regarding the process specified in control: Code::Blocks (since codeblocks.exe)

This is to delete the folder and avoid the error:

Code: Select all

 erreurs dans les paquets [[PackageRequest(package='tis-codeblocks',version=(Version('25.3.0.0'), 7),architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows'],min_os_version=Version('10.0.26100'),max_os_version=Version('10.0.26100')), PackageEntry('tis-codeblocks','25.3-7' maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5689, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4609, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4514, in install_wapt\n    exitstatus = setup.install()\n  File "C:\\Program Files (x86)\\wapt\\private\\tmp\\wapt5rr5rgkd\\setup.py", line 10, in install\n  File "C:\\Program Files (x86)\\wapt\\private\\tmp\\wapt5rr5rgkd\\setup.py", line 24, in uninstall\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4169, in run\n    return ensure_unicode(run(*arg, pidlist=self.pidlist,**args))\n  File "C:\\Program Files (x86)\\wapt\\waptutils.py", line 2318, in run\n    raise CalledProcessErrorOutput(proc.returncode, cmd, \'\'.join(output))\nwaptutils.CalledProcessErrorOutput: Command \'"C:\\\\Program Files\\\\CodeBlocks\\\\uninstall.exe" /S\' returned non-zero exit status 1.\nOutput:\'"C:\\Program Files\\CodeBlocks\\uninstall.exe"\' n\'est pas reconnu en tant que commande interne\r\nou externe, un programme exécutable ou un fichier de commandes.\r\n\n']]

Re: Fix uninstall CodeBlocks

Published: April 28, 2026 - 2:07 PM
by italbot
Hello,

Thank you for bringing this to our attention, I'm looking into it.

Sincerely,

Ingrid

Re: Fix uninstall CodeBlocks

Published: April 30, 2026 - 12:17 PM
by italbot
Hello,

I just made the change, and at the same time I fixed an issue with retrieving the binary in update_package().

Have a good day.

Best regards,

Ingrid

Re: Fix uninstall CodeBlocks

Published: May 4, 2026 - 4:17 PM
by Olivier Schmitt
THANKS!