windows installer - python distutils post msi installation -
i creating msi installer distutils bdist_msi command. in setup file, want run code after msi has installed package, please help..
from distutils.core import setup distutils.command.bdist_msi import bdist_msi import os import shutil startmenu = "c:/programdata/microsoft/windows/start menu/programs/shotexplorer" startup = "c:/programdata/microsoft/windows/start menu/programs/startup" link = r"c:\python27\lib\site-packages\shotexplorer\shotexplorer.lnk" class mycommand(bdist_msi): def run(self): bdist_msi.run(self) print "creating start menu entries" if not os.path.exists(startmenu): os.makedirs(startmenu) shutil.copy(link, startmenu) shutil.copy(link, startup) setup( name = "shotexplorer", version = "1.0", description = "tool explore shots on isilon", author = "abhishek.garg", author_email = "abhishekgarg12@yahoo.com", packages = ["shotexplorer", "shotexplorer.pyhook"], package_data = {"":["explorer.ico","quicktime.png","shotexplorer.lnk","pyhook/_cpyhook.pyd"]}, include_package_data = true, cmdclass = {'bdist_msi':mycommand} )
Comments
Post a Comment