-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathemu_check.sh
282 lines (260 loc) · 8.16 KB
/
emu_check.sh
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
#!/bin/sh
NONE='\033[00m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
PURPLE='\033[01;35m'
CYAN='\033[01;36m'
WHITE='\033[01;37m'
BOLD='\033[1m'
UNDERLINE='\033[4m'
BLINK='\x1b[5m'
hasRedDream=false
hasYaba=false
hasMupen=false
hasPPSSPP=false
hasDuckstation=false
hasDrastic=false
hasDolphinMMJ=false
hasRetroArch=false
hasCitra=false
hasAether=false
#Handheld model
handheldModel=$(cat ~/dragoonDoriseTools/.device)
#Retroarch?
FOLDER=~/storage/shared/RetroArch
if [ -d "$FOLDER" ]; then
hasRetroArch=true
fi
#Aether?
FOLDER=~/storage/shared/Android/data/xyz.aethersx2.android
if [ -d "$FOLDER" ]; then
hasAether=true
fi
#Citra?
FOLDER=~/storage/shared/citra-emu
if [ -d "$FOLDER" ]; then
hasCitra=true
fi
#RedDream?
FOLDER=~/storage/shared/Android/data/io.recompiled.redream
if [ -d "$FOLDER" ]; then
hasRedDream=true
fi
#YabaSanshioro?
FOLDER=~/storage/shared/Android/data/org.devmiyax.yabasanshioro2.pro
FOLDERPRO=~/storage/shared/Android/data/org.devmiyax.yabasanshioro2
if [ -d "$FOLDER" ]; then
hasYaba=true
fi
if [ -d "$FOLDERPRO" ]; then
hasYaba=true
fi
#Mupen64
FOLDER=~/storage/shared/Android/data/org.mupen64plusae.v3.fzurita
FOLDERPRO=~/storage/shared/Android/data/org.mupen64plusae.v3.fzurita.pro
if [ -d "$FOLDER" ] || [ -d "$FOLDERPRO" ]; then
hasMupen=true
fi
#PPSSPP
FOLDER=~/storage/shared/Android/data/org.ppsspp.ppsspp
FOLDERGOLD=~/storage/shared/Android/data/org.ppsspp.ppssppgold
if [ -d "$FOLDER" ] || [ -d "$FOLDERGOLD" ]; then
hasPPSSPP=true
fi
#duckstation
FOLDER=~/storage/shared/duckstation
if [ -d "$FOLDER" ]; then
hasDuckstation=true
fi
#Drastic
FOLDER=~/storage/shared/DraStic
if [ -d "$FOLDER" ]; then
hasDrastic=true
fi
#DolphinMMJ
FOLDER=~/storage/shared/dolphin-mmjr
if [ -d "$FOLDER" ]; then
hasDolphinMMJ=true
fi
clear
echo "### Checking emulators " &>> ~/storage/shared/pegasus_installer_log.log
echo -e ""
echo -e "Checking for installed emulators..."
echo -e ""
#Common emulators
echo -ne "Retroarch..."
if [ $hasRetroArch == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
echo -ne "PSP - PPSSPP..."
if [ $hasPPSSPP == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
echo -ne "Playstation - Duckstation..."
if [ $hasDuckstation == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
echo -ne "Nintendo DS - Drastic..."
if [ $hasDrastic == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
#Only ODIN & ANDROID
if [[ $handheldModel == "ODIN" ]] || [[ $handheldModel == "ANDROID" ]]; then
echo "### Emus only for ODIN $ Android " &>> ~/storage/shared/pegasus_installer_log.log
echo -ne "PS2 - AetherSX2..."
if [ $hasAether == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
echo -ne "3DS - Citra..."
if [ $hasCitra == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
echo -ne "Nintendo Wii & GameCube - Dolphin MMJR..."
if [ $hasDolphinMMJ == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
echo ""
fi
#Only on Rp2+
if [[ $handheldModel == "RP2+" ]]; then
echo "### RP2+ Only Emus " &>> ~/storage/shared/pegasus_installer_log.log
echo -ne "Nintendo Wii & GameCube - Dolphin MMJR..."
if [ $hasDolphinMMJ == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
echo ""
fi
#Only on RG552 or Android
if [[ $handheldModel == "RG552" ]] || [[ $handheldModel == "ANDROID" ]]; then
echo "### RG552 & Android only Emus " &>> ~/storage/shared/pegasus_installer_log.log
echo -ne "Nintendo 64 - Mupen 64 Plus..."
if [ $hasMupen == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
echo -ne "Dreamcast - RedDream..."
if [ $hasRedDream == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
echo -ne "Saturn - Yaba Sanshiro 2 Pro..."
if [ $hasYaba == true ]; then
echo -e "${GREEN}Installed${NONE}"
else
echo -e "${RED}Not installed${NONE}"
fi
fi
echo -e ""
echo -e "We're going to download all missing emulators."
echo -e "${BOLD}Remember to open every emulator right after installing it and to grant them folder permissions.${NONE}"
echo -e "Come back in here after every installation to continue the installation."
echo -e "Press the ${RED}A button${NONE} to install the missing emulators."
read pause
clear
echo "### Downloading missing emus start " &>> ~/storage/shared/pegasus_installer_log.log
#We prevent to download some emulators
if [[ $handheldModel == "ODIN" ]]; then
hasRedDream=true
hasYaba=true
fi
if [[ $handheldModel == "RP2+" ]]; then
hasCitra=true
fi
if [[ $handheldModel == "RG552" ]]; then
hasCitra=true
hasAether=true
fi
if [ $hasRetroArch == false ]; then
echo -e "Multisystem - RetroArch..."
echo ""
wget -q --show-progress https://buildbot.libretro.com/stable/1.10.3/android/RetroArch.apk -P ~/dragoonDoriseTools/
echo ""
echo -e "We need to install RetroArch before we can continue..."
echo -e "When RetroArch is installed click ${BOLD}OPEN${NONE} in the installation window so RetroArch is opened."
echo -e "Wait for Retroarch files to be downloaded, then quit Retroarch and come back here."
echo -e "Press the ${RED}A button${NONE} to install RetroArch now"
read pause
xdg-open ~/dragoonDoriseTools/RetroArch.apk
echo -e "Press the ${RED}A button${NONE} to install the next emulator"
read pause
fi
if [ $hasRedDream == false ]; then
echo -e "Dreamcast - Redream..."
termux-open "https://play.google.com/store/apps/details?id=io.recompiled.redream"
echo -e "Press the ${RED}A button${NONE} to install the next emulator"
fi
if [ $hasDolphinMMJ == false ]; then
echo -e "Nintendo Wii & GameCube - Dolphin MMJR..."
wget -q --show-progress https://github.com/Bankaimaster999/Dolphin-MMJR/releases/download/1.0-11505/app-release.apk -P ~/dragoonDoriseTools/
echo -e "Press the ${RED}A button${NONE} to install Dolphin"
read pause
xdg-open ~/dragoonDoriseTools/app-release.apk
echo -e "Press the ${RED}A button${NONE} to install the next emulator"
read pause
fi
if [ $hasYaba == false ]; then
echo -e "Saturn - Yaba Sanshiro 2 Pro..."
termux-open "https://play.google.com/store/apps/details?id=org.devmiyax.yabasanshioro2.pro"
echo -e "Press the ${RED}A button${NONE} to install the next emulator"
read pause
fi
if [ $hasMupen == false ]; then
echo -e "Nintendo 64 - Mupen 64 Plus..."
termux-open "https://play.google.com/store/apps/details?id=org.mupen64plusae.v3.fzurita"
echo -e "Press the ${RED}A button${NONE} to install the next emulator"
read pause
fi
if [ $hasPPSSPP == false ]; then
echo -e "PSP - PPSSPP..."
termux-open "https://play.google.com/store/apps/details?id=org.ppsspp.ppsspp"
echo -e "Press the ${RED}A button${NONE} to install the next emulator"
read pause
fi
if [ $hasDuckstation == false ]; then
echo -e "Playstation - Duckstation..."
termux-open "https://play.google.com/store/apps/details?id=com.github.stenzek.duckstation"
echo -e "Press the ${RED}A button${NONE} to install the next emulator"
read pause
fi
if [ $hasAether == false ]; then
echo -e "Playstation2 - AetherSX2..."
termux-open "https://play.google.com/store/apps/details?id=xyz.aethersx2.android"
echo -e "Press the ${RED}A button${NONE} to install the next emulator"
read pause
fi
if [ $hasDrastic == false ]; then
echo -e "Nintendo DS - Drastic..."
termux-open "https://play.google.com/store/apps/details?id=com.dsemu.drastic"
echo -e "Press the ${RED}A button${NONE} to install the next emulator"
read pause
fi
if [ $hasCitra == false ]; then
echo -e "Nintendo 3DS - Citra MMJ..."
wget -q --show-progress https://github.com/weihuoya/citra/releases/download/20220902/Citra_MMJ_20220902.apk -P ~/dragoonDoriseTools/
echo -e "Press the ${RED}A button${NONE} to install Citra MMJ"
read pause
xdg-open ~/dragoonDoriseTools/Citra_MMJ_20220902.apk
fi
echo "### Downloading missing emulator finish " &>> ~/storage/shared/pegasus_installer_log.log
echo -e "Emulators installed."
echo -e "Press the ${RED}A button${NONE} to continue"
read pause