Qt Plugins with external libraries - dll

I'm devellopping a QT application with QT Plugins.
my plugins need external libraries(.dll) to run. I want to put all my plugins in a "plugins" folder in a folder for each plugin. In each folder I want to put the librairies link to the plugin. At this moment, I must put all libraries of all plugins next to the executable of my application.
Have you any idea to give the path of the plugin external application to the main application?

Related

Intellij IDEA generating html y jnlp for java fx artifact

Why when I'm generating an artifact for a javafx application using Intellij IDEA, besides the .jar, it generates a .html and a .jnlp file?, are those two necessary for the application to work, if not is there a setting I can change in order to don't create those anymore?
Files Required for Various JavaFX Execution Modes
it generates a .html and a .jnlp file?, are those two necessary for the application to work
The files required for deployment depend on the execution mode of your application.
If your application is embedded in a browser (e.g. executes via the Java plugin like a traditional Java applet), then you require all of the .html, .jnlp and .jar files.
If your application is launched from a browser via Webstart using the Java deployment toolkit, then you require all of the .html, .jnlp and .jar files.
If your application is launched via Webstart from a web page via a direct href link to the jnlp file, then you only need the .jnlp and .jar file.
If your application is distributed as a "standalone program" (e.g. "Users launch it using a Java launcher, such as java -jar MyApp.jar, or by double-clicking the application JAR file."), then you only need the .jar file.
If your application is distributed as a "self-contained" application then you need none of the .jnlp, .html or .jar files, as everything required to run your application will be packaged into a native install package (e.g. .rpm, .msi, .deb, .dmg) that you will distribute.
Suggested Approach
As you will be using the "standalone program" form of distribution, you only require the .jar file for distribution and can ignore other files created by the Java packaging tools.
While you could have Idea package your application as a JAR by choosing Build | Build Artifacts | Edit... | + | JAR | From modules with dependencies..., I don't recommend that as you will also need to set a main class in the manifest and will lose some of the functionality of files which are packaged using Idea's "JavaFX Application" packaging type, such as in-built detection that the Java runtime used to launch the application meets minimum requirements to run JavaFX applications and transparent network proxy support.
So instead, just use, unchanged, the Idea artifact packaging configuration that you have already setup. Ignore the .html files and .jnlp files output. Just distribute the .jar file to your users along with instructions on how to launch it either via java -jar MyApp.jar or double-clicking the .jar after a Java runtime has been installed on their machine.
Portable Build Advice
If it is only you developing the project and you are unfamiliar with external build tools such as maven or gradle, then it is (probably) simpler to use the artifact packaging features built into your Idea IDE rather than to learn and use external tools.
If your project might potentially be worked on by other developers or builds are to be produced and tested within a continuous integration system such as Jenkins, I do not recommend relying on IDE specific build systems such as the artifact packager in Idea. Instead, use an external build tool such as maven or gradle. There is a maven plugin and a gradle plugin for JavaFX build.

Getting contents and natures of all projects in a Maven build

Currently I'm working on a Maven plugin that should generate files in all projects (OSGi bundles) that have a certain Eclipse project nature.
How can I access the contents of the projects included in the build and the project natures by using the Maven API?
Maven is a standalone build tool, not an Eclipse plugin. You cannot access Eclipse project settings from core Maven API.
Eclipse supports Maven with the M2E Eclipse plugin. It is possible to write M2E extensions and in the extension you can query the project natures via the functions of AbstractProjectConfigurator class.
However, M2E extensions will not run when you compile your code in the command line. I suggest that you choose one of the followings:
Write an Eclipse plugin that generates the source code into the src folder of the maven project. Code generation should be started by the user manually (selecting a context menu in the project or something).
Avoid using Eclipse project natures and solve your questions based on analyzing the source and pom of your project.
If you need to react on certain aspects in the source code like it looks from the thread with Balazs then you can simply write an ordinary maven plugin and include it in the parent pom. It will then run in every project and can analyze the code and react based on it.

guice-assistedinject.jar in Eclipse target platform but not addable in plug-in's dependencies

I'm developing an Eclipse RCP application with Eclipse 4.4 Luna M5 and I'm using Guice 3.0.
So I added guice.jar to my target platform and for every plug-in I'm developing I can add bundle com.google.inject to the plug-in's dependencies using the plug-in manifest editor of Eclipse. So far, everything works fine.
Now the problem: I want to use guice assisted injects (#Assisted).
So I added guice-assistedinject.jar to my target platform. (I'm using a .target file = Eclipse Target definition file).
In then "Content" tab of the .target file editor Eclipse correctly shows me the fragment bundle com.google.inject.assistinject 3.0 from guice-assistedinject.jar, but I cannot add this bundle or an exported package of this bundle to the dependencies of the plug-in projects I'm developing.
When I press "Add" in the plug-in manifest editor, com.google.inject.assistedinject is not in the list of addable dependencies? What's wrong?
Here my comment as answer again:
OK, found the solution: it's a PDE problem, see accepted answer in Eclipse OSGi bundle reqiure another bundle's fragment
After changing the manifest of my guice-3.0.jar in the target platform like described in the link above, I needed to do the following:
Reload the target platform (Windows -> Preferences -> Plug-in development -> Target platform) and restart eclipse.
Remove the bundle com.google.inject from the required bundles of my plug-in.
Add all needed com.google.inject packages to "imported packages" of my plug-in. Now in the list of packages I can see com.google.inject.assistedinject.Assisted and import it!

Is it possible to use an eclipse plugin project as jar library in a regular java project?

I have an eclipse plugin that I would like to access some classes in a regular Java Project. I was wondering if it is possible to generate a jar file from the plugin and then use that jar file in the Java Project. So in summary:
Is it possible to use an eclipse plugin project as jar library in a regular java project?
Thanks,
-- Tiago
Most of the time,an Eclipse plugin is exactly a jar file/few jar files,and on some other conditions it contains a features folder and other type files.For a single jar which is added dependency to this project,any public/static members can be accessible.
So just add it to the project's build path and you can access them.

Intellij not detecting JAR's in Play Framework project

I've loaded a playframework project into intellij. I have an external jar in the project (Which is in my lib folder) but for some reason intellij isn't detecting it.
The jar is also included in the SDK's for platform settings. In any other project I have in intellij it detects this JAR no problem. Anyone have any idea what I'm doing wrong?
While doing in development in idea you have to add the lib folder as a dependency to the module. It worked for me when I added the manual dependency
File->Project Structure-> Modules -> (select your module if multiple) -> dependencies
Then I just clicked 'add' to add the lib folder. Your project would start detecting the jars.
Intellij Documentation to add external jars.