text stringlengths 0 834k |
|---|
GOTO DOWNLOADINSTALLER |
) ELSE ( |
ECHO FORGE Installer download failed a second time... stopping. |
ECHO ERROR: FORGE Installer download failed a second time... stopping. 1>> ""%~dp0serverstart.log"" 2>&1 |
SET MC_SERVER_ERROR_REASON=ForgeInstallerDownloadFailed |
GOTO ERROR |
) |
) |
REM Rename temp installer to proper installer, replacing one that was there already |
DEL /F /Q ""%~dp0forge-%MC_SERVER_MCVER%-%MC_SERVER_FORGEVER%-installer.jar"" 1>> ""%~dp0serverstart.log"" 2>&1 |
MOVE /Y ""%~dp0tmp-forgeinstaller.jar"" ""forge-%MC_SERVER_MCVER%-%MC_SERVER_FORGEVER%-installer.jar"" 1>> ""%~dp0serverstart.log"" 2>&1 |
ECHO Download complete. |
:RUNINSTALLER |
ECHO. |
ECHO Installing Forge now, please wait... |
ECHO INFO: Starting Forge install now, details below: 1>> ""%~dp0serverstart.log"" 2>&1 |
java -jar ""%~dp0forge-%MC_SERVER_MCVER%-%MC_SERVER_FORGEVER%-installer.jar"" --installServer 1>> ""%~dp0serverstart.log"" 2>&1 |
REM TODO: CHECKS TO VALIDATE SUCCESSFUL INSTALL |
REM File cleanup |
DEL /F /Q ""%~dp0tmp-forgeinstaller.jar"" 1>> ""%~dp0serverstart.log"" 2>&1 |
DEL /F /Q ""%~dp0forge-%MC_SERVER_MCVER%.html"" 1>> ""%~dp0serverstart.log"" 2>&1 |
COLOR 2F |
ECHO. |
ECHO. |
ECHO. |
ECHO ================================================ |
ECHO Forge and Minecraft Download/Install complete! |
ECHO ================================================ |
ECHO INFO: Download/Install complete... 1>> ""%~dp0serverstart.log"" 2>&1 |
ECHO. |
>nul TIMEOUT 4 |
GOTO BEGIN |
:DOWNLOADSPONGE |
REM Auto-Download not implemented yet, and might not ever be |
REM Problems with scraping github for link for bootsreapper were problematic |
REM ---Rename any spongeforge*.jar to .jar.disabled |
REM (FOR /f ""tokens=* delims=*"" %%x in ('dir ""%~dp0mods\*spongeforge*.jar"" /B /O:-D') DO MOVE /Y ""%%x"" ""%%x.disabled"") 1>> ""%~dp0serverstart.log"" 2>&1 |
REM ---Rename any sponge*bootstrap*.jar to .jar.disabled |
REM (FOR /f ""tokens=* delims=*"" %%x in ('dir ""%~dp0*sponge*bootstrap*.jar"" /B /O:-D') DO MOVE /Y ""%~dp0%%x"" ""%%x.disabled"") 1>> ""%~dp0serverstart.log"" 2>&1 |
REM ---Download spongeforge index to parse for jar download |
REM bitsadmin /rawreturn /nowrap /transfer dlspongehtml /download /priority FOREGROUND ""http://files.minecraftforge.net/maven/org/spongepowered/spongeforge/index_%MC_SERVER_MCVER%.html"" ""%~dp0spongeforge-%MC_SERVER_MCVER%.html"" 1>> ""%~dp0serverstart.log"" 2>&1 |
REM ---Download sponge bootstrap html to parse for jar download |
REM bitsadmin /rawreturn /nowrap /transfer dlspongebootstrap /download /priority FOREGROUND ""https://api.github.com/repos/simon816/spongebootstrap/releases/latest"" ""%~dp0spongebootstrap.html"" 1>> ""%~dp0serverstart.log"" 2>&1 |
REM ---Find latest bootstrap download and save to var |
REM FOR /f tokens^=* delims^=^"" %%F in ('findstr /ir ""https:\/\/github.*releases.*Bootstrap.*\.jar"" ""%~dp0spongebootstrap.html""') DO ( |
REM SET ""MC_SERVER_SPONGEBOOTSTRAPURL=%%F"" |
REM FOR /f tokens^=^30 delims^=^/ %%B in (""%%G"") DO ECHO Bootstrap Filename: %%B |
REM ---Find latest SpongeForge download and save to var http://files.minecraftforge.net/maven/org/spongepowered/spongeforge/1.10.2-2281-5.2.0-BETA-2274/spongeforge-1.10.2-2281-5.2.0-BETA-2274.jar |
REM FOR /f tokens^=* delims^=^"" %%G in ('findstr /ir ""https:\/\/files.*%MC_SERVER_MCVER%.*%MC_SERVER_FORGESHORT%.*[0-9]*\.jar"" ""%~dp0spongeforge-%MC_SERVER_MCVER%.html""') DO ( |
REM SET ""MC_SERVER_SPONGEURL=%%G"" |
REM FOR /f tokens^=^30 delims^=^/ %%S in (""%%G"") DO ECHO SpongeForge Filename: %%S |
REM ) |
REM ECHO DEBUG: Attempting to download ""%MC_SERVER_SPONGEBOOTSTRAPURL%"" 1>> ""%~dp0serverstart.log"" 2>&1 |
REM bitsadmin /rawreturn /nowrap /transfer dlforgeinstaller /download /priority FOREGROUND %MC_SERVER_SPONGEBOOTSTRAPURL% ""%~dp0%%B"" 1>> ""%~dp0serverstart.log"" 2>&1 |
REM ECHO DEBUG: Attempting to download ""%MC_SERVER_SPONGEURL%"" 1>> ""%~dp0serverstart.log"" 2>&1 |
REM bitsadmin /rawreturn /nowrap /transfer dlforgeinstaller /download /priority FOREGROUND %MC_SERVER_SPONGEURL% ""%~dp0%%S"" 1>> ""%~dp0serverstart.log"" 2>&1 |
CLS |
TITLE ERROR! SPONGE FILES NOT FOUND!! (ServerStart) |
COLOR cf |
ECHO. |
ECHO **** ERROR **** |
ECHO SPONGE has been enabled in settings.cfg but necessary files were not found... |
ECHO. |
ECHO To use Sponge: |
ECHO 1) ""MODS"" folder must have a SpongeForge JAR matching Forge %MC_SERVER_FORGESHORT% |
ECHO 2) SpongeBootstrap JAR must be present in same folder as Forge ""universal"" |
ECHO. |
ECHO **** PLEASE NOTE **** |
ECHO YOU MAY NOT RECIEVE SUPPORT from modpack devs if you use Sponge |
ECHO Use at your own risk OR DISABLE SPONGE in settings.cfg |
ECHO. |
TIMEOUT 1 >nul |
COLOR 4f |
TIMEOUT 1 >nul |
COLOR cf |
TIMEOUT 1 >nul |
COLOR 4f |
TIMEOUT 1 >nul |
COLOR cf |
TIMEOUT 1 >nul |
COLOR 0c |
PAUSE |
GOTO CLEANUP |
:ERROR |
COLOR cf |
TITLE ERROR - ""%MC_SERVER_ERROR_REASON%"" - Script Stopped |
ECHO. |
ECHO **** ERROR **** |
ECHO There was an Error, Code: ""%MC_SERVER_ERROR_REASON%"" |
ECHO ERROR: Error flagged, reason is: ""%MC_SERVER_ERROR_REASON%"" 1>> ""%~dp0serverstart.log"" 2>&1 |
ECHO. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.