Skip to content

Commit efec55e

Browse files
authored
Update and package all wrapper binaries (#1112)
1 parent bda9f9c commit efec55e

File tree

4 files changed

+61
-19
lines changed

4 files changed

+61
-19
lines changed

Wurstpack/wurstscript/grill

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
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" "$@"

Wurstpack/wurstscript/grill.cmd

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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

Wurstpack/wurstscript/wrapper_config.toml

Lines changed: 0 additions & 16 deletions
This file was deleted.

de.peeeq.wurstscript/deploy.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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) {
176176
tasks.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(".")

0 commit comments

Comments
 (0)