diff --git a/Makefile b/Makefile index 8549a35..aa2d73a 100644 --- a/Makefile +++ b/Makefile @@ -11,81 +11,60 @@ # https://sourceforge.net/p/launch4j/ # ############################################################ -MTUNE ?= generic -OS_TYPE := $(shell $(CXX) -dumpmachine) - -ifeq ($(words $(filter x86_64-%,$(OS_TYPE))),0) - MARCH ?= i586 - L5J_ARCH = x86 +ifeq ($(words $(filter x86_64-%,$(shell $(CXX) -dumpmachine))),0) + EXE_ARCH = x86 + DEFAULT_MARCH := i586 else - MARCH ?= x86-64 - L5J_ARCH = x64 + EXE_ARCH = x64 + DEFAULT_MARCH := x86-64 endif +MARCH ?= $(DEFAULT_MARCH) +MTUNE ?= generic + CFLAGS = -Os -static -municode -mwindows -march=$(MARCH) -mtune=$(MTUNE) -.PHONY: all init headers resources clean +.PHONY: all init resources build strip clean -all: headers +all: strip init: mkdir -p bin mkdir -p obj resources: init - windres -o obj/icon.$(L5J_ARCH).o res/icon.rc - windres -o obj/splash_screen.$(L5J_ARCH).o res/splash_screen.rc - windres -o obj/version.$(L5J_ARCH).o res/version.rc + windres -o obj/icon.$(EXE_ARCH).o res/icon.rc + windres -o obj/splash_screen.$(EXE_ARCH).o res/splash_screen.rc + windres -o obj/version.$(EXE_ARCH).o res/version.rc -headers: init resources - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).nosplash.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).nowait.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).nowait_nosplash.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).wrapped.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).wrapped_nosplash.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).wrapped_nowait.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).wrapped_nowait_nosplash.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_nowait.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_wrapped.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_wrapped_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_wrapped_nowait.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_wrapped_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_java11.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_java11_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_java11_nowait.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_java11_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_java11_wrapped.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_java11_wrapped_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_java11_wrapped_nowait.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o obj/splash_screen.$(L5J_ARCH).o - $(CC) $(CFLAGS) -o bin/launch5j_$(L5J_ARCH).registry_java11_wrapped_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(L5J_ARCH).o obj/icon.$(L5J_ARCH).o - strip bin/launch5j_$(L5J_ARCH).exe - strip bin/launch5j_$(L5J_ARCH).nosplash.exe - strip bin/launch5j_$(L5J_ARCH).nowait.exe - strip bin/launch5j_$(L5J_ARCH).nowait_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).wrapped.exe - strip bin/launch5j_$(L5J_ARCH).wrapped_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).wrapped_nowait.exe - strip bin/launch5j_$(L5J_ARCH).wrapped_nowait_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).registry.exe - strip bin/launch5j_$(L5J_ARCH).registry_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).registry_nowait.exe - strip bin/launch5j_$(L5J_ARCH).registry_nowait_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).registry_wrapped.exe - strip bin/launch5j_$(L5J_ARCH).registry_wrapped_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).registry_wrapped_nowait.exe - strip bin/launch5j_$(L5J_ARCH).registry_wrapped_nowait_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).registry_java11.exe - strip bin/launch5j_$(L5J_ARCH).registry_java11_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).registry_java11_nowait.exe - strip bin/launch5j_$(L5J_ARCH).registry_java11_nowait_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).registry_java11_wrapped.exe - strip bin/launch5j_$(L5J_ARCH).registry_java11_wrapped_nosplash.exe - strip bin/launch5j_$(L5J_ARCH).registry_java11_wrapped_nowait.exe - strip bin/launch5j_$(L5J_ARCH).registry_java11_wrapped_nowait_nosplash.exe +build: init resources + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).nosplash.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).nowait.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).nowait_nosplash.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).wrapped.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).wrapped_nosplash.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).wrapped_nowait.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).wrapped_nowait_nosplash.exe -DDETECT_REGISTRY=0 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_nowait.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_wrapped.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_wrapped_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_wrapped_nowait.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_wrapped_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_java11.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_java11_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_java11_nowait.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_java11_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_java11_wrapped.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_java11_wrapped_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_java11_wrapped_nowait.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o obj/splash_screen.$(EXE_ARCH).o + $(CC) $(CFLAGS) -o bin/launch5j_$(EXE_ARCH).registry_java11_wrapped_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DREQUIRE_JAVA11=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/version.$(EXE_ARCH).o obj/icon.$(EXE_ARCH).o + +strip: build + find bin -type f -name '*.exe' -exec strip -v {} \; clean: init rm -f bin/*.exe diff --git a/README.md b/README.md index 346f412..86c3819 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![Launch5j](etc/logo.png) **Java JAR wrapper for creating Windows native executables -created by LoRd_MuldeR <>** +created by LoRd_MuldeR <>** # Introduction @@ -21,6 +21,13 @@ There currently are two different ways to use Launch5j with your application cod copy /B launch5j.wrapped.exe + my_program.jar my_program.exe + If you are building you application with Apache Ant, consider using the `concat` task like this: + + + + + + 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®'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. @@ -48,8 +55,27 @@ Launch5j executables come in a number of variants, allowing you to pick the most 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™** 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™**](http://www.angusj.com/resourcehacker/) utility to “edit” the pre-compiled executable files and *replace* resources as needed: + +![reshack](etc/reshacker-example.png) + +# Build instructions + +In order to build Launch5j from the sources, it is recommended to use the [*GNU C Compiler* (GCC)](https://gcc.gnu.org/) for Windows, as provided by the [*Mingw-w64*](http://mingw-w64.org/) project. Other C compilers may work, but are **not** officially supported. + +Probably the most simple way to set up the required build environment is by installing the [**MSYS2**](https://www.msys2.org/) distribution, which includes *GCC* (Mingw-w64) as well as all the required build tools, such as *Bash* and *GNU make*. + +Please make sure that the essential development tools and the MinGW-w64 toolchains are installed: + + $ pacman -S base-devel + $ pacman -S mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain + +Once the build environment has been set up, just run the provided Makefile: + + $ cd /path/to/launch5j + $ make + +*Note:* In order to create 32-Bit or 64-Bit binaries, use the `mingw32` or `mingw64` sub-system of MSYS2, respectively. # Acknowledgment diff --git a/etc/reshacker-example.png b/etc/reshacker-example.png new file mode 100644 index 0000000..2b3fab0 Binary files /dev/null and b/etc/reshacker-example.png differ