[skip ci] fix wrong logic to determine linkable runtime image in local build scripts

This commit is contained in:
Armin Schrenk
2025-05-08 16:50:52 +02:00
parent 119d18d699
commit ef54b685f6
3 changed files with 3 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ fi
# create runtime
## check for JEP 493
JMOD_PATHS="openjfx-jmods"
if $(${JAVA_HOME}/bin/jlink --help | grep -q "Linking from run-time image enabled"); then
if ! $(${JAVA_HOME}/bin/jlink --help | grep -q "Linking from run-time image enabled"); then
JMOD_PATHS="${JAVA_HOME}/jmods:${JMOD_PATHS}"
fi
## create runtime image

View File

@@ -78,7 +78,7 @@ cp ../../../target/${MAIN_JAR_GLOB} ../../../target/mods
# create runtime
## check for JEP 493
JMOD_PATHS="openjfx-jmods"
if $(${JAVA_HOME}/bin/jlink --help | grep -q "Linking from run-time image enabled"); then
if ! $(${JAVA_HOME}/bin/jlink --help | grep -q "Linking from run-time image enabled"); then
JMOD_PATHS="${JAVA_HOME}/jmods:${JMOD_PATHS}"
fi
## create custom runtime

2
dist/win/build.ps1 vendored
View File

@@ -91,7 +91,7 @@ Move-Item -Force -Path ".\resources\javafx-jmods-*" -Destination ".\resources\ja
## create custom runtime
### check for JEP 493
$jmodPaths="$buildDir/resources/javafx-jmods";
if ((& "$Env:JAVA_HOME\bin\jlink" --help | Select-String -Pattern "Linking from run-time image enabled" -SimpleMatch | Measure-Object).Count -gt 0 ) {
if ((& "$Env:JAVA_HOME\bin\jlink" --help | Select-String -Pattern "Linking from run-time image enabled" -SimpleMatch | Measure-Object).Count -eq 0 ) {
$jmodPaths="$Env:JAVA_HOME/jmods;" + $jmodPaths;
}
### create runtime