120 Uninstall the eric files. |
120 Uninstall the eric files. |
121 """ |
121 """ |
122 global pyModDir |
122 global pyModDir |
123 |
123 |
124 # Remove the menu entry for Linux systems |
124 # Remove the menu entry for Linux systems |
125 if sys.platform.startswith("linux") and os.getuid() == 0: |
125 if sys.platform.startswith("linux"): |
126 if includePythonVariant: |
126 if os.getuid() == 0: |
127 marker = PythonMarkers[sys.version_info.major] |
127 for name in ["/usr/share/pixmaps/eric.png", |
128 else: |
128 "/usr/share/pixmaps/ericWeb.png"]: |
129 marker = "" |
129 if os.path.exists(name): |
130 for name in ["/usr/share/applications/eric6" + marker + ".desktop", |
130 os.remove(name) |
131 "/usr/share/appdata/eric6" + marker + ".appdata.xml", |
131 if includePythonVariant: |
132 "/usr/share/applications/eric6_webbrowser" + marker + |
132 marker = PythonMarkers[sys.version_info.major] |
133 ".desktop", |
133 else: |
134 "/usr/share/applications/eric6_browser" + marker + |
134 marker = "" |
135 ".desktop", |
135 for name in [ |
136 "/usr/share/pixmaps/eric" + marker + ".png", |
136 "/usr/share/applications/eric6" + marker + ".desktop", |
137 "/usr/share/pixmaps/ericWeb" + marker + ".png"]: |
137 "/usr/share/appdata/eric6" + marker + ".appdata.xml", |
138 if os.path.exists(name): |
138 "/usr/share/metainfo/eric6" + marker + ".appdata.xml", |
139 os.remove(name) |
139 "/usr/share/applications/eric6_webbrowser" + marker + |
|
140 ".desktop", |
|
141 "/usr/share/applications/eric6_browser" + marker + |
|
142 ".desktop", |
|
143 "/usr/share/pixmaps/eric" + marker + ".png", |
|
144 "/usr/share/pixmaps/ericWeb" + marker + ".png", |
|
145 ]: |
|
146 if os.path.exists(name): |
|
147 os.remove(name) |
|
148 elif os.getuid() >= 1000: |
|
149 # it is assumed that user ids start at 1000 |
|
150 for name in ["~/.local/share/pixmaps/eric.png", |
|
151 "~/.local/share/pixmaps/ericWeb.png"]: |
|
152 path = os.path.expanduser(name) |
|
153 if os.path.exists(path): |
|
154 os.remove(path) |
|
155 if includePythonVariant: |
|
156 marker = PythonMarkers[sys.version_info.major] |
|
157 else: |
|
158 marker = "" |
|
159 for name in [ |
|
160 "~/.local/share/applications/eric6" + marker + ".desktop", |
|
161 "~/.local/share/appdata/eric6" + marker + ".appdata.xml", |
|
162 "~/.local/share/metainfo/eric6" + marker + ".appdata.xml", |
|
163 "~/.local/share/applications/eric6_webbrowser" + marker + |
|
164 ".desktop", |
|
165 "~/.local/share/applications/eric6_browser" + marker + |
|
166 ".desktop", |
|
167 "~/.local/share/pixmaps/eric" + marker + ".png", |
|
168 "~/.local/share/pixmaps/ericWeb" + marker + ".png", |
|
169 ]: |
|
170 path = os.path.expanduser(name) |
|
171 if os.path.exists(path): |
|
172 os.remove(path) |
140 |
173 |
141 # Remove the wrapper scripts |
174 # Remove the wrapper scripts |
142 rem_wnames = [ |
175 rem_wnames = [ |
143 "eric6_api", "eric6_compare", |
176 "eric6_api", "eric6_compare", |
144 "eric6_configure", "eric6_diff", |
177 "eric6_configure", "eric6_diff", |