Difference between Inno Setup and Launch4j

こ雲淡風輕ζ 提交于 2020-01-02 10:00:27

问题


I want to create a package for my Java application. The application has a GUI.

I am confused about the difference between the Inno Setup and the Launch4j.

My main question is does Inno Setup also create an .exe file like the Launch4j? Or do I need to create the .exe file with Launch4j and package the application with the Inno Setup?


回答1:


Inno setup output is an installer as it is an installer maker. In the other hand launch4j is a wrapper to convert a jar into a exe.

So if you want to distribute a big application in many files that you need to install or that need to be configured before launched, as is common in programs of Windows, Inno Setup is for you.

If you wanna make a simple exe that run without need to install it, sometimes called "portable exe", launch4j is what you want.

About if you need to create a exe to use Inno Setup, the answer is No, you don't need to convert it into an exe but if you don't convert it, you will need to configure the installer to check if java is installed and register the jar extension to be launched with Java if needed. If you convert with launch4j and then use it in the setup, you can forget about configuring java (but it still a good idea to check if java is installed in the wizard setup).




回答2:


I have just done this by using launch4j and Inno Setup.

Use launch4j to create exe file that wraps all files for the project such as .class file, jars for libraries, jre, etc. everything that makes your project to an app.

After use launch4j to build exe, you can use Inno Setup to build an installer exe so the users can download the installer posted by you somewhere such as your web site. The users run the installer downloaded to install your application to their machines.

By the way, I am glad to share my experience of struggling after created installer through Inno Setup. I got complaining of missing jre bundle when testing running the installer to install the app into machines. I solved the issue by the path of launch4j and jre. This is my path:

launch4j, bin/jre resourceds/bin/jre

Set launch4j, bin, and resources on same level.



来源:https://stackoverflow.com/questions/16347028/difference-between-inno-setup-and-launch4j

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!