Skip to content

Commit

Permalink
Add build targets for Warhead and Wars
Browse files Browse the repository at this point in the history
  • Loading branch information
ccomrade committed Jan 24, 2024
1 parent 482a411 commit 05e7926
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 22 deletions.
79 changes: 60 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,61 +77,102 @@ target_link_options(LauncherBase PUBLIC /DYNAMICBASE:NO /LARGEADDRESSAWARE)

################################################################################

add_executable(Crysis WIN32
add_library(GameLauncher STATIC
Code/Launcher/Game/GameLauncher.cpp
Code/Launcher/Game/GameLauncher.h
Code/Launcher/Game/LanguageHook.cpp
Code/Launcher/Game/LanguageHook.h
Code/Launcher/Game/Main.cpp
Code/Launcher/Game/Resources.h
)

target_link_libraries(GameLauncher LauncherBase)

################################################################################

add_executable(Crysis WIN32
Code/Launcher/Game/Main.cpp
Resources/Crysis.rc
Resources/Launcher.manifest
Resources/GameLauncher.rc
)

target_link_libraries(Crysis GameLauncher)

################################################################################

# 32-bit Warhead is not supported yet
if(BUILD_BITS EQUAL 64)

add_executable(CrysisWarheadLauncher WIN32
Code/Launcher/Game/Main.cpp
Resources/CrysisWarhead.rc
Resources/Launcher.manifest
)

target_link_libraries(CrysisWarheadLauncher GameLauncher)

endif()

################################################################################

add_executable(CrysisWars WIN32
Code/Launcher/Game/Main.cpp
Resources/CrysisWars.rc
Resources/Launcher.manifest
)

target_link_libraries(CrysisWars GameLauncher)

set_target_properties(CrysisWars
PROPERTIES
RUNTIME_OUTPUT_NAME Crysis
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Wars
)

################################################################################

add_executable(CrysisDedicatedServer WIN32
Code/Launcher/DedicatedServer/DedicatedServerLauncher.cpp
Code/Launcher/DedicatedServer/DedicatedServerLauncher.h
Code/Launcher/DedicatedServer/Main.cpp
Code/Launcher/DedicatedServer/Resources.h
Resources/DedicatedServer.rc
Resources/Launcher.manifest
Resources/DedicatedServerLauncher.rc
)

target_link_libraries(CrysisDedicatedServer LauncherBase)

################################################################################

add_executable(CrysisHeadlessServer
Code/Launcher/HeadlessServer/HeadlessServerLauncher.cpp
Code/Launcher/HeadlessServer/HeadlessServerLauncher.h
Code/Launcher/HeadlessServer/Logger.cpp
Code/Launcher/HeadlessServer/Logger.h
Code/Launcher/HeadlessServer/Main.cpp
Code/Launcher/HeadlessServer/NullValidator.h
Resources/HeadlessServerLauncher.rc
Resources/HeadlessServer.rc
)

target_link_libraries(Crysis LauncherBase)
target_link_libraries(CrysisDedicatedServer LauncherBase)
target_link_libraries(CrysisHeadlessServer LauncherBase)

################################################################################

set(GAME_LAUNCHER_RESOURCES
set(CURSORS
${PROJECT_SOURCE_DIR}/Resources/CursorAmber.cur
${PROJECT_SOURCE_DIR}/Resources/CursorBlue.cur
${PROJECT_SOURCE_DIR}/Resources/CursorGreen.cur
${PROJECT_SOURCE_DIR}/Resources/CursorRed.cur
${PROJECT_SOURCE_DIR}/Resources/CursorWhite.cur
${PROJECT_SOURCE_DIR}/Resources/GameIcon.ico
)

set(DEDICATED_SERVER_LAUNCHER_RESOURCES
${PROJECT_SOURCE_DIR}/Resources/DedicatedServerIcon.ico
)
set(CRYSIS_RESOURCES ${CURSORS} ${PROJECT_SOURCE_DIR}/Resources/Crysis.ico)
set(CRYSIS_WARHEAD_RESOURCES ${CURSORS} ${PROJECT_SOURCE_DIR}/Resources/CrysisWarhead.ico)
set(CRYSIS_WARS_RESOURCES ${CURSORS} ${PROJECT_SOURCE_DIR}/Resources/CrysisWars.ico)
set(DEDICATED_SERVER_RESOURCES ${PROJECT_SOURCE_DIR}/Resources/DedicatedServer.ico)

set_source_files_properties(Resources/GameLauncher.rc
PROPERTIES OBJECT_DEPENDS "${GAME_LAUNCHER_RESOURCES}"
)

set_source_files_properties(Resources/DedicatedServerLauncher.rc
PROPERTIES OBJECT_DEPENDS "${DEDICATED_SERVER_LAUNCHER_RESOURCES}"
)
set_source_files_properties(Resources/Crysis.rc PROPERTIES OBJECT_DEPENDS "${CRYSIS_RESOURCES}")
set_source_files_properties(Resources/CrysisWarhead.rc PROPERTIES OBJECT_DEPENDS "${CRYSIS_WARHEAD_RESOURCES}")
set_source_files_properties(Resources/CrysisWars.rc PROPERTIES OBJECT_DEPENDS "${CRYSIS_WARS_RESOURCES}")
set_source_files_properties(Resources/DedicatedServer.rc PROPERTIES OBJECT_DEPENDS "${DEDICATED_SERVER_RESOURCES}")

################################################################################
File renamed without changes.
4 changes: 2 additions & 2 deletions Resources/GameLauncher.rc → Resources/Crysis.rc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Game launcher resources
// Crysis launcher resources

#include <winver.h>

#include "Launcher/Game/Resources.h"
#include "Project.h"

RESOURCE_ICON ICON "GameIcon.ico"
RESOURCE_ICON ICON "Crysis.ico"

RESOURCE_CURSOR_AMBER CURSOR "CursorAmber.cur"
RESOURCE_CURSOR_BLUE CURSOR "CursorBlue.cur"
Expand Down
Binary file added Resources/CrysisWarhead.ico
Binary file not shown.
41 changes: 41 additions & 0 deletions Resources/CrysisWarhead.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Crysis Warhead launcher resources

#include <winver.h>

#include "Launcher/Game/Resources.h"
#include "Project.h"

RESOURCE_ICON ICON "CrysisWarhead.ico"

RESOURCE_CURSOR_AMBER CURSOR "CursorAmber.cur"
RESOURCE_CURSOR_BLUE CURSOR "CursorBlue.cur"
RESOURCE_CURSOR_GREEN CURSOR "CursorGreen.cur"
RESOURCE_CURSOR_RED CURSOR "CursorRed.cur"
RESOURCE_CURSOR_WHITE CURSOR "CursorWhite.cur"

VS_VERSION_INFO VERSIONINFO
FILEVERSION PROJECT_VERSION, 0, 0, 0
PRODUCTVERSION PROJECT_VERSION, 0, 0, 0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Crytek GmbH"
VALUE "LegalCopyright", "(C) 2007 Crytek GmbH"
VALUE "ProductName", "C1-Launcher"
VALUE "ProductVersion", PROJECT_VERSION_STRING
VALUE "FileVersion", PROJECT_VERSION_STRING
VALUE "FileDescription", "Crysis Warhead"
VALUE "InternalName", "CrysisWarheadLauncher"
VALUE "OriginalFilename", "CrysisWarheadLauncher.exe"
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
Binary file added Resources/CrysisWars.ico
Binary file not shown.
41 changes: 41 additions & 0 deletions Resources/CrysisWars.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Crysis Wars launcher resources

#include <winver.h>

#include "Launcher/Game/Resources.h"
#include "Project.h"

RESOURCE_ICON ICON "CrysisWars.ico"

RESOURCE_CURSOR_AMBER CURSOR "CursorAmber.cur"
RESOURCE_CURSOR_BLUE CURSOR "CursorBlue.cur"
RESOURCE_CURSOR_GREEN CURSOR "CursorGreen.cur"
RESOURCE_CURSOR_RED CURSOR "CursorRed.cur"
RESOURCE_CURSOR_WHITE CURSOR "CursorWhite.cur"

VS_VERSION_INFO VERSIONINFO
FILEVERSION PROJECT_VERSION, 0, 0, 0
PRODUCTVERSION PROJECT_VERSION, 0, 0, 0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Crytek GmbH"
VALUE "LegalCopyright", "(C) 2007 Crytek GmbH"
VALUE "ProductName", "C1-Launcher"
VALUE "ProductVersion", PROJECT_VERSION_STRING
VALUE "FileVersion", PROJECT_VERSION_STRING
VALUE "FileDescription", "Crysis Wars"
VALUE "InternalName", "Crysis"
VALUE "OriginalFilename", "Crysis.exe"
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "Launcher/DedicatedServer/Resources.h"
#include "Project.h"

RESOURCE_ICON ICON "DedicatedServerIcon.ico"
RESOURCE_ICON ICON "DedicatedServer.ico"

VS_VERSION_INFO VERSIONINFO
FILEVERSION PROJECT_VERSION, 0, 0, 0
Expand Down
File renamed without changes.

0 comments on commit 05e7926

Please sign in to comment.