Make encoding of command-line args optional; default is *enabled*.
This commit is contained in:
parent
16e7802b85
commit
d1094c350a
64
Makefile
64
Makefile
@ -55,40 +55,72 @@ resources: init
|
|||||||
windres -o obj/registry.$(CPU_ARCH).o res/registry.rc
|
windres -o obj/registry.$(CPU_ARCH).o res/registry.rc
|
||||||
|
|
||||||
build: init resources
|
build: init resources
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -o bin/launch5j_$(CPU_ARCH).exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH).exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -o bin/launch5j_$(CPU_ARCH)_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -o bin/launch5j_$(CPU_ARCH)_nowait.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -o bin/launch5j_$(CPU_ARCH)_nowait_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_nosplash_noenc.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -o bin/launch5j_$(CPU_ARCH)_registry.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_nowait.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -o bin/launch5j_$(CPU_ARCH)_registry_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_nowait_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -o bin/launch5j_$(CPU_ARCH)_registry_nowait.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_nowait_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -o bin/launch5j_$(CPU_ARCH)_registry_nowait_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_nowait_nosplash_noenc.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -o bin/launch5j_$(CPU_ARCH)_wrapped.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_registry.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_registry_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_nowait.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_registry_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_nowait_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_registry_nosplash_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_registry_nowait.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_registry_nowait_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_registry_nowait_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=0 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_registry_nowait_nosplash_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_wrapped.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_nosplash_noenc.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_nowait.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_nowait_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_nowait_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=0 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_nowait_nosplash_noenc.exe src/head.c obj/common.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=1 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_nosplash_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=1 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/splash_screen.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=1 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait_nosplash.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
$(CC) $(CFLAGS) -DL5J_JAR_FILE_WRAPPED=1 -DL5J_DETECT_REGISTRY=1 -DL5J_STAY_ALIVE=0 -DL5J_ENABLE_SPLASH=0 -DL5J_ENCODE_ARGS=0 -o bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait_nosplash_noenc.exe src/head.c obj/common.$(CPU_ARCH).o obj/registry.$(CPU_ARCH).o $(LDFLAGS)
|
||||||
|
|
||||||
strip: build
|
strip: build
|
||||||
strip bin/launch5j_$(CPU_ARCH).exe
|
strip bin/launch5j_$(CPU_ARCH).exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_nosplash.exe
|
strip bin/launch5j_$(CPU_ARCH)_nosplash.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_nosplash_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_nowait.exe
|
strip bin/launch5j_$(CPU_ARCH)_nowait.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_nowait_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_nowait_nosplash.exe
|
strip bin/launch5j_$(CPU_ARCH)_nowait_nosplash.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_nowait_nosplash_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_registry.exe
|
strip bin/launch5j_$(CPU_ARCH)_registry.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_registry_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_registry_nosplash.exe
|
strip bin/launch5j_$(CPU_ARCH)_registry_nosplash.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_registry_nosplash_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_registry_nowait.exe
|
strip bin/launch5j_$(CPU_ARCH)_registry_nowait.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_registry_nowait_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_registry_nowait_nosplash.exe
|
strip bin/launch5j_$(CPU_ARCH)_registry_nowait_nosplash.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_registry_nowait_nosplash_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_wrapped.exe
|
strip bin/launch5j_$(CPU_ARCH)_wrapped.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_wrapped_nosplash.exe
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_nosplash.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_nosplash_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_wrapped_nowait.exe
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_nowait.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_nowait_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_wrapped_nowait_nosplash.exe
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_nowait_nosplash.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_nowait_nosplash_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry.exe
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_nosplash.exe
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_nosplash.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_nosplash_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait.exe
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait_noenc.exe
|
||||||
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait_nosplash.exe
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait_nosplash.exe
|
||||||
|
strip bin/launch5j_$(CPU_ARCH)_wrapped_registry_nowait_nosplash_noenc.exe
|
||||||
|
|
||||||
clean: init
|
clean: init
|
||||||
$(RM) bin/*.$(SUFFIX)
|
$(RM) bin/*.$(SUFFIX)
|
||||||
|
@ -30,50 +30,51 @@ public class Generator {
|
|||||||
|
|
||||||
private final static String EMPTY = "";
|
private final static String EMPTY = "";
|
||||||
private final static Pattern RTRIM = Pattern.compile("\\s+$");
|
private final static Pattern RTRIM = Pattern.compile("\\s+$");
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
final List<String> filenNames = new ArrayList<String>();
|
final List<String> filenNames = new ArrayList<String>();
|
||||||
final PrintStream out = new PrintStream(System.out, true, StandardCharsets.UTF_8.name());
|
final PrintStream out = new PrintStream(System.out, true, StandardCharsets.UTF_8.name());
|
||||||
|
|
||||||
outputTemplate(out, "header");
|
outputTemplate(out, "header");
|
||||||
|
|
||||||
out.println("build: init resources");
|
out.println("build: init resources");
|
||||||
for(int wrapped = 0; wrapped < 2; ++wrapped) {
|
for (int wrapped = 0; wrapped < 2; ++wrapped) {
|
||||||
for(int registry = 0; registry < 2; ++registry) {
|
for (int registry = 0; registry < 2; ++registry) {
|
||||||
for(int stayAlive = 1; stayAlive > -1; --stayAlive) {
|
for (int stayAlive = 1; stayAlive > -1; --stayAlive) {
|
||||||
for(int enableSplash = 1; enableSplash > -1; --enableSplash) {
|
for (int enableSplash = 1; enableSplash > -1; --enableSplash) {
|
||||||
out.println(generateCommand(
|
for (int encArgs = 1; encArgs > -1; --encArgs) {
|
||||||
filenNames, wrapped, registry, stayAlive, enableSplash));
|
out.println(generateCommand(filenNames, wrapped, registry, stayAlive, enableSplash, encArgs));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out.println("\nstrip: build");
|
out.println("\nstrip: build");
|
||||||
for(final String fileName : filenNames) {
|
for (final String fileName : filenNames) {
|
||||||
out.printf("\tstrip %s\n", fileName);
|
out.printf("\tstrip %s\n", fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
out.println();
|
out.println();
|
||||||
outputTemplate(out, "footer");
|
outputTemplate(out, "footer");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void outputTemplate(final PrintStream out, final String name) throws IOException {
|
private static void outputTemplate(final PrintStream out, final String name) throws IOException {
|
||||||
try(final InputStream in = Generator.class.getResourceAsStream(String.format("/.assets/templates/%s.mak", name))) {
|
try (final InputStream in = Generator.class.getResourceAsStream(String.format("/.assets/templates/%s.mak", name))) {
|
||||||
if(in == null) {
|
if (in == null) {
|
||||||
throw new IOException("Failed to open '" + name + "' template file!");
|
throw new IOException("Failed to open '" + name + "' template file!");
|
||||||
}
|
}
|
||||||
try(final BufferedReader reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))) {
|
try (final BufferedReader reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))) {
|
||||||
boolean blank = false, first = true;
|
boolean blank = false, first = true;
|
||||||
String line;
|
String line;
|
||||||
while((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
line = RTRIM.matcher(line).replaceAll(EMPTY);
|
line = RTRIM.matcher(line).replaceAll(EMPTY);
|
||||||
if(line.isEmpty()) {
|
if (line.isEmpty()) {
|
||||||
blank = true;
|
blank = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(blank) {
|
if (blank) {
|
||||||
if(!first) {
|
if (!first) {
|
||||||
out.println();
|
out.println();
|
||||||
}
|
}
|
||||||
blank = false;
|
blank = false;
|
||||||
@ -86,57 +87,57 @@ public class Generator {
|
|||||||
out.println();
|
out.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String generateCommand(final List<String> filenNames,
|
private static String generateCommand(final List<String> outNames, final int wrapped, final int registry, final int stayAlive, final int enableSplash, final int encArgs) {
|
||||||
final int wrapped, final int registry, final int stayAlive, final int enableSplash)
|
final String fileName = String.format("bin/launch5j_$(CPU_ARCH)%s.exe",
|
||||||
{
|
generateNameSuffix(wrapped, registry, stayAlive, enableSplash, encArgs));
|
||||||
final String fileName = String.format("bin/launch5j_$(CPU_ARCH)%s.exe",
|
final StringBuilder cmdLine = new StringBuilder(
|
||||||
generateNameSuffix(wrapped, registry, stayAlive, enableSplash));
|
String.format("\t$(CC) $(CFLAGS) " +
|
||||||
final StringBuilder cmdLine = new StringBuilder(String.format(
|
"-DL5J_JAR_FILE_WRAPPED=%d " +
|
||||||
"\t$(CC) $(CFLAGS) "
|
"-DL5J_DETECT_REGISTRY=%d " +
|
||||||
+ "-DL5J_JAR_FILE_WRAPPED=%d "
|
"-DL5J_STAY_ALIVE=%d " +
|
||||||
+ "-DL5J_DETECT_REGISTRY=%d "
|
"-DL5J_ENABLE_SPLASH=%d " +
|
||||||
+ "-DL5J_STAY_ALIVE=%d "
|
"-DL5J_ENCODE_ARGS=%d " +
|
||||||
+ "-DL5J_ENABLE_SPLASH=%d "
|
"-o %s " +
|
||||||
+ "-o %s "
|
"src/head.c obj/common.$(CPU_ARCH).o",
|
||||||
+ "src/head.c obj/common.$(CPU_ARCH).o",
|
wrapped,
|
||||||
wrapped,
|
registry,
|
||||||
registry,
|
stayAlive,
|
||||||
stayAlive,
|
enableSplash,
|
||||||
enableSplash,
|
encArgs,
|
||||||
fileName));
|
fileName));
|
||||||
|
if (enableSplash > 0) {
|
||||||
if(enableSplash > 0) {
|
cmdLine.append(" obj/splash_screen.$(CPU_ARCH).o");
|
||||||
append(cmdLine, ' ', "obj/splash_screen.$(CPU_ARCH).o");
|
|
||||||
}
|
}
|
||||||
if(registry > 0) {
|
if (registry > 0) {
|
||||||
append(cmdLine, ' ', "obj/registry.$(CPU_ARCH).o");
|
cmdLine.append(" obj/registry.$(CPU_ARCH).o");
|
||||||
}
|
}
|
||||||
|
cmdLine.append(" $(LDFLAGS)");
|
||||||
append(cmdLine, ' ', "$(LDFLAGS)");
|
outNames.add(fileName);
|
||||||
|
|
||||||
filenNames.add(fileName);
|
|
||||||
return cmdLine.toString();
|
return cmdLine.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String generateNameSuffix(final int wrapped, final int registry, final int stayAlive, final int enableSplash) {
|
private static String generateNameSuffix(final int wrapped, final int registry, final int stayAlive, final int enableSplash, final int encArgs) {
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
if(wrapped > 0) {
|
if (wrapped > 0) {
|
||||||
append(builder, '_', "wrapped");
|
append(builder, '_', "wrapped");
|
||||||
}
|
}
|
||||||
if(registry > 0) {
|
if (registry > 0) {
|
||||||
append(builder, '_', "registry");
|
append(builder, '_', "registry");
|
||||||
}
|
}
|
||||||
if(stayAlive == 0) {
|
if (stayAlive == 0) {
|
||||||
append(builder, '_', "nowait");
|
append(builder, '_', "nowait");
|
||||||
}
|
}
|
||||||
if(enableSplash == 0) {
|
if (enableSplash == 0) {
|
||||||
append(builder, '_', "nosplash");
|
append(builder, '_', "nosplash");
|
||||||
}
|
}
|
||||||
|
if (encArgs == 0) {
|
||||||
|
append(builder, '_', "noenc");
|
||||||
|
}
|
||||||
return (builder.length() > 0) ? builder.insert(0, '_').toString() : "";
|
return (builder.length() > 0) ? builder.insert(0, '_').toString() : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void append(final StringBuilder builder, final char sep, final String string) {
|
private static void append(final StringBuilder builder, final char sep, final String string) {
|
||||||
if(builder.length() != 0) {
|
if (builder.length() != 0) {
|
||||||
builder.append(sep);
|
builder.append(sep);
|
||||||
}
|
}
|
||||||
builder.append(string);
|
builder.append(string);
|
||||||
|
31
src/head.c
31
src/head.c
@ -42,6 +42,9 @@
|
|||||||
#ifndef L5J_STAY_ALIVE
|
#ifndef L5J_STAY_ALIVE
|
||||||
#error L5J_STAY_ALIVE flag is *not* defined!
|
#error L5J_STAY_ALIVE flag is *not* defined!
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef L5J_ENCODE_ARGS
|
||||||
|
#error L5J_ENCODE_ARGS flag is *not* defined!
|
||||||
|
#endif
|
||||||
#ifndef L5J_WAIT_FOR_WINDOW
|
#ifndef L5J_WAIT_FOR_WINDOW
|
||||||
#define L5J_WAIT_FOR_WINDOW 1
|
#define L5J_WAIT_FOR_WINDOW 1
|
||||||
#endif
|
#endif
|
||||||
@ -1011,6 +1014,7 @@ static wchar_t *encode_commandline_args(const int argc, const LPWSTR *const argv
|
|||||||
|
|
||||||
static const wchar_t *encode_commandline(const wchar_t *const command_line)
|
static const wchar_t *encode_commandline(const wchar_t *const command_line)
|
||||||
{
|
{
|
||||||
|
#if L5J_ENCODE_ARGS
|
||||||
const wchar_t * encoded = NULL;
|
const wchar_t * encoded = NULL;
|
||||||
if (NOT_EMPTY(command_line))
|
if (NOT_EMPTY(command_line))
|
||||||
{
|
{
|
||||||
@ -1023,6 +1027,9 @@ static const wchar_t *encode_commandline(const wchar_t *const command_line)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return encoded;
|
return encoded;
|
||||||
|
#else
|
||||||
|
return wcsdup(command_line);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
@ -1405,18 +1412,16 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE _hPrevInstance, PWSTR pCmdLin
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
jre_relative_path = load_string(hInstance, ID_STR_JREPATH);
|
jre_relative_path = load_string(hInstance, ID_STR_JREPATH);
|
||||||
|
const wchar_t *const jre_relative_path_offset = AVAILABLE(jre_relative_path) ? skip_leading_separator(jre_relative_path) : NULL;
|
||||||
|
if (!(java_runtime_path = aswprintf(L"%s\\%s", executable_directory, NOT_EMPTY(jre_relative_path_offset) ? jre_relative_path_offset: JRE_RELATIVE_PATH_DEFAULT)))
|
||||||
{
|
{
|
||||||
const wchar_t *const relative_path_ptr = AVAILABLE(jre_relative_path) ? skip_leading_separator(jre_relative_path) : NULL;
|
show_message(hwnd, MB_ICONERROR | MB_TOPMOST, APP_HEADING, L"The path of the Java runtime could not be determined!");
|
||||||
if (!(java_runtime_path = aswprintf(L"%s\\%s", executable_directory, NOT_EMPTY(relative_path_ptr) ? relative_path_ptr: JRE_RELATIVE_PATH_DEFAULT)))
|
goto cleanup;
|
||||||
{
|
}
|
||||||
show_message(hwnd, MB_ICONERROR | MB_TOPMOST, APP_HEADING, L"The path of the Java runtime could not be determined!");
|
if (!file_is_executable(java_runtime_path))
|
||||||
goto cleanup;
|
{
|
||||||
}
|
show_message_format(hwnd, MB_ICONERROR | MB_TOPMOST, APP_HEADING, L"The Java runtime could not be found or is invalid:\n\n%s\n\n\nRe-installing the application may fix the problem!", java_runtime_path);
|
||||||
if (!file_is_executable(java_runtime_path))
|
goto cleanup;
|
||||||
{
|
|
||||||
show_message_format(hwnd, MB_ICONERROR | MB_TOPMOST, APP_HEADING, L"The Java runtime could not be found or is invalid:\n\n%s\n\n\nRe-installing the application may fix the problem!", java_runtime_path);
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1433,14 +1438,14 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE _hPrevInstance, PWSTR pCmdLin
|
|||||||
const wchar_t *const jarfile_ptr = NOT_EMPTY(jarfile_short_path) ? jarfile_short_path : jarfile_path;
|
const wchar_t *const jarfile_ptr = NOT_EMPTY(jarfile_short_path) ? jarfile_short_path : jarfile_path;
|
||||||
command_line = AVAILABLE(jvm_extra_args)
|
command_line = AVAILABLE(jvm_extra_args)
|
||||||
? aswprintf(NOT_EMPTY(cmd_args_encoded) ? L"\"%s\" %s -Dl5j.pid=%u -jar \"%s\" %s %s" : L"\"%s\" %s -Dl5j.pid=%u -jar \"%s\" %s", java_runtime_path, jvm_extra_args, pid, jarfile_ptr, ext_args_encoded, cmd_args_encoded)
|
? aswprintf(NOT_EMPTY(cmd_args_encoded) ? L"\"%s\" %s -Dl5j.pid=%u -jar \"%s\" %s %s" : L"\"%s\" %s -Dl5j.pid=%u -jar \"%s\" %s", java_runtime_path, jvm_extra_args, pid, jarfile_ptr, ext_args_encoded, cmd_args_encoded)
|
||||||
: aswprintf(NOT_EMPTY(cmd_args_encoded) ? L"\"%s\" -Dl5j.pid=%u -jar \"%s\" %s %s" : L"\"%s\" -Dl5j.pid=%u -jar \"%s\" %s", java_runtime_path, pid, jarfile_ptr, ext_args_encoded, cmd_args_encoded);
|
: aswprintf(NOT_EMPTY(cmd_args_encoded) ? L"\"%s\" -Dl5j.pid=%u -jar \"%s\" %s %s" : L"\"%s\" -Dl5j.pid=%u -jar \"%s\" %s", java_runtime_path, pid, jarfile_ptr, ext_args_encoded, cmd_args_encoded);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const wchar_t *const jarfile_ptr = NOT_EMPTY(jarfile_short_path) ? jarfile_short_path : jarfile_path;
|
const wchar_t *const jarfile_ptr = NOT_EMPTY(jarfile_short_path) ? jarfile_short_path : jarfile_path;
|
||||||
command_line = AVAILABLE(jvm_extra_args)
|
command_line = AVAILABLE(jvm_extra_args)
|
||||||
? aswprintf(NOT_EMPTY(cmd_args_encoded) ? L"\"%s\" %s -Dl5j.pid=%u -jar \"%s\" %s" : L"\"%s\" %s -Dl5j.pid=%u -jar \"%s\"", java_runtime_path, jvm_extra_args, pid, jarfile_ptr, cmd_args_encoded)
|
? aswprintf(NOT_EMPTY(cmd_args_encoded) ? L"\"%s\" %s -Dl5j.pid=%u -jar \"%s\" %s" : L"\"%s\" %s -Dl5j.pid=%u -jar \"%s\"", java_runtime_path, jvm_extra_args, pid, jarfile_ptr, cmd_args_encoded)
|
||||||
: aswprintf(NOT_EMPTY(cmd_args_encoded) ? L"\"%s\" -Dl5j.pid=%u -jar \"%s\" %s" : L"\"%s\" -Dl5j.pid=%u -jar \"%s\"", java_runtime_path, pid, jarfile_ptr, cmd_args_encoded);
|
: aswprintf(NOT_EMPTY(cmd_args_encoded) ? L"\"%s\" -Dl5j.pid=%u -jar \"%s\" %s" : L"\"%s\" -Dl5j.pid=%u -jar \"%s\"", java_runtime_path, pid, jarfile_ptr, cmd_args_encoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure command-line was created
|
// Make sure command-line was created
|
||||||
|
Loading…
Reference in New Issue
Block a user