Improved the Makefile and added README file.

This commit is contained in:
LoRd_MuldeR 2020-09-27 20:33:49 +02:00
parent c626d3f66c
commit 9b88d313fc
8 changed files with 245 additions and 43 deletions

View File

@ -11,10 +11,18 @@
# https://sourceforge.net/p/launch4j/ # # https://sourceforge.net/p/launch4j/ #
############################################################ ############################################################
MARCH ?= i586 MTUNE ?= generic
MTUNE ?= intel OS_TYPE := $(shell $(CXX) -dumpmachine)
CFLAGS = -O3 -municode -mwindows -march=$(MARCH) -mtune=$(MTUNE) ifeq ($(words $(filter x86_64-%,$(OS_TYPE))),0)
MARCH ?= i586
L5J_ARCH = x86
else
MARCH ?= x86-64
L5J_ARCH = x64
endif
CFLAGS = -Os -static -municode -mwindows -march=$(MARCH) -mtune=$(MTUNE)
.PHONY: all init headers resources clean .PHONY: all init headers resources clean
@ -25,42 +33,59 @@ init:
mkdir -p obj mkdir -p obj
resources: init resources: init
windres -o obj/icon.o res/icon.rc windres -o obj/icon.$(L5J_ARCH).o res/icon.rc
windres -o obj/splash_screen.o res/splash_screen.rc windres -o obj/splash_screen.$(L5J_ARCH).o res/splash_screen.rc
windres -o obj/version.$(L5J_ARCH).o res/version.rc
headers: init resources headers: init resources
$(CC) $(CFLAGS) -o bin/head.exe -DDETECT_REGISTRY=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/icon.o obj/splash_screen.o $(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/head_nosplash.exe -DDETECT_REGISTRY=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/icon.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/head_nowait.exe -DDETECT_REGISTRY=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/icon.o obj/splash_screen.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/head_nowait_nosplash.exe -DDETECT_REGISTRY=0 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/icon.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/head_wrapped.exe -DDETECT_REGISTRY=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/icon.o obj/splash_screen.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/head_wrapped_nosplash.exe -DDETECT_REGISTRY=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/icon.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/head_wrapped_nowait.exe -DDETECT_REGISTRY=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/icon.o obj/splash_screen.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/head_wrapped_nowait_nosplash.exe -DDETECT_REGISTRY=0 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/icon.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/head_registry.exe -DDETECT_REGISTRY=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/icon.o obj/splash_screen.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/head_registry_nosplash.exe -DDETECT_REGISTRY=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/icon.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/head_registry_nowait.exe -DDETECT_REGISTRY=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/icon.o obj/splash_screen.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/head_registry_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DJAR_FILE_WRAPPED=0 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/icon.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/head_registry_wrapped.exe -DDETECT_REGISTRY=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=1 src/head.c obj/icon.o obj/splash_screen.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/head_registry_wrapped_nosplash.exe -DDETECT_REGISTRY=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=1 -DENABLE_SPLASH=0 src/head.c obj/icon.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/head_registry_wrapped_nowait.exe -DDETECT_REGISTRY=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=1 src/head.c obj/icon.o obj/splash_screen.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/head_registry_wrapped_nowait_nosplash.exe -DDETECT_REGISTRY=1 -DJAR_FILE_WRAPPED=1 -DSTAY_ALIVE=0 -DENABLE_SPLASH=0 src/head.c obj/icon.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
strip bin/head.exe $(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
strip bin/head_nosplash.exe $(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
strip bin/head_nowait.exe $(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
strip bin/head_nowait_nosplash.exe $(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
strip bin/head_wrapped.exe $(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
strip bin/head_wrapped_nosplash.exe $(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
strip bin/head_wrapped_nowait.exe $(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
strip bin/head_wrapped_nowait_nosplash.exe $(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/head_registry.exe strip bin/launch5j_$(L5J_ARCH).exe
strip bin/head_registry_nosplash.exe strip bin/launch5j_$(L5J_ARCH).nosplash.exe
strip bin/head_registry_nowait.exe strip bin/launch5j_$(L5J_ARCH).nowait.exe
strip bin/head_registry_nowait_nosplash.exe strip bin/launch5j_$(L5J_ARCH).nowait_nosplash.exe
strip bin/head_registry_wrapped.exe strip bin/launch5j_$(L5J_ARCH).wrapped.exe
strip bin/head_registry_wrapped_nosplash.exe strip bin/launch5j_$(L5J_ARCH).wrapped_nosplash.exe
strip bin/head_registry_wrapped_nowait.exe strip bin/launch5j_$(L5J_ARCH).wrapped_nowait.exe
strip bin/head_registry_wrapped_nowait_nosplash.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
clean: init clean: init
rm -f bin/*.exe rm -f bin/*.exe

82
README.md Normal file
View File

@ -0,0 +1,82 @@
![Launch5j](etc/logo.png)
**Java JAR wrapper for creating Windows native executables
created by LoRd_MuldeR &lt;<mulder2@gme.de>&gt;**
# Introduction
**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.
# Usage
There currently are two different ways to use Launch5j with your application code:
* ***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.
* ***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:
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.
**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.
# Variants
Launch5j executables come in a number of variants, allowing you to pick the most suitable one:
* **`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.
* **`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.
* **`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.
* **`nosplash`**
Does **not** display a splash screen while the application is launching; default variant *does* display a splash screen while the application is launching.
* **`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.
# 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.
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/>
# Acknowledgment
This project is partly inspired by the “Launch4j” project, even though it has been re-written from scratch:
<https://sourceforge.net/p/launch4j/>
# License
This work has been released under the MIT license:
Copyright 2020 LoRd_MuldeR <mulder2@gmx.de>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

33
build.cmd Normal file
View File

@ -0,0 +1,33 @@
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
set "MSYS2_DIR=C:\msys64"
if not exist "%MSYS2_DIR%\msys2_shell.cmd" (
echo MSYS2 SHELL not found. Please check MSYS2_DIR and try again^^!
pause
goto:eof
)
echo ========================================================================
echo Clean
echo ========================================================================
echo.
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw32 -no-start -defterm -where "%~dp0" -c "make clean"
echo.
for %%m in (32,64) do (
echo ========================================================================
echo Build %%m-Bit
echo ========================================================================
echo.
call "%MSYS2_DIR%\msys2_shell.cmd" -mingw%%m -no-start -defterm -where "%~dp0" -c "make -B"
if not "!ERRORLEVEL!"=="0" goto:build_completed
echo.
)
echo ALL IS COMPLETED.
:build_completed
pause

BIN
etc/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

BIN
res/splash_screen.orig Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

55
res/version.rc Normal file
View File

@ -0,0 +1,55 @@
/////////////////////////////////////////////////////////////////////////////
//
// Microsoft Visual C++ generated resource script.
//
#define APSTUDIO_READONLY_SYMBOLS
#include "WinResrc.h" //"afxres.h"
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Neutral resources
//
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x3L
#else
FILEFLAGS 0x2L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "ProductName", "Launch5j"
VALUE "FileDescription", "Launch5j"
VALUE "ProductVersion", "1.0.0"
VALUE "FileVersion", "1.0.0"
VALUE "InternalName", "Launch5j"
VALUE "OriginalFilename", "launch5j.exe"
VALUE "LegalCopyright", "Created by LoRd_MuldeR <MuldeR2@GMX.de>"
VALUE "CompanyName", "Muldersoft"
VALUE "LegalTrademarks", "Muldersoft"
VALUE "Comments", "This work has been released under the MIT license!"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
END

View File

@ -28,12 +28,6 @@
// Resources // Resources
#include "resource.h" #include "resource.h"
// Const
static const wchar_t *const JRE_RELATIVE_PATH = L"runtime\\bin\\javaw.exe";
static const wchar_t *const JRE_DOWNLOAD_LINK = L"https://adoptopenjdk.net/";
static const DWORD SPLASH_SCREEN_TIMEOUT = 30000U;
static const ULONGLONG JAVA_MINIMUM_VERSION = 0x0008000000000000ull;
// Options // Options
#ifndef ENABLE_SPLASH #ifndef ENABLE_SPLASH
#define ENABLE_SPLASH 1 #define ENABLE_SPLASH 1
@ -53,6 +47,19 @@ static const ULONGLONG JAVA_MINIMUM_VERSION = 0x0008000000000000ull;
#ifndef PREFER_X64 #ifndef PREFER_X64
#define PREFER_X64 1 #define PREFER_X64 1
#endif #endif
#ifndef REQUIRE_JAVA11
#define REQUIRE_JAVA11 0
#endif
// Const
static const wchar_t *const JRE_RELATIVE_PATH = L"runtime\\bin\\javaw.exe";
static const wchar_t *const JRE_DOWNLOAD_LINK = L"https://adoptopenjdk.net/";
static const DWORD SPLASH_SCREEN_TIMEOUT = 30000U;
#if REQUIRE_JAVA11
static const ULONGLONG JAVA_MINIMUM_VERSION = 0x000B000000000000ull;
#else
static const ULONGLONG JAVA_MINIMUM_VERSION = 0x0008000000000000ull;
#endif
/* ======================================================================== */ /* ======================================================================== */
/* String routines */ /* String routines */