mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 06:32:53 +01:00
Merge pull request #463 from aclist/fix/wipe-pyapp
fix: clean up wipe_pyapp() process
This commit is contained in:
2 files changed
+3
-7
No files matched your search
@@ -29,7 +29,7 @@ steam_details = "Shortcut to DZGUI installed within Steam, if applicable. Requir
|
|||||||
path_remove_prefix = "The following path will be removed:"
|
path_remove_prefix = "The following path will be removed:"
|
||||||
not_installed = "It looks like DZGUI was not previously set up; nothing to uninstall."
|
not_installed = "It looks like DZGUI was not previously set up; nothing to uninstall."
|
||||||
standalone_uninstall = (
|
standalone_uninstall = (
|
||||||
"It looks like you are running the standalone version of DZGUI. "
|
"It looks like you are running the standalone version of DZGUI.\n"
|
||||||
"To finalize the uninstall process, you can remove the 'dzgui' file."
|
"To finalize the uninstall process, you can remove the 'dzgui' file."
|
||||||
)
|
)
|
||||||
system_uninstall = (
|
system_uninstall = (
|
||||||
|
|||||||
@@ -149,9 +149,6 @@ class UninstallPage(ScrolledWizardPage):
|
|||||||
self.start_menu_box = CheckboxWithPath(
|
self.start_menu_box = CheckboxWithPath(
|
||||||
uninstall.start_menu_label, uninstall.start_menu_details, shortcut
|
uninstall.start_menu_label, uninstall.start_menu_details, shortcut
|
||||||
)
|
)
|
||||||
self.share_box = CheckboxWithPath(
|
|
||||||
uninstall.desktop_label, uninstall.desktop_details, desktop
|
|
||||||
)
|
|
||||||
self.state_box = CheckboxWithPath(
|
self.state_box = CheckboxWithPath(
|
||||||
uninstall.state_label, uninstall.state_details, state
|
uninstall.state_label, uninstall.state_details, state
|
||||||
)
|
)
|
||||||
@@ -202,14 +199,14 @@ class UninstallPage(ScrolledWizardPage):
|
|||||||
try:
|
try:
|
||||||
shortcuts = Shortcuts(self.steam_path)
|
shortcuts = Shortcuts(self.steam_path)
|
||||||
shortcuts.delete_shortcut(self.share)
|
shortcuts.delete_shortcut(self.share)
|
||||||
|
shutil.rmtree(self.share)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(format_exception(e))
|
print(format_exception(e))
|
||||||
|
|
||||||
def wipe_pyapp(self) -> None:
|
def wipe_pyapp(self) -> None:
|
||||||
if self.pyapp is None:
|
if self.pyapp is None:
|
||||||
return
|
return
|
||||||
res = subprocess.run([self.pyapp, "self", "remove"])
|
subprocess.run([self.pyapp, "self", "remove"])
|
||||||
print(res)
|
|
||||||
|
|
||||||
def uninstall(self) -> None:
|
def uninstall(self) -> None:
|
||||||
for box in self.boxes:
|
for box in self.boxes:
|
||||||
@@ -224,7 +221,6 @@ class UninstallWizard(Gtk.Application):
|
|||||||
def __init__(self, is_deck: bool, paths: dict[str, str]) -> None:
|
def __init__(self, is_deck: bool, paths: dict[str, str]) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
config = Path(paths["XDG_CONFIG_HOME"])
|
config = Path(paths["XDG_CONFIG_HOME"])
|
||||||
# TODO: tests
|
|
||||||
if not config.is_dir() or not config.joinpath("config.json").is_file():
|
if not config.is_dir() or not config.joinpath("config.json").is_file():
|
||||||
print(uninstall.not_installed)
|
print(uninstall.not_installed)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in new issue
Block a user