Updated README.

This commit is contained in:
LoRd_MuldeR 2020-09-27 20:38:41 +02:00
parent 9b88d313fc
commit 5a117b4556

View File

@ -5,9 +5,7 @@ created by LoRd_MuldeR &lt;<mulder2@gme.de>&gt;**
# Introduction # Introduction
**Launch5j** is a reimagination of “Launch4j”, *with full Unicode support*. **Launch5j** is a reimagination of “Launch4j”, *with full Unicode support*. This is a tool for wrapping Java applications distributed as JARs in lightweight Windows native executables. The executable can be configured to search for a certain JRE version or use a bundled one. The wrapper also provides better user experience through an application icon, a native pre-JRE splash screen, and a Java download page in case the appropriate JRE cannot be found.
This is a tool for wrapping Java applications distributed as JARs in lightweight Windows native executables. The executable can be configured to search for a certain JRE version or use a bundled one. The wrapper also provides better user experience through an application icon, a native pre-JRE splash screen, and a Java download page in case the appropriate JRE cannot be found.
# Usage # Usage
@ -15,42 +13,42 @@ There currently are two different ways to use Launch5j with your application cod
* ***Use the launcher executable with a separate JAR file*** * ***Use the launcher executable with a separate JAR file***
Simply put the launcher executable (`launch5j.exe`) and your JAR file into the same directory. Launch5j will automatically detect the path of the JAR file based on the location of the executable file. More specifically, Launch5j detects the full path of the executable file and then replaces the `.exe` file extension with a `.jar` file extension in order to determine the path of the JAR file. Of course, you can rename the `launch5j.exe` executable file to `my_program.exe` or whatever you like. Simply put the launcher executable (`launch5j.exe`) and your JAR file into the same directory. Launch5j will automatically detect the path of the JAR file based on the location of the executable file. More specifically, Launch5j detects the full path of the executable file and then replaces the `.exe` file extension with a `.jar` file extension. You can rename the `launch5j.exe` executable to whatever you prefer.
* ***Combine the launcher executable and the JAR file (“wrapping”)*** * ***Combine the launcher executable and the JAR file (“wrapping”)***
In order to combine the launcher executable (`launch5j.wrapped.exe`) and the JAR file to a *single* file, you can simply concatenate these files. A simple way to achieve this is by running the following command-line in the terminal: In order to combine the launcher executable (`launch5j.wrapped.exe`) and the JAR file to a *single* file, you can simply concatenate these files. The executable launcher must go before the JAR file content. There are many ways to achieve this, but one method is by running the following *copy* command-line in the terminal:
copy /B launch5j.wrapped.exe + my_program.jar my_program.exe copy /B launch5j.wrapped.exe + my_program.jar my_program.exe
The resulting `my_program.exe` will be fully self-contained and is the only file you'll need to ship. The resulting `my_program.exe` will be fully self-contained and is the only file you'll need to ship.
**Warning:** Code signing, as with Microsoft&reg;'s `SignTool`, probably does **not** work with the “wrapped” executable file! If code signing is a requirement, then we recommend using a separate JAR file and just sing the launcher executable. **Warning:** Code signing, as with Microsoft&reg;'s `SignTool`, probably does **not** work with the “wrapped” executable file! If code signing is a requirement, please use a *separate* JAR file and just sing the launcher executable.
# Variants # Variants
Launch5j executables come in a number of variants, allowing you to pick the most suitable one: Launch5j executables come in a number of variants, allowing you to pick the most suitable one:
* **`wrapped`** * **`wrapped`**
Expects the JAR file and the executable launcher to be combined to a *single* file; default variant expects a separate JAR file in the same directory as the executable launcher. Expects that the JAR file and the executable launcher have been combined to a *single* file; default variant expects that a separate JAR file is present in the same directory where the executable launcher resides.
* **`registry`** * **`registry`**
Tries to detect the install path of the JRE from the Windows registry; default variant expects the JRE to be located in a path relative to the executable launcher. Tries to automatically detect the install path of the JRE from the Windows registry; default variant expects the JRE to be located in the `/runtime` path relative to the location of the executable launcher.
* **`java11`** * **`java11`**
When detecting JRE from the registry, accepts JRE version 11 or any newer JRE version; default variant accepts JRE version 8 (1.8.0) or any newer JRE version. When detecting the JRE install path from the Windows registry, accepts only JRE version 11 or any newer JRE version; default variant accepts only JRE version 8 (1.8.0) or any newer JRE version.
* **`nosplash`** * **`nosplash`**
Does **not** display a splash screen while the application is launching; default variant *does* display a splash screen while the application is launching. Does **not** display a splash screen while the application is launching; default variant *does* display a splash screen while the application is launching (will be hidden as soon as application window shows up).
* **`nowait`** * **`nowait`**
Does **not** keep the launcher executable alive while the application is running and thus won't return a meaningful exit code; default variant keeps the launcher executable alive until the application terminates and forwards the application's exit code. Does **not** keep the launcher executable alive while the application is running; default variant keeps the launcher executable alive until the application terminates and then forwards the application's exit code.
# Customizations # Customizations
Launch5j comes with a *default* executable icon and a *default* splash screen bitmap. These just server as an example and you probably want to replace them with your own *application-specific* graphics. Launch5j comes with a *default* executable icon and a *default* splash screen bitmap. These just server as an example and you probably want to replace them with your own *application-specific* graphics.
It is **not** necessary (though possible) to re-build the executable files for that purpose. Instead, you can use the excellent **Resource Hacker&trade;** utility to “edit” the pre-compiled executable files as needed: It is *not* necessary (though possible) to re-build the executable files for that purpose. Instead, you can use the excellent **Resource Hacker&trade;** utility to “edit” the pre-compiled executable files as needed:
<http://www.angusj.com/resourcehacker/> <http://www.angusj.com/resourcehacker/>
# Acknowledgment # Acknowledgment