Skip to content

Commit

Permalink
rework manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
v5p committed Oct 19, 2022
1 parent b07e0b5 commit b63e8c9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 18 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
cmake_minimum_required(VERSION 3.16)
project (CLIENT VERSION 0.18 LANGUAGES CXX)

set(CLIENT_MAJOR_VERSION "0")
set(CLIENT_MINOR_VERSION "18")
set(CLIENT_MAJOR_VERSION "1")
set(CLIENT_MINOR_VERSION "0")
set(CLIENT_PATCH_VERSION "0")
SET(CLIENT_PRERELEASE_VERSION "rc.1")
SET(CLIENT_PRERELEASE_VERSION "beta")

set(CLIENT_VERSION_STRING_MIN "${CLIENT_MAJOR_VERSION}.${CLIENT_MINOR_VERSION}.${CLIENT_PATCH_VERSION}")

if(CLIENT_PRERELEASE_VERSION)
set(CLIENT_VERSION_STRING "${CLIENT_MAJOR_VERSION}.${CLIENT_MINOR_VERSION}.${CLIENT_PATCH_VERSION}-${CLIENT_PRERELEASE_VERSION}")
else()
set(CLIENT_VERSION_STRING "${CLIENT_MAJOR_VERSION}.${CLIENT_MINOR_VERSION}.${CLIENT_PATCH_VERSION}")
set(CLIENT_VERSION_STRING CLIENT_VERSION_STRING_MIN)
endif()

set(RAPIDJSON ${PROJECT_SOURCE_DIR}/rapidjson)
Expand Down
10 changes: 9 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ file(GLOB src
"../utils/*.cpp"
)

add_definitions(-DCLIENT_VERSION_STRING="${CLIENT_VERSION_STRING}" -DWH_USE_WININET)
add_definitions(
-DCLIENT_VERSION_STRING="${CLIENT_VERSION_STRING}"
-DCLIENT_VERSION_STRING_MIN="${CLIENT_VERSION_STRING_MIN}"
-DCLIENT_MAJOR_VERSION=${CLIENT_MAJOR_VERSION}
-DCLIENT_MINOR_VERSION=${CLIENT_MINOR_VERSION}
-DCLIENT_PATCH_VERSION=${CLIENT_PATCH_VERSION}
-DWH_USE_WININET
)

add_executable(Client WIN32 ${src})
target_sources(Client PRIVATE Resource.rc)
target_include_directories(Client PRIVATE
Expand Down
31 changes: 18 additions & 13 deletions src/Resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,28 @@ LANGUAGE LANG_ENGLISH,
// Version
//

VS_VERSION_INFO VERSIONINFO FILEVERSION 0,
0, 4, 0 PRODUCTVERSION 0, 0, 4,
0 FILEFLAGSMASK 0x3fL
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, CLIENT_MAJOR_VERSION, CLIENT_MINOR_VERSION, CLIENT_PATCH_VERSION
PRODUCTVERSION 0, CLIENT_MAJOR_VERSION, CLIENT_MINOR_VERSION, CLIENT_PATCH_VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK
"StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName",
"Chief Software" VALUE "FileDescription",
"Krunker Client" VALUE "FileVersion",
CLIENT_VERSION_STRING VALUE "InternalName",
"Client.exe" VALUE "LegalCopyright",
"Copyright (C) 2021 Chief Software" VALUE "OriginalFilename",
"Client.exe" VALUE "ProductName", "Chief Client++" VALUE "ProductVersion",
CLIENT_VERSION_STRING END END BLOCK "VarFileInfo" BEGIN VALUE "Translation",
0x409, 1200 END END
FILEOS 0x40004L FILETYPE 0x1L FILESUBTYPE 0x0L
BEGIN BLOCK
"StringFileInfo" BEGIN BLOCK "040904b0" BEGIN
VALUE "CompanyName", "Chief Software"
VALUE "FileDescription", "A Desktop Krunker Client"
VALUE "FileVersion", CLIENT_VERSION_STRING
VALUE "LegalCopyright", "Copyright (C) 2021 Chief Software"
VALUE "ProductName", "Chief Client"
VALUE "ProductVersion", CLIENT_VERSION_STRING_MIN
END
END
BLOCK "VarFileInfo" BEGIN VALUE "Translation",
0x409, 1200
END END

#endif // English (United States) resources

0 comments on commit b63e8c9

Please sign in to comment.