Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv17022
Modified Files:
pywin32_postinstall.py
Log Message:
Install a shortcut for Pythonwin with the bdist_wininst builtin
functions (only works on NT/2000/XP).
Index: pywin32_postinstall.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pywin32_postinstall.py 3 Dec 2003 08:20:12 -0000 1.4
--- pywin32_postinstall.py 3 Dec 2003 09:00:57 -0000 1.5
***************
*** 148,151 ****
--- 148,172 ----
os.mkdir(make_dir)
+ try:
+ create_shortcut
+ except NameError:
+ # todo: create shortcut with win32all
+ pass
+ else:
+ try:
+ # use bdist_wininst builtins to create a shortcut.
+ # XXX CSIDL_COMMON_PROGRAMS only available works on NT/2000/XP:
+ fldr = get_special_folder_path("CSIDL_COMMON_PROGRAMS")
+ dst = os.path.join(fldr, "Python %d.%d\\PythonWin.lnk" % \
+ (sys.version_info[0], sys.version_info[1]))
+ create_shortcut(os.path.join(lib_dir, "Pythonwin\\Pythonwin.exe"),
+ "The Pythonwin IDE",
+ dst)
+ file_created(dst)
+ except Exception, details:
+ print details
+ else:
+ print "Shortcut for Pythonwin created"
+
print "The pywin32 extensions were successfully installed."
|