Browse Source

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

Split vcmiclient in two
Ivan Savenko 1 year ago
parent
commit
ee64928454
41 changed files with 221 additions and 157 deletions
  1. 1 0
      CMakeLists.txt
  2. 2 2
      client/CMT.h
  3. 25 122
      client/CMakeLists.txt
  4. 0 1
      client/CPlayerInterface.cpp
  5. 0 1
      client/ClientCommandManager.cpp
  6. 0 1
      client/eventsSDL/InputSourceText.cpp
  7. 0 1
      client/eventsSDL/InputSourceTouch.cpp
  8. 1 1
      clientapp/CFocusableHelper.cpp
  9. 0 0
      clientapp/CFocusableHelper.h
  10. 137 0
      clientapp/CMakeLists.txt
  11. 30 28
      clientapp/EntryPoint.cpp
  12. 11 0
      clientapp/StdInc.cpp
  13. 14 0
      clientapp/StdInc.h
  14. 0 0
      clientapp/VCMI_client.rc
  15. 0 0
      clientapp/ios/GameChatKeyboardHandler.h
  16. 0 0
      clientapp/ios/GameChatKeyboardHandler.m
  17. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/Contents.json
  18. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  19. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  20. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  21. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  22. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  23. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  24. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  25. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  26. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  27. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  28. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  29. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  30. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  31. 0 0
      clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  32. 0 0
      clientapp/ios/Images.xcassets/Contents.json
  33. 0 0
      clientapp/ios/Info.plist
  34. 0 0
      clientapp/ios/LaunchScreen.storyboard
  35. 0 0
      clientapp/ios/Settings.bundle/Root.plist
  36. 0 0
      clientapp/ios/Settings.bundle/en.lproj/Root.strings
  37. 0 0
      clientapp/ios/Settings.bundle/ru.lproj/Root.strings
  38. 0 0
      clientapp/ios/main.m
  39. 0 0
      clientapp/ios/startSDL.h
  40. 0 0
      clientapp/ios/startSDL.mm
  41. 0 0
      clientapp/ios/vcmi_logo.png

+ 1 - 0
CMakeLists.txt

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

+ 2 - 2
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);

+ 25 - 122
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 "$<TARGET_FILE_DIR:vcmiclient>"
-			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 "$<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()
+vcmi_set_output_dir(vcmiclientcommon "")
+enable_pch(vcmiclientcommon)

+ 0 - 1
client/CPlayerInterface.cpp

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

+ 0 - 1
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

+ 0 - 1
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"

+ 0 - 1
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"

+ 1 - 1
client/CFocusableHelper.cpp → clientapp/CFocusableHelper.cpp

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

+ 0 - 0
client/CFocusableHelper.h → clientapp/CFocusableHelper.h


+ 137 - 0
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 "$<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()

+ 30 - 28
client/CMT.cpp → 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 "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 "../lib/CConfigHandler.h"
-#include "../lib/texts/CGeneralTextHandler.h"
+#include "../Global.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/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 <boost/program_options.hpp>
 #include <vstd/StringUtils.h>
@@ -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");

+ 11 - 0
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"

+ 14 - 0
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

+ 0 - 0
client/VCMI_client.rc → clientapp/VCMI_client.rc


+ 0 - 0
client/ios/GameChatKeyboardHandler.h → clientapp/ios/GameChatKeyboardHandler.h


+ 0 - 0
client/ios/GameChatKeyboardHandler.m → clientapp/ios/GameChatKeyboardHandler.m


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/Contents.json → clientapp/ios/Images.xcassets/AppIcon.appiconset/Contents.json


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/AppIcon.appiconset/[email protected] → clientapp/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 0 - 0
client/ios/Images.xcassets/Contents.json → clientapp/ios/Images.xcassets/Contents.json


+ 0 - 0
client/ios/Info.plist → clientapp/ios/Info.plist


+ 0 - 0
client/ios/LaunchScreen.storyboard → clientapp/ios/LaunchScreen.storyboard


+ 0 - 0
client/ios/Settings.bundle/Root.plist → clientapp/ios/Settings.bundle/Root.plist


+ 0 - 0
client/ios/Settings.bundle/en.lproj/Root.strings → clientapp/ios/Settings.bundle/en.lproj/Root.strings


+ 0 - 0
client/ios/Settings.bundle/ru.lproj/Root.strings → clientapp/ios/Settings.bundle/ru.lproj/Root.strings


+ 0 - 0
client/ios/main.m → clientapp/ios/main.m


+ 0 - 0
client/ios/startSDL.h → clientapp/ios/startSDL.h


+ 0 - 0
client/ios/startSDL.mm → clientapp/ios/startSDL.mm


+ 0 - 0
client/ios/vcmi_logo.png → clientapp/ios/vcmi_logo.png