Make sure that the URL begins with a HTTP(S) prefix + updated README file.

This commit is contained in:
LoRd_MuldeR 2020-09-29 22:07:03 +02:00
parent 93217bebc8
commit 5dcdfa7195
4 changed files with 10 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/*.html
/bin /bin
/obj /obj

View File

@ -120,6 +120,8 @@ Some options can be configured via the launcher executable's [STRINGTABLE](https
The Java download URL that will ne suggested, if **no** suitable JRE could be detected on the machine. The Java download URL that will ne suggested, if **no** suitable JRE could be detected on the machine.
If not specified, wes suggest downloading OpenJDK as provided by the [AdoptOpenJDK](https://adoptopenjdk.net/) project. If not specified, wes suggest downloading OpenJDK as provided by the [AdoptOpenJDK](https://adoptopenjdk.net/) project.
*Hint:* The URL must begin with a `http://` or `https://` prefix; otherwise the URL will be ignored!
(This option only applies to the “registry” variant of Launch5j) (This option only applies to the “registry” variant of Launch5j)
*Note:* We use the convention that the default resource string value `"?"` is used to represent an “undefined” value, because resource strings cannot be empty. You can replace the default value as needed! *Note:* We use the convention that the default resource string value `"?"` is used to represent an “undefined” value, because resource strings cannot be empty. You can replace the default value as needed!

View File

@ -49,8 +49,8 @@ END
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,2,0,0 FILEVERSION 0,3,0,0
PRODUCTVERSION 0,2,0,0 PRODUCTVERSION 0,3,0,0
FILEFLAGSMASK 0x17L FILEFLAGSMASK 0x17L
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x3L FILEFLAGS 0x3L
@ -67,8 +67,8 @@ BEGIN
BEGIN BEGIN
VALUE "ProductName", "Launch5j" VALUE "ProductName", "Launch5j"
VALUE "FileDescription", "Launch5j" VALUE "FileDescription", "Launch5j"
VALUE "ProductVersion", "0.2.0" VALUE "ProductVersion", "0.3.0"
VALUE "FileVersion", "0.2.0" VALUE "FileVersion", "0.3.0"
VALUE "InternalName", "Launch5j" VALUE "InternalName", "Launch5j"
VALUE "OriginalFilename", "launch5j.exe" VALUE "OriginalFilename", "launch5j.exe"
VALUE "LegalCopyright", "Created by LoRd_MuldeR <MuldeR2@GMX.de>" VALUE "LegalCopyright", "Created by LoRd_MuldeR <MuldeR2@GMX.de>"

View File

@ -856,6 +856,8 @@ static BOOL wait_for_process_ready(const HWND hwnd, const HANDLE process_handle,
/* Message box */ /* Message box */
/* ======================================================================== */ /* ======================================================================== */
#define IS_HTTP_URL(STR) (NOT_EMPTY(STR) && ((wcsnicmp((STR), L"http://", 7U) == 0) || (wcsnicmp((STR), L"https://", 8U) == 0)))
static const wchar_t *describe_system_error(const DWORD error_code) static const wchar_t *describe_system_error(const DWORD error_code)
{ {
const wchar_t *error_test = NULL, *buffer = NULL; const wchar_t *error_test = NULL, *buffer = NULL;
@ -902,7 +904,7 @@ static void show_jre_download_notice(const HINSTANCE hinstance, const HWND hwnd,
: awprintf(L"%u.%u", req_version_comp[0U], req_version_comp[1U])); : awprintf(L"%u.%u", req_version_comp[0U], req_version_comp[1U]));
if(version_str) if(version_str)
{ {
const wchar_t *const jre_download_ptr = AVAILABLE(jre_download_link) ? jre_download_link : JRE_DOWNLOAD_LINK_DEFAULT; const wchar_t *const jre_download_ptr = IS_HTTP_URL(jre_download_link) ? jre_download_link : JRE_DOWNLOAD_LINK_DEFAULT;
const int result = (required_bitness == 0U) const int result = (required_bitness == 0U)
? show_message_format(hwnd, MB_ICONWARNING | MB_OKCANCEL | MB_TOPMOST, title, ? show_message_format(hwnd, MB_ICONWARNING | MB_OKCANCEL | MB_TOPMOST, title,
L"This application requires the Java Runtime Environment, version %ls, or a compatible newer version.\n\n" L"This application requires the Java Runtime Environment, version %ls, or a compatible newer version.\n\n"