How do I use the Bundle JRE option in Launch4j - bundle

I have worked with Java for a while now, long enough to start producing my own programs with GUIs and not just little sample programs from a text book that run in Eclipse. I wanted to make my programs more user friendly for the user, specifically the Windows users, by wrapping the executable Jar into an Exe. So I found Launch4j, it seems to do a pretty good job but I have no idea what over half of the options in that program mean (It took me an hour to figure out how to get it to make a functional Exe). I handed that to a fried to test and he returned to me saying that he was getting the no JRE found error. Well I wondered how I can force the end users to have the JRE then I noticed the bundle JRE option in Launch4j. But how do I use it? Do I download the JRE offline installer for Windows and it will run that if it can't find an installed one? Then what about proper version for the system (32-bit v 64-bit). I guess I was thinking I would lead it to this mysterious package containing a JRE and my wrapped program would use that to run. Just can someone please tell me how to use that function, what if anything I have to download, etc.
If Launch4j isn't the best program to do this then please recommend something else, I have only just started to get into this, for all I know there is a better wrapper out there.

Your "installation" will need an already installed JRE (with jre/bin folder with java.exe and all the other files) for a "bundled" JRE. You can't pack an Java installer with launch4j.
Doesn't it show to your friend the option to download and install Java if it doesn't find a JRE?
If you want to install Java alongside with your application, take a look at NSIS.
There's another one: IzPack. It creates multi-plataform installer. But, as it depends on Java, it's the same case of launch4j -> you'll need to download and install Java first. (I didn't use IzPack yet, but when I was looking for a solution, it was one of my alternatives.)

I have created my own version of the launch4j that allows downloading and installing of required JRE automatically. If you want to give it a try, get it here: https://github.com/maztan/launch4j_auto_jre_download . After running the launch4j, set the options in the "JRE" tab.

Related

How to create distribution of Python GTK3 app?

I made an application using GTK3 on Windows (Mingw_x64 installation of GTK) and I cannot really figure out how to make a distribution out of this. According to official documentation of PyGObject, it is possible in some way.
I already tried to make a package using setuptools, but PyGObject documentation is not saying much about this process and I was not able to configure setup correctly to make it work. PyGObject has a lot of dependecies and weird imports, that I do not know how to include.
I also tried Pyinstaller, which claims it has GTK support, and it really can pack it into executable, however it is not working. I tried these two options:
make only one file (.exe), but in this situations, it throws an error, that some file is not found (libpixbufloader-ani.dll)
create a directory with all needed files (libpixbufloader-ani.dll and other libs are included this time), but when running exe, another exeption occurs, this time Struct and 2 other libraries are missing (strangely, there is a folder that contains Struct)
Becouse of the missing files, I tried adding as many paths containing needed libraries as possible to Pyinstaller, but without success.
Does anyone have any experience with packaging GTK appliciations in Python? There is definitely a way to do this, but I am not very experienced with packaging. If needed, I can provide more information.
This is an issue that has been brought up on PyInstaller's GitHub page, as others (including myself) have experienced the same issue that you've mentioned.
The last time I tried the dev version of PyInstaller, the issue still wasn't fixed, but I managed to get a working executable by using PyInstaller to find the dependencies that my Python3/GTK3 app needed, and then I used cx_Freeze to generate the final executable.

CVIRTE.dll Missing error?

I want to install a software on my PC but when i clicked to install it I got
CVIRTE.dll Missing error
I search for this error but unable to download this dll file. Please provide any link to download this file
Any help would be highly appreciated
I guess this is the CVI Runtime Engine. It is needed to run Applications that were made with LabWindows/CVI or MeasurementStudio by National Instruments ( http://www.ni.com/lwcvi/ ). Usually, programmers of such applications also generate a Windows Installer Package for the application, which also does the installation of the CVI Runtime Engine. So , once you installed a CVI application like that, you usually can run other CVI application just by copying them (as long as they do not need additional packages from Ni). So, either run an installer of another application made with CVI, or just install the RTE.
Be aware that there are new versions of the RTE with every new version of CVI, and the library is getting larger and larger. So maybe you can go for an older version of the RTE, it could be more compact.
The 2015 version of the RTE can be downloaded here :
http://www.ni.com/download/labwindowscvi-run-time-engine-2015/5374/en/
Good luck !

How do I install gtk-fortran on windows 8?

I want to build a GUI for some fortran code I have. GTK-Fortran seemed like a simple option, but I'm having trouble getting everything installed in the correct place.
I am using Windows 8. I have gfortran (version 4.8.1), Cmake, and GTK+ 3 installed. As far as I can tell, the last thing I need to do is include GTK-Fortran, which I download from https://github.com/jerryd/gtk-fortran (the link to download the .zip file is on the right side of the page), but all of the instructions on what to do with it are incredibly vague to me. The INSTALL instructions seem to want me to make a new directory, C:\build, and then do something with cmake, but I'm not sure what that something is or how to do it.
I have GTK+ 3 in C:\GTK, and its bin is included in the path. I would like to just put the GTK-Fortran files within the GTK folder, but I don't think that will actually give me access to the GTK-Fortran files.
Could someone give me very clear instructions on what to do with the files for GTK-Fortran so that I can call them from my own fortran code?
The simplest way for using gtk-fortran under Windows is to install MSYS2/MINGW64, following the installation steps described in the wiki of the project:
https://github.com/vmagnin/gtk-fortran/wiki#windows

Netbeans javafx mac bundle without JRE

I am having a hard time trying to build my javafx app into .app (for mac).
I found a legit way to do that, here is resource for that:
http://docs.oracle.com/javafx/2/deployment/deploy_quick_start.htm
However, it is far from what I'm looking for. By following that tutorial, I managed to build an app from my javafx project, however the size of file was just ridiculous and it is because the whole JRE is being bundled inside. I am now looking for a way to deploy .app file with dependencies (it's important) ONLY and without JRE. (JRE should be pre-installed by user). Is there a way to do that? I really tried to find one, but faild. Hope you, guys, help me.
Instructions for packaging a JavaFX application as a native installable app without including a JRE:
JavaFX packaging tools update - Self-Contained Applications: Create Package without Java Runtime.
The tools used are the same as from the deployment quick start you mention in your question. You just set the fx:platform basedir="".
I'll just quote the article here:
This may sound a bit puzzling at first glance. Package without embedded Java Runtime is not really self-contained and obviously will not help with:
Deployment on fresh systems. JRE need to be installed separately (and this step will require admin permissions).
Possible compatibility issues due to updates of system runtime.
However, these packages are much much smaller in size. If download size matters and you are confident that user have recommended system JRE installed then this may be good option to consider if you want to improve user experience for install and launch.
Technically, this is implemented as an extension of previous feature. Pass empty string as value for 'basedir' attribute and this will be treated as request to not bundle Java runtime, e.g.
<fx:platform basedir=""/>

Totally Lost on "Installing" OpenCV / ctypes-opencv for Python 3

edit: The real solution to this is now that OpenCV supports python 3. I'm leaving the details below for anyone who happens to be stuck with an old setup.
I'm trying to get OpenCV working with Python 3. A friend showed me ctypes-opencv that appears to work with Python 3. The problem is I totally can not figure out how to "install" or get any code working. I've followed all instructions I could find from a few people mentioning installs on google and none of those seemed to work or I couldn't even get through the basics that they mentioned.
I am just hacking around with the version of IDLE that came with Python 3. No IDE.
Start with OpenCV:
The only windows installer for OpenCV 2.1 is a visual studio installer. I assume that means that it installs files that make it easier to use in Visual Studio. However, does it also mean that I can't use that installer with Python 3? I tried the vs installer together with ctypes-opencv as below, and I got errors that the dlls were not in my path (but my path variable did include the OpenCV bin folder with dlls). Is this the wrong direction?
The apparent alternative is to build OpenCV myself. I tried following the directions here and all I get is "project files may be invalid" from the CMake gui application when pressing the "Configure" button. Same when following these hints from Stack Overflow. I'm suspicious that this is also the wrong direction since I am not currently using any of the tools that are listed in the CMake configure. Is this also the wrong direction?
Next ctypes-opencv:
I installed this and the installer recognizes Python3.1 and puts itself into the site-packages folder. If I try to run demos, it tells me the dlls are not in the path although they are, as mentioned above.
Summary:
I think I generally understand each piece here (code, compile, dll, imports, ...) but I do not know how all the pieces fit together and where I am going wrong. Can someone please tell me what steps or understanding I am missing here?
I get the feeling that I need to be reading a book or two to fill in the holes in my understanding of how all these pieces fit together. I wouldn't even know what area of books to get though so any suggestions there would be appreciated as well.
Python's ctypes is a wrapper around the opencv dll files, as long as you can point to the compiled libraries it doesn't matter what the source code is set up to be edited in. For windows I would simply run the installer, then try to load the dll with ctypes. If you can get that far, any other errors can be fixed by looking at the ctypes wrapper file and editing the load section to look like your test file.
Christoph Gohlke maintains Windows binaries for many Python packages, including the production version of OpenCV 3.0 with Python 3.x bindings, released 4 June 2015:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
To install, just download the 64-bit or 32-bit .whl file appropriate for your system, then run pip install [filename]. Then the instruction import cv2 should work in your Python 3.x interpreter.
Yakiimo san, OpenCV 2.1 DLL can be loaded with ctypes. I have tested it.
p.s. I have set the C;\OpenCV2.1\bin in Env Path.

Resources