-
Notifications
You must be signed in to change notification settings - Fork 28
Wrapper Unicode support & workflow tuning #1113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.