Page 1 of 1
Packages for "portable" software
Published: November 23, 2015 - 09:29
by gaelds
Hello,
would you happen to have an example of a package that would allow copying or unzipping a folder on the client PC, creating a desktop shortcut, and automatically deleting these files during uninstallation?
For example, I'd like to create a package for Mirage:
http://spcfa.spip.ac-rouen.fr/spip.php?article451
Re: Packages for "portable" software
Published: Dec 1, 2015 - 6:57 AM
by gaelds
If it can help anyone, here's an example of a package that allows you to copy a directory to C:\Software\... and create shortcuts to the executable on the desktop and in the start menu:
Code: Select all
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
def install():
print(u'Copie de Analyse spectrale')
copytree2('Analyse Spectrale',makepath('C:\\','Logiciels','Sciences','Analyse Spectrale'))
print(u'Raccourci sur le bureau public')
mkdirs(makepath(common_desktop(),'Logiciels','Physique-Chimie'))
create_shortcut(makepath(common_desktop(),'Logiciels','Physique-Chimie','Analyse spectrale.lnk'),target=makepath('C:\\','Logiciels','Sciences','Analyse Spectrale','analyse-spectrale.exe'))
print(u'Raccourci dans le menu demarrer')
create_programs_menu_shortcut('Analyse spectrale', target=makepath('C:\\','Logiciels','Sciences','Analyse Spectrale','analyse-spectrale.exe'))
def uninstall():
print(u'Suppression de Analyse spectrale')
remove_tree(makepath('C:\\','Logiciels','Sciences','Analyse Spectrale'))
remove_file(makepath(common_desktop(),'Logiciels','Physique-Chimie','Analyse spectrale.lnk'))
remove_programs_menu_shortcut('Analyse spectrale.lnk')
Re: Packages for "portable" software
Published: February 18, 2016 - 9:50 AM
by tienou
Thanks for sharing, gaelds
