Plugin depends on files that need to exist in path

Answered

Hi! The plugin I am developing depends on a couple of .dll, .exe, and other files. I am using Gradle to develop the plugin. For this to work however, they need to be in the PATH of the machine the plugin is running in. When debugging the plugin in sandbox mode, I can add the folder containing the dependencies to the path using {systemProperty 'java.library.path', 'path/to/dependencies'}. Does something similar exist for zipping the plugin, to set the path? Also: is the location where the plugin is located always fixed? (e.g. C:\Users\$user\.IntelliJIdea2019.1\config\plugins\$plugin\lib) Or, is there a way to copy these files into an existing folder in the PATH. I hope someone can help me with this problem, thanks in advance.

2 comments
Comment actions Permalink

You'll have to package such files together with your plugin. Installation path can be obtained via com.intellij.openapi.application.PluginPathManager#getPluginHome.

1
Comment actions Permalink

Thanks for the reply! I ended up setting/adding to the path using the methods specified here: https://stackoverflow.com/questions/23824368/how-can-i-configure-java-library-path-at-runtime

0

Please sign in to leave a comment.