You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A path to the "config" directory is derived from the current process directory. This logic is fragile and redundant. jpackage runs a copy of the "post-image" script from the "config" directory, so the path to the "config" directory is the parent folder of the script:
var installerConfig = fileSystem.GetFile(WScript.ScriptFullName).ParentFolder;
The script relies on the assumption that jpackage will create the "config" directory and the "image" directory within JabRef project directory tree. This is needed to obtain a path to the root directory of the project at JabRef-post-image.wsf:12. To ensure this, '--temp', "$buildDir/installer" is passed as an argument to jpackage in build.gradle:936. This will fall off if Gradle build directory is created outside of the project tree, which is not an uncommon configuration.
Unfortunately, issue n2 doesn't have a trivial solution like issue n1 because jpackage doesn't provide sufficient context to the post-image script. As a workaround, I'd embed a path to JabRef project root in the post-image script source. This will make it agnostic to the location of the project build directory and eliminate the need for '--temp', "$buildDir/installer" in the build.gradle. To embed a path to JabRef project root in the JabRef-post-image.wsf file, I'd add a Gradle task transforming it in the build.
The text was updated successfully, but these errors were encountered:
As a maintainer of the jpackage JDK tool I noticed buildres/windows/JabRef-post-image.wsf has a couple of issues:
'--temp', "$buildDir/installer"
is passed as an argument to jpackage in build.gradle:936. This will fall off if Gradle build directory is created outside of the project tree, which is not an uncommon configuration.Unfortunately, issue n2 doesn't have a trivial solution like issue n1 because jpackage doesn't provide sufficient context to the post-image script. As a workaround, I'd embed a path to JabRef project root in the post-image script source. This will make it agnostic to the location of the project build directory and eliminate the need for
'--temp', "$buildDir/installer"
in the build.gradle. To embed a path to JabRef project root in the JabRef-post-image.wsf file, I'd add a Gradle task transforming it in the build.The text was updated successfully, but these errors were encountered: