forked from dragoonDorise/EmuDeck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installCLI.sh
executable file
·238 lines (200 loc) · 5.97 KB
/
installCLI.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
#!/bin/bash
#
##
## Branch to download
##
#
branch="dev"
echo $branch > "$HOME/.config/EmuDeck/branch.txt"
#VARS
EMUDECKGIT="$HOME/.config/EmuDeck/backend"
emuDecksettingsFile="$HOME/emudeck/settings.sh"
#Functions
function setSetting() {
local var=$1
local new_val=$2
settingExists=$(grep -rw "$emuDecksettingsFile" -e "$var")
if [[ $settingExists == '' ]]; then
#insert setting to end
echo "variable not found in settings. Adding $var=$new_val to $emuDecksettingsFile"
sed -i -e '$a\'"$var=$new_val" "$emuDecksettingsFile"
elif [[ ! $settingExists == '' ]]; then
echo "Old value $settingExists"
if [[ $settingExists == "$var=$new_val" ]]; then
echo "Setting unchanged, skipping"
else
changeLine "$var=" "$var=$new_val" "$emuDecksettingsFile"
fi
fi
#Update values
# shellcheck source=settings.sh
source "$emuDecksettingsFile"
}
setDefaults(){
setSetting expert false
setSetting system SteamOS
setSetting doSetupRA true
setSetting doSetupDolphin true
setSetting doSetupPCSX2QT true
setSetting doSetupRPCS3 true
setSetting doSetupCitra true
setSetting doSetupYuzu true
setSetting doSetupmelonDS true
setSetting doSetupCemu true
setSetting doSetupPrimehack true
setSetting doSetupDuck true
setSetting doSetupRyujinx true
setSetting doSetupXemu true
setSetting doSetupPPSSPP true
setSetting doSetupXenia false
setSetting doSetupMAME true
setSetting doSetupRMG false
setSetting doSetupScummVM true
setSetting doSetupSupermodel true
setSetting doSetupVita3K true
setSetting doSetupBigPEmu true
setSetting doSetupESDE true
setSetting doInstallRA true
setSetting doSetupMGBA true
setSetting doInstallRPCS3 true
setSetting doInstallYuzu true
setSetting doInstallCitra true
setSetting doInstallPCSX2QT true
setSetting doInstallDolphin true
setSetting doInstallRyujinx false
setSetting doInstallmelonDS true
setSetting doInstallRMG true
setSetting doInstallCemu true
setSetting doSetupSRM true
setSetting doInstallPrimeHack true
setSetting doInstallDuck true
setSetting doInstallPPSSPP true
setSetting doInstallXemu true
setSetting doInstallXenia false
setSetting doInstallMAME false
setSetting doInstallScummVM true
setSetting doInstallBigPEmu true
setSetting doInstallSupermodel true
setSetting doInstallGyro false
setSetting doInstallVita3K true
setSetting doInstallSRM true
setSetting doInstallCHD true
setSetting doInstallPowertools false
setSetting doInstallMGBA false
setSetting doInstallHomeBrewGames false
setSetting doInstallESDE true
setSetting doInstallModel2 true
setSetting arSega 43
setSetting arSnes 43
setSetting arDolphin 43
setSetting arClassic3D 43
setSetting RABezels true
setSetting RAautoSave false
setSetting duckWide false
setSetting DolphinWide false
setSetting DreamcastWide false
setSetting BeetleWide false
setSetting pcsx2QTWide false
setSetting emulationPath $HOME/Emulation
setSetting romsPath $HOME/Emulation/roms
setSetting toolsPath $HOME/Emulation/tools
setSetting biosPath $HOME/Emulation/bios
setSetting storagePath $HOME/Emulation/storage
setSetting savesPath $HOME/Emulation/saves
setSetting ESDEscrapData $HOME/Emulation/tools/downloaded_media
setSetting RAHandHeldShader false
setSetting RAHandClassic2D false
setSetting RAHandClassic3D false
setSetting esdeTheme EPICNOIR
setSetting doSelectWideScreen false
setSetting doRASignIn false
setSetting doRAEnable false
setSetting doSelectEmulators false
setSetting doESDEThemePicker false
setSetting doResetEmulators false
setSetting XemuWide false
setSetting achievementsHardcore false
setSetting cloud_sync_provider false
setSetting cloud_sync_status false
setSetting dolphinResolution 720P
setSetting rclone_provider false
setSetting duckstationResolution 720P
setSetting pcsx2Resolution 720P
setSetting yuzuResolution 720P
setSetting ppssppResolution 720P
setSetting rpcs3Resolution 720P
setSetting ryujinxResolution 720P
setSetting xemuResolution 720P
setSetting emuGBA multiemulator
setSetting emuMAME multiemulator
setSetting xeniaResolution 720P
setSetting emuNDS melonds
setSetting emuN64 ra
setSetting emuMULTI ra
setSetting emuPSP ppsspp
setSetting emuPSX duckstation
setSetting emuSCUMMVM scummvm
setSetting emuDreamcast multiemulator
}
#We create all the needed folders for installation
if [[ ! -e $EMUDECKGIT/.git/config ]]; then
mkdir -p "$EMUDECKGIT"
#Cloning EmuDeck files
git clone --depth 1 --no-single-branch https://github.com/dragoonDorise/EmuDeck.git "$EMUDECKGIT"
git checkout $branch
else
cd "$EMUDECKGIT"
git fetch origin && git checkout origin/$branch && git reset --hard origin/$branch && git clean -ffdx
fi
#Default settings per system on Easy mode
setDefaults
#
# UI Start
#
# Welcome, Quick or custom?
source "$EMUDECKGIT"/whiptail/WelcomePage.sh
if [ $expert == 'false' ]; then
cp "$EMUDECKGIT/settings.sh" "$emuDecksettingsFile"
fi
# Location
source "$EMUDECKGIT"/whiptail/RomStoragePage.sh
#
## Custom mode Questions
#
if [ $expert == 'true' ]; then
# Emulators
source $EMUDECKGIT/whiptail/EmulatorSelectorPage.sh
# if [ $second == true ]; then
# # Overwrite configuration?
# source "$EMUDECKGIT"/whiptail/EmulatorConfigurationPage.sh
# fi
# Retroachievements
#source "$EMUDECKGIT"/whiptail/RAAchievementsPage.sh
# Bezels
source "$EMUDECKGIT"/whiptail/RABezelsPage.sh
# if [ $deviceAR != 43 ]; then
# # AR Sega Classic
source "$EMUDECKGIT"/whiptail/AspectRatioSegaPage.sh
#
# # AR SNES + NES
source "$EMUDECKGIT"/whiptail/AspectRatioSNESPage.sh
#
# # AR 3D Classics
# source "$EMUDECKGIT"/whiptail/AspectRatio3DPage.sh
#
# # AR Gamecube
# source "$EMUDECKGIT"/whiptail/AspectRatioDolphinPage.sh
# fi
# LCD Shader Handhelds
#source "$EMUDECKGIT"/whiptail/ShadersHandheldsPage.sh
# CRT Shader Handhelds
#source "$EMUDECKGIT"/whiptail/Shaders2DPage.sh
# Frontend
source "$EMUDECKGIT"/whiptail/PegasusInstallPage.sh
# Pegasus Theme
if [ $doInstallPegasus == true ]; then
source "$EMUDECKGIT"/whiptail/PegasusThemePage.sh
fi
fi
# Installation...
. "$EMUDECKGIT/setup.sh"