I am trying to package a cx_freeze exe in a msi, and I am having a bit of a
time getting a "post-install" script to run.
Note that this is to be installed on machines that probably will not have
Python installed on it (The whole reason for cx_freeze to be used)
But installation on my Windows laptop does not seem to run the postinstall
(but it does have python installed)
my setup.py:
------------------------------
import sys
from cx_Freeze import setup, Executable
from AdminMenu import version
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable("MyApp.py",base = base, icon='logo.ico'),
]
setup(
name = "MyApp",
version = version,
description = "MyApp installer",
executables = executables,
options = {'user_options':{'install_
script':'install.py'}},
#options = {'bdist_msi':{'install_script':'install.py'}},
scripts = ['install.py'],
)
----------------------------------
My install.py:
#!python
import sys
#from AdminMenu import version
#if sys.argv[1] == '-install':
#we need to create an shortcut
#path = get_special_folder_path('CSIDL_COMMON_PROGRAMS')
path = get_special_folder_path("CSIDL_DESKTOPDIRECTORY")
path += '\\MyApp.lnk'
#path += '\\MyApp-0.9.5\\MyApp.exe'
#print path
file_created(path)
create_shortcut("C:\\Program Files\\MyApp-0.9.6\\MyApp.exe", 'MyApp', path)
Any help would be appreciated.
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users