diff --git a/CMakeLists.txt b/CMakeLists.txt index be18cbf50..639b2dba7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -680,6 +680,7 @@ endif() if (ENABLE_CLIENT) add_subdirectory(client) + add_subdirectory(clientapp) endif() if(ENABLE_SERVER) diff --git a/client/CMT.h b/client/CMT.h index 1bf25fd73..abd6596f5 100644 --- a/client/CMT.h +++ b/client/CMT.h @@ -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 *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 +/// Defined in clientapp EntryPoint /// TODO: decide on better location for this method [[noreturn]] void handleFatalError(const std::string & message, bool terminate); +void handleQuit(bool ask = true); diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 168ce70f5..1f377e57a 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -1,4 +1,4 @@ -set(client_SRCS +set(vcmiclientcommon_SRCS StdInc.cpp ../CCallback.cpp @@ -178,7 +178,6 @@ set(client_SRCS ArtifactsUIController.cpp CGameInfo.cpp - CMT.cpp CPlayerInterface.cpp PlayerLocalState.cpp CServerHandler.cpp @@ -191,7 +190,7 @@ set(client_SRCS ServerRunner.cpp ) -set(client_HEADERS +set(vcmiclientcommon_HEADERS StdInc.h adventureMap/AdventureMapInterface.h @@ -407,76 +406,50 @@ set(client_HEADERS ) if(APPLE_IOS) - set(client_SRCS ${client_SRCS} - CFocusableHelper.cpp - ios/GameChatKeyboardHandler.m - ios/main.m - ios/startSDL.mm + set(vcmiclientcommon_SRCS ${vcmiclientcommon_SRCS} ios/utils.mm ) - set(client_HEADERS ${client_HEADERS} - CFocusableHelper.h - ios/GameChatKeyboardHandler.h - ios/startSDL.h + set(vcmiclientcommon_HEADERS ${vcmiclientcommon_HEADERS} ios/utils.h ) endif() -assign_source_group(${client_SRCS} ${client_HEADERS} VCMI_client.rc) - -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() +assign_source_group(${vcmiclientcommon_SRCS} ${vcmiclientcommon_HEADERS}) +add_library(vcmiclientcommon STATIC ${vcmiclientcommon_SRCS} ${vcmiclientcommon_HEADERS}) if(NOT ENABLE_STATIC_LIBS) - add_dependencies(vcmiclient + add_dependencies(vcmiclientcommon BattleAI EmptyAI StupidAI VCAI ) if(ENABLE_NULLKILLER_AI) - add_dependencies(vcmiclient Nullkiller) + add_dependencies(vcmiclientcommon Nullkiller) endif() endif() if(APPLE_IOS) if(ENABLE_ERM) - add_dependencies(vcmiclient vcmiERM) + add_dependencies(vcmiclientcommon vcmiERM) endif() if(ENABLE_LUA) - add_dependencies(vcmiclient vcmiLua) + add_dependencies(vcmiclientcommon vcmiLua) endif() endif() if(WIN32) - target_sources(vcmiclient PRIVATE "VCMI_client.rc") - set_target_properties(vcmiclient + set_target_properties(vcmiclientcommon PROPERTIES - OUTPUT_NAME "VCMI_client" - PROJECT_LABEL "VCMI_client" + OUTPUT_NAME "VCMI_vcmiclientcommon" + 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) - 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 "$" - COMMAND ${CMAKE_COMMAND} -E copy AI/fuzzylite.dll fuzzylite.dll - COMMAND ${CMAKE_COMMAND} -E copy AI/tbb12.dll tbb12.dll - ) + target_link_libraries(vcmiclientcommon SDL2::SDL2main) endif() + target_compile_definitions(vcmiclientcommon PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH) elseif(APPLE_IOS) - target_link_libraries(vcmiclient PRIVATE + target_link_libraries(vcmiclientcommon PRIVATE iOS_utils # FFmpeg @@ -488,101 +461,31 @@ elseif(APPLE_IOS) "-framework CoreMedia" "-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() -target_link_libraries(vcmiclient PRIVATE vcmiservercommon) -if(ENABLE_SINGLE_APP_BUILD AND ENABLE_LAUNCHER) - target_link_libraries(vcmiclient PRIVATE vcmilauncher) -endif() +target_link_libraries(vcmiclientcommon PRIVATE vcmiservercommon) -target_link_libraries(vcmiclient PRIVATE +target_link_libraries(vcmiclientcommon PUBLIC vcmi SDL2::SDL2 SDL2::Image SDL2::Mixer SDL2::TTF ) if(ffmpeg_LIBRARIES) - target_link_libraries(vcmiclient PRIVATE + target_link_libraries(vcmiclientcommon PRIVATE ${ffmpeg_LIBRARIES} ) else() - target_compile_definitions(vcmiclient PRIVATE DISABLE_VIDEO) + target_compile_definitions(vcmiclientcommon PRIVATE DISABLE_VIDEO) endif() -target_include_directories(vcmiclient PUBLIC +target_include_directories(vcmiclientcommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) if (ffmpeg_INCLUDE_DIRS) - target_include_directories(vcmiclient PRIVATE + target_include_directories(vcmiclientcommon PRIVATE ${ffmpeg_INCLUDE_DIRS} ) 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 "$" - COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --component "${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}" --config "$" --prefix "$" - 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 "$" --prefix "${androidQtBuildDir}" - COMMAND "${androidDeployQt}" --input "${CMAKE_BINARY_DIR}/androiddeployqt.json" --output "${androidQtBuildDir}" --android-platform "android-${ANDROID_TARGET_SDK_VERSION}" --verbose $<$>:--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() +vcmi_set_output_dir(vcmiclientcommon "") +enable_pch(vcmiclientcommon) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index ac99a12ba..162aada4c 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -13,7 +13,6 @@ #include #include "CGameInfo.h" -#include "CMT.h" #include "CServerHandler.h" #include "HeroMovementController.h" #include "PlayerLocalState.h" diff --git a/client/ClientCommandManager.cpp b/client/ClientCommandManager.cpp index a8db5983a..a2a7176ef 100644 --- a/client/ClientCommandManager.cpp +++ b/client/ClientCommandManager.cpp @@ -39,7 +39,6 @@ #include "../lib/CHeroHandler.h" #include "../lib/VCMIDirs.h" #include "../lib/logging/VisualLogger.h" -#include "CMT.h" #include "../lib/serializer/Connection.h" #ifdef SCRIPTING_ENABLED diff --git a/client/eventsSDL/InputSourceText.cpp b/client/eventsSDL/InputSourceText.cpp index b1fdfa77d..d33a4e035 100644 --- a/client/eventsSDL/InputSourceText.cpp +++ b/client/eventsSDL/InputSourceText.cpp @@ -11,7 +11,6 @@ #include "StdInc.h" #include "InputSourceText.h" -#include "../CMT.h" #include "../gui/CGuiHandler.h" #include "../gui/EventDispatcher.h" #include "../render/IScreenHandler.h" diff --git a/client/eventsSDL/InputSourceTouch.cpp b/client/eventsSDL/InputSourceTouch.cpp index 992daeb2c..0b5d48954 100644 --- a/client/eventsSDL/InputSourceTouch.cpp +++ b/client/eventsSDL/InputSourceTouch.cpp @@ -14,7 +14,6 @@ #include "InputHandler.h" #include "../../lib/CConfigHandler.h" -#include "../CMT.h" #include "../CGameInfo.h" #include "../gui/CursorHandler.h" #include "../gui/CGuiHandler.h" diff --git a/client/CFocusableHelper.cpp b/clientapp/CFocusableHelper.cpp similarity index 90% rename from client/CFocusableHelper.cpp rename to clientapp/CFocusableHelper.cpp index ea0297eca..3772694d2 100644 --- a/client/CFocusableHelper.cpp +++ b/clientapp/CFocusableHelper.cpp @@ -9,7 +9,7 @@ */ #include "StdInc.h" #include "CFocusableHelper.h" -#include "widgets/CTextInput.h" +#include "../client/widgets/CTextInput.h" void removeFocusFromActiveInput() { diff --git a/client/CFocusableHelper.h b/clientapp/CFocusableHelper.h similarity index 100% rename from client/CFocusableHelper.h rename to clientapp/CFocusableHelper.h diff --git a/clientapp/CMakeLists.txt b/clientapp/CMakeLists.txt new file mode 100644 index 000000000..56d21c1c8 --- /dev/null +++ b/clientapp/CMakeLists.txt @@ -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 "$" + 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 "$" + COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --component "${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}" --config "$" --prefix "$" + 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 "$" --prefix "${androidQtBuildDir}" + COMMAND "${androidDeployQt}" --input "${CMAKE_BINARY_DIR}/androiddeployqt.json" --output "${androidQtBuildDir}" --android-platform "android-${ANDROID_TARGET_SDK_VERSION}" --verbose $<$>:--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() diff --git a/client/CMT.cpp b/clientapp/EntryPoint.cpp similarity index 93% rename from client/CMT.cpp rename to clientapp/EntryPoint.cpp index 3962a1821..e32303f07 100644 --- a/client/CMT.cpp +++ b/clientapp/EntryPoint.cpp @@ -1,5 +1,5 @@ /* - * CMT.cpp, part of VCMI engine + * EntryPoint.cpp, part of VCMI engine * * 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 "CMT.h" +#include "../Global.h" -#include "CGameInfo.h" -#include "mainmenu/CMainMenu.h" -#include "media/CEmptyVideoPlayer.h" -#include "media/CMusicHandler.h" -#include "media/CSoundHandler.h" -#include "media/CVideoHandler.h" -#include "gui/CursorHandler.h" -#include "eventsSDL/InputHandler.h" -#include "CPlayerInterface.h" -#include "gui/CGuiHandler.h" -#include "gui/WindowHandler.h" -#include "CServerHandler.h" -#include "ClientCommandManager.h" -#include "windows/CMessage.h" -#include "windows/InfoWindows.h" -#include "render/IScreenHandler.h" -#include "render/IRenderHandler.h" -#include "render/Graphics.h" +#include "../client/CGameInfo.h" +#include "../client/ClientCommandManager.h" +#include "../client/CMT.h" +#include "../client/CPlayerInterface.h" +#include "../client/CServerHandler.h" +#include "../client/eventsSDL/InputHandler.h" +#include "../client/gui/CGuiHandler.h" +#include "../client/gui/CursorHandler.h" +#include "../client/gui/WindowHandler.h" +#include "../client/mainmenu/CMainMenu.h" +#include "../client/media/CEmptyVideoPlayer.h" +#include "../client/media/CMusicHandler.h" +#include "../client/media/CSoundHandler.h" +#include "../client/media/CVideoHandler.h" +#include "../client/render/Graphics.h" +#include "../client/render/IRenderHandler.h" +#include "../client/render/IScreenHandler.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/ExceptionsCommon.h" -#include "../lib/VCMIDirs.h" -#include "../lib/VCMI_Lib.h" #include "../lib/filesystem/Filesystem.h" - #include "../lib/logging/CBasicLogConfigurator.h" +#include "../lib/texts/CGeneralTextHandler.h" +#include "../lib/VCMI_Lib.h" +#include "../lib/VCMIDirs.h" #include #include @@ -525,6 +525,8 @@ void handleQuit(bool ask) 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) { logGlobal->error("FATAL ERROR ENCOUNTERED, VCMI WILL NOW TERMINATE"); diff --git a/clientapp/StdInc.cpp b/clientapp/StdInc.cpp new file mode 100644 index 000000000..277dd9af0 --- /dev/null +++ b/clientapp/StdInc.cpp @@ -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" diff --git a/clientapp/StdInc.h b/clientapp/StdInc.h new file mode 100644 index 000000000..d03216bdf --- /dev/null +++ b/clientapp/StdInc.h @@ -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 diff --git a/client/VCMI_client.rc b/clientapp/VCMI_client.rc similarity index 100% rename from client/VCMI_client.rc rename to clientapp/VCMI_client.rc diff --git a/client/ios/GameChatKeyboardHandler.h b/clientapp/ios/GameChatKeyboardHandler.h similarity index 100% rename from client/ios/GameChatKeyboardHandler.h rename to clientapp/ios/GameChatKeyboardHandler.h diff --git a/client/ios/GameChatKeyboardHandler.m b/clientapp/ios/GameChatKeyboardHandler.m similarity index 100% rename from client/ios/GameChatKeyboardHandler.m rename to clientapp/ios/GameChatKeyboardHandler.m diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Contents.json b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Contents.json rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from client/ios/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to clientapp/ios/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/client/ios/Images.xcassets/Contents.json b/clientapp/ios/Images.xcassets/Contents.json similarity index 100% rename from client/ios/Images.xcassets/Contents.json rename to clientapp/ios/Images.xcassets/Contents.json diff --git a/client/ios/Info.plist b/clientapp/ios/Info.plist similarity index 100% rename from client/ios/Info.plist rename to clientapp/ios/Info.plist diff --git a/client/ios/LaunchScreen.storyboard b/clientapp/ios/LaunchScreen.storyboard similarity index 100% rename from client/ios/LaunchScreen.storyboard rename to clientapp/ios/LaunchScreen.storyboard diff --git a/client/ios/Settings.bundle/Root.plist b/clientapp/ios/Settings.bundle/Root.plist similarity index 100% rename from client/ios/Settings.bundle/Root.plist rename to clientapp/ios/Settings.bundle/Root.plist diff --git a/client/ios/Settings.bundle/en.lproj/Root.strings b/clientapp/ios/Settings.bundle/en.lproj/Root.strings similarity index 100% rename from client/ios/Settings.bundle/en.lproj/Root.strings rename to clientapp/ios/Settings.bundle/en.lproj/Root.strings diff --git a/client/ios/Settings.bundle/ru.lproj/Root.strings b/clientapp/ios/Settings.bundle/ru.lproj/Root.strings similarity index 100% rename from client/ios/Settings.bundle/ru.lproj/Root.strings rename to clientapp/ios/Settings.bundle/ru.lproj/Root.strings diff --git a/client/ios/main.m b/clientapp/ios/main.m similarity index 100% rename from client/ios/main.m rename to clientapp/ios/main.m diff --git a/client/ios/startSDL.h b/clientapp/ios/startSDL.h similarity index 100% rename from client/ios/startSDL.h rename to clientapp/ios/startSDL.h diff --git a/client/ios/startSDL.mm b/clientapp/ios/startSDL.mm similarity index 100% rename from client/ios/startSDL.mm rename to clientapp/ios/startSDL.mm diff --git a/client/ios/vcmi_logo.png b/clientapp/ios/vcmi_logo.png similarity index 100% rename from client/ios/vcmi_logo.png rename to clientapp/ios/vcmi_logo.png