summaryrefslogtreecommitdiff
path: root/pygtk_postinstall.py
diff options
context:
space:
mode:
authorJohn Stowers <john.stowers@gmail.com>2010-10-22 13:27:59 +1300
committerJohn Stowers <john.stowers@gmail.com>2010-10-22 13:27:59 +1300
commitef116ee617059897f905e0813eb0561e686f0ec4 (patch)
tree283c4d57b582d460e182c5eb182918b6fa9a77cb /pygtk_postinstall.py
parent61e1ec89f84bc01c24fc861f3b0dce3355bf77a7 (diff)
downloadpygtk-ef116ee617059897f905e0813eb0561e686f0ec4.tar.gz
Shortcut removal is not needed on post-uninstall
Diffstat (limited to 'pygtk_postinstall.py')
-rw-r--r--pygtk_postinstall.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/pygtk_postinstall.py b/pygtk_postinstall.py
index 5690096f..471c4b23 100644
--- a/pygtk_postinstall.py
+++ b/pygtk_postinstall.py
@@ -58,23 +58,14 @@ def create_shortcuts():
if os.path.isfile(pygtk_doc_link):
os.remove(pygtk_doc_link)
create_shortcut(doc_url,'PyGTK Documentation',pygtk_doc_link)
+ file_created(pygtk_doc_link)
homepage_link = os.path.join(pygtk_shortcuts,
"PyGTK Home.lnk")
if os.path.isfile(homepage_link):
os.remove(homepage_link)
create_shortcut("http://www.pygtk.org",'PyGTK Homepage',homepage_link)
-
-def remove_shortcuts():
- pygtk_shortcuts = os.path.join(
- get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'PyGTK')
- os.remove(os.path.join(pygtk_shortcuts,'PyGTK Documentation.lnk'))
- os.remove(os.path.join(pygtk_shortcuts,'PyGTK Home.lnk'))
- try:
- os.rmdir(pygtk_shortcuts)
- except OSError, e:
- # Directory is not empty, so leave it like that !
- pass
+ file_created(homepage_link)
if len(sys.argv) == 2:
if sys.argv[1] == "-install":
@@ -84,5 +75,4 @@ if len(sys.argv) == 2:
# TODO: Add an installer option for shortcut creation
# create_shortcuts()
print __doc__
- elif sys.argv[1] == "-remove":
- remove_shortcuts()
+