Finishing touches 2

This commit is contained in:
mazmazz 2018-12-03 01:06:25 -05:00
parent d4718fa6d1
commit 6694b203e0
2 changed files with 22 additions and 5 deletions

View file

@ -26,6 +26,8 @@ if ["%SVZIP%"] == [""] (
:: Operate on install archives :: Operate on install archives
type NUL > "%SCRIPTDIR%\new-install\staging.txt"
if exist "%SCRIPTDIR%\Installer.7z" ( if exist "%SCRIPTDIR%\Installer.7z" (
if ["%SVZIP%"] == [""] ( if ["%SVZIP%"] == [""] (
echo. echo.
@ -61,3 +63,5 @@ if exist "%SCRIPTDIR%\Patch_x64.7z" (
) )
copy /y /b "%SCRIPTDIR%\sfx\7zsd_LZMA2_x64.sfx" + "%SCRIPTDIR%\sfx\config-patch.txt" + "%SCRIPTDIR%\Patch_x64.7z" "%SCRIPTDIR%\SRB2-%SRB2VERSIONNAME%-x64-Patch.exe" copy /y /b "%SCRIPTDIR%\sfx\7zsd_LZMA2_x64.sfx" + "%SCRIPTDIR%\sfx\config-patch.txt" + "%SCRIPTDIR%\Patch_x64.7z" "%SCRIPTDIR%\SRB2-%SRB2VERSIONNAME%-x64-Patch.exe"
) )
del /f /q "%SCRIPTDIR%\new-install\staging.txt"

View file

@ -29,6 +29,15 @@ set "STAGINGDIR=%STAGINGDIR:~0,-1%"
for %%d in ("%STAGINGDIR%") do set INSTALLDIR=%%~dpd for %%d in ("%STAGINGDIR%") do set INSTALLDIR=%%~dpd
set "INSTALLDIR=%INSTALLDIR:~0,-1%" set "INSTALLDIR=%INSTALLDIR:~0,-1%"
:: FAILSAFE: Check if staging.txt exists in the directory
:: If not, exit, so we don't mess up anything by accident.
if exist "%STAGINGDIR%\staging.txt" (
echo.
) else (
exit
)
:: Check if we need to create %userprofile%\SRB2 :: Check if we need to create %userprofile%\SRB2
set "USERDIR=%INSTALLDIR%" set "USERDIR=%INSTALLDIR%"
@ -90,11 +99,11 @@ echo f | xcopy /y "%STAGINGDIR%\LICENSE.txt" "%USERDIR%\LICENSE.txt"
echo f | xcopy /y "%STAGINGDIR%\LICENSE-3RD-PARTY.txt" "%USERDIR%\LICENSE-3RD-PARTY.txt" echo f | xcopy /y "%STAGINGDIR%\LICENSE-3RD-PARTY.txt" "%USERDIR%\LICENSE-3RD-PARTY.txt"
echo Your game data and mods folder is: > "%USERDIR%\! Data and Mods Go Here !.txt" echo Your game data and mods folder is: > "%USERDIR%\! Data and Mods Go Here !.txt"
echo. >> "%USERDIR%\! Data and Mods Go Here !.txt" echo. >> "%USERDIR%\! Data and Mods Go Here !.txt"
echo "%USERDIR%" >> "%USERDIR%\! Data and Mods Go Here !.txt" echo %USERDIR% >> "%USERDIR%\! Data and Mods Go Here !.txt"
echo. >> "%USERDIR%\! Data and Mods Go Here !.txt" echo. >> "%USERDIR%\! Data and Mods Go Here !.txt"
echo Your install folder is: >> "%USERDIR%\! Data and Mods Go Here !.txt" echo Your install folder is: >> "%USERDIR%\! Data and Mods Go Here !.txt"
echo. >> "%USERDIR%\! Data and Mods Go Here !.txt" echo. >> "%USERDIR%\! Data and Mods Go Here !.txt"
echo "%INSTALLDIR%" >> "%USERDIR%\! Data and Mods Go Here !.txt" echo %INSTALLDIR% >> "%USERDIR%\! Data and Mods Go Here !.txt"
echo. >> "%USERDIR%\! Data and Mods Go Here !.txt" echo. >> "%USERDIR%\! Data and Mods Go Here !.txt"
echo To run SRB2, go to: >> "%USERDIR%\! Data and Mods Go Here !.txt" echo To run SRB2, go to: >> "%USERDIR%\! Data and Mods Go Here !.txt"
echo. >> "%USERDIR%\! Data and Mods Go Here !.txt" echo. >> "%USERDIR%\! Data and Mods Go Here !.txt"
@ -185,10 +194,14 @@ for %%F in ("%STAGINGDIR%\*") DO (
) )
if ["%%~nxF"] == ["staging.bat"] ( if ["%%~nxF"] == ["staging.bat"] (
echo. echo.
) else (
if ["%%~nxF"] == ["staging.txt"] (
echo.
) else ( ) else (
move "%STAGINGDIR%\%%~nxF" "%INSTALLDIR%\%%~nxF" move "%STAGINGDIR%\%%~nxF" "%INSTALLDIR%\%%~nxF"
) )
) )
)
: Finished : Finished