File tree Expand file tree Collapse file tree 4 files changed +61
-19
lines changed
Expand file tree Collapse file tree 4 files changed +61
-19
lines changed Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /usr/bin/env bash
2+ set -euo pipefail
23
3- java -jar ~ /.wurst/WurstSetup.jar ${@: 1: 6}
4+ RUNTIME=" $HOME /.wurst/wurst-runtime/bin/java"
5+
6+ # Resolve script dir (absolute)
7+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
8+
9+ JAR=" $DIR /grill/grill.jar"
10+ if [[ ! -f " $JAR " ]]; then
11+ JAR=" $DIR /../grill/grill.jar"
12+ fi
13+
14+ if [[ ! -f " $JAR " ]]; then
15+ echo " [grill] ERROR: Missing jar. Searched:"
16+ echo " $DIR /grill/grill.jar"
17+ echo " $DIR /../grill/grill.jar"
18+ exit 2
19+ fi
20+
21+ if [[ ! -x " $RUNTIME " ]]; then
22+ echo " [grill] ERROR: Bundled runtime not found or not executable at:"
23+ echo " $RUNTIME "
24+ echo " Please reinstall wurstscript via the VSCode extension."
25+ exit 3
26+ fi
27+
28+ exec " $RUNTIME " -jar " $JAR " " $@ "
Original file line number Diff line number Diff line change 1+ @ echo off
2+ setlocal EnableExtensions
3+
4+ rem ---- shared slim runtime ----
5+ set " RUNTIME = %USERPROFILE% \.wurst\wurst-runtime\bin\java.exe"
6+
7+ rem script directory (trailing backslash)
8+ set " DIR = %~dp0 "
9+
10+ if not exist " %RUNTIME% " (
11+ echo [wurstscript] ERROR: Runtime not found:
12+ echo(%RUNTIME%
13+ echo Reinstall Wurstscript via the VSCode extension.
14+ exit /b 1
15+ )
16+
17+ rem ---- fixed jar location(s), no wildcards ----
18+ set " JAR = %DIR% grill\grill.jar"
19+ if not exist " %JAR% " set " JAR = %DIR% ..\grill\grill.jar"
20+ if not exist " %JAR% " (
21+ echo [grill] ERROR: Missing jar:
22+ echo(%DIR% grill\grill.jar
23+ echo or
24+ echo(%DIR% ..\grill\grill.jar
25+ exit /b 1
26+ )
27+
28+ rem Optional JVM flags via env var, e.g. set WURST_JAVA_OPTS=-Xmx1g
29+ " %RUNTIME% " %WURST_JAVA_OPTS% -jar " %JAR% " %*
30+ endlocal
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ tasks.register("jdepsModules") {
8484 if (! detected. split(" ," ). contains(jdwpModule)) {
8585 detected = detected + " ," + jdwpModule
8686 }
87-
87+
8888 if (! extraJdkModules. isEmpty()) detected = detected + " ," + extraJdkModules
8989
9090 modulesTxt. get(). asFile. text = detected
@@ -176,6 +176,9 @@ tasks.register("assembleSlimCompilerDist", Copy) {
176176tasks. named(" assembleSlimCompilerDist" , Copy ) { t ->
177177 if (os. isWindows()) {
178178 from(" ../Wurstpack/wurstscript/wurstscript.cmd" ) { into(" ." ) }
179+ from(" ../Wurstpack/wurstscript/wurstscript" ) { into(" ." ) }
180+ from(" ../Wurstpack/wurstscript/grill.cmd" ) { into(" ." ) }
181+ from(" ../Wurstpack/wurstscript/grill" ) { into(" ." ) }
179182 } else {
180183 from(" ../Wurstpack/wurstscript/wurstscript" ) {
181184 into(" ." )
You can’t perform that action at this time.
0 commit comments