oyvindberg/tui-scala

Solve / document how to build a Native Image

Closed this issue · 0 comments

For now a workaround is needed:

    val newJniLibraryPath = started.projectPaths(demoProject).resourcesDirs.generated / jniLibraryPath.getFileName.toString
    Files.createDirectories(newJniLibraryPath.getParent)
    Files.copy(jniLibraryPath, newJniLibraryPath, StandardCopyOption.REPLACE_EXISTING)
    started.logger.info(s"workaround for https://github.com/oracle/graal/issues/5219 : copy $jniLibraryPath to $newJniLibraryPath")

(see https://github.com/oyvindberg/tui-scala/blob/master/scripts/src/scala/tui/scripts/GenNativeImage.scala#L16-L19 )

Likely related to oracle/graal#5219