Bump version to v0.2.0

This commit is contained in:
Tindy X 2021-03-14 00:38:34 +08:00
parent bf06a5b5a6
commit 2f624e6f4d
No known key found for this signature in database
GPG Key ID: C6AD413169968D58
4 changed files with 69 additions and 6 deletions

View File

@ -8,7 +8,7 @@ ENDIF()
SET(CMAKE_CXX_STANDARD 17)
IF (NOT WIN32)
MESSAGE(FATAL_ERROR "This is not supposed to be run on non-Windows platforms!")
MESSAGE(FATAL_ERROR "This is not supposed to be run on non-Windows platforms!")
ENDIF()
@ -19,7 +19,8 @@ ELSE()
ENDIF()
ADD_EXECUTABLE(brokenithm
src/main.cpp)
src/main.cpp
src/resources.rc)
INCLUDE_DIRECTORIES(src)
LINK_DIRECTORIES(${CMAKE_SOURCE_DIR})

View File

@ -2,9 +2,11 @@
#include <atomic>
#include <thread>
#include <unistd.h>
#include <inttypes.h>
#include "socket.h"
#include "defer.h"
#include "version.h"
#include <windows.h>
std::string remote_address;
@ -219,15 +221,15 @@ void updatePacketId(uint32_t newPacketId)
{
if(last_input_packet_id > newPacketId)
{
fprintf(stderr, "[WARN] Packet #%zu came too late\n", newPacketId);
fprintf(stderr, "[WARN] Packet #%" PRIu32 " came too late\n", newPacketId);
}
else if(newPacketId > last_input_packet_id + 1)
{
fprintf(stderr, "[WARN] Packets between #%zu and #%zu total %zu packet(s) are missing, probably too late or dropped\n", last_input_packet_id, newPacketId, newPacketId - last_input_packet_id - 1);
fprintf(stderr, "[WARN] Packets between #%" PRIu32 " and #%" PRIu32 " total %" PRIu32 " packet(s) are missing, probably too late or dropped\n", last_input_packet_id, newPacketId, newPacketId - last_input_packet_id - 1);
}
else if(newPacketId == last_input_packet_id)
{
fprintf(stderr, "[WARN] Packet #%zu duplicated\n", newPacketId);
fprintf(stderr, "[WARN] Packet #%" PRIu32 " duplicated\n", newPacketId);
}
last_input_packet_id = newPacketId;
}
@ -352,7 +354,7 @@ void printInfo()
printf("=================================================\n");
printf("= Brokenithm-Evolved-Android: =\n");
printf("= Brokenithm with full IO over network =\n");
printf("= v0.1 by XTindy =\n");
printf("= " VERSION " by XTindy =\n");
printf("= Original: esterTion =\n");
printf("=================================================\n\n");
}

50
src/resources.rc Normal file
View File

@ -0,0 +1,50 @@
//
// Include the necessary resources
//
#include <winver.h>
#include <ntdef.h>
#include "version.h"
#ifdef RC_INVOKED
//
// Set up debug information
//
#if DBG
#define VER_DBG VS_FF_DEBUG
#else
#define VER_DBG 0
#endif
// ------- version info -------------------------------------------------------
VS_VERSION_INFO VERSIONINFO
FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VER_DBG
FILEOS VOS_NT
FILETYPE VFT_DRV
FILESUBTYPE VFT2_DRV_SYSTEM
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "Brokenithm-Evolved"
VALUE "FileDescription", "Brokenithm-Evolved-Android Server"
VALUE "FileVersion", VERSION
VALUE "InternalName", "Brokenithm-Evolved-Android Server"
VALUE "LegalCopyright", "(C)2021 XTindy"
VALUE "OriginalFilename", "brokenithm_server.exe"
VALUE "ProductName", "Brokenithm-Evolved"
VALUE "ProductVersion", VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409,1200
END
END
#endif

10
src/version.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef VERSION_H_INCLUDED
#define VERSION_H_INCLUDED
#define VERSION "V0.2.0"
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 0
#endif // VERSION_H_INCLUDED