diff --git a/CMakeLists.txt b/CMakeLists.txt index d66000c..f0a381d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) # Version -set(APP_VERSION "4.2.0") +set(APP_VERSION "4.3.0") add_executable(winrar-keygen _tmain.cpp @@ -20,6 +20,7 @@ add_executable(winrar-keygen ) if(WIN32) + enable_language(RC) target_sources(winrar-keygen PRIVATE winrar-keygen.rc) endif() diff --git a/_tmain.cpp b/_tmain.cpp index 7939ee6..b4a9a5b 100644 --- a/_tmain.cpp +++ b/_tmain.cpp @@ -25,7 +25,7 @@ #endif #ifndef APP_VERSION -#define APP_VERSION "4.2.0" +#define APP_VERSION "4.3.0" #endif #ifdef _WIN32 @@ -393,6 +393,15 @@ int CompareAndPrintUpdate(const std::string& currentVersion, const std::string& Version local = ParseVersion(currentVersion); Version remote = ParseVersion(remoteTag); + if (!local.valid) { +#ifdef _WIN32 + std::wcerr << L"Error: Could not parse current version '" << Utf8ToWide(currentVersion) << L"'.\n"; +#else + std::cerr << "Error: Could not parse current version '" << currentVersion << "'.\n"; +#endif + return -1; + } + if (!remote.valid) { #ifdef _WIN32 std::wcerr << L"Error: Could not parse remote version '" << Utf8ToWide(remoteTag) << L"'.\n"; diff --git a/vcpkg.json b/vcpkg.json index 81317a8..f0ae9a4 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "winrar-keygen", - "version": "4.2.0", + "version": "4.3.0", "dependencies": [ "gmp" ] diff --git a/winrar-keygen.rc b/winrar-keygen.rc index e48b65f..e938707 100644 --- a/winrar-keygen.rc +++ b/winrar-keygen.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,2,0,0 - PRODUCTVERSION 4,2,0,0 + FILEVERSION 4,3,0,0 + PRODUCTVERSION 4,3,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +69,12 @@ BEGIN BEGIN VALUE "CompanyName", "WinRAR Keygen" VALUE "FileDescription", "WinRAR Key Generation Tool" - VALUE "FileVersion", "4.2.0" + VALUE "FileVersion", "4.3.0" VALUE "InternalName", "winrar-keygen.exe" VALUE "LegalCopyright", "Copyright (C) 2021 Bitcookies" VALUE "OriginalFilename", "winrar-keygen.exe" VALUE "ProductName", "WinRAR Keygen" - VALUE "ProductVersion", "4.2.0" + VALUE "ProductVersion", "4.3.0" END END BLOCK "VarFileInfo"