forked from moraroy/NonSteamLaunchers-On-Steam-Deck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NonSteamLaunchers.sh
executable file
·2791 lines (2282 loc) · 124 KB
/
NonSteamLaunchers.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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env bash
set -x # activate debugging (execution shown)
set -o pipefail # capture error from pipes
# set -eu # exit immediately, undefined vars are errors
# ENVIRONMENT VARIABLES
# $USER
[[ -n $(logname >/dev/null 2>&1) ]] && logged_in_user=$(logname) || logged_in_user=$(whoami)
#DBUS
# Add the DBUS_SESSION_BUS_ADDRESS environment variable
dbus_address=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ | cut -d= -f2-)
export DBUS_SESSION_BUS_ADDRESS=$dbus_address
# $UID
# logged_in_uid=$(id -u "${logged_in_user}")
# $HOME
logged_in_home=$(eval echo "~${logged_in_user}")
# TODO: `/tmp` or `mktemp -d` might be a better option (see: EOF)
# $PWD (working directory)
download_dir="${logged_in_home}/Downloads/NonSteamLaunchersInstallation"
# Create a log file in the same directory as the desktop file/.sh file
exec >> "${logged_in_home}/Downloads/NonSteamLaunchers-install.log" 2>&1
# Version number (major.minor)
version=v3.8.1
# TODO: tighten logic to check whether major/minor version is up-to-date via `-eq`, `-lt`, or `-gt` operators
# Check repo releases via GitHub API then display current stable version
check_for_updates() {
# Set the URL to the GitHub API for the repository
local api_url="https://api.github.com/repos/moraroy/NonSteamLaunchers-On-Steam-Deck/releases/latest"
# Get the latest release tag from the GitHub API
local latest_version=$(curl -s "$api_url" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
# Compare the version number in the script against the latest release tag
if [ "$version" != "$latest_version" ]; then
# Display a Zenity window to notify the user that a new version is available
zenity --info --text="A new version is available: $latest_version\nPlease download it from GitHub." --width=200 --height=100
else
echo "You are already running the latest version: $version"
fi
}
# Get the command line arguments
args=("$@")
#Download Modules
# Define the repository and the folders to clone
repo_url='https://github.com/lukespragg/NonSteamLaunchers-On-Steam-Deck/archive/refs/heads/main.zip'
folders_to_clone=('requests' 'urllib3' 'steamgrid' 'vdf')
# Define the parent folder
logged_in_home=$(eval echo ~$user)
parent_folder="${logged_in_home}/.config/systemd/user/Modules"
mkdir -p "${parent_folder}"
# Check if the folders already exist
folders_exist=true
for folder in "${folders_to_clone[@]}"; do
if [ ! -d "${parent_folder}/${folder}" ]; then
folders_exist=false
break
fi
done
if [ "${folders_exist}" = false ]; then
# Download the repository as a zip file
zip_file_path="${parent_folder}/repo.zip"
wget -O "${zip_file_path}" "${repo_url}"
# Extract the zip file
unzip -d "${parent_folder}" "${zip_file_path}"
# Move the folders to the parent directory and delete the unnecessary files
for folder in "${folders_to_clone[@]}"; do
destination_path="${parent_folder}/${folder}"
source_path="${parent_folder}/NonSteamLaunchers-On-Steam-Deck-main/Modules/${folder}"
if [ ! -d "${destination_path}" ]; then
mv "${source_path}" "${destination_path}"
fi
done
# Delete the downloaded zip file and the extracted repository folder
rm "${zip_file_path}"
rm -r "${parent_folder}/NonSteamLaunchers-On-Steam-Deck-main"
fi
#End of Download Modules
#Service File rough update
rm -rf ${logged_in_home}/.config/systemd/user/NSLGameScanner.py
# Delete the service file
rm -rf ${logged_in_home}/.config/systemd/user/nslgamescanner.service
# Remove the symlink
unlink ${logged_in_home}/.config/systemd/user/default.target.wants/nslgamescanner.service
# Reload the systemd user instance
systemctl --user daemon-reload
# Define your Python script path
python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py"
# Define your GitHub link
github_link="https://raw.githubusercontent.com/lukespragg/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py"
curl -o $python_script_path $github_link
chmod +x $python_script_path
# Define the path to the env_vars file
env_vars="${logged_in_home}/.config/systemd/user/env_vars"
#End of Rough Update of the .py
if [ -f "$env_vars" ]; then
echo "env_vars file found. Running the .py file."
live="and is LIVE."
else
echo "env_vars file not found. Not Running the .py file."
live="and is not LIVE."
fi
# Check if "Decky Plugin" is one of the arguments
decky_plugin=false
for arg in "${args[@]}"; do
if [ "$arg" = "Decky Plugin" ]; then
decky_plugin=true
break
fi
done
# If the Decky Plugin argument is set, check if the env_vars file exists
if [ "$decky_plugin" = true ]; then
if [ -f "$env_vars" ]; then
# If the env_vars file exists, run the .py file and continue with the script
echo "Decky Plugin argument set and env_vars file found. Running the .py file..."
python3 $python_script_path
echo "Python script ran. Continuing with the script..."
else
# If the env_vars file does not exist, exit the script
echo "Decky Plugin argument set but env_vars file not found. Exiting the script."
exit 0
fi
else
# If the Decky Plugin argument is not set, continue with the script
echo "Decky Plugin argument not set. Continuing with the script..."
python3 $python_script_path
echo "env_vars file found. Running the .py file."
live="and is LIVE."
fi
# Check if any command line arguments were provided
if [ ${#args[@]} -eq 0 ]; then
# No command line arguments were provided, so check for updates and display the zenity window if necessary
check_for_updates
fi
# Check if the NonSteamLaunchersInstallation subfolder exists in the Downloads folder
if [ -d "$download_dir" ]; then
# Delete the NonSteamLaunchersInstallation subfolder
rm -rf "$download_dir"
echo "Deleted NonSteamLaunchersInstallation subfolder"
else
echo "NonSteamLaunchersInstallation subfolder does not exist"
fi
# Game Launchers
# TODO: parameterize hard-coded client versions (cf. 'app-25.6.2')
# Set the paths to the launcher executables
epic_games_launcher_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe"
epic_games_launcher_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/EpicGamesLauncher/pfx/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe"
gog_galaxy_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/GOG Galaxy/GalaxyClient.exe"
gog_galaxy_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher/pfx/drive_c/Program Files (x86)/GOG Galaxy/GalaxyClient.exe"
uplay_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/upc.exe"
uplay_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/UplayLauncher/pfx/drive_c/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/upc.exe"
battlenet_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Battle.net/Battle.net Launcher.exe"
battlenet_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/Battle.netLauncher/pfx/drive_c/Program Files (x86)/Battle.net/Battle.net Launcher.exe"
eaapp_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Electronic Arts/EA Desktop/EA Desktop/EADesktop.exe"
eaapp_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/TheEAappLauncher/pfx/drive_c/Program Files/Electronic Arts/EA Desktop/EA Desktop/EADesktop.exe"
amazongames_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/Amazon Games/App/Amazon Games.exe"
amazongames_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher/pfx/drive_c/users/steamuser/AppData/Local/Amazon Games/App/Amazon Games.exe"
itchio_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/itch/app-25.6.2/itch.exe"
itchio_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/itchioLauncher/pfx/drive_c/users/steamuser/AppData/Local/itch/app-25.6.2/itch.exe"
legacygames_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Legacy Games/Legacy Games Launcher/Legacy Games Launcher.exe"
legacygames_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher/pfx/drive_c/Program Files/Legacy Games/Legacy Games Launcher/Legacy Games Launcher.exe"
humblegames_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Humble App/Humble App.exe"
humblegames_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher/pfx/drive_c/Program Files/Humble App/Humble App.exe"
indiegala_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/IGClient/IGClient.exe"
indiegala_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/IndieGalaLauncher/pfx/drive_c/Program Files/IGClient/IGClient.exe"
rockstar_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Rockstar Games/Launcher/Launcher.exe"
rockstar_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher/pfx/drive_c/Program Files/Rockstar Games/Launcher/Launcher.exe"
glyph_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Glyph/GlyphClient.exe"
glyph_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/GlyphLauncher/pfx/drive_c/Program Files (x86)/Glyph/GlyphClient.exe"
minecraft_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Minecraft Launcher/MinecraftLauncher.exe"
minecraft_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/MinecraftLauncher/pfx/drive_c/Program Files (x86)/Minecraft Launcher/MinecraftLauncher.exe"
psplus_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/PlayStationPlus/pspluslauncher.exe"
psplus_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/PlaystationPlusLauncher/pfx/drive_c/Program Files (x86)/PlayStationPlus/pspluslauncher.exe"
vkplay_path1="${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/GameCenter/GameCenter.exe"
vkplay_path2="${logged_in_home}/.local/share/Steam/steamapps/compatdata/VKPlayLauncher/pfx/drive_c/users/steamuser/AppData/Local/GameCenter/GameCenter.exe"
# Chrome File Path
# chrome_installpath="/app/bin/chrome"
chrome_path="/usr/bin/flatpak"
chrome_startdir="\"/usr/bin\""
chromedirectory="\"$chrome_path\""
# Check if Epic Games Launcher is installed
function CheckInstallations {
if [[ -f "$epic_games_launcher_path1" ]]; then
# Epic Games Launcher is installed in path 1
epic_games_value="FALSE"
epic_games_text="Epic Games ===> $epic_games_launcher_path1"
elif [[ -f "$epic_games_launcher_path2" ]]; then
# Epic Games Launcher is installed in path 2
epic_games_value="FALSE"
epic_games_text="Epic Games ===> $epic_games_launcher_path2"
else
# Epic Games Launcher is not installed
epic_games_value="FALSE"
epic_games_text="Epic Games"
fi
# Check if GOG Galaxy is installed
if [[ -f "$gog_galaxy_path1" ]]; then
# GOG Galaxy is installed in path 1
gog_galaxy_value="FALSE"
gog_galaxy_text="GOG Galaxy ===> $gog_galaxy_path1"
elif [[ -f "$gog_galaxy_path2" ]]; then
# GOG Galaxy is installed in path 2
gog_galaxy_value="FALSE"
gog_galaxy_text="GOG Galaxy ===> $gog_galaxy_path2"
else
# GOG Galaxy is not installed
gog_galaxy_value="FALSE"
gog_galaxy_text="GOG Galaxy"
fi
# Check if Uplay is installed
if [[ -f "$uplay_path1" ]]; then
# Uplay is installed in path 1
uplay_value="FALSE"
uplay_text="Ubisoft Connect ===> $uplay_path1"
elif [[ -f "$uplay_path2" ]]; then
# Uplay is installed in path 2
uplay_value="FALSE"
uplay_text="Ubisoft Connect ===> $uplay_path2"
else
# Uplay is not installed
uplay_value="FALSE"
uplay_text="Ubisoft Connect"
fi
# Check if Battle.net is installed
if [[ -f "$battlenet_path1" ]]; then
# Battle.net is installed in path 1
battlenet_value="FALSE"
battlenet_text="Battle.net ===> $battlenet_path1"
elif [[ -f "$battlenet_path2" ]]; then
# Battle.net is installed in path 2
battlenet_value="FALSE"
battlenet_text="Battle.net ===> $battlenet_path2"
else
# Battle.net is not installed
battlenet_value="FALSE"
battlenet_text="Battle.net"
fi
# Check if EA App is installed
if [[ -f "$eaapp_path1" ]]; then
# EA App is installed in path 1
eaapp_value="FALSE"
eaapp_text="EA App ===> $eaapp_path1"
elif [[ -f "$eaapp_path2" ]]; then
# EA App is installed in path 2
eaapp_value="FALSE"
eaapp_text="EA App ===> $eaapp_path2"
else
# EA App is not installed
eaapp_value="FALSE"
eaapp_text="EA App"
fi
# Check if Amazon Games is installed
if [[ -f "$amazongames_path1" ]]; then
# Amazon Games is installed in path 1
amazongames_value="FALSE"
amazongames_text="Amazon Games ===> $amazongames_path1"
elif [[ -f "$amazongames_path2" ]]; then
# Amazon Games is installed in path 2
amazongames_value="FALSE"
amazongames_text="Amazon Games ===> $amazongames_path2"
else
# Amazon Games is not installed
amazongames_value="FALSE"
amazongames_text="Amazon Games"
fi
# Check if itch.io is installed
if [[ -f "$itchio_path1" ]]; then
# itch.io is installed in path 1
itchio_value="FALSE"
itchio_text="itch.io ===> $itchio_path1"
elif [[ -f "$itchio_path2" ]]; then
# itch.io is installed in path 2
itchio_value="FALSE"
itchio_text="itch.io ===> $itchio_path2"
else
# itch.io is not installed
itchio_value="FALSE"
itchio_text="itch.io"
fi
# Check if Legacy Games Launcher is installed
if [[ -f "$legacygames_path1" ]]; then
# Legacy Games is installed in path 1
legacygames_value="FALSE"
legacygames_text="Legacy Games ===> $legacygames_path1"
elif [[ -f "$legacygames_path2" ]]; then
# Legacy Games is installed in path 2
legacygames_value="FALSE"
legacygames_text="Legacy Games ===> $legacygames_path2"
else
# Legacy Games is not installed
legacygames_value="FALSE"
legacygames_text="Legacy Games - Broken, Use at own risk"
fi
# Check if Humble Games Launcher is installed
if [[ -f "$humblegames_path1" ]]; then
# Humble Games is installed in path 1 on local drive
humblegames_value="FALSE"
humblegames_text="Humble Games Collection ===> $humblegames_path1"
elif [[ -f "$humblegames_path2" ]]; then
# Humble Games is installed in path 2 on local drive
humblegames_value="FALSE"
humblegames_text="Humble Games Collection ===> $humblegames_path2"
else
# Humble Games is not installed
humblegames_value="FALSE"
humblegames_text="Humble Games Collection - Use Desktop Mode to sign in, then launch Game Mode"
fi
# Check if indiegala is installed
if [[ -f "$indiegala_path1" ]]; then
# indiegala is installed in path 1 on local drive
indiegala_value="FALSE"
indiegala_text="IndieGala ===> $indiegala_path1"
elif [[ -f "$indiegala_path2" ]]; then
# indiegala is installed in path 2 on local drive
indiegala_value="FALSE"
indiegala_text="IndieGala ===> $indiegala_path2"
else
# indiegala is not installed
indiegala_value="FALSE"
indiegala_text="IndieGala"
fi
# Check if Rockstar is installed
if [[ -f "$rockstar_path1" ]]; then
# Rockstar is installed in path 1 on local drive
rockstar_value="FALSE"
rockstar_text="Rockstar Games Launcher ===> $rockstar_path1"
elif [[ -f "$rockstar_path2" ]]; then
# Rockstar is installed in path 2 on local drive
rockstar_value="FALSE"
rockstar_text="Rockstar Games Launcher ===> $rockstar_path2"
else
# Rockstar is not installed
rockstar_value="FALSE"
rockstar_text="Rockstar Games Launcher"
fi
# Check if Glyph is installed
if [[ -f "$glyph_path1" ]]; then
# Glyph is installed in path 1 on local drive
glyph_value="FALSE"
glyph_text="Glyph Launcher ===> $glyph_path1"
elif [[ -f "$glyph_path2" ]]; then
# Glyph is installed in path 2 on local drive
glyph_value="FALSE"
glyph_text="Glyph Launcher ===> $glyph_path2"
else
# Glyph is not installed
glyph_value="FALSE"
glyph_text="Glyph Launcher"
fi
# Check if Minecraft is installed
if [[ -f "$minecraft_path1" ]]; then
# Minecraft is installed in path 1 on local drive
minecraft_value="FALSE"
minecraft_text="Minecraft ===> $minecraft_path1"
elif [[ -f "$minecraft_path2" ]]; then
# Minecraft is installed in path 2 on local drive
minecraft_value="FALSE"
minecraft_text="Minecraft ===> $minecraft_path2"
else
# Minecraft is not installed
minecraft_value="FALSE"
minecraft_text="Minecraft - Close black screen to continue installation"
fi
# Check if PlaystationPlus is installed
if [[ -f "$psplus_path1" ]]; then
# PlaystationPlus is installed in path 1 on local drive
psplus_value="FALSE"
psplus_text="Playstation Plus ===> $psplus_path1"
elif [[ -f "$psplus_path2" ]]; then
# PlaystationPlus is installed in path 2 on local drive
psplus_value="FALSE"
psplus_text="Playstation Plus ===> $psplus_path2"
else
# PlaystationPlus is not installed
psplus_value="FALSE"
psplus_text="Playstation Plus"
fi
# Check if VK Play is installed
if [[ -f "$vkplay_path1" ]]; then
# VK Play is installed in path 1 on local drive
vkplay_value="FALSE"
vkplay_text="VK Play ===> $vkplay_path1"
elif [[ -f "$vkplay_path2" ]]; then
# VK Play is installed in path 2 on local drive
vkplay_value="FALSE"
vkplay_text="VK Play ===> $vkplay_path2"
else
# VK Play is not installed
vkplay_value="FALSE"
vkplay_text="VK Play"
fi }
# Verify launchers are installed
function CheckInstallationDirectory {
# Check if NonSteamLaunchers is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers" ]]; then
# NonSteamLaunchers is installed
nonsteamlauncher_move_value="TRUE"
else
# NonSteamLaunchers is not installed
nonsteamlauncher_move_value="FALSE"
fi
# Check if EpicGamesLauncher is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/EpicGamesLauncher" ]]; then
# EpicGamesLauncher is installed
epicgameslauncher_move_value="TRUE"
else
# EpicGamesLauncher is not installed
epicgameslauncher_move_value="FALSE"
fi
# Check if GogGalaxyLauncher is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher" ]]; then
# GogGalaxyLauncher is installed
goggalaxylauncher_move_value="TRUE"
else
# GogGalaxyLauncher is not installed
goggalaxylauncher_move_value="FALSE"
fi
# Check if UplayLauncher is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/UplayLauncher" ]]; then
# UplayLauncher is installed
uplaylauncher_move_value="TRUE"
else
# UplayLauncher is not installed
uplaylauncher_move_value="FALSE"
fi
# Check if Battle.netLauncher is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/Battle.netLauncher" ]]; then
# Battle.netLauncher is installed
battlenetlauncher_move_value="TRUE"
else
# Battle.netLauncher is not installed
battlenetlauncher_move_value="FALSE"
fi
# Check if TheEAappLauncher is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/TheEAappLauncher" ]]; then
# TheEAappLauncher is installed
eaapplauncher_move_value="TRUE"
else
# TheEAappLauncher is not installed
eaapplauncher_move_value="FALSE"
fi
# Check if AmazonGamesLauncher is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher" ]]; then
# AmazonGamesLauncher is installed
amazongameslauncher_move_value="TRUE"
else
# AmazonGamesLauncher is not installed
amazongameslauncher_move_value="FALSE"
fi
# Check if itchioLauncher is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/itchioLauncher" ]]; then
# itchioLauncher is installed
itchiolauncher_move_value="TRUE"
else
# itchioLauncher is not installed
itchiolauncher_move_value="FALSE"
fi
# Check if LegacyGamesLauncher is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher" ]]; then
# LegacyGamesLauncher is installed
legacygameslauncher_move_value="TRUE"
else
# LegacyGamesLauncher is not installed
legacygameslauncher_move_value="FALSE"
fi
# Check if HumbleGamesLauncher is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher" ]]; then
# HumbleGamesLauncher is installed
humblegameslauncher_move_value="TRUE"
else
# HumbleGamesLauncher is not installed
humblegameslauncher_move_value="FALSE"
fi
# Check if indiegala is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/IndieGalaLauncher" ]]; then
# indiegalaLauncher is installed
indiegalalauncher_move_value="TRUE"
else
# indiegalaLauncher is not installed
indiegalalauncher_move_value="FALSE"
fi
# Check if rockstar is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher" ]]; then
# rockstar games launcher is installed
rockstargameslauncher_move_value="TRUE"
else
# rockstar games launcher is not installed
rockstargameslauncher_move_value="FALSE"
fi
# Check if Glyph is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/GlyphLauncher" ]]; then
# Glyph is installed
glyphlauncher_move_value="TRUE"
else
# Glyph is not installed
glyphlauncher_move_value="FALSE"
fi
# Check if Minecraft is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/MinecraftLauncher" ]]; then
# Minecraft is installed
minecraftlauncher_move_value="TRUE"
else
# Minecraft is not installed
minecraftlauncher_move_value="FALSE"
fi
# TODO: `pspluslauncher_move_value` is unused (SC2034)
# Check if PlaystationPlus is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/PlaystationPlusLauncher" ]]; then
# PlaystationPlus is installed
pspluslauncher_move_value="TRUE"
else
# PlaystationPlus is not installed
pspluslauncher_move_value="FALSE"
fi
# Check if VK Play is installed
if [[ -d "${logged_in_home}/.local/share/Steam/steamapps/compatdata/VKPlayLauncher" ]]; then
# VK Play is installed
vkplaylauncher_move_value="TRUE"
else
# VK Play is not installed
vkplay_move_value="FALSE"
fi }
#Get SD Card Path
get_sd_path() {
# This assumes that the SD card is mounted under /run/media/deck/
local sd_path=$(df | grep '/run/media/deck/' | awk '{print $6}')
echo $sd_path
}
# Check which app IDs are installed
CheckInstallations
CheckInstallationDirectory
# Get the command line arguments
args=("$@")
# Initialize an array to store the custom websites
custom_websites=()
# Initialize a variable to store whether the "Separate App IDs" option is selected or not
separate_app_ids=false
# Check if any command line arguments were provided
if [ ${#args[@]} -eq 0 ]; then
# No command line arguments were provided, so display the main zenity window
selected_launchers=$(zenity --list --text="Which launchers do you want to download and install?" --checklist --column="$version" --column="Default = one App ID Installation, One Prefix, NonSteamLaunchers - updated the NSLGameScanner.py $live" FALSE "SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX" $epic_games_value "$epic_games_text" $gog_galaxy_value "$gog_galaxy_text" $uplay_value "$uplay_text" $battlenet_value "$battlenet_text" $amazongames_value "$amazongames_text" $eaapp_value "$eaapp_text" $legacygames_value "$legacygames_text" $itchio_value "$itchio_text" $humblegames_value "$humblegames_text" $indiegala_value "$indiegala_text" $rockstar_value "$rockstar_text" $glyph_value "$glyph_text" $minecraft_value "$minecraft_text" $psplus_value "$psplus_text" $vkplay_value "$vkplay_text" FALSE "Xbox Game Pass" FALSE "GeForce Now" FALSE "Amazon Luna" FALSE "Netflix" FALSE "Hulu" FALSE "Disney+" FALSE "Amazon Prime Video" FALSE "movie-web" FALSE "Youtube" FALSE "Twitch" --width=800 --height=740 --extra-button="Uninstall" --extra-button="Stop NSLGameScanner" --extra-button="Start Fresh" --extra-button="Move to SD Card")
# Check if the user clicked the 'Cancel' button or selected one of the extra buttons
if [ $? -eq 1 ] || [[ $selected_launchers == "Start Fresh" ]] || [[ $selected_launchers == "Move to SD Card" ]] || [[ $selected_launchers == "Uninstall" ]]; then
# The user clicked the 'Cancel' button or selected one of the extra buttons, so skip prompting for custom websites
custom_websites=()
else
# The user did not click the 'Cancel' button or select one of the extra buttons, so prompt for custom websites
custom_websites_str=$(zenity --entry --title="Shortcut Creator" --text="Enter custom websites that you want shortcuts for, separated by commas. Leave blank and press ok if you dont want any. E.g. myspace.com, limewire.com, my.screenname.aol.com")
# Split the custom_websites_str variable into an array using ',' as the delimiter
IFS=',' read -ra custom_websites <<< "$custom_websites_str"
fi
else
# Command line arguments were provided, so set the value of the options variable using the command line arguments
# Initialize an array to store the selected launchers
selected_launchers=()
for arg in "${args[@]}"; do
if [[ "$arg" =~ ^https?:// ]]; then
# Check if the arg is not an empty string before adding it to the custom_websites array
if [ -n "$arg" ]; then
custom_websites+=("$arg")
fi
else
selected_launchers+=("$arg")
fi
done
# TODO: error handling for unbound variable $selected_launchers_str on line 564
# Convert the selected_launchers array to a string by joining its elements with a `|` delimiter.
selected_launchers_str=$(IFS="|"; echo "${selected_launchers[*]}")
# TODO: SC2199
# Check if the `SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX` option was included in the `selected_launchers` variable. If this option was included, set the value of the `separate_app_ids` variable to `true`, indicating that separate app IDs should be used. Otherwise, set it to `false`.
if [[ "${selected_launchers[@]}" =~ "SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX" ]]; then
separate_app_ids=true
else
separate_app_ids=false
fi
fi
# TODO: SC2145
# Print the selected launchers and custom websites
echo "Selected launchers: $selected_launchers"
echo "Selected launchers: $selected_launchers_str"
echo "Custom websites: ${custom_websites[@]}"
echo "Separate App IDs: $separate_app_ids"
# Set the value of the options variable
if [ ${#args[@]} -eq 0 ]; then
# No command line arguments were provided, so set the value of the options variable using the selected_launchers variable
options="$selected_launchers"
else
# Command line arguments were provided, so set the value of the options variable using the selected_launchers_str variable
options="$selected_launchers_str"
fi
# Check if the cancel button was clicked
if [ $? -eq 1 ] && [[ $options != "Start Fresh" ]] && [[ $options != "Move to SD Card" ]] && [[ $options != "Uninstall" ]]; then
# The cancel button was clicked
echo "The cancel button was clicked"
exit 1
fi
# Check if no options were selected and no custom website was provided
if [ -z "$options" ] && [ -z "$custom_websites" ]; then
# No options were selected and no custom website was provided
zenity --error --text="No options were selected and no custom website was provided. The script will now exit." --width=200 --height=150
exit 1
fi
# Check if the user selected to use separate app IDs
if [[ $options == *"SEPARATE APP IDS - CHECK THIS TO SEPARATE YOUR PREFIX"* ]]; then
# User selected to use separate app IDs
use_separate_appids=true
else
# User did not select to use separate app IDs
use_separate_appids=false
fi
# Define the StartFreshFunction
function StartFreshFunction {
# Define the path to the compatdata directory
compatdata_dir="${logged_in_home}/.local/share/Steam/steamapps/compatdata"
# Define the path to the other directory
other_dir="${logged_in_home}/.local/share/Steam/steamapps/shadercache/"
# Define an array of original folder names
folder_names=("EpicGamesLauncher" "GogGalaxyLauncher" "UplayLauncher" "Battle.netLauncher" "TheEAappLauncher" "AmazonGamesLauncher" "itchioLauncher" "LegacyGamesLauncher" "HumbleGamesLauncher" "IndieGalaLauncher" "RockstarGamesLauncher" "GlyphLauncher" "MinecraftLauncher" "PlaystationPlusLauncher" "VKPlayLauncher")
# Define an array of app IDs
app_ids=("3772819390" "4294900670" "4063097571" "3786021133" "3448088735" "3923904787" "3440562512" "2948446662" "3303169468" "3595505624" "4272271078" "3259996605" "2588786779" "4090616647" "3494943831" "2390200925" "4253976432" "2221882453" "2296676888" "2486751858" "3974004104" "3811372789" "3788101956" "3782277090" "3640061468" "3216372511" "2882622939" "2800812206" "2580882702")
# Iterate over each folder name in the folder_names array
for folder in "${folder_names[@]}"; do
# Check if the folder exists
if [ -e "${compatdata_dir}/${folder}" ]; then
# Check if the folder is a symbolic link
if [ -L "${compatdata_dir}/${folder}" ]; then
# Get the path of the target of the symbolic link
target_path=$(readlink -f "${compatdata_dir}/${folder}")
# Delete the target of the symbolic link
rm -rf "$target_path"
# Delete the symbolic link
unlink "${compatdata_dir}/${folder}"
else
# Delete the folder
# shellcheck disable=SC2115
rm -rf "${compatdata_dir}/${folder}"
fi
fi
done
# Iterate over each app ID in the app_ids array
for app_id in "${app_ids[@]}"; do
# Check if the folder exists
if [ -e "${other_dir}/${app_id}" ]; then
# Check if the folder is a symbolic link
if [ -L "${other_dir}/${app_id}" ]; then
# Get the path of the target of the symbolic link
target_path=$(readlink -f "${other_dir}/${app_id}")
# Delete the target of the symbolic link
rm -rf "$target_path"
# Delete the symbolic link
unlink "${other_dir}/${app_id}"
else
# Delete the folder
# shellcheck disable=SC2115
rm -rf "${other_dir}/${app_id}"
fi
fi
done
# Check if the NonSteamLaunchers folder exists
if [ -e "$compatdata_dir/NonSteamLaunchers" ]; then
# Check if the NonSteamLaunchers folder is a symbolic link
if [ -L "$compatdata_dir/NonSteamLaunchers" ]; then
# Get the path of the target of the symbolic link
target_path=$(readlink -f "$compatdata_dir/NonSteamLaunchers")
# Delete the target of the symbolic link
rm -rf "$target_path"
# Delete the symbolic link
unlink "$compatdata_dir/NonSteamLaunchers"
else
# Delete the NonSteamLaunchers folder
rm -rf "$compatdata_dir/NonSteamLaunchers"
fi
fi
# Iterate over each folder in the compatdata directory
for folder_path in "$compatdata_dir"/*; do
# Check if the current item is a folder
if [ -d "$folder_path" ]; then
# Check if the folder is empty
if [ -z "$(ls -A "$folder_path")" ]; then
# Delete the empty folder
rmdir "$folder_path"
echo "Deleted empty folder: $(basename "$folder_path")"
fi
fi
done
# TODO: declare array and use find/for loop to avoid duplicate `rm` processes
rm -rf "/run/media/mmcblk0p1/NonSteamLaunchers/"
rm -rf "/run/media/mmcblk0p1/EpicGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/GogGalaxyLauncher/"
rm -rf "/run/media/mmcblk0p1/UplayLauncher/"
rm -rf "/run/media/mmcblk0p1/Battle.netLauncher/"
rm -rf "/run/media/mmcblk0p1/TheEAappLauncher/"
rm -rf "/run/media/mmcblk0p1/AmazonGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/LegacyGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/itchioLauncher/"
rm -rf "/run/media/mmcblk0p1/HumbleGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/IndieGalaLauncher/"
rm -rf "/run/media/mmcblk0p1/RockstarGamesLauncher/"
rm -rf "/run/media/mmcblk0p1/GlyphLauncher/"
rm -rf "/run/media/mmcblk0p1/MinecraftLauncher/"
rm -rf "/run/media/mmcblk0p1/PlaystationPlusLauncher/"
rm -rf "/run/media/mmcblk0p1/VKPlayLauncher/"
rm -rf ${logged_in_home}/Downloads/NonSteamLaunchersInstallation
rm -rf ${logged_in_home}/.config/systemd/user/Modules
rm -rf ${logged_in_home}/.config/systemd/user/env_vars
rm -rf ${logged_in_home}/.config/systemd/user/NSLGameScanner.py
# Delete the service file
rm -rf ${logged_in_home}/.config/systemd/user/nslgamescanner.service
# Remove the symlink
unlink ${logged_in_home}/.config/systemd/user/default.target.wants/nslgamescanner.service
# Reload the systemd user instance
systemctl --user daemon-reload
# Exit the script with exit code 0 to indicate success
exit 0
}
# Check if the Start Fresh button was clicked or if the Start Fresh option was passed as a command line argument
if [[ $options == "Start Fresh" ]] || [[ $selected_launchers == "Start Fresh" ]]; then
# The Start Fresh button was clicked or the Start Fresh option was passed as a command line argument
if [ ${#args[@]} -eq 0 ]; then
# No command line arguments were provided, so display the zenity window
if zenity --question --text="aaahhh it always feels good to start fresh :) but...This will delete the App ID folders you installed inside the steamapps/compatdata/ directory as well as the Shader Cache associated with them in the steamapps/shadercache directory. The nslgamescanner.service will also be terminated at /.config/systemd/user/ This means anything youve installed (launchers or games) WITHIN THIS SCRIPT will be deleted if you have them there. Everything will be wiped. Are you sure?" --width=300 --height=260; then
# The user clicked the "Yes" button, so call the StartFreshFunction
StartFreshFunction
# If the Start Fresh function was called, set an environment variable
if [ "$?" -eq 0 ]; then
export START_FRESH=true
else
export START_FRESH=false
fi
else
# The user clicked the "No" button, so exit with exit code 0 to indicate success.
exit 0
fi
else
# Command line arguments were provided, so skip displaying the zenity window and directly perform any necessary actions to start fresh by calling the StartFreshFunction
StartFreshFunction
fi
fi
if [[ $options == "Uninstall" ]]; then
# Check if the cancel button was clicked
# The OK button was not clicked
# Define the launcher options
options=$(zenity --list --checklist \
--title="Uninstall Launchers" \
--text="Select the launchers you want to Uninstall..." \
--column="Select" --column="This will delete the launcher and all of its games and files." \
--width=508 --height=507 \
FALSE "Epic Games" \
FALSE "Gog Galaxy" \
FALSE "Uplay" \
FALSE "Battle.net" \
FALSE "EA App" \
FALSE "Amazon Games" \
FALSE "Legacy Games" \
FALSE "itch.io" \
FALSE "Humble Bundle" \
FALSE "IndieGala" \
FALSE "Rockstar Games Launcher" \
FALSE "Glyph Launcher" \
FALSE "Minecraft"\
FALSE "Playstation Plus"\
FALSE "VK Play")
if [[ $options != "" ]]; then
# The Uninstall button was clicked
# Add code here to handle the uninstallation of the selected launcher(s)
if [[ $options == *"Epic Games"* ]]; then
# User selected to uninstall Epic Games Launcher
# Check if Epic Games Launcher was installed using the NonSteamLaunchers prefix
if [[ -f "$epic_games_launcher_path1" ]]; then
# Epic Games Launcher was installed using the NonSteamLaunchers prefix
# Add code here to run the Epic Games Launcher uninstaller
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Epic Games"
elif [[ -f "$epic_games_launcher_path2" ]]; then
# Epic Games Launcher was installed using a separate app ID
# Add code here to delete the EpicGamesLauncher app ID folder
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/EpicGamesLauncher"
fi
fi
if [[ $options == *"Gog Galaxy"* ]]; then
# User selected to uninstall GOG Galaxy
# Check if GOG Galaxy was installed using the NonSteamLaunchers prefix
if [[ -f "$gog_galaxy_path1" ]]; then
# GOG Galaxy was installed using the NonSteamLaunchers prefix
# Add code here to run the GOG Galaxy uninstaller
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/GOG Galaxy"
elif [[ -f "$gog_galaxy_path2" ]]; then
# GOG Galaxy was installed using a separate app ID
# Add code here to delete the GogGalaxyLauncher app ID folder
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher"
fi
fi
if [[ $options == *"Uplay"* ]]; then
# User selected to uninstall Uplay
# Check if Uplay was installed using the NonSteamLaunchers prefix
if [[ -f "$uplay_path1" ]]; then
# Uplay was installed using the NonSteamLaunchers prefix
# Add code here to run the Uplay uninstaller
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Ubisoft"
elif [[ -f "$uplay_path2" ]]; then
# Uplay was installed using a separate app ID
# Add code here to delete the UplayLauncher app ID folder
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/UplayLauncher"
fi
fi
if [[ $options == *"Battle.net"* ]]; then
# User selected to uninstall Battle.net
# Check if Battle.net was installed using the NonSteamLaunchers prefix
if [[ -f "$battlenet_path1" ]]; then
# Battle.net was installed using the NonSteamLaunchers prefix
# Add code here to run the Battle.net uninstaller
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files (x86)/Battle.net"
elif [[ -f "$battlenet_path2" ]]; then
# Battle.net was installed using a separate app ID
# Add code here to delete the Battle.netLauncher app ID folder
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/Battle.netLauncher"
fi
fi
if [[ $options == *"EA App"* ]]; then
# User selected to uninstall EA App
# Check if EA App was installed using the NonSteamLaunchers prefix
if [[ -f "$eaapp_path1" ]]; then
# EA App was installed using the NonSteamLaunchers prefix
# Add code here to run the EA App uninstaller
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Electronic Arts"
elif [[ -f "$eaapp_path2" ]]; then
# EA App was installed using a separate app ID
# Add code here to delete the EALauncher app ID folder
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/TheEAappLauncher"
fi
fi
if [[ $options == *"Amazon Games"* ]]; then
# User selected to uninstall Amazon Games
# Check if Amazon Games was installed using the NonSteamLaunchers prefix
if [[ -f "$amazongames_path1" ]]; then
# Amazon Games was installed using the NonSteamLaunchers prefix
# Add code here to run the Amazon Games uninstaller
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/Amazon Games"
elif [[ -f "$amazongames_path2" ]]; then
# Amazon Games was installed using a separate app ID
# Add code here to delete the AmazonGamesLauncher app ID folder
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher"
fi
fi
if [[ $options == *"Legacy Games"* ]]; then
# User selected to uninstall Legacy Games
# Check if Legacy Games was installed using the NonSteamLaunchers prefix
if [[ -f "$legacygames_path1" ]]; then
# Legacy Games was installed using the NonSteamLaunchers prefix
# Add code here to run the Legacy Games uninstaller
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/Program Files/Legacy Games"
elif [[ -f "$legacygames_path2" ]]; then
# Legacy Games was installed using a separate app ID
# Add code here to delete the LegacyGamesLauncher app ID folder
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher"
fi
fi
if [[ $options == *"itch.io"* ]]; then
# User selected to uninstall Itch.io
# Check if Itch.io was installed using the NonSteamLaunchers prefix
if [[ -f "$itchio_path1" ]]; then
# Itch.io was installed using the NonSteamLaunchers prefix
# Add code here to run the Itch.io uninstaller
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/pfx/drive_c/users/steamuser/AppData/Local/itch"
elif [[ -f "$itchio_path2" ]]; then
# Itch.io was installed using a separate app ID
# Add code here to delete the Itch.ioLauncher app ID folder
rm -rf "${logged_in_home}/.local/share/Steam/steamapps/compatdata/itchioLauncher"
fi
fi
if [[ $options == *"Humble Bundle"* ]]; then