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
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
permissions:
contents: read
env:
JAVA_TOOL_OPTIONS: >-
-XX:+UseCompactObjectHeaders
-XX:+UseStringDeduplication
GRADLE_OPTS: -Dorg.gradle.daemon=false
defaults:
run:
Expand Down Expand Up @@ -155,7 +158,7 @@ jobs:
- name: Publish Nightly Release (upload assets)
uses: softprops/action-gh-release@v2
with:
tag_name: nightly # tag now points at $GITHUB_SHA
tag_name: nightly
prerelease: true
draft: false
make_latest: "false"
Expand All @@ -167,4 +170,3 @@ jobs:
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

50 changes: 30 additions & 20 deletions Wurstpack/wurstscript/grill.cmd
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
@echo off
setlocal EnableExtensions
setlocal

rem ---- shared slim runtime ----
set "RUNTIME=%USERPROFILE%\.wurst\wurst-runtime\bin\java.exe"
rem Save current code page
for /f "tokens=2 delims=: " %%A in ('chcp') do set "_OLDCP=%%A"

rem script directory (trailing backslash)
rem Switch to UTF-8 for this session
chcp 65001 >NUL

rem Resolve script dir
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
set "JAVA=%DIR%wurst-runtime\bin\java.exe"
set "GRILL_JAR=%DIR%grill\grill.jar"

if not exist "%GRILL_JAR%" (
echo [grill] ERROR: Missing jar. Searched:
echo %GRILL_JAR%
rem fallback to ../grill if you want:
set "GRILL_JAR=%DIR%..\grill\grill.jar"
if not exist "%GRILL_JAR%" (
echo %GRILL_JAR%
goto :restore
)
)

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
if not exist "%JAVA%" (
echo [grill] ERROR: Bundled runtime not found or not executable at:
echo %JAVA%
echo Please reinstall wurstscript via the VS Code extension.
goto :restore
)

rem Optional JVM flags via env var, e.g. set WURST_JAVA_OPTS=-Xmx1g
"%RUNTIME%" %WURST_JAVA_OPTS% -jar "%JAR%" %*
"%JAVA%" -Dfile.encoding=UTF-8 -jar "%GRILL_JAR%" %*

:restore
rem Restore previous code page if we captured it
if defined _OLDCP chcp %_OLDCP% >NUL

endlocal
44 changes: 25 additions & 19 deletions Wurstpack/wurstscript/wurstscript.cmd
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
@echo off
setlocal EnableExtensions
setlocal

rem ---- shared slim runtime ----
set "RUNTIME=%USERPROFILE%\.wurst\wurst-runtime\bin\java.exe"
rem Save current code page
for /f "tokens=2 delims=: " %%A in ('chcp') do set "_OLDCP=%%A"

rem Switch to UTF-8
chcp 65001 >NUL

rem script directory (trailing backslash)
set "DIR=%~dp0"
set "JAVA=%DIR%wurst-runtime\bin\java.exe"
set "JAR=%DIR%wurst-compiler\wurstscript.jar"

if not exist "%RUNTIME%" (
echo [wurstscript] ERROR: Runtime not found:
echo(%RUNTIME%
echo Reinstall Wurstscript via the VSCode extension.
exit /b 1
if not exist "%JAR%" (
set "JAR=%DIR%..\wurst-compiler\wurstscript.jar"
)

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

rem Optional JVM flags via env var, e.g. set WURST_JAVA_OPTS=-Xmx1g
"%RUNTIME%" %WURST_JAVA_OPTS% -jar "%JAR%" %*
if not exist "%JAVA%" (
echo [wurstscript] ERROR: Bundled runtime not found or not executable at:
echo %JAVA%
echo Please reinstall wurstscript via the VS Code extension.
goto :restore
)

"%JAVA%" -Dfile.encoding=UTF-8 -jar "%JAR%" %*

:restore
if defined _OLDCP chcp %_OLDCP% >NUL
endlocal
Loading