-
Notifications
You must be signed in to change notification settings - Fork 9
/
RetroCake.bat
6409 lines (6008 loc) · 416 KB
/
RetroCake.bat
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
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::Welcome to the RetroCake script!::::::::::::::::::::::::::::::::::::::
::I have commented as much as I think is needed, but if there is any confusion just message me through github!::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
if not "%1" == "max" start /MAX cmd /c %0 max & exit/b
::Checks if the batch file was run as admin. If not it yells at you and will exit.
:check_Permissions
net session >nul 2>&1
if %errorLevel% == 0 (
goto setvars
) else (
goto AdminFail
)
:setvars
::Sets time variables for the backup files
set dayte=%date:~4,10%
set thyme=%time:~0,8%
set gooddayte=%dayte:/=%
set goodthyme=%thyme::=%
goto CusInstallCheck
:CusInstallCheck
::Checks dummy file in AppData for a customized install directory of RetroCake.
if EXIST %APPDATA%\RetroCake\CusInstallDir.txt goto PullCusDir
if EXIST C:\RetroCake\RetroCake goto CusInstallN
goto CusInstall
:PullCusDir
::Pulls the directory string from a custom install Appdata text file into the rkdiruhh variable.
set /p rkdiruhh=<%APPDATA%\RetroCake\CusInstallDir.txt
::Swaps the variable from rkdiruhh to rkdir. Removes the trailing space that gets generated by piping out the directory for some reason.
set rkdir=%rkdiruhh:~0,-1%
goto CheckRetroCake
:CusInstall
::Prompts to install in a custom directory or default C:\RetroCake.
cls
set /P c=Install RetroCake in a custom directory (Default is C:\RetroCake)[Y/N]?
if /I "%c%" EQU "Y" goto CusInstallY
if /I "%c%" EQU "N" goto CusInstallN
:CusInstallY
::Pronpts to enter the custom installation directory.
cls
set /p rkdir="Enter Custom RetroCake Install Path (default C:\RetroCake): "
::writes the directory to %APPDATA%\RetroCake\ for use when launching the bat file.
mkdir %APPDATA%\RetroCake\
echo %rkdir% > %APPDATA%\RetroCake\CusInstallDir.txt
goto CheckRetroCake
:CusInstallN
::Sets the install directory to default C:\RetroCake
set rkdir=C:\RetroCake
goto CheckRetroCake
:CheckRetroCake
::Checks if RetroCake is already installed
IF EXIST %rkdir%\Temp\ goto permcheck
goto SetRCDir
:SetRCDir
::Creates the directories needed for installation, then sets the permissions to Everyone R/W for use with the shares.
mkdir %rkdir%
mkdir %rkdir%\EmulationStation
mkdir %rkdir%\RetroArch
mkdir %rkdir%\Temp
mkdir %rkdir%\Tools
icacls "%rkdir%" /grant everyone:(OI)(CI)F /T
echo pls no delete > %rkdir%\RetroCake
goto check7z
:permcheck
::Changes permissions to Everyone R/W for use with the shares, secondary check for already installed just in case.
IF EXIST %rkdir%\RetroCake goto check7z
goto permss
:permss
::Changes permissions to Everyone R/W for use with the shares, secondary check for already installed just in case.
icacls "%rkdir%" /grant everyone:(OI)(CI)F /T
echo pls no delete > %rkdir%\RetroCake
goto check7z
:check7z
::Checks for 7z Installation for use with the bat file.
IF EXIST %rkdir%\Tools\7za\7za.exe goto WGETSetupCheck
goto install7z
:install7z
::Installs 7z with pretty information.
cls
echo =================================================================
echo = =
echo = SETTING UP 7ZA... =
echo = =
echo =================================================================
mkdir %rkdir%\Tools\7za
::Pulls 7za and unzips via powershell. (All future unzipping is done with 7za, as it is faster and cleaner.
powershell -command (New-Object Net.WebClient).DownloadFile('http://www.7-zip.org/a/7za920.zip','%rkdir%\Tools\7za\7za.zip');(new-object -com shell.application).namespace('%rkdir%\Tools\7za').CopyHere((new-object -com shell.application).namespace('%rkdir%\Tools\7za\7za.zip').Items(),16)
cls
echo ================================================
echo = Cleaning up downloaded file(s) =
echo ================================================
::Waits for the zip to be fully closed
ping 127.0.0.1 -n 2 >nul
::Deletes downloaded zip
del %rkdir%\Tools\7za\7za.zip
IF EXIST %rkdir%\Tools\7za\7za.exe goto WGETSetupCheck
goto 7zerror
:WGETSetupCheck
IF EXIST "%rkdir%\Tools\Wget\wget.exe" goto SGitCheck
goto WGETSetup
:WGETSetup
::Installs wget binaries with pretty information.
cls
echo =================================================================
echo = =
echo = SETTING UP WGET... =
echo = =
echo =================================================================
mkdir %rkdir%\Tools\Wget
::Pulls wget binaries and unzips via powershell. (All future unzipping is done with 7za, as it is faster and cleaner.
powershell -command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/Flerp/RetroCake/master/wget/wget-1.20.3-win32.zip','%rkdir%\Tools\Wget\Wget.zip')
ping 127.0.0.1 -n 3 > nul
%rkdir%\Tools\7za\7za.exe x "%rkdir%\Tools\Wget\Wget.zip" -o"%rkdir%\Tools\Wget" -aoa > nul
cls
echo ================================================
echo = Cleaning up downloaded file(s) =
echo ================================================
::Waits for the zip to be fully closed
ping 127.0.0.1 -n 2 >nul
::Deletes downloaded zip
del %rkdir%\Tools\Wget\Wget.zip
IF EXIST "%rkdir%\Tools\Wget\wget.exe" goto SGitCheck
goto WGETerror
:SGitCheck
::Checks if git is installed (Used for various functions in the bat file)
IF EXIST %rkdir%\Tools\git\bin\git.exe goto VCREDISTCheck
goto sGitArchCheck
:sGitArchCheck
::Checks if installation is x86 or x86_64
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
goto sgit64
)
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
goto sgit32
)
:sgit32
::Installs git the same way as 7za
cls
echo =================================================================
echo = =
echo = SETTING UP GIT... =
echo = =
echo =================================================================
%rkdir%\Tools\Wget\wget.exe -q https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/PortableGit-2.16.2-32-bit.7z.exe -O "%rkdir%\Temp\git.zip"
mkdir %rkdir%\Tools\git
%rkdir%\Tools\7za\7za.exe x "%rkdir%\Temp\git.zip" -o"%rkdir%\Tools\git" -aoa > nul
cls
echo ================================================
echo = Cleaning up downloaded file(s) =
echo ================================================
ping 127.0.0.1 -n 3 > nul
del "%rkdir%\Temp\git.zip"
IF EXIST %rkdir%\Tools\git\bin\git.exe goto VCREDISTCheck
goto GITerror
:sgit64
::Installs git the same way as 7za
cls
echo =================================================================
echo = =
echo = SETTING UP GIT... =
echo = =
echo =================================================================
%rkdir%\Tools\Wget\wget.exe -q https://github.com/git-for-windows/git/releases/download/v2.15.0.windows.1/PortableGit-2.15.0-64-bit.7z.exe -O "%rkdir%\Temp\git.zip"
mkdir %rkdir%\Tools\git
%rkdir%\Tools\7za\7za.exe x "%rkdir%\Temp\git.zip" -o"%rkdir%\Tools\git" -aoa > nul
cls
echo ================================================
echo = Cleaning up downloaded file(s) =
echo ================================================
ping 127.0.0.1 -n 3 > nul
del "%rkdir%\Temp\git.zip"
IF EXIST %rkdir%\Tools\git\bin\git.exe goto VCREDISTCheck
goto GITerror
:VCREDISTCheck
::Checks if RetroCake has installed the Visual Studio Redistributables
IF EXIST "%rkdir%\Tools\VC" goto DirectXSetupCheck
goto VCRedistArchCheck
:VCRedistArchCheck
cls
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
goto VCRedistInstall64
)
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
goto VCRedistInstall32
)
:VCRedistInstall64
cls
echo =================================================================
echo = =
echo = SETTING UP VC REDIST =
echo = =
echo =================================================================
%rkdir%\Tools\Wget\wget.exe -q https://download.visualstudio.microsoft.com/download/pr/11100230/15ccb3f02745c7b206ad10373cbca89b/VC_redist.x64.exe -O "%rkdir%\Temp\VC_Redist_2017.exe"
%rkdir%\Tools\Wget\wget.exe -q https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe -O "%rkdir%\Temp\VC_Redist_2015_64.exe"
%rkdir%\Tools\Wget\wget.exe -q https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe -O "%rkdir%\Temp\VC_Redist_2015_32.exe"
%rkdir%\Tools\Wget\wget.exe -q https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe -O "%rkdir%\Temp\VC_Redist_2010_32.exe"
%rkdir%\Tools\Wget\wget.exe -q https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe -O "%rkdir%\Temp\VC_Redist_2010_64.exe"
%rkdir%\Temp\VC_Redist_2017.exe /install /quiet
%rkdir%\Temp\VC_Redist_2015_64.exe /install /quiet
%rkdir%\Temp\VC_Redist_2015_32.exe /install /quiet
%rkdir%\Temp\VC_Redist_2010_32.exe /install /quiet
%rkdir%\Temp\VC_Redist_2010_64.exe /install /quiet
echo VCRedistInstalled > "%rkdir%\Tools\VC"
cls
echo ================================================
echo = Cleaning up downloaded file(s) =
echo ================================================
ping 127.0.0.1 -n 3 > nul
del "%rkdir%\Temp\VC_Redist_2017.exe"
del "%rkdir%\Temp\VC_Redist_2015_64.exe"
del "%rkdir%\Temp\VC_Redist_2015_32.exe"
del "%rkdir%\Temp\VC_Redist_2010_32.exe"
del "%rkdir%\Temp\VC_Redist_2010_64.exe"
goto DirectXSetupCheck
:VCRedistInstall32
cls
echo =================================================================
echo = =
echo = SETTING UP VC REDIST =
echo = =
echo =================================================================
%rkdir%\Tools\Wget\wget.exe -q https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe -O "%rkdir%\Temp\VC_Redist_2015_32.exe"
%rkdir%\Tools\Wget\wget.exe -q https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe -O "%rkdir%\Temp\VC_Redist_2010_32.exe"
%rkdir%\Temp\VC_Redist_2015_32.exe /install /quiet
%rkdir%\Temp\VC_Redist_2010_32.exe /install /quiet
echo VCRedistInstalled > "%rkdir%\Tools\VC"
cls
echo ================================================
echo = Cleaning up downloaded file(s) =
echo ================================================
ping 127.0.0.1 -n 3 > nul
del "%rkdir%\Temp\VC_Redist_2015_32.exe"
goto DirectXSetupCheck
:DirectXSetupCheck
IF EXIST "%rkdir%\Tools\DX" goto menu
goto DirectXSetup
:DirectXSetup
cls
echo =================================================================
echo = =
echo = SETTING UP DIRECT X =
echo = =
echo =================================================================
%rkdir%\Tools\Wget\wget.exe -q https://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe -O "%rkdir%\Temp\dxwebsetup.exe"
%rkdir%\Temp\dxwebsetup.exe /Q
echo DXInstalled > "%rkdir%\Tools\DX"
cls
echo ================================================
echo = Cleaning up downloaded file(s) =
echo ================================================
ping 127.0.0.1 -n 3 > nul
del "%rkdir%\Temp\dxwebsetup.exe"
goto menu
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
:menu
::Main menu selection. Uses keys 1-9
cls
echo RetroCake v1.4.6
echo ===========================================================================
echo = =
Echo = 1.) AUTOMATED INSTALLERS =
echo = =
echo ===========================================================================
echo = =
echo = 2.) MANAGE EMULATIONSTATION =
echo = =
echo = 3.) MANAGE RETROARCH =
echo = =
echo = 4.) MANAGE ADDITIONAL EMULATORS =
echo = =
echo = 5.) MANAGE ROM DIRECTORIES =
echo = =
echo = 6.) MANAGE DEDICATED EMUBOX SETTINGS =
echo = =
echo = 7.) SYSTEM CLEANUP =
echo = =
echo = 8.) ROM SCRAPER =
echo = =
echo ===========================================================================
echo = =
echo = 9.) UPDATE RETROCAKE SCRIPT =
echo = =
echo ===========================================================================
CHOICE /N /C:123456789 /M "Enter Corresponding Menu choice (1, 2, 3, 4, 5, 6, 7, 8, 9)"
IF ERRORLEVEL ==9 GOTO RetroCakeUpdate
IF ERRORLEVEL ==8 GOTO ScraperSetup
IF ERRORLEVEL ==7 GOTO SysClean
IF ERRORLEVEL ==6 GOTO DediMenu
IF ERRORLEVEL ==5 GOTO RomMenu
IF ERRORLEVEL ==4 GOTO EmuFolderCheck
IF ERRORLEVEL ==3 GOTO RAMenu
IF ERRORLEVEL ==2 GOTO ESMenu
IF ERRORLEVEL ==1 GOTO automated
::=================================================================================================================================================================================================================================================================================================================
:automated
::Menu for automated full installers (Emulationstation + RetroArch + Config Generation + ROM Directory Setup)
cls
echo =================================================================================
echo = =
Echo = 1.) FULL SETUP WITHOUT ROM DIRECTORIES (NEED TO EDIT ES_SYSTEMS.CFG) =
echo = =
echo = 2.) FULL SETUP WITH DEFAULT ROM DIRECTORIES (%rkdir%\ROMS\SYSTEMNAME) =
echo = =
echo = 3.) FULL SETUP WITH CUSTOM ROM DIRECTORIES =
echo = =
echo = =
echo = 4.) RETURN TO MAIN MENU =
echo = =
echo =================================================================================
CHOICE /N /C:1234 /M "Enter Corresponding Menu choice (1, 2, 3, 4)"
IF ERRORLEVEL ==4 GOTO menu
IF ERRORLEVEL ==3 GOTO BrandNewCus
IF ERRORLEVEL ==2 GOTO BrandNewDef
IF ERRORLEVEL ==1 GOTO BrandNewBlank
::=================================================================================================================================================================================================================================================================================================================
:ESMenu
::Menu for Managing Emulationstation updates, config, and themes.
cls
echo ===========================================================================
echo = =
echo = 1.) CHECK EMULATIONSTATION FOR UPDATES =
echo = =
echo = 2.) MANAGE ES_SYSTEMS.CFG =
echo = =
echo = 3.) MANAGE EMULATIONSTATION THEMES =
echo = =
echo = =
echo = 4.) RETURN TO MAIN MENU =
echo = =
echo ===========================================================================
CHOICE /N /C:12345 /M "Enter Corresponding Menu choice (1, 2, 3, 4, 5)"
IF ERRORLEVEL ==4 GOTO menu
IF ERRORLEVEL ==3 GOTO ThemeManager
IF ERRORLEVEL ==2 GOTO ManESCFG
IF ERRORLEVEL ==1 GOTO StartESVerCheck
::=================================================================================================================================================================================================================================================================================================================
:RAMenu
::Menu for managing RetroArch Updates, Core updates, and config.
cls
echo ===========================================================================
echo = =
Echo = 1.) INSTALL RETROARCH 1.8.1 =
echo = =
echo = 2.) UPDATE/INSTALL RETROARCH TO THE LATEST NIGHTLY BUILD =
echo = =
echo = 3.) GENERATE CLEAN RETROARCH.CFG =
echo = =
echo = 4.) UPDATE RETROARCH CORES TO THE LATEST NIGHTLY BUILD =
echo = =
echo = =
echo = 5.) RETURN TO MAIN MENU =
echo = =
echo ===========================================================================
CHOICE /N /C:12345 /M "Enter Corresponding Menu choice (1, 2, 3, 4, 5)"
IF ERRORLEVEL ==5 GOTO menu
IF ERRORLEVEL ==4 GOTO updatecores
IF ERRORLEVEL ==3 GOTO racfg
IF ERRORLEVEL ==2 GOTO UpdateRAn
IF ERRORLEVEL ==1 GOTO UpdateRA
::=================================================================================================================================================================================================================================================================================================================
:RomMenu
::Menu for managing ROM directories in both windows and es_systems.cfg. Can also share your ROM directories.
cls
echo ===========================================================================
echo = =
Echo = 1.) CREATE DEFAULT ROM DIRECTORIES (%rkdir%\ROMS\SYSTEMNAME) =
echo = =
Echo = 2.) CREATE CUSTOM ROM DIRECTORIES =
echo = =
echo = 3.) SHARE ROM DIRECTORIES =
echo = =
echo = =
echo = 4.) RETURN TO MAIN MENU =
echo = =
echo ===========================================================================
CHOICE /N /C:1234 /M "Enter Corresponding Menu choice (1, 2, 3, 4)"
IF ERRORLEVEL ==4 GOTO menu
IF ERRORLEVEL ==3 GOTO DediShare
IF ERRORLEVEL ==2 GOTO CusRomDirSet
IF ERRORLEVEL ==1 GOTO DefaultRomFolders
::=================================================================================================================================================================================================================================================================================================================
:EmuFolderCheck
::Checks if the Emulator Folder is created. Creates if not.
cls
IF EXIST %rkdir%\Emulators\ goto AdditionalEmu
mkdir %rkdir%\Emulators
goto AdditionalEmu
:AdditionalEmu
::Menu for managing additional emulators (Non RetroArch ones)
cls
echo ===========================================================================
echo = =
Echo = 1.) INSTALL ALL ADDITIONAL EMULATORS =
echo = =
echo = 2.) INSTALL ATARI ST EMULATOR (Hatari) =
echo = =
echo = 3.) INSTALL BBC MICRO EMULATOR (BeebEm) =
echo = =
echo = 4.) INSTALL COCO\DRAGON32 EMULATOR (XRoar) =
echo = =
echo = 5.) INSTALL LASERDISK GAME EMULATOR (Daphne) =
echo = =
echo = 6.) INSTALL INTELLIVISION EMULATOR (jzIntv) =
echo = =
echo = 7.) INSTALL PS2 EMULATOR (PCSX2 1.4.0) =
echo = =
echo = 8.) INSTALL GAMECUBE EMULATOR (Dolphin 5.0) =
echo = =
echo = =
echo = 9.) Page 2 =
echo = =
echo ===========================================================================
CHOICE /N /C:123456789 /M "Enter Corresponding Menu choice (1, 2, 3, 4, 5, 6, 7, 8, 9)"
IF ERRORLEVEL ==9 GOTO EmuPage2
IF ERRORLEVEL ==8 GOTO DolphinEmu
IF ERRORLEVEL ==7 GOTO PCSX2
IF ERRORLEVEL ==6 GOTO jzIntv
IF ERRORLEVEL ==5 GOTO Daphne
IF ERRORLEVEL ==4 GOTO XRoar
IF ERRORLEVEL ==3 GOTO BeebEm
IF ERRORLEVEL ==2 GOTO Hatari
IF ERRORLEVEL ==1 GOTO InstallAllEmu
:EmuPage2
::Additional Emulators continued.
cls
echo ===========================================================================
echo = =
Echo = 1.) INSTALL APPLE II EMULATOR (AppleWin) =
echo = =
Echo = 2.) INSTALL COMMODORE 64 EMULATOR (WinVICE) =
echo = =
Echo = 3.) INSTALL WII U EMULATOR (Cemu) =
echo = =
echo = =
echo = 4.) RETURN TO MAIN MENU =
echo = =
echo ===========================================================================
CHOICE /N /C:123 /M "Enter Corresponding Menu choice (1, 2, 3)"
IF ERRORLEVEL ==4 GOTO menu
IF ERRORLEVEL ==3 GOTO CemuEmu
IF ERRORLEVEL ==2 GOTO VICE
IF ERRORLEVEL ==1 GOTO AppleWin
:InstallAllEmu
::Secondary Emulator Folder check. May not be needed
IF EXIST %rkdir%\Emulators\ goto StartAllEmu
mkdir %rkdir%\Emulators
goto StartAllEmu
:StartAllEmu
::Creates a temporary file (tmp.txt) for the goto statements after each emulator is installed. Allows chaining emulator installation.
Echo This file is temporary. You should never see it > %rkdir%\Emulators\tmp.txt
goto AppleWin
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
:BrandNewBlank
::Creates temporary file to guide the installation process for Blank installation (No es_systems.cfg setup)
cls
echo Temp file used for installation. IF you see this file something bad happened > %rkdir%\Temp\BrandNewBlank
goto updateES
:BrandNewDef
::Creates temporary file to guide the installation process for default installation (ROM directory inside RetroCake directory)
cls
echo Temp file used for installation. IF you see this file something bad happened > %rkdir%\Temp\BrandNewDef
goto updateES
:BrandNewCus
::Creates temporary file to guide the installation process for custom ROM directory installation installation (ROM directory set via variable)
cls
echo Temp file used for installation. IF you see this file something bad happened > %rkdir%\Temp\BrandNewCus
goto updateES
:BrandNewClean
::Removes temporary files used for guiding installation.
cls
del %rkdir%\Temp\BrandNewBlank /S /Q
del %rkdir%\Temp\BrandNewDef /S /Q
del %rkdir%\Temp\BrandNewCus /S /Q
goto completed
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
:RetroCakeUpdate
::Creates a batch file to pull the latest retrocake.bat. Launches the new batch file that launches the new RetroCake.bat. Needed this separation as launching from inside this retrocake.bat caused crashing issues.
cls
ping 127.0.0.1 -n 2 >nul
echo @echo off
echo del %rkdir%\Tools\RetroCake.bat /S /Q > "%rkdir%\Tools\Updater.bat"
echo %rkdir%\Tools\git\bin\git.exe clone --depth=1 https://github.com/Flerp/RetroCake.git %rkdir%\Temp\Script >> "%rkdir%\Tools\Updater.bat"
echo xcopy %rkdir%\Temp\Script\RetroCake.bat %rkdir%\Tools\ >> "%rkdir%\Tools\Updater.bat"
echo rmdir %rkdir%\Temp\Script\ /S /Q >> "%rkdir%\Tools\Updater.bat"
echo start %rkdir%\Tools\RetroCake.bat >> "%rkdir%\Tools\Updater.bat"
echo exit >> %rkdir%\Tools\Updater.bat
start %rkdir%\Tools\Updater.bat
exit
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
:DediMenu
::Menu for dedicated EmuBos Options/installation. Used for setting the machine to be installed as a standalone emulator box and not just an application
cls
echo ===========================================================================
echo = =
Echo = 1.) SETUP ALL DEDICATED EMUBOX SETTINGS =
echo = (Auto Start, Auto Login, Folder Shares, System Name to RetroCake) =
echo = =
Echo = 2.) RETROCAKE AUTO START OPTIONS =
echo = =
echo = 3.) SETUP AUTOLOGIN =
echo = =
echo = 4.) SETUP RETROCAKE FOLDER SHARES =
echo = =
echo = 5.) SETUP SYSTEM NAME =
echo = =
echo = =
echo = 6.) RETURN TO MAIN MENU =
echo = =
echo ===========================================================================
CHOICE /N /C:123456 /M "Enter Corresponding Menu choice (1, 2, 3, 4, 5, 6)"
IF ERRORLEVEL ==6 GOTO menu
IF ERRORLEVEL ==5 GOTO DediHostnameMenu
IF ERRORLEVEL ==4 GOTO DediShareMenu
IF ERRORLEVEL ==3 GOTO AutoLogin
IF ERRORLEVEL ==2 GOTO AutoStartMenu
IF ERRORLEVEL ==1 GOTO FullDedi
:DediAsk
::Asks if this machine will be used as a dedicated emulator machine instead of installing as an application.
cls
set /P c=Is this system a dedicated Emulator Box [Y/N]?
if /I "%c%" EQU "Y" goto FullDedi
if /I "%c%" EQU "N" goto BrandNewClean
:FullDedi
::Creates a temporary file to guide the installation process through full dedicated setup.
cls
echo This file is temporary, you should never see it > %rkdir%\Temp\FullDedi.txt
IF EXIST %rkdir%\Temp\FullDedi.txt goto DediAutoStartSetup
goto erroorr
::=================================================================================================================================================================================================================================================================================================================
:AutoStartMenu
::Menu for selecting if EmulationStation starts up when the PC logs in.
cls
echo ===========================================================================
echo = =
Echo = 1.) SETUP AUTOMATIC RETROCAKE LAUNCH ON LOGIN =
echo = =
Echo = 2.) REMOVE AUTOMATIC RETROCAKE LAUNCH ON LOGIN =
echo = =
echo = =
echo = 3.) RETURN TO DEDICATED EMUBOX MENU =
echo = =
echo ===========================================================================
CHOICE /N /C:123 /M "Enter Corresponding Menu choice (1, 2, 3)"
IF ERRORLEVEL ==3 GOTO DediMenu
IF ERRORLEVEL ==2 GOTO DediAutoStartRemove
IF ERRORLEVEL ==1 GOTO DediAutoStartSetup
:DediAutoStartSetup
::Creates a batch file to launch Emulationstation. Creates a shortcut in the startup folder.
cls
echo ====================================================
echo = =
echo = ADDING RETROCAKE TO AUTOSTART ON LOGIN =
echo = =
echo ====================================================
cd /D "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
echo taskkill /im explorer.exe /f > "%rkdir%\Tools\startES.bat"
echo "%rkdir%\EmulationStation\emulationstation.exe" >> "%rkdir%\Tools\startES.bat"
del "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\startES.lnk"
echo Set oWS = WScript.CreateObject("WScript.Shell") > "%USERPROFILE%\CreateShortcut2.vbs"
echo sLinkFile = "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\startES.lnk" >> "%USERPROFILE%\CreateShortcut2.vbs"
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> "%USERPROFILE%\CreateShortcut2.vbs"
echo oLink.TargetPath = "%rkdir%\Tools\startES.bat" >> "%USERPROFILE%\CreateShortcut2.vbs"
echo oLink.Save >> "%USERPROFILE%\CreateShortcut2.vbs"
cscript "%USERPROFILE%\CreateShortcut2.vbs"
del "%USERPROFILE%\CreateShortcut2.vbs"
IF EXIST %rkdir%\Temp\FullDedi.txt goto AutoLogin
goto completed
:DediAutoStartRemove
::Removes the shortcut in the startup folder. Disabling launching emulationstation on login.
cls
echo ====================================================
echo = =
echo = REMOVING RETROCAKE AUTOSTART ON LOGIN =
echo = =
echo ====================================================
del "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\startES.lnk" /s /q
del %rkdir%\Tools\startES.bat /a /q
goto completed
::=================================================================================================================================================================================================================================================================================================================
:AutoLogin
::Guides the user through setting up Auto login. Tried to do this via registry edits, but it never worked properly.
cls
echo ==================================================================
echo = =
echo = PLEASE UNCHECK THE BOX LABELLED =
echo = Users must enter a user name and password to use this computer =
echo = THEN PRESS OK OR APPLY =
echo = =
echo = PRESS ANY KEY WHEN FINISHED =
echo = =
echo ==================================================================
start netplwiz
pause > nul
IF EXIST %rkdir%\Temp\FullDedi.txt goto DediShare
goto completed
::=================================================================================================================================================================================================================================================================================================================
:DediShareMenu
::Menu for Managing sharing of the RetroCake folders (ROMS, emulationstation config folder, RetroArch, and additional emulators.)
cls
echo ===========================================================================
echo = =
Echo = 1.) SETUP RETROCAKE SHARES WITH DEFAULT ROM DIRECTORY =
echo = =
Echo = 2.) SETUP RETROCAKE SHARES WITH CUSTOM ROM DIRECTORY =
echo = =
Echo = 3.) REMOVE RETROCAKE SHARES =
echo = =
echo = =
echo = 4.) RETURN TO DEDICATED EMUBOX MENU =
echo = =
echo ===========================================================================
CHOICE /N /C:1234 /M "Enter Corresponding Menu choice (1, 2, 3, 4)"
IF ERRORLEVEL ==4 GOTO DediMenu
IF ERRORLEVEL ==3 GOTO DediRemoveShares
IF ERRORLEVEL ==2 GOTO DediShare
IF ERRORLEVEL ==1 GOTO DediShare
:DediShare
::Shares all folders and sets permissions to Everyone R/W. Moves to ROM shares and checks if they are default or custom.
cls
net share BIOS=%rkdir%\RetroArch\system /grant:everyone,full
net share Emulationstation="%USERPROFILE%\.emulationstation" /grant:everyone,full
net share Emulators=%rkdir%\Emulators /grant:everyone,full
IF EXIST %rkdir%\ROMS\ goto RomShareDef
goto RomShareCus
:RomShareDef
::Shares default ROM dir.
net share ROMS=%rkdir%\ROMS /grant:everyone,full
IF EXIST %rkdir%\Temp\FullDedi.txt goto DediHostnameDef
goto completed
:RomShareCus
::Shares Custom ROM dir.
set /p cusromdir="Enter Path for ROM Folder (default %rkdir%\ROMS): "
net share ROMS=%cusromdir% /grant:everyone,full
IF EXIST %rkdir%\Temp\FullDedi.txt goto DediHostnameDef
goto completed
:DediRemoveShares
::Removes the shares created by this installer.
cls
net share BIOS /delete
net share EmulationStation /delete
net share ROMS /delete
goto completed
::=================================================================================================================================================================================================================================================================================================================
:DediHostnameMenu
::Menu for managing the PC's hostname
cls
echo ===========================================================================
echo = =
Echo = 1.) CHANGE PC NAME TO RetroCake =
echo = =
Echo = 2.) CREATE CUSTOM PC NAME =
echo = =
echo = =
echo = 3.) RETURN TO DEDICATED EMUBOX MENU =
echo = =
echo ===========================================================================
CHOICE /N /C:123 /M "Enter Corresponding Menu choice (1, 2, 3)"
IF ERRORLEVEL ==3 GOTO DediMenu
IF ERRORLEVEL ==2 GOTO DediHostnameCus
IF ERRORLEVEL ==1 GOTO DediHostnameDef
:DediHostnameDef
::Sets the hostname to RetroCake.
cls
WMIC computersystem where caption='%COMPUTERNAME%' rename RetroCake
IF EXIST %rkdir%\Temp\FullDedi.txt goto FullDediClean
goto completed
:DediHostnameCus
::Allows the setting of and inserted hostname.
cls
set /p cushostname="Enter custom PC name: "
WMIC computersystem where caption='%COMPUTERNAME%' rename %cushostname%
goto completed
:FullDediClean
::Removes the temporary file used for performing all dedicated installation options.
cls
del %rkdir%\Temp\FullDedi.txt /s /q
goto completed
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
:StartESVerCheck
::Starts checking Emulationstation's version for update. Removes the ESCheck folder to ensure comparison results are good.
cls
echo ====================================================
echo = =
echo = CHECKING FOR UPDATES =
echo = =
echo ====================================================
IF EXIST %rkdir%\Temp\ESCheck\ goto CleanESCheck
goto ESCheck
:CleanESCheck
rmdir %rkdir%\Temp\ESCheck /S /Q
goto ESCheck
:ESCheck
::Checks if emulationstation is installed. if not it prompts to install. if already installed downloads a small version of the latest update. Compares the downloaded exe with the installed exe. If different prompts to update
::Accomplishes this version compare by writing the file size of the current exe and the downloaded exe to two text files. Compares the strings in the text files. If they are the same then no update. If they are different then prompts for update.
::tried through WMIC checks, but version string is not included in the EXE :<
IF NOT EXIST %rkdir%\EmulationStation\emulationstation.exe goto UpdateESQN
mkdir %rkdir%\Temp\ESCheck
%rkdir%\Tools\Wget\wget.exe -q https://github.com/jrassa/EmulationStation/releases/download/continuous-master/EmulationStation-Win32-no-deps.zip -O "%rkdir%\Temp\ESCheck\tempES.zip"
cls
%rkdir%\Tools\7za\7za.exe x "%rkdir%\Temp\ESCheck\tempES.zip" -o"%rkdir%\Temp\ESCheck" -aoa > nul
::wmic datafile where name="C:\\RetroCake\\EmulationStation\\emulationstation.exe" get Version /value > %rkdir%\Temp\ESCheck\currentES.txt
::wmic datafile where name="C:\\RetroCake\\Temp\\ESCheck\\emulationstation.exe" get Version /value > %rkdir%\Temp\ESCheck\newES.txt
for %%I in (%rkdir%\EmulationStation\emulationstation.exe) do echo %%~zI > %rkdir%\Temp\ESCheck\currentES.txt
for %%I in (%rkdir%\Temp\ESCheck\emulationstation.exe) do echo %%~zI > %rkdir%\Temp\ESCheck\newES.txt
cd /D %rkdir%\Temp\ESCheck
set /p currentES=<currentES.txt
set /p newES=<newES.txt
ping 127.0.0.1 -n 2 >nul
IF %currentES%==%newES% goto UpToDate
goto UpdateESQ
:UpdateESQ
::Prompts to update. Sends to Emulationstation installation (Newest available version)
cls
set /P c=An update is available. Would you like to update [Y/N]?
if /I "%c%" EQU "Y" goto UpdateES
if /I "%c%" EQU "N" goto cancelled
:UpdateESQN
::Lets the user know that emulationstation is not installed. Prompts for installation. (Newest available version)
cls
set /P c=EmulationStation not found. Would you like to install [Y/N]?
if /I "%c%" EQU "Y" goto UpdateES
if /I "%c%" EQU "N" goto cancelled
::=================================================================================================================================================================================================================================================================================================================
:updateES
::Backs up old installation
%rkdir%\Tools\7za\7za.exe a "%rkdir%\Backup\ES_Backup_%gooddayte%_%goodthyme%.zip" "%rkdir%\EmulationStation\"
::Removes old emulationstation files
rmdir "%rkdir%\EmulationStation" /s /q
mkdir "%rkdir%\EmulationStation"
::Deletes old shortcut
del "%USERPROFILE%\Desktop\*statio*.lnk
::Downloads the latest build of EmulationStation
cls
echo ====================================================
echo = =
echo = DOWNLOADING THE LATEST BUILD OF EMULATIONSTATION =
echo = =
echo ====================================================
%rkdir%\Tools\Wget\wget.exe -q https://github.com/jrassa/EmulationStation/releases/download/continuous-master/EmulationStation-Win32.zip -O "%rkdir%\Temp\ES.zip"
ping 127.0.0.1 -n 3 > nul
::Extracts to the RetroCake\Emulationstation directory
%rkdir%\Tools\7za\7za.exe x "%rkdir%\Temp\ES.zip" -o"%rkdir%\EmulationStation" > nul
cls
echo ================================================
echo = Cleaning up downloaded file(s) =
echo ================================================
::Makes a shortcut on the desktop to Emulationstation called RetroCake (EmulationStation icon)
echo Set oWS = WScript.CreateObject("WScript.Shell") > "%rkdir%\Temp\CreateShortcut.vbs"
echo sLinkFile = "%USERPROFILE%\Desktop\RetroCake.lnk" >> "%rkdir%\Temp\CreateShortcut.vbs"
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> "%rkdir%\Temp\CreateShortcut.vbs"
echo oLink.TargetPath = "%rkdir%\EmulationStation\emulationstation.exe" >> "%rkdir%\Temp\CreateShortcut.vbs"
echo oLink.Save >> "%rkdir%\Temp\CreateShortcut.vbs"
cscript "%rkdir%\Temp\CreateShortcut.vbs"
del "%rkdir%\Temp\CreateShortcut.vbs"
::Cleans up Downlaoded zip
del "%rkdir%\Temp\ES.zip"
if EXIST "%rkdir%\EmulationStation\emulationstation.exe" goto ESNewSucceed
goto ESNewFailed
:ESNewFailed
cls
echo ====================================================
echo = =
echo = Current Builds of EmulationStation are Failing =
echo = Falling Back to Version 2.8.0 =
echo = =
echo ====================================================
%rkdir%\Tools\Wget\wget.exe -q https://github.com/Flerp/RetroCake/releases/download/ES_2.8.0/EmulationStation.zip -O "%rkdir%\Temp\ES.zip"
ping 127.0.0.1 -n 3 > nul
::Extracts to the RetroCake\Emulationstation directory
%rkdir%\Tools\7za\7za.exe x "%rkdir%\Temp\ES.zip" -o"%rkdir%\EmulationStation" > nul
cls
echo ================================================
echo = Cleaning up downloaded file(s) =
echo ================================================
::Makes a shortcut on the desktop to Emulationstation called RetroCake (EmulationStation icon)
echo Set oWS = WScript.CreateObject("WScript.Shell") > "%rkdir%\Temp\CreateShortcut.vbs"
echo sLinkFile = "%USERPROFILE%\Desktop\RetroCake.lnk" >> "%rkdir%\Temp\CreateShortcut.vbs"
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> "%rkdir%\Temp\CreateShortcut.vbs"
echo oLink.TargetPath = "%rkdir%\EmulationStation\emulationstation.exe" >> "%rkdir%\Temp\CreateShortcut.vbs"
echo oLink.Save >> "%rkdir%\Temp\CreateShortcut.vbs"
cscript "%rkdir%\Temp\CreateShortcut.vbs"
del "%rkdir%\Temp\CreateShortcut.vbs"
::Cleans up Downlaoded zip
del "%rkdir%\Temp\ES.zip"
if EXIST "%rkdir%\EmulationStation\emulationstation.exe" goto ESNewSucceed
goto ESInstallTotalFailure
:ESNewSucceed
::Installs default Carbon theme
mkdir "%USERPROFILE%\.emulationstation\themes"
cd /D "%USERPROFILE%\.emulationstation\themes"
rmdir carbon /S /Q
%rkdir%\Tools\git\bin\git.exe clone --recursive https://github.com/Flerp/es-theme-carbon.git %theme%
::Checks for temporary files created during automated installer selection
IF EXIST %rkdir%\Temp\BrandNewBlank goto blankESCFG
IF EXIST %rkdir%\Temp\BrandNewDef goto defaultESCFG
IF EXIST %rkdir%\Temp\BrandNewCus goto customESCFG
goto completed
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
::=================================================================================================================================================================================================================================================================================================================
:ManESCFG
::Menu to manage es_systems.cfg
cls
echo ===================================================================================
echo = =
Echo = 1.) CREATE NEW ES_SYSTEMS.CFG WITHOUT ROM PATHS =
echo = =
echo = 2.) CREATE NEW ES_SYSTEMS.CFG WITH DEFAULT ROM PATH %rkdir%\ROMS\SYSTEM =
echo = =
echo = 3.) CREATE NEW ES_SYSTEMS.CFG WITH CUSTOM ROM PATH =
echo = =
echo = 4.) EDIT ES_SYSTEMS.CFG =
echo = =
echo = =
echo = 5.) RETURN TO EMULATIONSTATION MANAGER =
echo = =
echo ===================================================================================
CHOICE /N /C:12345 /M "Enter Corresponding Menu choice (1, 2, 3, 4, 5)"
IF ERRORLEVEL ==5 GOTO esmenu
IF ERRORLEVEL ==4 GOTO editES
IF ERRORLEVEL ==3 GOTO customESCFG
IF ERRORLEVEL ==2 GOTO defaultESCFG
IF ERRORLEVEL ==1 GOTO blankESCFG
:blankESCFG
::Creates an es_systems.cfg without ROM directories incase you need/want something special (Not recommended as it's kinda poop to enter all the stuff manually.
::Backs up current es_systems.cfg
%rkdir%\Tools\7za\7za.exe a "%USERPROFILE%\es_systems_%gooddayte%_%goodthyme%.zip" "%USERPROFILE%\.emulationstation\es_systems.cfg"
::Deletes old es_systems.cfg
del "%USERPROFILE%\.emulationstation\es_systems.cfg" /q
::Creates a new es_systems.cfg
cls
mkdir "%USERPROFILE%\.emulationstation"
echo ^<?xml version="1.0"?^> > "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<systemList^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<system^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<name^>nes^</name^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<fullname^>Nintendo Entertainment System^</fullname^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<path^>C:\PATH\TO\ROM\FOLDER\nes^</path^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<extension^>.nes .NES^</extension^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<command^>%rkdir%\RetroArch\retroarch.exe -L %rkdir%\RetroArch\cores\fceumm_libretro.dll "%%ROM_RAW%%"^</command^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<platform^>nes^</platform^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<theme^>nes^</theme^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^</system^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<system^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<name^>fds^</name^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<fullname^>Famicom Disk System^</fullname^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<path^>C:\PATH\TO\ROM\FOLDER\fds^</path^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<extension^>.nes .fds .zip .NES .FDS .ZIP^</extension^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<command^>%rkdir%\RetroArch\retroarch.exe -L %rkdir%\RetroArch\cores\fceumm_libretro.dll "%%ROM_RAW%%"^</command^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<platform^>fds^</platform^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<theme^>fds^</theme^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^</system^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<system^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<name^>snes^</name^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<fullname^>Super Nintendo^</fullname^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<path^>C:\PATH\TO\ROM\FOLDER\snes^</path^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<extension^>.7z .bin .smc .sfc .fig .swc .mgd .zip .7Z .BIN .SMC .SFC .FIG .SWC .MGD .ZIP^</extension^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<command^>%rkdir%\RetroArch\retroarch.exe -L %rkdir%\RetroArch\cores\snes9x2010_libretro.dll "%%ROM_RAW%%"^</command^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<platform^>snes^</platform^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<theme^>snes^</theme^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^</system^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<system^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<name^>n64^</name^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<fullname^>Nintendo 64^</fullname^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<path^>C:\PATH\TO\ROM\FOLDER\n64^</path^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<extension^>.z64 .n64 .v64 .Z64 .N64 .V64^</extension^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<command^>%rkdir%\RetroArch\retroarch.exe -L %rkdir%\RetroArch\cores\mupen64plus_next_libretro.dll "%%ROM_RAW%%"^</command^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<platform^>n64^</platform^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<theme^>n64^</theme^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^</system^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<system^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<name^>gc^</name^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"
echo ^<fullname^>Nintendo Gamecube^</fullname^> >> "%USERPROFILE%\.emulationstation\es_systems.cfg"