1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Merge pull request #4448 from smanolloff/split-client+develop

Split vcmiclient in two
This commit is contained in:
Ivan Savenko 2024-09-02 15:34:05 +03:00 committed by GitHub
commit ee64928454
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
41 changed files with 219 additions and 155 deletions

View File

@ -680,6 +680,7 @@ endif()
if (ENABLE_CLIENT) if (ENABLE_CLIENT)
add_subdirectory(client) add_subdirectory(client)
add_subdirectory(clientapp)
endif() endif()
if(ENABLE_SERVER) if(ENABLE_SERVER)

View File

@ -20,8 +20,8 @@ extern SDL_Surface *screen; // main screen surface
extern SDL_Surface *screen2; // and hlp surface (used to store not-active interfaces layer) extern SDL_Surface *screen2; // and hlp surface (used to store not-active interfaces layer)
extern SDL_Surface *screenBuf; // points to screen (if only advmapint is present) or screen2 (else) - should be used when updating controls which are not regularly redrawed extern SDL_Surface *screenBuf; // points to screen (if only advmapint is present) or screen2 (else) - should be used when updating controls which are not regularly redrawed
void handleQuit(bool ask = true);
/// Notify user about encountered fatal error and terminate the game /// Notify user about encountered fatal error and terminate the game
/// Defined in clientapp EntryPoint
/// TODO: decide on better location for this method /// TODO: decide on better location for this method
[[noreturn]] void handleFatalError(const std::string & message, bool terminate); [[noreturn]] void handleFatalError(const std::string & message, bool terminate);
void handleQuit(bool ask = true);

View File

@ -1,4 +1,4 @@
set(client_SRCS set(vcmiclientcommon_SRCS
StdInc.cpp StdInc.cpp
../CCallback.cpp ../CCallback.cpp
@ -178,7 +178,6 @@ set(client_SRCS
ArtifactsUIController.cpp ArtifactsUIController.cpp
CGameInfo.cpp CGameInfo.cpp
CMT.cpp
CPlayerInterface.cpp CPlayerInterface.cpp
PlayerLocalState.cpp PlayerLocalState.cpp
CServerHandler.cpp CServerHandler.cpp
@ -191,7 +190,7 @@ set(client_SRCS
ServerRunner.cpp ServerRunner.cpp
) )
set(client_HEADERS set(vcmiclientcommon_HEADERS
StdInc.h StdInc.h
adventureMap/AdventureMapInterface.h adventureMap/AdventureMapInterface.h
@ -407,76 +406,50 @@ set(client_HEADERS
) )
if(APPLE_IOS) if(APPLE_IOS)
set(client_SRCS ${client_SRCS} set(vcmiclientcommon_SRCS ${vcmiclientcommon_SRCS}
CFocusableHelper.cpp
ios/GameChatKeyboardHandler.m
ios/main.m
ios/startSDL.mm
ios/utils.mm ios/utils.mm
) )
set(client_HEADERS ${client_HEADERS} set(vcmiclientcommon_HEADERS ${vcmiclientcommon_HEADERS}
CFocusableHelper.h
ios/GameChatKeyboardHandler.h
ios/startSDL.h
ios/utils.h ios/utils.h
) )
endif() endif()
assign_source_group(${client_SRCS} ${client_HEADERS} VCMI_client.rc) assign_source_group(${vcmiclientcommon_SRCS} ${vcmiclientcommon_HEADERS})
add_library(vcmiclientcommon STATIC ${vcmiclientcommon_SRCS} ${vcmiclientcommon_HEADERS})
if(ANDROID)
add_library(vcmiclient SHARED ${client_SRCS} ${client_HEADERS})
set_target_properties(vcmiclient PROPERTIES
OUTPUT_NAME "vcmiclient_${ANDROID_ABI}" # required by Qt
)
else()
add_executable(vcmiclient ${client_SRCS} ${client_HEADERS})
endif()
if(NOT ENABLE_STATIC_LIBS) if(NOT ENABLE_STATIC_LIBS)
add_dependencies(vcmiclient add_dependencies(vcmiclientcommon
BattleAI BattleAI
EmptyAI EmptyAI
StupidAI StupidAI
VCAI VCAI
) )
if(ENABLE_NULLKILLER_AI) if(ENABLE_NULLKILLER_AI)
add_dependencies(vcmiclient Nullkiller) add_dependencies(vcmiclientcommon Nullkiller)
endif() endif()
endif() endif()
if(APPLE_IOS) if(APPLE_IOS)
if(ENABLE_ERM) if(ENABLE_ERM)
add_dependencies(vcmiclient vcmiERM) add_dependencies(vcmiclientcommon vcmiERM)
endif() endif()
if(ENABLE_LUA) if(ENABLE_LUA)
add_dependencies(vcmiclient vcmiLua) add_dependencies(vcmiclientcommon vcmiLua)
endif() endif()
endif() endif()
if(WIN32) if(WIN32)
target_sources(vcmiclient PRIVATE "VCMI_client.rc") set_target_properties(vcmiclientcommon
set_target_properties(vcmiclient
PROPERTIES PROPERTIES
OUTPUT_NAME "VCMI_client" OUTPUT_NAME "VCMI_vcmiclientcommon"
PROJECT_LABEL "VCMI_client" PROJECT_LABEL "VCMI_vcmiclientcommon"
) )
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vcmiclient) set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vcmiclientcommon)
if(NOT ENABLE_DEBUG_CONSOLE) if(NOT ENABLE_DEBUG_CONSOLE)
set_target_properties(vcmiclient PROPERTIES WIN32_EXECUTABLE) target_link_libraries(vcmiclientcommon SDL2::SDL2main)
target_link_libraries(vcmiclient SDL2::SDL2main)
endif()
target_compile_definitions(vcmiclient PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH)
# TODO: very hacky, find proper solution to copy AI dlls into bin dir
if(MSVC)
add_custom_command(TARGET vcmiclient POST_BUILD
WORKING_DIRECTORY "$<TARGET_FILE_DIR:vcmiclient>"
COMMAND ${CMAKE_COMMAND} -E copy AI/fuzzylite.dll fuzzylite.dll
COMMAND ${CMAKE_COMMAND} -E copy AI/tbb12.dll tbb12.dll
)
endif() endif()
target_compile_definitions(vcmiclientcommon PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH)
elseif(APPLE_IOS) elseif(APPLE_IOS)
target_link_libraries(vcmiclient PRIVATE target_link_libraries(vcmiclientcommon PRIVATE
iOS_utils iOS_utils
# FFmpeg # FFmpeg
@ -488,101 +461,31 @@ elseif(APPLE_IOS)
"-framework CoreMedia" "-framework CoreMedia"
"-framework VideoToolbox" "-framework VideoToolbox"
) )
set_target_properties(vcmiclient PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/ios/Info.plist"
XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks"
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "$(CODE_SIGNING_ALLOWED_FOR_APPS)"
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
)
foreach(XCODE_RESOURCE LaunchScreen.storyboard Images.xcassets Settings.bundle vcmi_logo.png)
set(XCODE_RESOURCE_PATH ios/${XCODE_RESOURCE})
target_sources(vcmiclient PRIVATE ${XCODE_RESOURCE_PATH})
set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
# workaround to prevent CMAKE_SKIP_PRECOMPILE_HEADERS being added as compile flag
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.22.0" AND CMAKE_VERSION VERSION_LESS "3.25.0")
set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES LANGUAGE CXX)
endif()
endforeach()
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-e,_client_main")
endif() endif()
target_link_libraries(vcmiclient PRIVATE vcmiservercommon) target_link_libraries(vcmiclientcommon PRIVATE vcmiservercommon)
if(ENABLE_SINGLE_APP_BUILD AND ENABLE_LAUNCHER)
target_link_libraries(vcmiclient PRIVATE vcmilauncher)
endif()
target_link_libraries(vcmiclient PRIVATE target_link_libraries(vcmiclientcommon PUBLIC
vcmi SDL2::SDL2 SDL2::Image SDL2::Mixer SDL2::TTF vcmi SDL2::SDL2 SDL2::Image SDL2::Mixer SDL2::TTF
) )
if(ffmpeg_LIBRARIES) if(ffmpeg_LIBRARIES)
target_link_libraries(vcmiclient PRIVATE target_link_libraries(vcmiclientcommon PRIVATE
${ffmpeg_LIBRARIES} ${ffmpeg_LIBRARIES}
) )
else() else()
target_compile_definitions(vcmiclient PRIVATE DISABLE_VIDEO) target_compile_definitions(vcmiclientcommon PRIVATE DISABLE_VIDEO)
endif() endif()
target_include_directories(vcmiclient PUBLIC target_include_directories(vcmiclientcommon PUBLIC
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
if (ffmpeg_INCLUDE_DIRS) if (ffmpeg_INCLUDE_DIRS)
target_include_directories(vcmiclient PRIVATE target_include_directories(vcmiclientcommon PRIVATE
${ffmpeg_INCLUDE_DIRS} ${ffmpeg_INCLUDE_DIRS}
) )
endif() endif()
vcmi_set_output_dir(vcmiclient "") vcmi_set_output_dir(vcmiclientcommon "")
enable_pch(vcmiclient) enable_pch(vcmiclientcommon)
if(APPLE_IOS)
vcmi_install_conan_deps("\${CMAKE_INSTALL_PREFIX}")
add_custom_command(TARGET vcmiclient POST_BUILD
COMMAND ios/set_build_version.sh "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --component "${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
COMMAND ios/rpath_remove_symlinks.sh
COMMAND ios/codesign.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
install(TARGETS vcmiclient DESTINATION Payload COMPONENT app) # for ipa generation with cpack
elseif(ANDROID)
find_program(androidDeployQt androiddeployqt
PATHS "${qtBinDir}"
)
vcmi_install_conan_deps("\${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
add_custom_target(android_deploy ALL
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --prefix "${androidQtBuildDir}"
COMMAND "${androidDeployQt}" --input "${CMAKE_BINARY_DIR}/androiddeployqt.json" --output "${androidQtBuildDir}" --android-platform "android-${ANDROID_TARGET_SDK_VERSION}" --verbose $<$<NOT:$<CONFIG:Debug>>:--release> ${ANDROIDDEPLOYQT_OPTIONS}
COMMAND_EXPAND_LISTS
VERBATIM
COMMENT "Create android package"
)
add_dependencies(android_deploy vcmiclient)
else()
install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
endif()
#install icons and desktop file on Linux
if(NOT WIN32 AND NOT APPLE AND NOT ANDROID)
#FIXME: move to client makefile?
foreach(iconSize 16 22 32 48 64 128 256 512 1024 2048)
install(FILES "icons/vcmiclient.${iconSize}x${iconSize}.png"
DESTINATION "share/icons/hicolor/${iconSize}x${iconSize}/apps"
RENAME vcmiclient.png
)
endforeach()
install(FILES icons/vcmiclient.svg
DESTINATION share/icons/hicolor/scalable/apps
RENAME vcmiclient.svg
)
install(FILES icons/vcmiclient.desktop
DESTINATION share/applications
)
endif()

View File

@ -13,7 +13,6 @@
#include <vcmi/Artifact.h> #include <vcmi/Artifact.h>
#include "CGameInfo.h" #include "CGameInfo.h"
#include "CMT.h"
#include "CServerHandler.h" #include "CServerHandler.h"
#include "HeroMovementController.h" #include "HeroMovementController.h"
#include "PlayerLocalState.h" #include "PlayerLocalState.h"

View File

@ -39,7 +39,6 @@
#include "../lib/CHeroHandler.h" #include "../lib/CHeroHandler.h"
#include "../lib/VCMIDirs.h" #include "../lib/VCMIDirs.h"
#include "../lib/logging/VisualLogger.h" #include "../lib/logging/VisualLogger.h"
#include "CMT.h"
#include "../lib/serializer/Connection.h" #include "../lib/serializer/Connection.h"
#ifdef SCRIPTING_ENABLED #ifdef SCRIPTING_ENABLED

View File

@ -11,7 +11,6 @@
#include "StdInc.h" #include "StdInc.h"
#include "InputSourceText.h" #include "InputSourceText.h"
#include "../CMT.h"
#include "../gui/CGuiHandler.h" #include "../gui/CGuiHandler.h"
#include "../gui/EventDispatcher.h" #include "../gui/EventDispatcher.h"
#include "../render/IScreenHandler.h" #include "../render/IScreenHandler.h"

View File

@ -14,7 +14,6 @@
#include "InputHandler.h" #include "InputHandler.h"
#include "../../lib/CConfigHandler.h" #include "../../lib/CConfigHandler.h"
#include "../CMT.h"
#include "../CGameInfo.h" #include "../CGameInfo.h"
#include "../gui/CursorHandler.h" #include "../gui/CursorHandler.h"
#include "../gui/CGuiHandler.h" #include "../gui/CGuiHandler.h"

View File

@ -9,7 +9,7 @@
*/ */
#include "StdInc.h" #include "StdInc.h"
#include "CFocusableHelper.h" #include "CFocusableHelper.h"
#include "widgets/CTextInput.h" #include "../client/widgets/CTextInput.h"
void removeFocusFromActiveInput() void removeFocusFromActiveInput()
{ {

137
clientapp/CMakeLists.txt Normal file
View File

@ -0,0 +1,137 @@
set(clientapp_SRCS
StdInc.cpp
EntryPoint.cpp
)
set(clientapp_HEADERS
StdInc.h
)
if(APPLE_IOS)
set(clientapp_SRCS ${clientapp_SRCS}
CFocusableHelper.cpp
ios/GameChatKeyboardHandler.m
ios/main.m
ios/startSDL.mm
)
set(clientapp_HEADERS ${clientapp_HEADERS}
CFocusableHelper.h
ios/GameChatKeyboardHandler.h
ios/startSDL.h
)
endif()
assign_source_group(${clientapp_SRCS} ${clientapp_HEADERS})
if(ANDROID)
add_library(vcmiclient SHARED ${clientapp_SRCS} ${clientapp_HEADERS})
set_target_properties(vcmiclient PROPERTIES
OUTPUT_NAME "vcmiclient_${ANDROID_ABI}" # required by Qt
)
else()
add_executable(vcmiclient ${clientapp_SRCS} ${clientapp_HEADERS})
endif()
target_link_libraries(vcmiclient PRIVATE vcmiclientcommon)
if(ENABLE_SINGLE_APP_BUILD AND ENABLE_LAUNCHER)
target_link_libraries(vcmiclient PRIVATE vcmilauncher)
endif()
target_include_directories(vcmiclient
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
)
if(WIN32)
target_sources(vcmiclient PRIVATE "VCMI_client.rc")
set_target_properties(vcmiclient
PROPERTIES
OUTPUT_NAME "VCMI_client"
PROJECT_LABEL "VCMI_client"
)
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vcmiclient)
if(NOT ENABLE_DEBUG_CONSOLE)
set_target_properties(vcmiclient PROPERTIES WIN32_EXECUTABLE)
target_link_libraries(vcmiclient SDL2::SDL2main)
endif()
target_compile_definitions(vcmiclient PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH)
# TODO: very hacky, find proper solution to copy AI dlls into bin dir
if(MSVC)
add_custom_command(TARGET vcmiclient POST_BUILD
WORKING_DIRECTORY "$<TARGET_FILE_DIR:vcmiclient>"
COMMAND ${CMAKE_COMMAND} -E copy AI/fuzzylite.dll fuzzylite.dll
COMMAND ${CMAKE_COMMAND} -E copy AI/tbb12.dll tbb12.dll
)
endif()
elseif(APPLE_IOS)
set_target_properties(vcmiclient PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/ios/Info.plist"
XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks"
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "$(CODE_SIGNING_ALLOWED_FOR_APPS)"
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
)
foreach(XCODE_RESOURCE LaunchScreen.storyboard Images.xcassets Settings.bundle vcmi_logo.png)
set(XCODE_RESOURCE_PATH ios/${XCODE_RESOURCE})
target_sources(vcmiclient PRIVATE ${XCODE_RESOURCE_PATH})
set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
# workaround to prevent CMAKE_SKIP_PRECOMPILE_HEADERS being added as compile flag
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.22.0" AND CMAKE_VERSION VERSION_LESS "3.25.0")
set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES LANGUAGE CXX)
endif()
endforeach()
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-e,_client_main")
endif()
vcmi_set_output_dir(vcmiclient "")
enable_pch(vcmiclient)
if(APPLE_IOS)
vcmi_install_conan_deps("\${CMAKE_INSTALL_PREFIX}")
add_custom_command(TARGET vcmiclient POST_BUILD
COMMAND ios/set_build_version.sh "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --component "${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
COMMAND ios/rpath_remove_symlinks.sh
COMMAND ios/codesign.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
install(TARGETS vcmiclient DESTINATION Payload COMPONENT app) # for ipa generation with cpack
elseif(ANDROID)
find_program(androidDeployQt androiddeployqt
PATHS "${qtBinDir}"
)
vcmi_install_conan_deps("\${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
add_custom_target(android_deploy ALL
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --prefix "${androidQtBuildDir}"
COMMAND "${androidDeployQt}" --input "${CMAKE_BINARY_DIR}/androiddeployqt.json" --output "${androidQtBuildDir}" --android-platform "android-${ANDROID_TARGET_SDK_VERSION}" --verbose $<$<NOT:$<CONFIG:Debug>>:--release> ${ANDROIDDEPLOYQT_OPTIONS}
COMMAND_EXPAND_LISTS
VERBATIM
COMMENT "Create android package"
)
add_dependencies(android_deploy vcmiclient)
else()
install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
endif()
#install icons and desktop file on Linux
if(NOT WIN32 AND NOT APPLE AND NOT ANDROID)
#FIXME: move to client makefile?
foreach(iconSize 16 22 32 48 64 128 256 512 1024 2048)
install(FILES "icons/vcmiclient.${iconSize}x${iconSize}.png"
DESTINATION "share/icons/hicolor/${iconSize}x${iconSize}/apps"
RENAME vcmiclient.png
)
endforeach()
install(FILES icons/vcmiclient.svg
DESTINATION share/icons/hicolor/scalable/apps
RENAME vcmiclient.svg
)
install(FILES icons/vcmiclient.desktop
DESTINATION share/applications
)
endif()

View File

@ -1,5 +1,5 @@
/* /*
* CMT.cpp, part of VCMI engine * EntryPoint.cpp, part of VCMI engine
* *
* Authors: listed in file AUTHORS in main folder * Authors: listed in file AUTHORS in main folder
* *
@ -8,38 +8,38 @@
* *
*/ */
// CMT.cpp : Defines the entry point for the console application. // EntryPoint.cpp : Defines the entry point for the console application.
#include "StdInc.h" #include "StdInc.h"
#include "CMT.h" #include "../Global.h"
#include "CGameInfo.h" #include "../client/CGameInfo.h"
#include "mainmenu/CMainMenu.h" #include "../client/ClientCommandManager.h"
#include "media/CEmptyVideoPlayer.h" #include "../client/CMT.h"
#include "media/CMusicHandler.h" #include "../client/CPlayerInterface.h"
#include "media/CSoundHandler.h" #include "../client/CServerHandler.h"
#include "media/CVideoHandler.h" #include "../client/eventsSDL/InputHandler.h"
#include "gui/CursorHandler.h" #include "../client/gui/CGuiHandler.h"
#include "eventsSDL/InputHandler.h" #include "../client/gui/CursorHandler.h"
#include "CPlayerInterface.h" #include "../client/gui/WindowHandler.h"
#include "gui/CGuiHandler.h" #include "../client/mainmenu/CMainMenu.h"
#include "gui/WindowHandler.h" #include "../client/media/CEmptyVideoPlayer.h"
#include "CServerHandler.h" #include "../client/media/CMusicHandler.h"
#include "ClientCommandManager.h" #include "../client/media/CSoundHandler.h"
#include "windows/CMessage.h" #include "../client/media/CVideoHandler.h"
#include "windows/InfoWindows.h" #include "../client/render/Graphics.h"
#include "render/IScreenHandler.h" #include "../client/render/IRenderHandler.h"
#include "render/IRenderHandler.h" #include "../client/render/IScreenHandler.h"
#include "render/Graphics.h" #include "../client/windows/CMessage.h"
#include "../client/windows/InfoWindows.h"
#include "../lib/CConfigHandler.h"
#include "../lib/texts/CGeneralTextHandler.h"
#include "../lib/CThreadHelper.h" #include "../lib/CThreadHelper.h"
#include "../lib/ExceptionsCommon.h" #include "../lib/ExceptionsCommon.h"
#include "../lib/VCMIDirs.h"
#include "../lib/VCMI_Lib.h"
#include "../lib/filesystem/Filesystem.h" #include "../lib/filesystem/Filesystem.h"
#include "../lib/logging/CBasicLogConfigurator.h" #include "../lib/logging/CBasicLogConfigurator.h"
#include "../lib/texts/CGeneralTextHandler.h"
#include "../lib/VCMI_Lib.h"
#include "../lib/VCMIDirs.h"
#include <boost/program_options.hpp> #include <boost/program_options.hpp>
#include <vstd/StringUtils.h> #include <vstd/StringUtils.h>
@ -525,6 +525,8 @@ void handleQuit(bool ask)
CInfoWindow::showYesNoDialog(CGI->generaltexth->allTexts[69], {}, quitApplication, {}, PlayerColor(1)); CInfoWindow::showYesNoDialog(CGI->generaltexth->allTexts[69], {}, quitApplication, {}, PlayerColor(1));
} }
/// Notify user about encountered fatal error and terminate the game
/// TODO: decide on better location for this method
void handleFatalError(const std::string & message, bool terminate) void handleFatalError(const std::string & message, bool terminate)
{ {
logGlobal->error("FATAL ERROR ENCOUNTERED, VCMI WILL NOW TERMINATE"); logGlobal->error("FATAL ERROR ENCOUNTERED, VCMI WILL NOW TERMINATE");

11
clientapp/StdInc.cpp Normal file
View File

@ -0,0 +1,11 @@
/*
* StdInc.cpp, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
// Creates the precompiled header
#include "StdInc.h"

14
clientapp/StdInc.h Normal file
View File

@ -0,0 +1,14 @@
/*
* StdInc.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "../Global.h"
VCMI_LIB_USING_NAMESPACE

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB