Page 1 of 1

Clean up the start menu with a WAPT package

Published: November 29, 2018 - 11:59 AM
by Jonattend
Good morning,
I use WAPT to deploy various software applications. So far, nothing illogical, you might say :)

For each software, I specified, in the def install() the final shortcut in the All Users start menu.

Code: Select all

  print("Creation du raccourci vers Outils Multimedias ....")
  # creation du raccourci dans le menu demarrer, programmes, outils multimedias ...
  create_programs_menu_shortcut('VLC',target=makepath(programfiles64,'VideoLAN','VLC','vlc.exe'),folder=u'Outils Multimedias')
  # suppression du raccourci de l application dans le menu demarrer, programmes ... sinon deux raccourcis seront crées : celui par défaut et celui qu'on a ajouté. Ajout de l'argument ignore_errors sinon erreur sous Windows 10 si réinstallation du paquet ...
  remove_tree(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\VideoLAN', ignore_errors=True)
Example :
- VLC: lands in Start Menu\Programs\Multimedia Tools
- GeoGebra: lands in Start Menu\Programs\Maths Tools
etc ....

The problem is that if there's a package update, the setup.py file won't be preserved. So I'd have to modify setup.py again so the shortcuts land in the correct location...
So, I was wondering: is it possible to create a "final" package whose sole purpose would be to clean up the start menu after installing software via WAPT?
example :
- VLC installation
- GeoGebra installation
- Anaconda installation
- Application of the Start Menu sorting package to classify applications into the correct subfolders:
-> VLC: Multimedia Tools
-> GeoGebra: Math Tools
-> Anaconda: Programming Tools

If WAPT can execute a .bat file, I can always do it via a .bat file. But the most important thing is that this package is executed very last, relative to the others...

Thank you for your suggestions :)

Re: Cleaning the Start Menu with a WAPT Package

Published: November 29, 2018 - 2:42 PM
by vcardon
Jonattend wrote: Nov 29, 2018 - 11:59 AM So, I was wondering: is it possible to create a "final" package whose sole purpose would be to clean up the Start Menu after installing software via WAPT?
For example:
- VLC installation
- GeoGebra installation
- Anaconda installation
- application of the Start Menu sorting package to classify the applications in the correct subfolders:
-> VLC: Multimedia Tools
-> GeoGebra: Math Tools
-> Anaconda: Programming Tools
It would be more a matter of creating a package whose setup.py handles managing your shortcuts and whose control lists the dependent software.

The dependencies will be installed first and then your shortcut package will run over them, cleaning them up as needed.

Sincerely.

Re: Cleaning the Start Menu with a WAPT Package

Published: November 29, 2018 - 3:15 PM
by Jonattend
Hmmmmmmmm, I see the idea!
I'll try it out and give you feedback.

Thanks! ;)

Re: Cleaning the Start Menu with a WAPT Package

Published: November 30, 2018 - 3:17 PM
by Jonattend
Well, it works pretty well!!

I tried it with two apps and it does the job perfectly. ;)

Thanks for your help. ;)

Re: Cleaning the Start Menu with a WAPT Package

Published: February 19, 2019 - 2:53 PM
by Jonattend
Hello,

After learning "the correct way to update a package," I'm wondering if this so-called "final shortcut" package is still useful...

Let's imagine:
- I have a VLC package that needs to be installed in "Media Tools"
- I have a Mozilla Firefox ESR package that needs to be installed in the "Programs" folder in the Start menu.

- Either there's no "update-package-source" file in setup.py, in which case I just replace my .exe file without touching my setup.py file (for example, VLC)
- Or there is an "update-package-source" file in setup.py, which I run, and then I re-upload the package (here, Firefox-ESR).

Therefore, I would use a package group to install several programs, and the shortcut management would be handled in each setup.py file.

Is this correct?

Thank you for your clarification.