Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions Wurstpack/wurstscript/grill
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail

java -jar ~/.wurst/WurstSetup.jar ${@:1:6}
RUNTIME="$HOME/.wurst/wurst-runtime/bin/java"

# Resolve script dir (absolute)
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

JAR="$DIR/grill/grill.jar"
if [[ ! -f "$JAR" ]]; then
JAR="$DIR/../grill/grill.jar"
fi

if [[ ! -f "$JAR" ]]; then
echo "[grill] ERROR: Missing jar. Searched:"
echo " $DIR/grill/grill.jar"
echo " $DIR/../grill/grill.jar"
exit 2
fi

if [[ ! -x "$RUNTIME" ]]; then
echo "[grill] ERROR: Bundled runtime not found or not executable at:"
echo " $RUNTIME"
echo "Please reinstall wurstscript via the VSCode extension."
exit 3
fi

exec "$RUNTIME" -jar "$JAR" "$@"
30 changes: 30 additions & 0 deletions Wurstpack/wurstscript/grill.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@echo off
setlocal EnableExtensions

rem ---- shared slim runtime ----
set "RUNTIME=%USERPROFILE%\.wurst\wurst-runtime\bin\java.exe"

rem script directory (trailing backslash)
set "DIR=%~dp0"

if not exist "%RUNTIME%" (
echo [wurstscript] ERROR: Runtime not found:
echo(%RUNTIME%
echo Reinstall Wurstscript via the VSCode extension.
exit /b 1
)

rem ---- fixed jar location(s), no wildcards ----
set "JAR=%DIR%grill\grill.jar"
if not exist "%JAR%" set "JAR=%DIR%..\grill\grill.jar"
if not exist "%JAR%" (
echo [grill] ERROR: Missing jar:
echo(%DIR%grill\grill.jar
echo or
echo(%DIR%..\grill\grill.jar
exit /b 1
)

rem Optional JVM flags via env var, e.g. set WURST_JAVA_OPTS=-Xmx1g
"%RUNTIME%" %WURST_JAVA_OPTS% -jar "%JAR%" %*
endlocal
16 changes: 0 additions & 16 deletions Wurstpack/wurstscript/wrapper_config.toml

This file was deleted.

5 changes: 4 additions & 1 deletion de.peeeq.wurstscript/deploy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ tasks.register("jdepsModules") {
if (!detected.split(",").contains(jdwpModule)) {
detected = detected + "," + jdwpModule
}

if (!extraJdkModules.isEmpty()) detected = detected + "," + extraJdkModules

modulesTxt.get().asFile.text = detected
Expand Down Expand Up @@ -176,6 +176,9 @@ tasks.register("assembleSlimCompilerDist", Copy) {
tasks.named("assembleSlimCompilerDist", Copy) { t ->
if (os.isWindows()) {
from("../Wurstpack/wurstscript/wurstscript.cmd") { into(".") }
from("../Wurstpack/wurstscript/wurstscript") { into(".") }
from("../Wurstpack/wurstscript/grill.cmd") { into(".") }
from("../Wurstpack/wurstscript/grill") { into(".") }
} else {
from("../Wurstpack/wurstscript/wurstscript") {
into(".")
Expand Down
Loading