Netbeans Platform Installer and JOGL - jogl

I'm trying to build an application that uses both Netbeans Platform and JOGL. So far, it runs fine from within Netbeans, but once I try to create an application that can run externally, I get some problems. The application will start (judging from the splash screen), but a window never displays, and I never get an error message. As soon as I remove the JOGL module (leaving only straight Swing code), everything works fine.
Project Setup:
1 Library Module for JOGL, including the dll's (for Windows 7 64 bit only), in the library/modules/lib folder
1 Module for a window displaying a GLJPanel, rendering a simple image with an animator
1 Module with a simple form in Swing
Has anybody seen this before?

Edit: apparently the trick in this case (using native libs when building Netbeans Platform executables) is placing the native libs in the project's root folder.
If this were not about netbean platform executables, a more generic comment is to make sure the native libs (dlls) are picked up correctly. Try adding the
-Djava.library.path=/path/to/libs option when you run it.

Related

How to run javafx with maven desktop application from a jar file outside Netbeans 11 on my laptop or another ones?

I am working on Netbeans apache 11.1. I developed so many desktop programs using java and could run them almost on any computer. But when I moved to JavaFX technology with maven I wanted to redevelop almost the same desktop apps using JavaFX, and everything worked fine into Netbeans 11.1. The problem is when I want to jar my apps and distribute them outside of Netbeans they actually do not work.
I tried everything I did in the past (which worked just fine) for instance: adding Class-Path and setting Main-Class to manifest but still does not work. I searched through a lot of forums and sites but still cannot run my app outside of Netbeans.
My code is as any code combination of JavaFX, Maven, CSS, and FXML. Everything works just fine into Netbeans. The problem is outside of it.
Although I've added openjfx-12.0.2_windows-x64_bin-sdk to windows environment path, when I attempted to run jar that's been generated by Netbeans using cmd I just get this ERROR: javafx runtime components are missing, and are required to run this application. ANY HELP PLEASE?
I don't know if I'm understanding your problem right (if not I'm sorry).
Runnable JAR JavaFX
What once helped me, was create a new run configuration (in intellij) with the main class and the JRE. After that I created a Run Maven Goal with the command line
assembly:single

Qt error with reMarkable tablet app

I have a reMarkable tablet , which I mostly love except for the lack of linux support (surprising given it is a linux-based OS). However, I've managed to find a version of a linux application that is now unofficial. This github is actually a Qt docker app, but if you look in the code for the 'Dockerfile' you can find where to download the app, which is apparently still on the server even though there's not a link from the main web page. Anyway, I downloaded it and got it mostly working, figuring out a few dependencies based on same Dockerfile code. But, I can't seem to get file dialogs to work, which is the main reason for using the app.
The error I get is:
ERROR: No native FileDialog implementation available.
Qt Labs Platform requires Qt Widgets on this setup.
Add 'QT += widgets' to .pro and create QApplication in main().
I'm not a Qt developer, so I'm lost. I'd love to get this to work. Thanks.
In the .pro file of you project you should add this line QT += widgets
or just add widgets to the line with QT += ...
Qt can use native file dialogs on some platforms, and will fall back to its own implementation if none is available. But that requires that the application is built including the QtWidgets module, and using a QApplication.
If you don't have the source code of the app and a possiblity to rebuild it, there's no chance to fix this from a binary

Messed Up Layout in Deployed Qt Application on Windows 10

When I launch my deployed application from the .exe file the layout is messed up. When I launch the app from Qt Creator, the layout is fine.
Here are the details about how I deployed my app. I am using Qt 5.5 and MinGW 32 bit 4.9.2. I am running Windows 10.
First in Qt Creator I built for release.
Next, I opened the Qt 5.5 for Desktop (MinGW 4.9.2 32 bit) console.
I navigated to my project folder and ran
windeployqt.exe --release ./APPNAME.exe
It copied all the necessary .dll and created some folders as expected.
Now when I run the app, it seems to work just fine. But the layouts are all wrong. Again, when launching the app from Qt Creator it looks great! Proper spacing and sizing of my widgets. When I launch the .exe every thing is smooshed, the ratios of my sliders are all wrong, and some text is hidden because of crowding.
What could cause this bad layout? Am I missing some dependency somehow?
I figured out my own question. The issue was not my build or my layout but that many sizePolicy parameters don't seem to take effect when launching the app from QtCreator. Not 100% sure on the explanation but I think that when launching the .exe the OS is managing interpreting some of those size policy parameters and it does it differently (perhaps more strictly it appears) than QtCreator does. (To be clear I'm not talking about how the app looks in the Design tab. I'm actually talking about launching the app from within QtCreator)
So to fix the appearance of the app I have to play around with the size policies and parameters, build, and then launch the app from the executable.

After deploying Qt app with macdeployqt (Qt 4.7.3) the app is broken

Until now deploying my Application with macdeployqt worked fine, but after upgrading to Qt 4.7.3 (Mac Qt SDK 1.1 Release Candidate) my program is broken after the deployment. This are the issues:
all icons and resource images are gone (do not show up in the toolbar)
windows don't open anymore
Cmd+Q does not quit the app
What buzzes me is that i don't understand what causes all these problems, since macdeployqt simply copies the frameworks (QtGui, QtCore, QtSql, QtNetwork in my case) into the app bundle and rewrites the links of the binary and the deployed frameworks by using otool and install_name_tool. All icons and images are compiled into the binary, so the only thing i can think of is that rewriting the links (stored as strings?) overwrites data in the data section of the binary and/or code section.
What can I do to make macdeployqt work again?
EDIT: This problem also appears in a very simple test app with just one tool button that contains an icon. After macdeployqt this icon is not visible anymore.
EDIT: If would be helpful to know if anyone can reproduce the problem.
The macdeployqt-version that comes shipped with QtSDK seems to be broken.
Remove QtSDK and install the libraries from the framework-only version (http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x). The macdeployqt included there should work.
A bug regarding this problem is already filed for that in the Qt-Bugtracker -> http://bugreports.qt-project.org/browse/QTBUG-17959

Qt creator won't run app after compiling

I checked out a Qt project hosted on google code with SVN to a local folder. When I opened it on Qt Creator, it managed to compile the project, but when it tried to run the compiled program, an error message came up on the application output:
The process could not be started!
What is wrong?
I solved this problem by going to projects>run settings and manually specifying the executable. Found this solution by googling, don't know if it's the proper way to fix this.
I assume you tried to run it manually and not from the IDE by pressing Ctrl+R, and I assume that it works when you're running it from the IDE. If that's the case, the problem is that the compiled application requires the Qt libraries and the runtime loader can't find them. When deploying the app, you need to copy the Qt libraries it links against to the application folder (on Windows), or you need to copy them to the app directory and launch it via a wrapper script which adds that directory to LD_LIBRARY_PATH (on Linux.)

Resources