mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Split into subprojects (external, core, es).
Removed relative paths in #includes. Changed ViewController to a singleton, removing it from the Window class.
This commit is contained in:
parent
9df8129d55
commit
98120f9ecd
345
CMakeLists.txt
345
CMakeLists.txt
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(emulationstation)
|
||||
|
||||
|
@ -50,22 +50,6 @@ if(DEFINED BCMHOST)
|
|||
add_definitions(-D_RPI_)
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#set up _WIN32_WINNT variable (used by boost::asio) on Windows
|
||||
macro(get_WIN32_WINNT version)
|
||||
if (WIN32 AND CMAKE_SYSTEM_VERSION)
|
||||
set(ver ${CMAKE_SYSTEM_VERSION})
|
||||
string(REPLACE "." "" ver ${ver})
|
||||
string(REGEX REPLACE "([0-9])" "0\\1" ver ${ver})
|
||||
|
||||
set(${version} "0x${ver}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if(WIN32)
|
||||
get_WIN32_WINNT(ver)
|
||||
add_definitions(-D_WIN32_WINNT=${ver})
|
||||
endif()
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
if(MSVC)
|
||||
|
@ -82,6 +66,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||
if (G++_VERSION VERSION_LESS 4.7)
|
||||
message(SEND_ERROR "You need at least G++ 4.7 to compile EmulationStation!")
|
||||
endif()
|
||||
|
||||
#set up compiler flags for GCC
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-attributes -O3") #support C++11 for std::, optimize
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O3") #-s = strip binary
|
||||
|
@ -97,24 +82,26 @@ add_definitions(-DEIGEN_DONT_ALIGN)
|
|||
|
||||
#-------------------------------------------------------------------------------
|
||||
#add include directories
|
||||
set(ES_INCLUDE_DIRS
|
||||
set(COMMON_INCLUDE_DIRS
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
${FreeImage_INCLUDE_DIRS}
|
||||
${SDL2_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${EIGEN3_INCLUDE_DIR}
|
||||
${CURL_INCLUDE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/core/src
|
||||
)
|
||||
|
||||
#add ALSA for Linux
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
LIST(APPEND ES_INCLUDE_DIRS
|
||||
LIST(APPEND COMMON_INCLUDE_DIRS
|
||||
${ALSA_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(DEFINED BCMHOST)
|
||||
LIST(APPEND ES_INCLUDE_DIRS
|
||||
LIST(APPEND COMMON_INCLUDE_DIRS
|
||||
"/opt/vc/include"
|
||||
"/opt/vc/include/interface/vcos"
|
||||
"/opt/vc/include/interface/vmcs_host/linux"
|
||||
|
@ -122,263 +109,16 @@ if(DEFINED BCMHOST)
|
|||
)
|
||||
else()
|
||||
if(${GLSystem} MATCHES "Desktop OpenGL")
|
||||
LIST(APPEND ES_INCLUDE_DIRS
|
||||
LIST(APPEND COMMON_INCLUDE_DIRS
|
||||
${OPENGL_INCLUDE_DIR}
|
||||
)
|
||||
else()
|
||||
LIST(APPEND ES_INCLUDE_DIRS
|
||||
LIST(APPEND COMMON_INCLUDE_DIRS
|
||||
${OPENGLES_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#define basic sources and headers
|
||||
set(ES_HEADERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/AsyncHandle.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/AudioManager.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/GuiComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/HelpStyle.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/HttpReq.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ImageIO.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/InputConfig.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/InputManager.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Log.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/MathExp.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/platform.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ScraperCmdLine.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ThemeData.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Util.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Window.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.h
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AnimatedImageComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AsyncReqComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ButtonComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/BusyComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentGrid.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentList.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/HelpComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/IList.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageGridComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/OptionListComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScraperSearchComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperStart.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.h
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/TheArchiveScraper.h
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/pugiXML/pugiconfig.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/pugiXML/pugixml.hpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/nanosvg/nanosvg.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/nanosvg/nanosvgrast.h
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.h
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/Animation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/AnimationController.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/LambdaAnimation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/LaunchAnimation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/MoveCameraAnimation.h
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Font.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/SVGResource.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/Resources.h
|
||||
)
|
||||
set(ES_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/AudioManager.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/GuiComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/HelpStyle.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/HttpReq.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ImageIO.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/InputConfig.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/InputManager.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Log.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/MameNameMap.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/MathExp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/platform.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_draw_gl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_init.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ScraperCmdLine.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ThemeData.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Util.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Window.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AnimatedImageComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AsyncReqComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ButtonComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/BusyComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentGrid.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentList.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/HelpComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScraperSearchComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperStart.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/TheArchiveScraper.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/pugiXML/pugixml.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/nanosvg/nanosvg_impl.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Font.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/SVGResource.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/AnimationController.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/ResourceUtil.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/splash_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/window_icon_256_png.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/button_png.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/button_filled_png.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/textinput_ninepatch_png.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/textinput_ninepatch_active_png.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/frame_png.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/scroll_gradient_png.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_button_a_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_button_b_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_button_x_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_button_y_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_button_l_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_button_r_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_button_start_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_button_select_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_up_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_down_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_left_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_right_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_updown_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_leftright_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_all_svg.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/opensans_hebrew_condensed_regular_ttf.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/opensans_hebrew_condensed_light_ttf.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/arrow_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/option_arrow_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/checkbox_checked_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/checkbox_unchecked_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/star_filled_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/star_unfilled_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/on_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/off_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/fav_add_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/fav_remove_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/slider_knob_svg.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/busy_0_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/busy_1_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/busy_2_svg.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/busy_3_svg.cpp
|
||||
)
|
||||
|
||||
#SOURCE_GROUP(resources FILES ResourceUtil.cpp)
|
||||
|
||||
#add open gl specific sources
|
||||
#if(${GLSystem} MATCHES "Desktop OpenGL")
|
||||
LIST(APPEND ES_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_init_sdlgl.cpp
|
||||
)
|
||||
#else()
|
||||
# LIST(APPEND ES_SOURCES
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_init_rpi.cpp
|
||||
# )
|
||||
#endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#define OS specific sources and headers
|
||||
if(MSVC)
|
||||
LIST(APPEND ES_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.rc
|
||||
)
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#define libraries and directories
|
||||
if(DEFINED BCMHOST)
|
||||
|
@ -392,96 +132,57 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
set(ES_LIBRARIES
|
||||
set(COMMON_LIBRARIES
|
||||
${Boost_LIBRARIES}
|
||||
${FREETYPE_LIBRARIES}
|
||||
${FreeImage_LIBRARIES}
|
||||
${SDL2_LIBRARY}
|
||||
${SDL2MAIN_LIBRARY}
|
||||
${CURL_LIBRARIES}
|
||||
pugixml
|
||||
nanosvg
|
||||
)
|
||||
|
||||
#add ALSA for Linux
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
LIST(APPEND ES_LIBRARIES
|
||||
LIST(APPEND COMMON_LIBRARIES
|
||||
${ALSA_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(DEFINED BCMHOST)
|
||||
LIST(APPEND ES_LIBRARIES
|
||||
LIST(APPEND COMMON_LIBRARIES
|
||||
bcm_host
|
||||
EGL
|
||||
${OPENGLES_LIBRARIES}
|
||||
)
|
||||
else()
|
||||
if(MSVC)
|
||||
LIST(APPEND ES_LIBRARIES
|
||||
LIST(APPEND COMMON_LIBRARIES
|
||||
winmm
|
||||
)
|
||||
endif()
|
||||
if(${GLSystem} MATCHES "Desktop OpenGL")
|
||||
LIST(APPEND ES_LIBRARIES
|
||||
LIST(APPEND COMMON_LIBRARIES
|
||||
${OPENGL_LIBRARIES}
|
||||
)
|
||||
else()
|
||||
LIST(APPEND ES_LIBRARIES
|
||||
LIST(APPEND COMMON_LIBRARIES
|
||||
${OPENGLES_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#set up build directories
|
||||
# set up build directories
|
||||
set(dir ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(EXECUTABLE_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
|
||||
set(LIBRARY_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#define target
|
||||
include_directories(${ES_INCLUDE_DIRS})
|
||||
add_executable(emulationstation ${ES_SOURCES} ${ES_HEADERS})
|
||||
target_link_libraries(emulationstation ${ES_LIBRARIES})
|
||||
|
||||
#special properties for windows builds
|
||||
if(MSVC)
|
||||
#show console in debug builds, but not in proper release builds
|
||||
#Note that up to CMake 2.8.10 this feature is broken: http://public.kitware.com/Bug/view.php?id=12566
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
|
||||
endif()
|
||||
|
||||
install(TARGETS emulationstation
|
||||
RUNTIME
|
||||
DESTINATION bin)
|
||||
|
||||
INCLUDE(InstallRequiredSystemLibraries)
|
||||
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A flexible graphical emulator front-end")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION "EmulationStation is a flexible, graphical front-end designed for keyboardless navigation of your multi-platform retro game collection.")
|
||||
|
||||
SET(CPACK_RESOURCE_FILE LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md")
|
||||
SET(CPACK_RESOURCE_FILE README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
|
||||
|
||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Alec Lofquist <allofquist@yahoo.com>")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SECTION "misc")
|
||||
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "extra")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libsdl2-2.0-0, libboost-system1.54.0, libboost-filesystem1.54.0, libfreeimage3, libfreetype6, libcurl3, libasound2")
|
||||
SET(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS "debhelper (>= 8.0.0), cmake, g++ (>= 4.8), libsdl2-dev, libboost-system-dev, libboost-filesystem-dev, libboost-date-time-dev, libfreeimage-dev, libfreetype6-dev, libeigen3-dev, libcurl4-openssl-dev, libasound2-dev, libgl1-mesa-dev")
|
||||
|
||||
SET(CPACK_PACKAGE_VENDOR "emulationstation.org")
|
||||
SET(CPACK_PACKAGE_VERSION "2.0.0~rc1")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "0")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "0")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "emulationstation_${CMAKE_PACKAGE_VERSION}")
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "emulationstation" "emulationstation")
|
||||
|
||||
SET(CPACK_GENERATOR "TGZ;DEB")
|
||||
|
||||
INCLUDE(CPack)
|
||||
# add each component
|
||||
|
||||
add_subdirectory("external")
|
||||
add_subdirectory("core")
|
||||
add_subdirectory("es")
|
||||
|
|
165
core/CMakeLists.txt
Normal file
165
core/CMakeLists.txt
Normal file
|
@ -0,0 +1,165 @@
|
|||
project("core")
|
||||
|
||||
set(CORE_HEADERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/AsyncHandle.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/AudioManager.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/GuiComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/HelpStyle.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/HttpReq.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ImageIO.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/InputConfig.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/InputManager.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Log.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/platform.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ThemeData.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Util.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Window.h
|
||||
|
||||
# Animations
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/Animation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/AnimationController.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/LambdaAnimation.h
|
||||
|
||||
# GuiComponents
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AnimatedImageComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/BusyComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ButtonComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentGrid.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentList.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/HelpComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/IList.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageGridComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/OptionListComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.h
|
||||
|
||||
# Guis
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.h
|
||||
|
||||
# Resources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Font.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/SVGResource.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.h
|
||||
)
|
||||
|
||||
set(CORE_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/AudioManager.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/GuiComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/HelpStyle.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/HttpReq.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ImageIO.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/InputConfig.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/InputManager.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Log.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/platform.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_draw_gl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_init.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Renderer_init_sdlgl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ThemeData.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Util.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Window.cpp
|
||||
|
||||
# Animations
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/AnimationController.cpp
|
||||
|
||||
# GuiComponents
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AnimatedImageComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/BusyComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ButtonComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentGrid.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentList.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/HelpComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.cpp
|
||||
|
||||
# Guis
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.cpp
|
||||
|
||||
# Resources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Font.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/SVGResource.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.cpp
|
||||
|
||||
# Embedded assets (needed by ResourceManager)
|
||||
${emulationstation_SOURCE_DIR}/data/Resources.h
|
||||
)
|
||||
|
||||
set(EMBEDDED_ASSET_SOURCES
|
||||
${emulationstation_SOURCE_DIR}/data/ResourceUtil.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/splash_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/window_icon_256_png.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/button_png.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/button_filled_png.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/textinput_ninepatch_png.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/textinput_ninepatch_active_png.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/frame_png.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/scroll_gradient_png.cpp
|
||||
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_button_a_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_button_b_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_button_x_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_button_y_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_button_l_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_button_r_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_button_start_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_button_select_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_dpad_up_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_dpad_down_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_dpad_left_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_dpad_right_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_dpad_updown_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_dpad_leftright_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/help_dpad_all_svg.cpp
|
||||
|
||||
${emulationstation_SOURCE_DIR}/data/converted/opensans_hebrew_condensed_regular_ttf.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/opensans_hebrew_condensed_light_ttf.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/arrow_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/option_arrow_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/checkbox_checked_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/checkbox_unchecked_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/star_filled_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/star_unfilled_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/on_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/off_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/fav_add_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/fav_remove_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/slider_knob_svg.cpp
|
||||
|
||||
${emulationstation_SOURCE_DIR}/data/converted/busy_0_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/busy_1_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/busy_2_svg.cpp
|
||||
${emulationstation_SOURCE_DIR}/data/converted/busy_3_svg.cpp
|
||||
)
|
||||
|
||||
list(APPEND CORE_SOURCES ${EMBEDDED_ASSET_SOURCES})
|
||||
|
||||
include_directories(${COMMON_INCLUDE_DIRS})
|
||||
add_library(es-core STATIC ${CORE_SOURCES} ${CORE_HEADERS})
|
||||
target_link_libraries(es-core ${COMMON_LIBRARIES})
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
#include <SDL.h>
|
||||
#include "Log.h"
|
||||
#include "VolumeControl.h"
|
||||
|
||||
|
||||
std::vector<std::shared_ptr<Sound>> AudioManager::sSoundVector;
|
||||
SDL_AudioSpec AudioManager::sAudioFormat;
|
||||
|
@ -54,9 +52,6 @@ void AudioManager::mixAudio(void *unused, Uint8 *stream, int len)
|
|||
AudioManager::AudioManager()
|
||||
{
|
||||
init();
|
||||
|
||||
//set internal volume
|
||||
//VolumeControl::getInstance()->setVolume(50);
|
||||
}
|
||||
|
||||
AudioManager::~AudioManager()
|
||||
|
@ -138,9 +133,6 @@ void AudioManager::play()
|
|||
{
|
||||
getInstance();
|
||||
|
||||
//set internal audio volume. important after launching a game and returning here
|
||||
//VolumeControl::getInstance()->setVolume(50);
|
||||
|
||||
//unpause audio, the mixer will figure out if samples need to be played...
|
||||
SDL_PauseAudio(0);
|
||||
}
|
|
@ -3,7 +3,6 @@
|
|||
#include <vector>
|
||||
#include <FreeImage.h>
|
||||
|
||||
|
||||
class ImageIO
|
||||
{
|
||||
public:
|
|
@ -6,7 +6,7 @@
|
|||
#include <string>
|
||||
#include <SDL.h>
|
||||
#include <sstream>
|
||||
#include "pugiXML/pugixml.hpp"
|
||||
#include "pugixml/pugixml.hpp"
|
||||
|
||||
#define DEVICE_KEYBOARD -1
|
||||
|
|
@ -7,7 +7,6 @@
|
|||
#include "Log.h"
|
||||
#include "ImageIO.h"
|
||||
#include "../data/Resources.h"
|
||||
#include "EmulationStation.h"
|
||||
#include "Settings.h"
|
||||
|
||||
#ifdef USE_OPENGL_ES
|
|
@ -1,6 +1,6 @@
|
|||
#include "Settings.h"
|
||||
#include "Log.h"
|
||||
#include "pugiXML/pugixml.hpp"
|
||||
#include "pugixml/pugixml.hpp"
|
||||
#include "platform.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/assign.hpp>
|
|
@ -5,7 +5,7 @@
|
|||
#include "resources/TextureResource.h"
|
||||
#include "Log.h"
|
||||
#include "Settings.h"
|
||||
#include "pugiXML/pugixml.hpp"
|
||||
#include "pugixml/pugixml.hpp"
|
||||
#include <boost/assign.hpp>
|
||||
|
||||
#include "components/ImageComponent.h"
|
|
@ -9,7 +9,7 @@
|
|||
#include <boost/filesystem.hpp>
|
||||
#include <boost/variant.hpp>
|
||||
#include <Eigen/Dense>
|
||||
#include "pugiXML/pugixml.hpp"
|
||||
#include "pugixml/pugixml.hpp"
|
||||
#include "GuiComponent.h"
|
||||
|
||||
template<typename T>
|
|
@ -171,3 +171,13 @@ fs::path makeRelativePath(const fs::path& path, const fs::path& relativeTo, bool
|
|||
// nothing could be resolved
|
||||
return path;
|
||||
}
|
||||
|
||||
boost::posix_time::ptime string_to_ptime(const std::string& str, const std::string& fmt)
|
||||
{
|
||||
std::istringstream ss(str);
|
||||
ss.imbue(std::locale(std::locale::classic(), new boost::posix_time::time_input_facet(fmt))); //std::locale handles deleting the facet
|
||||
boost::posix_time::ptime time;
|
||||
ss >> time;
|
||||
|
||||
return time;
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <Eigen/Dense>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/date_time.hpp>
|
||||
|
||||
std::string strToUpper(const char* from);
|
||||
std::string& strToUpper(std::string& str);
|
||||
|
@ -26,3 +29,5 @@ boost::filesystem::path makeRelativePath(const boost::filesystem::path& path, co
|
|||
// expands "./my/path.sfc" to "[relativeTo]/my/path.sfc"
|
||||
// if allowHome is true, also expands "~/my/path.sfc" to "/home/pi/my/path.sfc"
|
||||
boost::filesystem::path resolvePath(const boost::filesystem::path& path, const boost::filesystem::path& relativeTo, bool allowHome);
|
||||
|
||||
boost::posix_time::ptime string_to_ptime(const std::string& str, const std::string& fmt = "%Y%m%dT%H%M%S%F%q");
|
|
@ -2,32 +2,25 @@
|
|||
#include <iostream>
|
||||
#include "Renderer.h"
|
||||
#include "AudioManager.h"
|
||||
#include "VolumeControl.h"
|
||||
#include "Log.h"
|
||||
#include "Settings.h"
|
||||
#include <iomanip>
|
||||
#include "views/ViewController.h"
|
||||
#include "components/HelpComponent.h"
|
||||
#include "components/ImageComponent.h"
|
||||
|
||||
Window::Window() : mNormalizeNextUpdate(false), mFrameTimeElapsed(0), mFrameCountElapsed(0), mAverageDeltaTime(10),
|
||||
mAllowSleep(true), mSleeping(false), mTimeSinceLastInput(0)
|
||||
{
|
||||
mViewController = new ViewController(this);
|
||||
mHelp = new HelpComponent(this);
|
||||
|
||||
mBackgroundOverlay = new ImageComponent(this);
|
||||
mBackgroundOverlay->setImage(":/scroll_gradient.png");
|
||||
|
||||
pushGui(mViewController);
|
||||
}
|
||||
|
||||
Window::~Window()
|
||||
{
|
||||
delete mViewController; // this would get deleted down below, but just to be safe, delete it here
|
||||
delete mBackgroundOverlay;
|
||||
|
||||
//delete all our GUIs
|
||||
// delete all our GUIs
|
||||
while(peekGui())
|
||||
delete peekGui();
|
||||
|
||||
|
@ -129,14 +122,6 @@ void Window::input(InputConfig* config, Input input)
|
|||
// toggle TextComponent debug view with Ctrl-T
|
||||
Settings::getInstance()->setBool("DebugText", !Settings::getInstance()->getBool("DebugText"));
|
||||
}
|
||||
else if(config->isMappedTo("mastervolup", input))
|
||||
{
|
||||
VolumeControl::getInstance()->setVolume(VolumeControl::getInstance()->getVolume() + 5);
|
||||
}
|
||||
else if(config->isMappedTo("mastervoldown", input))
|
||||
{
|
||||
VolumeControl::getInstance()->setVolume(VolumeControl::getInstance()->getVolume() - 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(peekGui())
|
|
@ -1,12 +1,10 @@
|
|||
#ifndef _WINDOW_H_
|
||||
#define _WINDOW_H_
|
||||
#pragma once
|
||||
|
||||
#include "GuiComponent.h"
|
||||
#include <vector>
|
||||
#include "resources/Font.h"
|
||||
#include "InputManager.h"
|
||||
|
||||
class ViewController;
|
||||
class HelpComponent;
|
||||
class ImageComponent;
|
||||
|
||||
|
@ -28,8 +26,6 @@ public:
|
|||
bool init(unsigned int width = 0, unsigned int height = 0);
|
||||
void deinit();
|
||||
|
||||
inline ViewController* getViewController() { return mViewController; }
|
||||
|
||||
void normalizeNextUpdate();
|
||||
|
||||
inline bool isSleeping() const { return mSleeping; }
|
||||
|
@ -38,14 +34,13 @@ public:
|
|||
|
||||
void renderLoadingScreen();
|
||||
|
||||
void renderHelpPromptsEarly(); // used by ViewController to render HelpPrompts before a fade
|
||||
void renderHelpPromptsEarly(); // used to render HelpPrompts before a fade
|
||||
void setHelpPrompts(const std::vector<HelpPrompt>& prompts, const HelpStyle& style);
|
||||
|
||||
private:
|
||||
void onSleep();
|
||||
void onWake();
|
||||
|
||||
ViewController* mViewController;
|
||||
HelpComponent* mHelp;
|
||||
ImageComponent* mBackgroundOverlay;
|
||||
|
||||
|
@ -67,5 +62,3 @@ private:
|
|||
|
||||
bool mRenderedHelpPrompts;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
#include "AnimationController.h"
|
||||
#include "animations/AnimationController.h"
|
||||
|
||||
AnimationController::AnimationController(Animation* anim, int delay, std::function<void()> finishedCallback, bool reverse)
|
||||
: mAnimation(anim), mFinishedCallback(finishedCallback), mReverse(reverse), mTime(-delay), mDelay(delay)
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
#include "Animation.h"
|
||||
#include "animations/Animation.h"
|
||||
|
||||
class AnimationController
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Animation.h"
|
||||
#include "animations/Animation.h"
|
||||
|
||||
// Useful for simple one-off animations, you can supply the animation's apply(t) method right in the constructor as a lambda.
|
||||
class LambdaAnimation : public Animation
|
|
@ -1,5 +1,5 @@
|
|||
#include "AnimatedImageComponent.h"
|
||||
#include "../Log.h"
|
||||
#include "components/AnimatedImageComponent.h"
|
||||
#include "Log.h"
|
||||
|
||||
AnimatedImageComponent::AnimatedImageComponent(Window* window) : GuiComponent(window), mEnabled(false)
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
#include "../GuiComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "ImageComponent.h"
|
||||
|
||||
struct AnimationFrame
|
|
@ -1,8 +1,8 @@
|
|||
#include "BusyComponent.h"
|
||||
|
||||
#include "AnimatedImageComponent.h"
|
||||
#include "TextComponent.h"
|
||||
#include "../Renderer.h"
|
||||
#include "components/AnimatedImageComponent.h"
|
||||
#include "components/TextComponent.h"
|
||||
#include "Renderer.h"
|
||||
|
||||
// animation definition
|
||||
AnimationFrame BUSY_ANIMATION_FRAMES[] = {
|
|
@ -1,6 +1,6 @@
|
|||
#include "../GuiComponent.h"
|
||||
#include "ComponentGrid.h"
|
||||
#include "NinePatchComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "components/ComponentGrid.h"
|
||||
#include "components/NinePatchComponent.h"
|
||||
|
||||
class AnimatedImageComponent;
|
||||
class TextComponent;
|
|
@ -1,8 +1,8 @@
|
|||
#include "ButtonComponent.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../Window.h"
|
||||
#include "../Util.h"
|
||||
#include "../Log.h"
|
||||
#include "components/ButtonComponent.h"
|
||||
#include "Renderer.h"
|
||||
#include "Window.h"
|
||||
#include "Util.h"
|
||||
#include "Log.h"
|
||||
|
||||
ButtonComponent::ButtonComponent(Window* window, const std::string& text, const std::string& helpText, const std::function<void()>& func) : GuiComponent(window),
|
||||
mBox(window, ":/button.png"),
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
#include <functional>
|
||||
#include "../resources/Font.h"
|
||||
#include "NinePatchComponent.h"
|
||||
#include "resources/Font.h"
|
||||
#include "components/NinePatchComponent.h"
|
||||
|
||||
class ButtonComponent : public GuiComponent
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
#include "ComponentGrid.h"
|
||||
#include "../Log.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../Settings.h"
|
||||
#include "components/ComponentGrid.h"
|
||||
#include "Log.h"
|
||||
#include "Renderer.h"
|
||||
#include "Settings.h"
|
||||
|
||||
using namespace GridFlags;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
|
||||
namespace GridFlags
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
#include "ComponentList.h"
|
||||
#include "../Util.h"
|
||||
#include "../Log.h"
|
||||
#include "components/ComponentList.h"
|
||||
#include "Util.h"
|
||||
#include "Log.h"
|
||||
|
||||
#define TOTAL_HORIZONTAL_PADDING_PX 20
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
#include "DateTimeComponent.h"
|
||||
#include "../MetaData.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../Window.h"
|
||||
#include "../Log.h"
|
||||
#include "../Util.h"
|
||||
#include "components/DateTimeComponent.h"
|
||||
#include "Renderer.h"
|
||||
#include "Window.h"
|
||||
#include "Log.h"
|
||||
#include "Util.h"
|
||||
|
||||
DateTimeComponent::DateTimeComponent(Window* window, DisplayMode dispMode) : GuiComponent(window),
|
||||
mEditing(false), mEditIndex(0), mDisplayMode(dispMode), mRelativeUpdateAccumulator(0),
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
#include <boost/date_time.hpp>
|
||||
#include "../resources/Font.h"
|
||||
#include "resources/Font.h"
|
||||
|
||||
// Used to enter or display a specific point in time.
|
||||
class DateTimeComponent : public GuiComponent
|
|
@ -1,12 +1,11 @@
|
|||
#include "HelpComponent.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../Settings.h"
|
||||
#include "../Log.h"
|
||||
#include "../Util.h"
|
||||
#include "ImageComponent.h"
|
||||
#include "TextComponent.h"
|
||||
#include "ComponentGrid.h"
|
||||
|
||||
#include "components/HelpComponent.h"
|
||||
#include "Renderer.h"
|
||||
#include "Settings.h"
|
||||
#include "Log.h"
|
||||
#include "Util.h"
|
||||
#include "components/ImageComponent.h"
|
||||
#include "components/TextComponent.h"
|
||||
#include "components/ComponentGrid.h"
|
||||
#include <boost/assign.hpp>
|
||||
|
||||
#define OFFSET_X 12 // move the entire thing right by this amount (px)
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "../HelpStyle.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "HelpStyle.h"
|
||||
|
||||
class ImageComponent;
|
||||
class TextureResource;
|
|
@ -3,10 +3,10 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "../GuiComponent.h"
|
||||
#include "ImageComponent.h"
|
||||
#include "../resources/Font.h"
|
||||
#include "../Renderer.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "components/ImageComponent.h"
|
||||
#include "resources/Font.h"
|
||||
#include "Renderer.h"
|
||||
|
||||
enum CursorState
|
||||
{
|
|
@ -1,12 +1,12 @@
|
|||
#include "ImageComponent.h"
|
||||
#include "components/ImageComponent.h"
|
||||
#include <iostream>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <math.h>
|
||||
#include "../Log.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../ThemeData.h"
|
||||
#include "../Util.h"
|
||||
#include "../resources/SVGResource.h"
|
||||
#include "Log.h"
|
||||
#include "Renderer.h"
|
||||
#include "ThemeData.h"
|
||||
#include "Util.h"
|
||||
#include "resources/SVGResource.h"
|
||||
|
||||
Eigen::Vector2i ImageComponent::getTextureSize() const
|
||||
{
|
|
@ -1,13 +1,13 @@
|
|||
#ifndef _IMAGECOMPONENT_H_
|
||||
#define _IMAGECOMPONENT_H_
|
||||
|
||||
#include "../platform.h"
|
||||
#include "platform.h"
|
||||
#include GLHEADER
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include "../resources/TextureResource.h"
|
||||
#include "resources/TextureResource.h"
|
||||
|
||||
class ImageComponent : public GuiComponent
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "IList.h"
|
||||
#include "../components/ImageComponent.h"
|
||||
#include "../Log.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "components/IList.h"
|
||||
#include "components/ImageComponent.h"
|
||||
#include "Log.h"
|
||||
|
||||
struct ImageGridData
|
||||
{
|
|
@ -1,5 +1,5 @@
|
|||
#include "MenuComponent.h"
|
||||
#include "ButtonComponent.h"
|
||||
#include "components/MenuComponent.h"
|
||||
#include "components/ButtonComponent.h"
|
||||
|
||||
#define BUTTON_GRID_VERT_PADDING 32
|
||||
#define BUTTON_GRID_HORIZ_PADDING 10
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include "NinePatchComponent.h"
|
||||
#include "ComponentList.h"
|
||||
#include "TextComponent.h"
|
||||
#include "ComponentGrid.h"
|
||||
#include "../Util.h"
|
||||
#include "components/NinePatchComponent.h"
|
||||
#include "components/ComponentList.h"
|
||||
#include "components/TextComponent.h"
|
||||
#include "components/ComponentGrid.h"
|
||||
#include "Util.h"
|
||||
|
||||
class ButtonComponent;
|
||||
class ImageComponent;
|
|
@ -1,9 +1,9 @@
|
|||
#include "NinePatchComponent.h"
|
||||
#include "../Window.h"
|
||||
#include "../Log.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../ThemeData.h"
|
||||
#include "../Util.h"
|
||||
#include "components/NinePatchComponent.h"
|
||||
#include "Window.h"
|
||||
#include "Log.h"
|
||||
#include "Renderer.h"
|
||||
#include "ThemeData.h"
|
||||
#include "Util.h"
|
||||
|
||||
NinePatchComponent::NinePatchComponent(Window* window, const std::string& path, unsigned int edgeColor, unsigned int centerColor) : GuiComponent(window),
|
||||
mEdgeColor(edgeColor), mCenterColor(centerColor),
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "../resources/TextureResource.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "resources/TextureResource.h"
|
||||
|
||||
// Display an image in a way so that edges don't get too distorted no matter the final size. Useful for UI elements like backgrounds, buttons, etc.
|
||||
// This is accomplished by splitting an image into 9 pieces:
|
|
@ -1,14 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "../resources/Font.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../Window.h"
|
||||
#include "TextComponent.h"
|
||||
#include "ImageComponent.h"
|
||||
#include "MenuComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "resources/Font.h"
|
||||
#include "Renderer.h"
|
||||
#include "Window.h"
|
||||
#include "components/TextComponent.h"
|
||||
#include "components/ImageComponent.h"
|
||||
#include "components/MenuComponent.h"
|
||||
#include <sstream>
|
||||
#include "../Log.h"
|
||||
#include "Log.h"
|
||||
|
||||
//Used to display a list of options.
|
||||
//Can select one or multiple options.
|
|
@ -1,6 +1,6 @@
|
|||
#include "ScrollableContainer.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../Log.h"
|
||||
#include "components/ScrollableContainer.h"
|
||||
#include "Renderer.h"
|
||||
#include "Log.h"
|
||||
|
||||
#define AUTO_SCROLL_RESET_DELAY 10000 // ms to reset to top after we reach the bottom
|
||||
#define AUTO_SCROLL_DELAY 8000 // ms to wait before we start to scroll
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
|
||||
class ScrollableContainer : public GuiComponent
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
#include "SliderComponent.h"
|
||||
#include "components/SliderComponent.h"
|
||||
#include <assert.h>
|
||||
#include "../Renderer.h"
|
||||
#include "../resources/Font.h"
|
||||
#include "../Log.h"
|
||||
#include "../Util.h"
|
||||
#include "Renderer.h"
|
||||
#include "resources/Font.h"
|
||||
#include "Log.h"
|
||||
#include "Util.h"
|
||||
|
||||
#define MOVE_REPEAT_DELAY 500
|
||||
#define MOVE_REPEAT_RATE 40
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "ImageComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "components/ImageComponent.h"
|
||||
|
||||
class TextCache;
|
||||
class Font;
|
|
@ -1,7 +1,7 @@
|
|||
#include "SwitchComponent.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../resources/Font.h"
|
||||
#include "../Window.h"
|
||||
#include "Renderer.h"
|
||||
#include "resources/Font.h"
|
||||
#include "Window.h"
|
||||
|
||||
SwitchComponent::SwitchComponent(Window* window, bool state) : GuiComponent(window), mImage(window), mState(state)
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "ImageComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "components/ImageComponent.h"
|
||||
|
||||
// A very simple "on/off" switch.
|
||||
// Should hopefully be switched to use images instead of text in the future.
|
|
@ -1,10 +1,10 @@
|
|||
#include "TextComponent.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../Log.h"
|
||||
#include "../Window.h"
|
||||
#include "../ThemeData.h"
|
||||
#include "../Util.h"
|
||||
#include "../Settings.h"
|
||||
#include "components/TextComponent.h"
|
||||
#include "Renderer.h"
|
||||
#include "Log.h"
|
||||
#include "Window.h"
|
||||
#include "ThemeData.h"
|
||||
#include "Util.h"
|
||||
#include "Settings.h"
|
||||
|
||||
TextComponent::TextComponent(Window* window) : GuiComponent(window),
|
||||
mFont(Font::get(FONT_SIZE_MEDIUM)), mUppercase(false), mColor(0x000000FF), mAutoCalcExtent(true, true), mAlignment(ALIGN_LEFT), mLineSpacing(1.5f)
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef _TEXTCOMPONENT_H_
|
||||
#define _TEXTCOMPONENT_H_
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "../resources/Font.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "resources/Font.h"
|
||||
|
||||
class ThemeData;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
#include "TextEditComponent.h"
|
||||
#include "../Log.h"
|
||||
#include "../resources/Font.h"
|
||||
#include "../Window.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../Util.h"
|
||||
#include "components/TextEditComponent.h"
|
||||
#include "Log.h"
|
||||
#include "resources/Font.h"
|
||||
#include "Window.h"
|
||||
#include "Renderer.h"
|
||||
#include "Util.h"
|
||||
|
||||
#define TEXT_PADDING_HORIZ 10
|
||||
#define TEXT_PADDING_VERT 2
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "NinePatchComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "components/NinePatchComponent.h"
|
||||
|
||||
class Font;
|
||||
class TextCache;
|
|
@ -1,35 +1,28 @@
|
|||
#include "GuiDetectDevice.h"
|
||||
#include "../Window.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../resources/Font.h"
|
||||
#include "GuiInputConfig.h"
|
||||
#include "../components/TextComponent.h"
|
||||
#include "guis/GuiDetectDevice.h"
|
||||
#include "Window.h"
|
||||
#include "Renderer.h"
|
||||
#include "resources/Font.h"
|
||||
#include "guis/GuiInputConfig.h"
|
||||
#include "components/TextComponent.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include "../views/ViewController.h"
|
||||
#include "../Util.h"
|
||||
#include "Util.h"
|
||||
|
||||
#define HOLD_TIME 1000
|
||||
|
||||
using namespace Eigen;
|
||||
|
||||
GuiDetectDevice::GuiDetectDevice(Window* window, bool firstRun) : GuiComponent(window), mFirstRun(firstRun),
|
||||
GuiDetectDevice::GuiDetectDevice(Window* window, bool firstRun, const std::function<void()>& doneCallback) : GuiComponent(window), mFirstRun(firstRun),
|
||||
mBackground(window, ":/frame.png"), mGrid(window, Vector2i(1, 5))
|
||||
{
|
||||
mHoldingConfig = NULL;
|
||||
mHoldTime = 0;
|
||||
mDoneCallback = doneCallback;
|
||||
|
||||
addChild(&mBackground);
|
||||
addChild(&mGrid);
|
||||
|
||||
if(firstRun)
|
||||
{
|
||||
mDoneCallback = [window] {
|
||||
window->getViewController()->goToStart();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// title
|
||||
mTitle = std::make_shared<TextComponent>(mWindow, firstRun ? "WELCOME" : "CONFIGURE INPUT",
|
||||
Font::get(FONT_SIZE_LARGE), 0x555555FF, ALIGN_CENTER);
|
|
@ -1,15 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "../components/NinePatchComponent.h"
|
||||
#include "../components/ComponentGrid.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "components/NinePatchComponent.h"
|
||||
#include "components/ComponentGrid.h"
|
||||
|
||||
class TextComponent;
|
||||
|
||||
class GuiDetectDevice : public GuiComponent
|
||||
{
|
||||
public:
|
||||
GuiDetectDevice(Window* window, bool firstRun);
|
||||
GuiDetectDevice(Window* window, bool firstRun, const std::function<void()>& doneCallback);
|
||||
|
||||
bool input(InputConfig* config, Input input) override;
|
||||
void update(int deltaTime) override;
|
|
@ -1,11 +1,11 @@
|
|||
#include "GuiInputConfig.h"
|
||||
#include "../Window.h"
|
||||
#include "../Log.h"
|
||||
#include "../components/TextComponent.h"
|
||||
#include "../components/ImageComponent.h"
|
||||
#include "../components/MenuComponent.h"
|
||||
#include "../components/ButtonComponent.h"
|
||||
#include "../Util.h"
|
||||
#include "guis/GuiInputConfig.h"
|
||||
#include "Window.h"
|
||||
#include "Log.h"
|
||||
#include "components/TextComponent.h"
|
||||
#include "components/ImageComponent.h"
|
||||
#include "components/MenuComponent.h"
|
||||
#include "components/ButtonComponent.h"
|
||||
#include "Util.h"
|
||||
|
||||
static const int inputCount = 10;
|
||||
static const char* inputName[inputCount] = { "Up", "Down", "Left", "Right", "A", "B", "Start", "Select", "PageUp", "PageDown" };
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "../components/NinePatchComponent.h"
|
||||
#include "../components/ComponentGrid.h"
|
||||
#include "../components/ComponentList.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "components/NinePatchComponent.h"
|
||||
#include "components/ComponentGrid.h"
|
||||
#include "components/ComponentList.h"
|
||||
|
||||
class TextComponent;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
#include "GuiMsgBox.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../components/TextComponent.h"
|
||||
#include "../components/ButtonComponent.h"
|
||||
#include "../components/MenuComponent.h" // for makeButtonGrid
|
||||
#include "../Util.h"
|
||||
#include "../Log.h"
|
||||
#include "guis/GuiMsgBox.h"
|
||||
#include "Renderer.h"
|
||||
#include "components/TextComponent.h"
|
||||
#include "components/ButtonComponent.h"
|
||||
#include "components/MenuComponent.h" // for makeButtonGrid
|
||||
#include "Util.h"
|
||||
#include "Log.h"
|
||||
|
||||
#define HORIZONTAL_PADDING_PX 20
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "../components/NinePatchComponent.h"
|
||||
#include "../components/ComponentGrid.h"
|
||||
#include "GuiComponent.h"
|
||||
#include "components/NinePatchComponent.h"
|
||||
#include "components/ComponentGrid.h"
|
||||
|
||||
class TextComponent;
|
||||
class ButtonComponent;
|
|
@ -1,5 +1,5 @@
|
|||
#include "GuiTextEditPopup.h"
|
||||
#include "../components/MenuComponent.h"
|
||||
#include "guis/GuiTextEditPopup.h"
|
||||
#include "components/MenuComponent.h"
|
||||
|
||||
using namespace Eigen;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
#include "../GuiComponent.h"
|
||||
#include "GuiComponent.h"
|
||||
|
||||
#include "../components/NinePatchComponent.h"
|
||||
#include "../components/ButtonComponent.h"
|
||||
#include "../components/ComponentGrid.h"
|
||||
#include "../components/TextEditComponent.h"
|
||||
#include "../components/TextComponent.h"
|
||||
#include "components/NinePatchComponent.h"
|
||||
#include "components/ButtonComponent.h"
|
||||
#include "components/ComponentGrid.h"
|
||||
#include "components/TextEditComponent.h"
|
||||
#include "components/TextComponent.h"
|
||||
|
||||
class GuiTextEditPopup : public GuiComponent
|
||||
{
|
|
@ -1,11 +1,11 @@
|
|||
#include "Font.h"
|
||||
#include "resources/Font.h"
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include "../Renderer.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include "../Log.h"
|
||||
#include "../Util.h"
|
||||
#include "Renderer.h"
|
||||
#include "Log.h"
|
||||
#include "Util.h"
|
||||
|
||||
FT_Library Font::sLibrary = NULL;
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "../platform.h"
|
||||
#include "platform.h"
|
||||
#include GLHEADER
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include <Eigen/Dense>
|
||||
#include "ResourceManager.h"
|
||||
#include "../ThemeData.h"
|
||||
#include "resources/ResourceManager.h"
|
||||
#include "ThemeData.h"
|
||||
|
||||
class TextCache;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "ResourceManager.h"
|
||||
#include "../Log.h"
|
||||
#include "../../data/Resources.h"
|
||||
#include "Log.h"
|
||||
#include "../data/Resources.h"
|
||||
#include <fstream>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
#include "SVGResource.h"
|
||||
#include "../nanosvg/nanosvg.h"
|
||||
#include "../nanosvg/nanosvgrast.h"
|
||||
#include "../Log.h"
|
||||
#include "../Util.h"
|
||||
#include "../ImageIO.h"
|
||||
#include "nanosvg/nanosvg.h"
|
||||
#include "nanosvg/nanosvgrast.h"
|
||||
#include "Log.h"
|
||||
#include "Util.h"
|
||||
#include "ImageIO.h"
|
||||
|
||||
#define DPI 96
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "TextureResource.h"
|
||||
#include "resources/TextureResource.h"
|
||||
|
||||
struct NSVGimage;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
#include "TextureResource.h"
|
||||
#include "../Log.h"
|
||||
#include "../platform.h"
|
||||
#include "resources/TextureResource.h"
|
||||
#include "Log.h"
|
||||
#include "platform.h"
|
||||
#include GLHEADER
|
||||
#include "../ImageIO.h"
|
||||
#include "../Renderer.h"
|
||||
#include "../Util.h"
|
||||
#include "SVGResource.h"
|
||||
#include "ImageIO.h"
|
||||
#include "Renderer.h"
|
||||
#include "Util.h"
|
||||
#include "resources/SVGResource.h"
|
||||
|
||||
std::map< TextureResource::TextureKeyType, std::weak_ptr<TextureResource> > TextureResource::sTextureMap;
|
||||
std::list< std::weak_ptr<TextureResource> > TextureResource::sTextureList;
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include "ResourceManager.h"
|
||||
#include "resources/ResourceManager.h"
|
||||
|
||||
#include <string>
|
||||
#include <Eigen/Dense>
|
||||
#include "../platform.h"
|
||||
#include "platform.h"
|
||||
#include GLHEADER
|
||||
|
||||
// An OpenGL texture.
|
149
es/CMakeLists.txt
Normal file
149
es/CMakeLists.txt
Normal file
|
@ -0,0 +1,149 @@
|
|||
project("es-app")
|
||||
|
||||
set(ES_HEADERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ScraperCmdLine.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.h
|
||||
|
||||
# GuiComponents
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AsyncReqComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScraperSearchComponent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h
|
||||
|
||||
# Guis
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperStart.h
|
||||
|
||||
# Scrapers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/TheArchiveScraper.h
|
||||
|
||||
# Views
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.h
|
||||
|
||||
# Animations
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/LaunchAnimation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/animations/MoveCameraAnimation.h
|
||||
)
|
||||
|
||||
set(ES_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/MameNameMap.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ScraperCmdLine.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.cpp
|
||||
|
||||
# GuiComponents
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/AsyncReqComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScraperSearchComponent.cpp
|
||||
|
||||
# Guis
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperStart.cpp
|
||||
|
||||
# Scrapers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/TheArchiveScraper.cpp
|
||||
|
||||
# Views
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.cpp
|
||||
)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# define OS specific sources and headers
|
||||
if(MSVC)
|
||||
LIST(APPEND ES_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.rc
|
||||
)
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# define target
|
||||
include_directories(${COMMON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
add_executable(emulationstation ${ES_SOURCES} ${ES_HEADERS})
|
||||
target_link_libraries(emulationstation ${COMMON_LIBRARIES} es-core)
|
||||
|
||||
# special properties for Windows builds
|
||||
if(MSVC)
|
||||
#show console in debug builds, but not in proper release builds
|
||||
#Note that up to CMake 2.8.10 this feature is broken: http://public.kitware.com/Bug/view.php?id=12566
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
|
||||
endif()
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# set up CPack install stuff so `make install` does something useful
|
||||
|
||||
install(TARGETS emulationstation
|
||||
RUNTIME
|
||||
DESTINATION bin)
|
||||
|
||||
INCLUDE(InstallRequiredSystemLibraries)
|
||||
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A flexible graphical emulator front-end")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION "EmulationStation is a flexible, graphical front-end designed for keyboardless navigation of your multi-platform retro game collection.")
|
||||
|
||||
SET(CPACK_RESOURCE_FILE LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md")
|
||||
SET(CPACK_RESOURCE_FILE README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
|
||||
|
||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Alec Lofquist <allofquist@yahoo.com>")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SECTION "misc")
|
||||
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "extra")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libsdl2-2.0-0, libboost-system1.54.0, libboost-filesystem1.54.0, libfreeimage3, libfreetype6, libcurl3, libasound2")
|
||||
SET(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS "debhelper (>= 8.0.0), cmake, g++ (>= 4.8), libsdl2-dev, libboost-system-dev, libboost-filesystem-dev, libboost-date-time-dev, libfreeimage-dev, libfreetype6-dev, libeigen3-dev, libcurl4-openssl-dev, libasound2-dev, libgl1-mesa-dev")
|
||||
|
||||
SET(CPACK_PACKAGE_VENDOR "emulationstation.org")
|
||||
SET(CPACK_PACKAGE_VERSION "2.0.0~rc1")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "0")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "0")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "emulationstation_${CMAKE_PACKAGE_VERSION}")
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "emulationstation" "emulationstation")
|
||||
|
||||
SET(CPACK_GENERATOR "TGZ;DEB")
|
||||
|
||||
INCLUDE(CPack)
|
BIN
es/src/EmulationStation.aps
Normal file
BIN
es/src/EmulationStation.aps
Normal file
Binary file not shown.
|
@ -133,14 +133,3 @@ boost::posix_time::ptime MetaDataList::getTime(const std::string& key) const
|
|||
{
|
||||
return string_to_ptime(get(key), "%Y%m%dT%H%M%S%F%q");
|
||||
}
|
||||
|
||||
//util function
|
||||
boost::posix_time::ptime string_to_ptime(const std::string& str, const std::string& fmt)
|
||||
{
|
||||
std::istringstream ss(str);
|
||||
ss.imbue(std::locale(std::locale::classic(), new boost::posix_time::time_input_facet(fmt))); //std::locale handles deleting the facet
|
||||
boost::posix_time::ptime time;
|
||||
ss >> time;
|
||||
|
||||
return time;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue