Compare commits
1 Commits
v1.1
...
8698e6b57b
| Author | SHA1 | Date | |
|---|---|---|---|
| 8698e6b57b |
33
native.cmd
Normal file
33
native.cmd
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
REM YOUR LOCAL GRAAL VM INSTALLATION
|
||||||
|
set JAVA_HOME=D:\programas\graalvm-jdk-21.0.7+8.1
|
||||||
|
REM generated file
|
||||||
|
set BIN_FILE=totp
|
||||||
|
|
||||||
|
set DEST_DIR=C:\Users\rubencj\util
|
||||||
|
|
||||||
|
set PATH=%JAVA_HOME%\bin;%CLOJURE_HOME%;%PATH%
|
||||||
|
set NATIVE=%JAVA_HOME%\bin\native-image.cmd
|
||||||
|
|
||||||
|
|
||||||
|
echo Using GraalVM native compiler: %NATIVE%
|
||||||
|
|
||||||
|
echo Creating uberjar
|
||||||
|
clojure -T:build uber
|
||||||
|
|
||||||
|
set UBERJAR=
|
||||||
|
for /f "delims=" %%a in ('dir /b /s target\clj-totp-*-standalone.jar') do @set UBERJAR=%%a
|
||||||
|
echo Created uberjar: %UBERJAR%
|
||||||
|
|
||||||
|
echo "Creating native image"
|
||||||
|
cmd /c %NATIVE% -jar %UBERJAR% -o target\%BIN_FILE% -H:+ReportExceptionStackTraces --features=clj_easy.graal_build_time.InitClojureClasses --report-unsupported-elements-at-runtime --verbose --no-fallback -H:ReflectionConfigurationFiles=reflect_config.json -H:-CheckToolchain
|
||||||
|
|
||||||
|
|
||||||
|
echo Executable created: target\%BIN_FILE%.exe
|
||||||
|
|
||||||
|
copy target\%BIN_FILE%.exe %DEST_DIR%
|
||||||
|
echo Native image copied to %DEST_DIR%\%BIN_FILE%.exe
|
||||||
Reference in New Issue
Block a user