-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathuninstall.py
35 lines (28 loc) · 1006 Bytes
/
uninstall.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
import xml.etree.ElementTree as ET
import os
import sys
import shutil
import tools
# remove PiBoy configurator entry in Retropie menu if needed
res = tools.checkPiboyConfiguratorEntryExists()
if (res == False):
print("Retropie Menu entry does not exists")
elif (res == True):
tools.removeRetropieMenuEntry()
elif (res == -1):
print("ERROR : File gamelist does not exists...")
# remove PiBoy-Configurator.sh
if os.path.exists("/home/pi/RetroPie/retropiemenu/PiBoy-Configurator.sh"):
os.remove("/home/pi/RetroPie/retropiemenu/PiBoy-Configurator.sh")
else:
print("File /home/pi/RetroPie/retropiemenu/PiBoy-Configurator.sh does not exists")
# remove autoconfig.py execution in rc.local if needed
tools.removeAutoconfigToRcLocal()
# remove piboy.cfg
if os.path.exists("/home/pi/PiBoy-Configurator/piboy.cfg"):
os.remove("/home/pi/PiBoy-Configurator/piboy.cfg")
else:
print("File /home/pi/PiBoy-Configurator/piboy.cfg does not exists")