193 |
193 |
194 # remove the eric configuration directory |
194 # remove the eric configuration directory |
195 removeConfigurationData() |
195 removeConfigurationData() |
196 |
196 |
197 print("\nUninstallation completed") |
197 print("\nUninstallation completed") |
198 except (IOError, OSError) as msg: |
198 except OSError as msg: |
199 sys.stderr.write( |
199 sys.stderr.write( |
200 'Error: {0}\nTry uninstall with admin rights.\n'.format(msg)) |
200 'Error: {0}\nTry uninstall with admin rights.\n'.format(msg)) |
201 exit(7) |
201 exit(7) |
202 |
202 |
203 |
203 |
224 for linkName in windowsDesktopNames(): |
224 for linkName in windowsDesktopNames(): |
225 linkPath = os.path.join(desktopFolder, linkName) |
225 linkPath = os.path.join(desktopFolder, linkName) |
226 if os.path.exists(linkPath): |
226 if os.path.exists(linkPath): |
227 try: |
227 try: |
228 os.remove(linkPath) |
228 os.remove(linkPath) |
229 except EnvironmentError: |
229 except OSError: |
230 # maybe restrictions prohibited link removal |
230 # maybe restrictions prohibited link removal |
231 print("Could not remove '{0}'.".format(linkPath)) |
231 print("Could not remove '{0}'.".format(linkPath)) |
232 |
232 |
233 # 2. cleanup start menu entry |
233 # 2. cleanup start menu entry |
234 regName = "Programs" |
234 regName = "Programs" |
237 programsFolder = os.path.normpath(os.path.expandvars(programsEntry)) |
237 programsFolder = os.path.normpath(os.path.expandvars(programsEntry)) |
238 eric6EntryPath = os.path.join(programsFolder, windowsProgramsEntry()) |
238 eric6EntryPath = os.path.join(programsFolder, windowsProgramsEntry()) |
239 if os.path.exists(eric6EntryPath): |
239 if os.path.exists(eric6EntryPath): |
240 try: |
240 try: |
241 shutil.rmtree(eric6EntryPath) |
241 shutil.rmtree(eric6EntryPath) |
242 except EnvironmentError: |
242 except OSError: |
243 # maybe restrictions prohibited link removal |
243 # maybe restrictions prohibited link removal |
244 print("Could not remove '{0}'.".format(eric6EntryPath)) |
244 print("Could not remove '{0}'.".format(eric6EntryPath)) |
245 |
245 |
246 |
246 |
247 def uninstallLinuxSpecifics(): |
247 def uninstallLinuxSpecifics(): |