gradlew.bat 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. @rem SPDX-FileCopyrightText: 2023 yuzu Emulator Project
  2. @rem SPDX-License-Identifier: GPL-3.0-or-later
  3. @if "%DEBUG%" == "" @echo off
  4. @rem ##########################################################################
  5. @rem
  6. @rem Gradle startup script for Windows
  7. @rem
  8. @rem ##########################################################################
  9. @rem Set local scope for the variables with windows NT shell
  10. if "%OS%"=="Windows_NT" setlocal
  11. set DIRNAME=%~dp0
  12. if "%DIRNAME%" == "" set DIRNAME=.
  13. set APP_BASE_NAME=%~n0
  14. set APP_HOME=%DIRNAME%
  15. @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
  16. set DEFAULT_JVM_OPTS=
  17. @rem Find java.exe
  18. if defined JAVA_HOME goto findJavaFromJavaHome
  19. set JAVA_EXE=java.exe
  20. %JAVA_EXE% -version >NUL 2>&1
  21. if "%ERRORLEVEL%" == "0" goto init
  22. echo.
  23. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
  24. echo.
  25. echo Please set the JAVA_HOME variable in your environment to match the
  26. echo location of your Java installation.
  27. goto fail
  28. :findJavaFromJavaHome
  29. set JAVA_HOME=%JAVA_HOME:"=%
  30. set JAVA_EXE=%JAVA_HOME%/bin/java.exe
  31. if exist "%JAVA_EXE%" goto init
  32. echo.
  33. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
  34. echo.
  35. echo Please set the JAVA_HOME variable in your environment to match the
  36. echo location of your Java installation.
  37. goto fail
  38. :init
  39. @rem Get command-line arguments, handling Windows variants
  40. if not "%OS%" == "Windows_NT" goto win9xME_args
  41. :win9xME_args
  42. @rem Slurp the command line arguments.
  43. set CMD_LINE_ARGS=
  44. set _SKIP=2
  45. :win9xME_args_slurp
  46. if "x%~1" == "x" goto execute
  47. set CMD_LINE_ARGS=%*
  48. :execute
  49. @rem Setup the command line
  50. set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
  51. @rem Execute Gradle
  52. "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
  53. :end
  54. @rem End local scope for the variables with windows NT shell
  55. if "%ERRORLEVEL%"=="0" goto mainEnd
  56. :fail
  57. rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
  58. rem the _cmd.exe /c_ return code!
  59. if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
  60. exit /b 1
  61. :mainEnd
  62. if "%OS%"=="Windows_NT" endlocal
  63. :omega