set cnt=0 set multi=false @for %%f in (.\content\^!*.zip) do set name2=%%f @for %%A in (.\content\^!*.zip) do set /a cnt+=1 cls @set name=%name2:~11,-12% if %cnt% gtr 1 set multi=true @set var=%cd% @set merge=false @set exist=false @set current=%CD:~0,2% @for /f "usebackq delims== tokens=2" %%x in (`wmic logicaldisk where "DeviceID='%current%'" get FreeSpace /format:value`) do set FreeSpace=%%x cls @echo off if not exist launchbox.exe goto a1 set exist=true cd exo\util if not exist util.zip unzip.exe -o -q *.zip CHOICE.EXE unzip.exe -o -q util.zip CHOICE.EXE cd .. cd .. cls echo. echo An eXo project or previous LaunchBox install has previously been setup in this folder. echo. if %multi% == true echo More than one eXo pack has been detected in this folder. if %multi% == true echo This installer does not support merging. Please follow the manual merge instructions or use the eXoDOS v6 Setup file if %multi% == true echo You should exit now if you are trying to merge. if %multi% == true echo. if %multi% == false echo Continuing will reinstall the pack. if %multi% == false echo. .\exo\util\choice /C:CE /N [C]ontinue or [E]xit if errorlevel = 2 goto end if errorlevel = 1 goto a1 :a1 cd exo\util if not exist util.zip unzip.exe -o -q *.zip CHOICE.EXE if not exist CHOICE.EXE unzip.exe -o -q util.zip CHOICE.EXE cd .. cd .. cls echo. if %multi% == false echo -=[WELCOME to eXo%name%]=- if %multi% == true echo -=[WELCOME to eXoMerge]=- echo. if %multi% == true echo This setup will install all eXo projects whose files are in this folder. The following packs have been if %multi% == true echo detected: if %multi% == true setlocal EnableDelayedExpansion if %multi% == true for %%f in (".\content\^!*.zip") do ( set pack2=%%f set pack=!pack2:~10,-12! echo eXo!pack! ) if %multi% == true echo. if %multi% == true echo If you do not see a pack listed that you wish to merge, please ensure it has been copied to this folder. if %multi% == false echo This setup will install eXo%name%. if %multi% == false echo. if %multi% == false echo However, if you wish to merge\combine, you should follow the manual merge instructions or run the if %multi% == false echo eXoDOS v6 Setup file. echo. .\exo\util\choice /C:CEM /N [C]ontinue, [E]xit, or [M]erge Instructions If errorlevel = 3 goto mergei If errorlevel = 2 goto end If errorlevel = 1 goto checks :mergei cls echo. echo To merge eXo packs together, you will need to copy the files of all packs you wish to merge into the same folder. echo Specifically, you need to copy the following files and subfolders: echo " .\Content\ <-FOLDER " echo " .\eXo\ <-FOLDER " echo " Setup.bat file <-FILE " echo Then run setup and it will install all of the detected projects echo. echo ------------------====================IMPORTANT====================------------------ echo. The above instructions only work with newer eXo packs. Use the following if you have difficulty with this method. echo. echo Install each eXo project separatly. echo Ensure LaunchBox is not running echo Go to the project you wish to merge and select the following folders ^& files: echo --Data echo --eXo echo --Images echo --Manuals echo --Music echo --Videos echo Paste these folders into your master folder (the project you are merging INTO) echo Say YES you want to merge folders (if prompted) echo Say NO when asked if you ant to overwrite any files with the same name echo Repeat this process for every other pack you wish to merge echo Start LaunchBox once this is done. echo If you do not see all of the platforms you merged, then close LaunchBox. Wait at least 15 seconds. Restart LaunchBox. echo. pause goto a1 :checks setlocal DisableDelayedExpansion if not exist .\eXo\util\util*.zip ( cls echo. echo ERROR echo. echo You are missing the util file. This file contains the emulators, along with several echo utilities required to run the games included with this pack. echo. echo The file resides in the .\eXo\util\ folder echo Please make sure this file has been downloaded before proceeding with setup. echo. echo Exiting setup pause goto end ) :metadata if not exist .\Content\^!*metadata.zip goto merror goto lbcheck :merror cls echo. echo ERROR echo. echo You are missing the !metadata file (!^metadata.zip). echo Without this, the entire pack is unplayable. echo This file contains the actual launch files and configuration files need to play the games. echo Please download this file and then re-run setup. echo. echo This file should be in your .\Content\ folder. echo. echo Exiting setup pause goto end :lbcheck if not exist .\Content\LaunchBox.zip ( cls echo. echo ERROR echo. echo You are missing the LaunchBox.zip file. echo Without this, you will have no front end. echo. echo This file should be in your .\Content\ folder. echo. echo If you plan to use a different front end or no front end at all, you can choose echo to continue. echo. goto check ) if %multi% == true if not exist .\Content\XO*Metadata.zip goto m2error if %multi% == false if not exist .\Content\XO%name%Metadata.zip goto m2error goto verified :m2error cls echo. echo ERROR echo You are missing the XOMetadata file (XO^Metadata.zip). echo Without this LaunchBox will not run properly. echo This file contains the manuals, xml, and image data LaunchBox needs. echo. echo This file should be in your .\Content\ folder. echo. echo If you plan to use a different front end or no front end at all, you can choose echo to continue. echo. goto check ) :check echo. echo Do you want to continue setup without support for LaunchBox? echo. echo Note: Launchbox is the front end. Without it, you will simply have a collection if %multi% == false echo of %name% zip files and a !%name% folder full of config files and game launch files. if %multi% == true echo of zip files and a folder full of config files and game launch files. echo Do not use this method if you aren't 100%% sure of what you are doing. echo. .\exo\util\choice /C:YN /N (Y)es or (N)o If errorlevel = 2 goto end If errorlevel = 1 goto skip :verified cls set x64=false rem wmic os get osarchitecture > oscheck.txt rem systeminfo | findstr /I type: > oscheck.txt cmd /c "echo %PROCESSOR_ARCHITECTURE%" > oscheck.txt for /F %%a in ('findstr /C:AMD64 oscheck.txt') do set x64=true del oscheck.txt if %x64%==false echo. if %x64%==false echo This machine is not reporting itself as 64 bit. LaunchBox, the front end, if %x64%==false echo will only run on a 64 bit machine. if %x64%==false echo. if %x64%==false pause if %x64%==false goto skip_lb cls echo. echo All files verified. echo. echo Beginning setup echo. echo Step 1 of 3 echo Extracting LaunchBox files echo Estimated Time: 1-2 minutes. echo. PAUSE echo EXTRACTING... .\eXo\util\unzip -o -q .\Content\LaunchBox.zip -d .\ goto continue :skip_lb echo. echo Installation will now continue, but please be aware that the front-end will not echo be functional on this machine. You may still run the games manually by navigating echo to the games launch folder and running the launch file manually. These can be found echo in: if %multi% == false echo .\eXo\eXo%name%\!%name%\ if %multi% == true echo .\eXo\eXoPACK\!PACK\ if %multi% == true echo *each PACK will have it's own name echo. echo Apart from launching the games, the front end also contains metadata, screenshots, echo manuals, box scans, game music, strategy guides, code wheels, and lots of other echo interesting things for each game. It is highly recommended that you take the necessary echo steps to get the frontend working. echo. pause goto continue :continue cls echo. echo Step 2 of 3 echo Extracting LaunchBox Metadata echo Estimated Time: 1-2 minutes. echo. pause .\eXo\util\unzip -o .\Content\XO*Metadata.zip -d .\ :step3 cls echo. echo Step 3 of 3 echo Extracting Game Configuration Files echo Estimated Time: 10-15 minutes. echo. pause for /F %%a in ('dir .\Content\GameData\ /A:D /B') DO ( .\eXo\util\unzip -o .\Content\GameData\%%a\*.zip -d .\ ) .\eXo\util\unzip -o .\Content\!*metadata.zip -d .\ IF %EXIST% == false goto :skip :cleanup cd exo cd util copy unzip.exe .. for /f %%F in ('dir /b /a-d ^| findstr /vile ".zip .bat"') do del "%%F" for /f %%H in ('dir /A:D /B') do rmdir %%H /s /q copy ..\unzip.exe .\ del ..\unzip.exe cd .. cd .. :skip cd eXo .\util\unzip -o .\util\util*.zip -d .\util if exist .\util\OPT*.zip .\util\unzip -o .\util\OPT*.zip -d .\util\ if exist .\util\EXT*.zip .\util\unzip -o .\util\EXT*.zip del .\util\OPT*.zip del .\util\EXT*.zip .\util\unzip -o .\util\util.zip ssr.exe -d .\util\ .\util\unzip -o .\util\util.zip SetConsole.exe -d .\util\ cd .. goto xml :skipxtract goto xml :xml goto NOA cls echo. echo Would you like to remove access to Adult games from LaunchBox? echo. echo Please read carefully: "Adult" refers to games with nudity rather than violence. Choosing YES echo will remove them from the front end, but not remove them from your hard drive. echo. echo If they have previously been removed, choosing NO here will restore them in the front end. echo. .\eXo\util\choice /C:NY /N (Y)es or (N)o If errorlevel = 2 goto YESA If errorlevel = 1 goto NOA :NOA if exist .\xml\ALL\*.xml copy .\xml\ALL\*.xml .\Data\Platforms\ copy .\xml\Playlists\*.* .\Data\Playlists\ cd xml call merge_parents call merge_platforms cd .. copy .\xml\Platforms.xml .\Data\ copy .\xml\Parents.xml .\Data\ if exist .\xml\MS-DOS.xml del .\xml\MS-DOS.xml goto screen :YESA if exist .\xml\family\*.xml copy .\xml\family\*.xml .\Data\Platforms\ copy .\xml\Playlists\*.* .\Data\Playlists\ cd xml call merge_parents call merge_platforms cd .. copy .\xml\Platforms.xml .\Data\ copy .\xml\Parents.xml .\Data\ if exist .\xml\MS-DOS.xml del .\xml\MS-DOS.xml goto screen :screen cls echo. echo Would you like [F]ullscreen or [W]indowed mode to be the default setting? echo. .\eXo\util\choice /C:FW If errorlevel = 2 goto WIN If errorlevel = 1 goto FULL :FULL cd eXo cls if exist .\emulators\dosbox\options.conf .\util\ssr 0 fullscreen=false fullscreen=true .\emulators\dosbox\options.conf if exist ".\util\WIN.SEL" del ".\util\WIN.SEL" echo > ".\util\FULL.SEL" cd .. goto ratio :WIN cd eXo cls if exist .\emulators\dosbox\options.conf .\util\ssr 0 fullscreen=true fullscreen=false .\emulators\dosbox\options.conf if exist ".\util\FULL.SEL" del ".\util\FULL.SEL" echo > ".\util\WIN.SEL" cd .. goto ratio :ratio cd exo cls echo. echo Would you like to enable Aspect Correction for all games? echo. echo Choosing Yes will attempt to preserve the game's original format. In fullscreen echo mode this will introduce black bars on the sides. echo. echo Choosing No will stretch the image to fit your monitor. echo. echo Choosing Yes is useful for widescreen monitors which cause stretching or distortion. echo. .\util\choice /C:YN /N [Y]es or [N]o If errorlevel = 2 goto aspectN If errorlevel = 1 goto aspectY :aspectY cls if exist .\emulators\dosbox\options.conf .\util\ssr 0 aspect=false aspect=true .\emulators\dosbox\options.conf if exist ".\util\ANO.SEL" del ".\util\ANO.SEL" echo > ".\util\AYES.SEL" goto ini :aspectN cls if exist .\emulators\dosbox\options.conf .\util\ssr 0 aspect=true aspect=false .\emulators\dosbox\options.conf if exist ".\util\AYES.SEL" del ".\util\AYES.SEL" echo > ".\util\ANO.SEL" goto ini :ini cd .. cls echo. if %multi% == false echo eXo%name% is now setup. Enjoy! if %multi% == true echo Your eXoPacks are now setup. Enjoy! echo. echo Would you like to create an icon on your desktop? echo. .\exo\util\choice /C:YN /N [Y]es or [N]o If errorlevel = 2 goto end If errorlevel = 1 goto shortcut :shortcut echo [InternetShortcut] > "%userprofile%\Desktop\eXoDREAMM.url" echo URL=%CD%\LaunchBox.exe >> "%userprofile%\Desktop\exoDREAMM.url" echo IconFile=%CD%\eXo\util\exodos.ico >> "%userprofile%\Desktop\eXoDREAMM.url" echo IconIndex=0 >> "%userprofile%\Desktop\eXoDREAM.url" :end