modded7/launchscripts/launch.bat
Exaxxion d3c771d94f
Update buildscripts (#335)
Merged changes from https://github.com/Nomifactory/Nomifactory/tree/dev/buildtools made after February 2022 (when I helped @tracer4b get the build scripts at the time set up).

CurseForge subsequently did its API changes so the old scripts don't work anymore.

You will need to create a Secret called CFCORE_API_TOKEN which contains the CurseForge API authentication token you wish to use (for https://api.curseforge.com). When running build scripts locally, you need to have an environment variable set with the same name and value.

This token allows the script to download mod jars required for building the server zip. Without this token, at the very least mods that disallow third-party downloads would return blank download links and that build target would fail. It might be needed to use the API at all, but @NotMyWing is our CICD author and resident expert, so I would defer to him on details.

/* Commits */

* Switch API calls to CFCore (#914)

Necessary to continue using the CurseForge API.

* Propagate the CFCore token to GHA

* Move download URL forging to fetchFileInfo

* Add CurseForge Beta deployment workflow (#944)

---------

Co-authored-by: Neeve <winwyv@gmail.com>
2023-04-17 18:21:45 +10:00

37 lines
891 B
Batchfile

:: Server Launch Script
::
:: Thrown together by Neeve in under five minutes, Public Domain
:: https://github.com/Neeve01
::
:: Added java version check by t0suj4, Public Domain
:: https://github.com/t0su4
:: DO NOT EDIT UNLESS YOU KNOW WHAT YOU'RE DOING
@ECHO OFF
SET FORGEJAR={{{forgeJar}}}
SET JAVA_PARAMETERS={{{jvmArgs}}}
:: these you can edit
SET MIN_RAM={{{minRAM}}}
SET MAX_RAM={{{maxRAM}}}
:: DO NOT EDIT ANYTHING PAST THIS LINE
SET LAUNCHPARAMS=-server -Xms%MIN_RAM% -Xmx%MAX_RAM% %JAVA_PARAMETERS% -Dlog4j.configurationFile=log4j2_112-116.xml -jar %FORGEJAR% nogui
echo Checking java version...
echo.
java -version
echo.
echo The expected java version is 1.8. Not higher, not lower.
echo.
echo Launching the server...
echo.
echo ^> java %LAUNCHPARAMS%
echo.
java %LAUNCHPARAMS%
echo.
echo ^> The server has stopped. If it's a crash, please read the output above.
echo.
pause