commit 93094bcbedb441a4445bbc188afe56722e2b7cb9
Author: emb <>
Date: Thu Jan 1 10:14:26 2015 -0600
Port from git
diff --git a/.hgignore b/.hgignore
new file mode 100644
index 0000000..4539299
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,2 @@
+syntax: glob
+Build/
\ No newline at end of file
diff --git a/Assets/Environment/Common/Collections/Arcade/Exclude.txt b/Assets/Environment/Common/Collections/Arcade/Exclude.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Assets/Environment/Common/Collections/Arcade/Include.txt b/Assets/Environment/Common/Collections/Arcade/Include.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Assets/Environment/Common/Collections/Arcade/Include.xml b/Assets/Environment/Common/Collections/Arcade/Include.xml
new file mode 100644
index 0000000..0b7017d
--- /dev/null
+++ b/Assets/Environment/Common/Collections/Arcade/Include.xml
@@ -0,0 +1,749 @@
+
+
\ No newline at end of file
diff --git a/Assets/Environment/Common/Collections/Arcade/Settings.conf b/Assets/Environment/Common/Collections/Arcade/Settings.conf
new file mode 100644
index 0000000..341f7b6
--- /dev/null
+++ b/Assets/Environment/Common/Collections/Arcade/Settings.conf
@@ -0,0 +1,13 @@
+# override the default layout with something else if desired
+#layout = Default
+launcher = MAME
+
+list.path = ../ROMs/MAME
+list.extensions = zip
+
+media.video = ../Media/Arcade/Videos
+media.title = ../Media/Arcade/Titles
+media.snap = ../Media/Arcade/Snaps
+media.box = ../Media/Arcade/Boxes
+media.cart = ../Media/Arcade/Carts
+
diff --git a/Assets/Environment/Common/Collections/Main/Menu.xml b/Assets/Environment/Common/Collections/Main/Menu.xml
new file mode 100644
index 0000000..2a84880
--- /dev/null
+++ b/Assets/Environment/Common/Collections/Main/Menu.xml
@@ -0,0 +1,7 @@
+
diff --git a/Assets/Environment/Common/Collections/Main/Settings.conf b/Assets/Environment/Common/Collections/Main/Settings.conf
new file mode 100644
index 0000000..5863137
--- /dev/null
+++ b/Assets/Environment/Common/Collections/Main/Settings.conf
@@ -0,0 +1,9 @@
+# override the default layout with something else if desired
+# layout = SomeCustomBuiltTheme
+
+media.video = ../Media/Systems/Videos
+media.title = ../Media/Systems/Titles
+media.box = ../Media/Systems/Boxes
+media.cart = ../Media/Systems/Carts
+media.snap = ../Media/Systems/Snaps
+
diff --git a/Assets/Environment/Common/Collections/NES and Arcade/Menu.xml b/Assets/Environment/Common/Collections/NES and Arcade/Menu.xml
new file mode 100644
index 0000000..df54a3b
--- /dev/null
+++ b/Assets/Environment/Common/Collections/NES and Arcade/Menu.xml
@@ -0,0 +1,5 @@
+
diff --git a/Assets/Environment/Common/Collections/NES and Arcade/Settings.conf b/Assets/Environment/Common/Collections/NES and Arcade/Settings.conf
new file mode 100644
index 0000000..5863137
--- /dev/null
+++ b/Assets/Environment/Common/Collections/NES and Arcade/Settings.conf
@@ -0,0 +1,9 @@
+# override the default layout with something else if desired
+# layout = SomeCustomBuiltTheme
+
+media.video = ../Media/Systems/Videos
+media.title = ../Media/Systems/Titles
+media.box = ../Media/Systems/Boxes
+media.cart = ../Media/Systems/Carts
+media.snap = ../Media/Systems/Snaps
+
diff --git a/Assets/Environment/Common/Collections/Nintendo Entertainment System/Exclude.txt b/Assets/Environment/Common/Collections/Nintendo Entertainment System/Exclude.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Assets/Environment/Common/Collections/Nintendo Entertainment System/Include.txt b/Assets/Environment/Common/Collections/Nintendo Entertainment System/Include.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Assets/Environment/Common/Collections/Nintendo Entertainment System/Settings.conf b/Assets/Environment/Common/Collections/Nintendo Entertainment System/Settings.conf
new file mode 100644
index 0000000..6b6725e
--- /dev/null
+++ b/Assets/Environment/Common/Collections/Nintendo Entertainment System/Settings.conf
@@ -0,0 +1,13 @@
+# override the default layout with something else if desired
+#layout = SomeNewLayout
+launcher = Nestopia
+
+list.path = ../ROMs/Nintendo NES
+list.extensions = nes
+
+media.video = ../Media/Nintendo NES/Videos
+media.title = ../Media/Nintendo NES/Titles
+media.box = ../Media/Nintendo NES/Boxes
+media.cart = ../Media/Nintendo NES/Carts
+media.snap = ../Media/Nintendo NES/Snaps
+
diff --git a/Assets/Environment/Common/Controls.conf b/Assets/Environment/Common/Controls.conf
new file mode 100644
index 0000000..b4fd723
--- /dev/null
+++ b/Assets/Environment/Common/Controls.conf
@@ -0,0 +1,7 @@
+previousItem = Up
+nextItem = Down
+pageUp = Left
+pageDown = Right
+select = Space
+back = Escape
+quit = Q
diff --git a/Assets/Environment/Common/Launchers/Fceux.conf b/Assets/Environment/Common/Launchers/Fceux.conf
new file mode 100644
index 0000000..6f3d733
--- /dev/null
+++ b/Assets/Environment/Common/Launchers/Fceux.conf
@@ -0,0 +1,2 @@
+executable = D:\Emulators\fceux\fceux.exe
+arguments = "%ITEM_FILEPATH%"
diff --git a/Assets/Environment/Common/Launchers/HyperLaunch.conf b/Assets/Environment/Common/Launchers/HyperLaunch.conf
new file mode 100644
index 0000000..057a172
--- /dev/null
+++ b/Assets/Environment/Common/Launchers/HyperLaunch.conf
@@ -0,0 +1,6 @@
+executable = ../HyperLaunch/HyperLaunch.exe
+arguments = -s "%ITEM_COLLECTION_NAME%" -r "%ITEM_FILEPATH%" -p RetroFE -f "%RETROFE_EXEC_PATH%"
+
+# For v3.0.1.1 compliant version, comment out the above arguments
+# and uncomment the following line:
+#arguments = "%ITEM_COLLECTION_NAME%" "%ITEM_NAME%"
diff --git a/Assets/Environment/Common/Launchers/MAME.conf b/Assets/Environment/Common/Launchers/MAME.conf
new file mode 100644
index 0000000..1094015
--- /dev/null
+++ b/Assets/Environment/Common/Launchers/MAME.conf
@@ -0,0 +1,2 @@
+executable = D:/Emulators/MAME/mamepp.exe
+arguments = "%ITEM_NAME%"
diff --git a/Assets/Environment/Common/Launchers/Nestopia.conf b/Assets/Environment/Common/Launchers/Nestopia.conf
new file mode 100644
index 0000000..61a51d7
--- /dev/null
+++ b/Assets/Environment/Common/Launchers/Nestopia.conf
@@ -0,0 +1,2 @@
+executable = D:\Emulators\nestopia\nestopia.exe
+arguments = "%ITEM_FILEPATH%"
diff --git a/Assets/Environment/Common/Layouts/Default 16x9/Age.otf b/Assets/Environment/Common/Layouts/Default 16x9/Age.otf
new file mode 100644
index 0000000..5d76781
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 16x9/Age.otf differ
diff --git a/Assets/Environment/Common/Layouts/Default 16x9/Layout.xml b/Assets/Environment/Common/Layouts/Default 16x9/Layout.xml
new file mode 100644
index 0000000..4a1a58c
--- /dev/null
+++ b/Assets/Environment/Common/Layouts/Default 16x9/Layout.xml
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Assets/Environment/Common/Layouts/Default 16x9/background.png b/Assets/Environment/Common/Layouts/Default 16x9/background.png
new file mode 100644
index 0000000..5d5f7e6
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 16x9/background.png differ
diff --git a/Assets/Environment/Common/Layouts/Default 16x9/highlight.wav b/Assets/Environment/Common/Layouts/Default 16x9/highlight.wav
new file mode 100644
index 0000000..589d167
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 16x9/highlight.wav differ
diff --git a/Assets/Environment/Common/Layouts/Default 16x9/load.wav b/Assets/Environment/Common/Layouts/Default 16x9/load.wav
new file mode 100644
index 0000000..077480e
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 16x9/load.wav differ
diff --git a/Assets/Environment/Common/Layouts/Default 16x9/logo.png b/Assets/Environment/Common/Layouts/Default 16x9/logo.png
new file mode 100644
index 0000000..54bd5ac
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 16x9/logo.png differ
diff --git a/Assets/Environment/Common/Layouts/Default 16x9/select.wav b/Assets/Environment/Common/Layouts/Default 16x9/select.wav
new file mode 100644
index 0000000..6678b93
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 16x9/select.wav differ
diff --git a/Assets/Environment/Common/Layouts/Default 16x9/square.png b/Assets/Environment/Common/Layouts/Default 16x9/square.png
new file mode 100644
index 0000000..de7cb82
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 16x9/square.png differ
diff --git a/Assets/Environment/Common/Layouts/Default 16x9/unload.wav b/Assets/Environment/Common/Layouts/Default 16x9/unload.wav
new file mode 100644
index 0000000..65f069a
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 16x9/unload.wav differ
diff --git a/Assets/Environment/Common/Layouts/Default 4x3/Age.otf b/Assets/Environment/Common/Layouts/Default 4x3/Age.otf
new file mode 100644
index 0000000..5d76781
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 4x3/Age.otf differ
diff --git a/Assets/Environment/Common/Layouts/Default 4x3/Layout.xml b/Assets/Environment/Common/Layouts/Default 4x3/Layout.xml
new file mode 100644
index 0000000..471c965
--- /dev/null
+++ b/Assets/Environment/Common/Layouts/Default 4x3/Layout.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Assets/Environment/Common/Layouts/Default 4x3/background.png b/Assets/Environment/Common/Layouts/Default 4x3/background.png
new file mode 100644
index 0000000..ce0e1a0
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 4x3/background.png differ
diff --git a/Assets/Environment/Common/Layouts/Default 4x3/highlight.wav b/Assets/Environment/Common/Layouts/Default 4x3/highlight.wav
new file mode 100644
index 0000000..589d167
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 4x3/highlight.wav differ
diff --git a/Assets/Environment/Common/Layouts/Default 4x3/load.wav b/Assets/Environment/Common/Layouts/Default 4x3/load.wav
new file mode 100644
index 0000000..077480e
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 4x3/load.wav differ
diff --git a/Assets/Environment/Common/Layouts/Default 4x3/logo.png b/Assets/Environment/Common/Layouts/Default 4x3/logo.png
new file mode 100644
index 0000000..54bd5ac
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 4x3/logo.png differ
diff --git a/Assets/Environment/Common/Layouts/Default 4x3/select.wav b/Assets/Environment/Common/Layouts/Default 4x3/select.wav
new file mode 100644
index 0000000..6678b93
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 4x3/select.wav differ
diff --git a/Assets/Environment/Common/Layouts/Default 4x3/square.png b/Assets/Environment/Common/Layouts/Default 4x3/square.png
new file mode 100644
index 0000000..de7cb82
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 4x3/square.png differ
diff --git a/Assets/Environment/Common/Layouts/Default 4x3/unload.wav b/Assets/Environment/Common/Layouts/Default 4x3/unload.wav
new file mode 100644
index 0000000..65f069a
Binary files /dev/null and b/Assets/Environment/Common/Layouts/Default 4x3/unload.wav differ
diff --git a/Assets/Environment/Common/Settings.conf b/Assets/Environment/Common/Settings.conf
new file mode 100644
index 0000000..9db1413
--- /dev/null
+++ b/Assets/Environment/Common/Settings.conf
@@ -0,0 +1,49 @@
+##############################################################################
+#
+# For support, visit www.retrofe.com
+# or visit irc.foreverchat.net (channel #retrofe)
+#
+# For Documentation, visit www.retrofe.com/documentation
+#
+##############################################################################
+
+
+#######################################
+# Display
+#######################################
+fullscreen = no
+horizontal = stretch # or enter in the screen pixel width (i.e 1024)
+vertical = stretch # or enter in the screen pixel width (i.e 768)
+layout = Default 16x9
+hideMouse = yes
+showParenthesis = yes
+showSquareBrackets = yes
+
+# If you would like RetroFE first load a different collection other than the
+# main menu, uncomment the line below and replace it with your collection name.
+# firstCollection = Arcade
+
+#######################################
+# Video playback settings
+#######################################
+
+# set to "no" for very old/slow systems
+videoEnable = yes
+
+# Number of times to loop video playback (enter 0 to continuously loop)
+videoLoop = 0
+
+#######################################
+# General
+#######################################
+# exit the frontend when the back button is pressed on the first page
+exitOnFirstPageBack = yes
+
+# enter 0 attract mode, otherwise enter the number of seconds to wait before enabling attract mode
+attractModeTime = 45
+
+#######################################
+# Debugging
+#######################################
+# do not set to "yes" unless you want your hard drive to quickly fill up
+debug.logfps = no
diff --git a/Assets/Environment/Linux/README-UBUNTU.txt b/Assets/Environment/Linux/README-UBUNTU.txt
new file mode 100644
index 0000000..862eeec
--- /dev/null
+++ b/Assets/Environment/Linux/README-UBUNTU.txt
@@ -0,0 +1,4 @@
+This program requires Ubuntu 14.04 and requires the following packages to be installed:
+
+sudo apt-get install zlib1g libsdl2-2.0 libsdl2-mixer-2.0 libsdl2-image-2.0 libsdl2-ttf-2.0 \
+libgstreamer1.0 libgstreamer-plugins-base1.0 libgstreamer-plugins-good1.0 libglib2.0
diff --git a/Assets/Environment/Windows/RetroFE.lnk b/Assets/Environment/Windows/RetroFE.lnk
new file mode 100644
index 0000000..fb83a0e
Binary files /dev/null and b/Assets/Environment/Windows/RetroFE.lnk differ
diff --git a/Build Instructions.txt b/Build Instructions.txt
new file mode 100644
index 0000000..5783405
--- /dev/null
+++ b/Build Instructions.txt
@@ -0,0 +1,34 @@
+Windows Setup
+===============================
+Install Python 2.7
+Install sphinx with python
+Install visual studio 2012
+Install cmake
+Install git
+Install 7zip
+Install gstreamer and gstreamer-devel (x86, not 64 bit!) from http://gstreamer.freedesktop/org/data/pkg/windows/1.4.0
+
+To build:
+1. Run "Source/SetupEnvironment.bat" to setup necessary variables and paths to compile in visual studio
+2. Generate your visual studio solution files with running:
+ cmake Source -BBuild -DGSTREAMER_ROOT=c:/gstreamer/1.0/x86 -DVERSION_MAJOR=0 -DVERSION_MINOR=0 -DVERSION_BUILD=0
+3. Compile your environment:
+ cd Build
+ msbuild RetroFE.sln
+
+Runnable environment is stored in Build/Artifacts/RetroFE
+
+Linux Setup
+===============================
+Install ubuntu or xubuntu 14.04
+Run the following command
+sudo apt-get install git g++ cmake zlib1g-dev libsdl2-2.0 libsdl2-mixer-2.0 libsdl2-image-2.0 libsdl2-ttf-2.0 \
+ libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
+ libgstreamer-plugins-good1.0-dev zlib1g-dev libglib2.0-0 libglib2.0-dev sqlite3
+
+To Build:
+ cmake Source -BBuild -DVERSION_MAJOR=0 -DVERSION_MINOR=0 -DVERSION_BUILD=0
+ cd Build
+ make
+
+Runnable environment is stored in Build/Artifacts/RetroFE
diff --git a/CMake/FindGStreamer.cmake b/CMake/FindGStreamer.cmake
new file mode 100644
index 0000000..ecbc987
--- /dev/null
+++ b/CMake/FindGStreamer.cmake
@@ -0,0 +1,49 @@
+FILE(TO_CMAKE_PATH "$ENV{GSTREAMER_ROOT}" TRY1_DIR)
+FILE(TO_CMAKE_PATH "${GSTREAMER_ROOT}" TRY2_DIR)
+FILE(GLOB GSTREAMER_ROOT ${TRY1_DIR} ${TRY2_DIR})
+
+FIND_PATH(GSTREAMER_gst_INCLUDE_DIR gst/gst.h
+ PATHS ${GSTREAMER_ROOT}/include ${GSTREAMER_ROOT}/include/gstreamer-1.0 /usr/local/include/gstreamer-1.0 /usr/include/gstreamer-1.0
+ ENV INCLUDE DOC "Directory containing gst/gst.h include file")
+
+FIND_PATH(GSTREAMER_gstconfig_INCLUDE_DIR gst/gstconfig.h
+ PATHS ${GSTREAMER_ROOT}/include ${GSTREAMER_ROOT}/lib/include ${GSTREAMER_ROOT}/include/gstreamer-1.0 /usr/local/include/gstreamer-1.0 /usr/include/gstreamer-1.0 /usr/local/lib/include/gstreamer-1.0 /usr/lib/include/gstreamer-1.0
+ ENV INCLUDE DOC "Directory containing gst/gstconfig.h include file")
+
+FIND_LIBRARY(GSTREAMER_gstaudio_LIBRARY NAMES gstaudio-1.0 libgstaudio-1.0 gstaudio
+ PATHS ${GSTREAMER_ROOT}/bin ${GSTREAMER_ROOT}/win32/bin ${GSTREAMER_ROOT}/bin/bin C:/gstreamer/bin ${GSTREAMER_ROOT}/lib ${GSTREAMER_ROOT}/win32/lib /usr/local/lib /usr/lib
+ ENV LIB
+ DOC "gstaudio library to link with"
+ NO_SYSTEM_ENVIRONMENT_PATH)
+
+FIND_LIBRARY(GSTREAMER_gstreamer_LIBRARY NAMES gstreamer-1.0 libgstreamer-1.0 gstreamer
+ PATHS ${GSTREAMER_ROOT}/bin ${GSTREAMER_ROOT}/win32/bin ${GSTREAMER_ROOT}/bin/bin C:/gstreamer/bin ${GSTREAMER_ROOT}/lib ${GSTREAMER_ROOT}/win32/lib /usr/local/lib /usr/lib
+ ENV LIB
+ DOC "gstreamer library to link with"
+ NO_SYSTEM_ENVIRONMENT_PATH)
+
+FIND_LIBRARY(GSTREAMER_gstbase_LIBRARY NAMES gstbase-1.0 libgstbase-1.0 gstbase
+ PATHS ${GSTREAMER_ROOT}/bin ${GSTREAMER_ROOT}/win32/bin ${GSTREAMER_ROOT}/bin/bin C:/gstreamer/bin ${GSTREAMER_ROOT}/lib ${GSTREAMER_ROOT}/win32/lib /usr/local/lib /usr/lib
+ ENV LIB
+ DOC "gstbase library to link with"
+ NO_SYSTEM_ENVIRONMENT_PATH)
+
+FIND_LIBRARY(GSTREAMER_gstvideo_LIBRARY NAMES gstvideo-1.0 libgstvideo-1.0 gstvideo
+ PATHS ${GSTREAMER_ROOT}/bin ${GSTREAMER_ROOT}/win32/bin ${GSTREAMER_ROOT}/bin/bin C:/gstreamer/bin ${GSTREAMER_ROOT}/lib ${GSTREAMER_ROOT}/win32/lib /usr/local/lib /usr/lib
+ ENV LIB
+ DOC "gstvideo library to link with"
+ NO_SYSTEM_ENVIRONMENT_PATH)
+
+#IF (GSTREAMER_gst_INCLUDE_DIR AND GSTREAMER_gstconfig_INCLUDE_DIR AND
+# GSTREAMER_gstaudio_LIBRARY AND GSTREAMER_gstbase_LIBRARY AND
+# GSTREAMER_gstreamer_LIBRARY AND GSTREAMER_gstvideo_LIBRARY)
+
+ SET(GSTREAMER_INCLUDE_DIRS ${GSTREAMER_gst_INCLUDE_DIR} ${GSTREAMER_gstconfig_INCLUDE_DIR})
+ list(REMOVE_DUPLICATES GSTREAMER_INCLUDE_DIRS)
+ SET(GSTREAMER_LIBRARIES ${GSTREAMER_gstaudio_LIBRARY} ${GSTREAMER_gstbase_LIBRARY}
+ ${GSTREAMER_gstreamer_LIBRARY} ${GSTREAMER_gstvideo_LIBRARY})
+ list(REMOVE_DUPLICATES GSTREAMER_LIBRARIES)
+ SET(GSTREAMER_FOUND TRUE)
+#ENDIF (GSTREAMER_gst_INCLUDE_DIR AND GSTREAMER_gstconfig_INCLUDE_DIR AND
+# GSTREAMER_gstaudio_LIBRARY AND GSTREAMER_gstbase_LIBRARY AND
+# GSTREAMER_gstreamer_LIBRARY AND GSTREAMER_gstvideo_LIBRARY)
\ No newline at end of file
diff --git a/CMake/FindGlib2.cmake b/CMake/FindGlib2.cmake
new file mode 100644
index 0000000..bd8f7bf
--- /dev/null
+++ b/CMake/FindGlib2.cmake
@@ -0,0 +1,43 @@
+FILE(TO_CMAKE_PATH "$ENV{GLIB2_ROOT}" TRY1_DIR)
+FILE(TO_CMAKE_PATH "${GLIB2_ROOT}" TRY2_DIR)
+FILE(GLOB GLIB2_ROOT ${TRY1_DIR} ${TRY2_DIR})
+
+FIND_PATH(GLIB_glib_2_INCLUDE_DIR glib.h
+ PATHS ${GLIB2_ROOT}/include ${GLIB2_ROOT}/include/glib-2.0 /usr/local/include/glib-2.0 /usr/include/glib-2.0 /opt/local/include/glib-2.0
+ ENV INCLUDE DOC "Directory containing glib.h include file")
+
+FIND_PATH(GLIB_glibconfig_2_INCLUDE_DIR glibconfig.h
+ PATHS ${GLIB2_ROOT}/include ${GLIB2_ROOT}/include/glib-2.0 ${GLIB2_ROOT}/lib/include ${GLIB2_ROOT}/lib/glib-2.0/include /usr/local/include/glib-2.0 /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/local/lib/glib-2.0/include /opt/local/lib/glib-2.0/include
+ ENV INCLUDE DOC "Directory containing glibconfig.h include file")
+
+FIND_LIBRARY(GLIB_glib_2_LIBRARY NAMES glib-2.0
+ PATHS ${GLIB2_ROOT}/bin ${GLIB2_ROOT}/win32/bin ${GLIB2_ROOT}/lib ${GLIB2_ROOT}/win32/lib /usr/local/lib /usr/lib /opt/local/lib
+ ENV LIB
+ DOC "glib library to link with"
+ NO_SYSTEM_ENVIRONMENT_PATH)
+
+FIND_LIBRARY(GLIB_gmodule_2_LIBRARY NAMES gmodule-2.0
+ PATHS ${GLIB2_ROOT}/bin ${GLIB2_ROOT}/win32/bin ${GLIB2_ROOT}/lib ${GLIB2_ROOT}/win32/lib /usr/local/lib /usr/lib /opt/local/lib
+ ENV LIB
+ DOC "gmodule library to link with"
+ NO_SYSTEM_ENVIRONMENT_PATH)
+
+FIND_LIBRARY(GLIB_gobject_2_LIBRARY NAMES gobject-2.0
+ PATHS ${GLIB2_ROOT}/bin ${GLIB2_ROOT}/win32/bin ${GLIB2_ROOT}/lib ${GLIB2_ROOT}/win32/lib /usr/local/lib /usr/lib /opt/local/lib
+ ENV LIB
+ DOC "gobject library to link with"
+ NO_SYSTEM_ENVIRONMENT_PATH)
+
+FIND_LIBRARY(GLIB_gthread_2_LIBRARY NAMES gthread-2.0
+ PATHS ${GLIB2_ROOT}/bin ${GLIB2_ROOT}/win32/bin ${GLIB2_ROOT}/lib ${GLIB2_ROOT}/win32/lib /usr/local/lib /usr/lib /opt/local/lib
+ ENV LIB
+ DOC "gthread library to link with"
+ NO_SYSTEM_ENVIRONMENT_PATH)
+
+#IF (GLIB_glib_2_INCLUDE_DIR AND GLIB_glibconfig_2_INCLUDE_DIR AND GLIB_glib_2_LIBRARY AND GLIB_gmodule_2_LIBRARY AND GLIB_gobject_2_LIBRARY AND GLIB_gthread_2_LIBRARY)
+ SET(GLIB2_INCLUDE_DIRS ${GLIB_glib_2_INCLUDE_DIR} ${GLIB_glib_2_INCLUDE_DIR}/glib-2.0 ${GLIB_glibconfig_2_INCLUDE_DIR})
+ list(REMOVE_DUPLICATES GLIB2_INCLUDE_DIRS)
+ SET(GLIB2_LIBRARIES ${GLIB_glib_2_LIBRARY} ${GLIB_gmodule_2_LIBRARY} ${GLIB_gobject_2_LIBRARY} ${GLIB_gthread_2_LIBRARY})
+ list(REMOVE_DUPLICATES GLIB2_LIBRARIES)
+ SET(GLIB2_FOUND TRUE)
+#ENDIF (GLIB_glib_2_INCLUDE_DIR AND GLIB_glibconfig_2_INCLUDE_DIR AND GLIB_glib_2_LIBRARY AND GLIB_gmodule_2_LIBRARY AND GLIB_gobject_2_LIBRARY AND GLIB_gthread_2_LIBRARY)
diff --git a/CMake/FindSDL2.cmake b/CMake/FindSDL2.cmake
new file mode 100644
index 0000000..7ee40d2
--- /dev/null
+++ b/CMake/FindSDL2.cmake
@@ -0,0 +1,87 @@
+# - Find SDL2 library and headers
+#
+# Find module for SDL 2.0 (http://www.libsdl.org/).
+# It defines the following variables:
+# SDL2_INCLUDE_DIRS - The location of the headers, e.g., SDL.h.
+# SDL2_LIBRARIES - The libraries to link against to use SDL2.
+# SDL2_FOUND - If false, do not try to use SDL2.
+# SDL2_VERSION_STRING - Human-readable string containing the version of SDL2.
+#
+# This module responds to the the flag:
+# SDL2_BUILDING_LIBRARY
+# If this is defined, then no SDL2_main will be linked in because
+# only applications need main().
+# Otherwise, it is assumed you are building an application and this
+# module will attempt to locate and set the the proper link flags
+# as part of the returned SDL2_LIBRARIES variable.
+#
+# Also defined, but not for general use are:
+# SDL2_INCLUDE_DIR - The directory that contains SDL.h.
+# SDL2_LIBRARY - The location of the SDL2 library.
+# SDL2MAIN_LIBRARY - The location of the SDL2main library.
+#
+
+#=============================================================================
+# Copyright 2013 Benjamin Eikel
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_SDL2 QUIET sdl2)
+
+find_path(SDL2_INCLUDE_DIR
+ NAMES SDL2/SDL.h
+ HINTS
+ ${SDL2_ROOT}/include
+)
+
+find_library(SDL2_LIBRARY
+ NAMES SDL2
+ HINTS
+ ${SDL2_ROOT}/lib
+ PATH_SUFFIXES x86
+)
+
+if(NOT SDL2_BUILDING_LIBRARY)
+ find_library(SDL2MAIN_LIBRARY
+ NAMES SDL2main
+ HINTS
+ ${SDL2_ROOT}/lib
+ PATH_SUFFIXES x86
+ )
+endif()
+
+if(SDL2_INCLUDE_DIR AND EXISTS "${SDL2_INCLUDE_DIR}/SDL2/SDL_version.h")
+ file(STRINGS "${SDL2_INCLUDE_DIR}/SDL2/SDL_version.h" SDL2_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_MAJOR_VERSION[ \t]+[0-9]+$")
+ file(STRINGS "${SDL2_INCLUDE_DIR}/SDL2/SDL_version.h" SDL2_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_MINOR_VERSION[ \t]+[0-9]+$")
+ file(STRINGS "${SDL2_INCLUDE_DIR}/SDL2/SDL_version.h" SDL2_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_PATCHLEVEL[ \t]+[0-9]+$")
+ string(REGEX REPLACE "^#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_MAJOR "${SDL2_VERSION_MAJOR_LINE}")
+ string(REGEX REPLACE "^#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_MINOR "${SDL2_VERSION_MINOR_LINE}")
+ string(REGEX REPLACE "^#define[ \t]+SDL_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_PATCH "${SDL2_VERSION_PATCH_LINE}")
+ set(SDL2_VERSION_STRING ${SDL2_VERSION_MAJOR}.${SDL2_VERSION_MINOR}.${SDL2_VERSION_PATCH})
+ unset(SDL2_VERSION_MAJOR_LINE)
+ unset(SDL2_VERSION_MINOR_LINE)
+ unset(SDL2_VERSION_PATCH_LINE)
+ unset(SDL2_VERSION_MAJOR)
+ unset(SDL2_VERSION_MINOR)
+ unset(SDL2_VERSION_PATCH)
+endif()
+
+set(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR} ${SDL2_INCLUDE_DIR}/SDL2)
+set(SDL2_LIBRARIES ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY})
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(SDL2
+ REQUIRED_VARS SDL2_INCLUDE_DIR SDL2_LIBRARY
+ VERSION_VAR SDL2_VERSION_STRING)
+
+mark_as_advanced(SDL2_INCLUDE_DIR SDL2_LIBRARY)
diff --git a/CMake/FindSDL2_image.cmake b/CMake/FindSDL2_image.cmake
new file mode 100644
index 0000000..1b61de4
--- /dev/null
+++ b/CMake/FindSDL2_image.cmake
@@ -0,0 +1,70 @@
+# - Find SDL2_image library and headers
+#
+# Find module for SDL_image 2.0 (http://www.libsdl.org/projects/SDL_image/).
+# It defines the following variables:
+# SDL2_IMAGE_INCLUDE_DIRS - The location of the headers, e.g., SDL_image.h.
+# SDL2_IMAGE_LIBRARIES - The libraries to link against to use SDL2_image.
+# SDL2_IMAGE_FOUND - If false, do not try to use SDL2_image.
+# SDL2_IMAGE_VERSION_STRING
+# Human-readable string containing the version of SDL2_image.
+#
+# Also defined, but not for general use are:
+# SDL2_IMAGE_INCLUDE_DIR - The directory that contains SDL_image.h.
+# SDL2_IMAGE_LIBRARY - The location of the SDL2_image library.
+#
+
+#=============================================================================
+# Copyright 2013 Benjamin Eikel
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_SDL2_IMAGE QUIET SDL2_image)
+
+find_path(SDL2_IMAGE_INCLUDE_DIR
+ NAMES SDL2/SDL_image.h
+ HINTS
+ ${SDL2_IMAGE_ROOT}/include
+)
+
+find_library(SDL2_IMAGE_LIBRARY
+ NAMES SDL2_image
+ HINTS
+ ${SDL2_IMAGE_ROOT}/lib
+ PATH_SUFFIXES x86
+)
+
+if(SDL2_IMAGE_INCLUDE_DIR AND EXISTS "${SDL2_IMAGE_INCLUDE_DIR}/SDL2/SDL_image.h")
+ file(STRINGS "${SDL2_IMAGE_INCLUDE_DIR}/SDL2/SDL_image.h" SDL2_IMAGE_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_IMAGE_MAJOR_VERSION[ \t]+[0-9]+$")
+ file(STRINGS "${SDL2_IMAGE_INCLUDE_DIR}/SDL2/SDL_image.h" SDL2_IMAGE_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_IMAGE_MINOR_VERSION[ \t]+[0-9]+$")
+ file(STRINGS "${SDL2_IMAGE_INCLUDE_DIR}/SDL2/SDL_image.h" SDL2_IMAGE_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_IMAGE_PATCHLEVEL[ \t]+[0-9]+$")
+ string(REGEX REPLACE "^#define[ \t]+SDL_IMAGE_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_IMAGE_VERSION_MAJOR "${SDL2_IMAGE_VERSION_MAJOR_LINE}")
+ string(REGEX REPLACE "^#define[ \t]+SDL_IMAGE_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_IMAGE_VERSION_MINOR "${SDL2_IMAGE_VERSION_MINOR_LINE}")
+ string(REGEX REPLACE "^#define[ \t]+SDL_IMAGE_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_IMAGE_VERSION_PATCH "${SDL2_IMAGE_VERSION_PATCH_LINE}")
+ set(SDL2_IMAGE_VERSION_STRING ${SDL2_IMAGE_VERSION_MAJOR}.${SDL2_IMAGE_VERSION_MINOR}.${SDL2_IMAGE_VERSION_PATCH})
+ unset(SDL2_IMAGE_VERSION_MAJOR_LINE)
+ unset(SDL2_IMAGE_VERSION_MINOR_LINE)
+ unset(SDL2_IMAGE_VERSION_PATCH_LINE)
+ unset(SDL2_IMAGE_VERSION_MAJOR)
+ unset(SDL2_IMAGE_VERSION_MINOR)
+ unset(SDL2_IMAGE_VERSION_PATCH)
+endif()
+
+set(SDL2_IMAGE_INCLUDE_DIRS ${SDL2_IMAGE_INCLUDE_DIR} ${SDL2_IMAGE_INCLUDE_DIR}/SDL2)
+set(SDL2_IMAGE_LIBRARIES ${SDL2_IMAGE_LIBRARY})
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(SDL2_image
+ REQUIRED_VARS SDL2_IMAGE_INCLUDE_DIRS SDL2_IMAGE_LIBRARIES
+ VERSION_VAR SDL2_IMAGE_VERSION_STRING)
+
+mark_as_advanced(SDL2_IMAGE_INCLUDE_DIR SDL2_IMAGE_LIBRARY)
diff --git a/CMake/FindSDL2_mixer.cmake b/CMake/FindSDL2_mixer.cmake
new file mode 100644
index 0000000..481dd78
--- /dev/null
+++ b/CMake/FindSDL2_mixer.cmake
@@ -0,0 +1,72 @@
+# Downloaded from http://cmake.3232098.n2.nabble.com/Find-modules-for-SDL2-td7585211.html and adapted to SDL2_mixer
+#
+# - Find SDL2_mixer library and headers
+#
+# Find module for SDL_mixer 2.0 (http://www.libsdl.org/projects/SDL_mixer/).
+# It defines the following variables:
+# SDL2_MIXER_INCLUDE_DIRS - The location of the headers, e.g., SDL_mixer.h.
+# SDL2_MIXER_LIBRARIES - The libraries to link against to use SDL2_mixer.
+# SDL2_MIXER_FOUND - If false, do not try to use SDL2_mixer.
+# SDL2_MIXER_VERSION_STRING
+# Human-readable string containing the version of SDL2_mixer.
+#
+# Also defined, but not for general use are:
+# SDL2_MIXER_INCLUDE_DIR - The directory that contains SDL_mixer.h.
+# SDL2_MIXER_LIBRARY - The location of the SDL2_mixer library.
+#
+
+#=============================================================================
+# Copyright 2013 Benjamin Eikel
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_SDL2_MIXER QUIET SDL2_mixer)
+
+find_path(SDL2_MIXER_INCLUDE_DIR
+ NAMES SDL2/SDL_mixer.h
+ HINTS
+ ${SDL2_MIXER_ROOT}/include
+)
+
+find_library(SDL2_MIXER_LIBRARY
+ NAMES SDL2_mixer
+ HINTS
+ ${SDL2_MIXER_ROOT}/lib
+ PATH_SUFFIXES x86
+)
+
+if(SDL2_MIXER_INCLUDE_DIR AND EXISTS "${SDL2_MIXER_INCLUDE_DIR}/SDL2/SDL_mixer.h")
+ file(STRINGS "${SDL2_MIXER_INCLUDE_DIR}/SDL2/SDL_mixer.h" SDL2_MIXER_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_MIXER_MAJOR_VERSION[ \t]+[0-9]+$")
+ file(STRINGS "${SDL2_MIXER_INCLUDE_DIR}/SDL2/SDL_mixer.h" SDL2_MIXER_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_MIXER_MINOR_VERSION[ \t]+[0-9]+$")
+ file(STRINGS "${SDL2_MIXER_INCLUDE_DIR}/SDL2/SDL_mixer.h" SDL2_MIXER_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_MIXER_PATCHLEVEL[ \t]+[0-9]+$")
+ string(REGEX REPLACE "^#define[ \t]+SDL_MIXER_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_MIXER_VERSION_MAJOR "${SDL2_MIXER_VERSION_MAJOR_LINE}")
+ string(REGEX REPLACE "^#define[ \t]+SDL_MIXER_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_MIXER_VERSION_MINOR "${SDL2_MIXER_VERSION_MINOR_LINE}")
+ string(REGEX REPLACE "^#define[ \t]+SDL_MIXER_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_MIXER_VERSION_PATCH "${SDL2_MIXER_VERSION_PATCH_LINE}")
+ set(SDL2_MIXER_VERSION_STRING ${SDL2_MIXER_VERSION_MAJOR}.${SDL2_MIXER_VERSION_MINOR}.${SDL2_MIXER_VERSION_PATCH})
+ unset(SDL2_MIXER_VERSION_MAJOR_LINE)
+ unset(SDL2_MIXER_VERSION_MINOR_LINE)
+ unset(SDL2_MIXER_VERSION_PATCH_LINE)
+ unset(SDL2_MIXER_VERSION_MAJOR)
+ unset(SDL2_MIXER_VERSION_MINOR)
+ unset(SDL2_MIXER_VERSION_PATCH)
+endif()
+
+set(SDL2_MIXER_INCLUDE_DIRS ${SDL2_MIXER_INCLUDE_DIR} ${SDL2_MIXER_INCLUDE_DIR}/SDL2)
+set(SDL2_MIXER_LIBRARIES ${SDL2_MIXER_LIBRARY})
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(SDL2_mixer
+ REQUIRED_VARS SDL2_MIXER_INCLUDE_DIRS SDL2_MIXER_LIBRARIES
+ VERSION_VAR SDL2_MIXER_VERSION_STRING)
+
+mark_as_advanced(SDL2_MIXER_INCLUDE_DIR SDL2_MIXER_LIBRARY)
diff --git a/CMake/FindSDL2_ttf.cmake b/CMake/FindSDL2_ttf.cmake
new file mode 100644
index 0000000..00c8deb
--- /dev/null
+++ b/CMake/FindSDL2_ttf.cmake
@@ -0,0 +1,73 @@
+# Downloaded from http://cmake.3232098.n2.nabble.com/Find-modules-for-SDL2-td7585211.html and adapted to SDL2_ttf
+#
+# - Find SDL2_ttf library and headers
+#
+# Find module for SDL_ttf 2.0 (http://www.libsdl.org/projects/SDL_ttf/).
+# It defines the following variables:
+# SDL2_TTF_INCLUDE_DIRS - The location of the headers, e.g., SDL_ttf.h.
+# SDL2_TTF_LIBRARIES - The libraries to link against to use SDL2_ttf.
+# SDL2_TTF_FOUND - If false, do not try to use SDL2_ttf.
+# SDL2_TTF_VERSION_STRING
+# Human-readable string containing the version of SDL2_ttf.
+#
+# Also defined, but not for general use are:
+# SDL2_TTF_INCLUDE_DIR - The directory that contains SDL_ttf.h.
+# SDL2_TTF_LIBRARY - The location of the SDL2_ttf library.
+#
+
+#=============================================================================
+# Copyright 2013 Benjamin Eikel
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_SDL2_TTF QUIET SDL2_ttf)
+
+find_path(SDL2_TTF_INCLUDE_DIR
+ NAMES SDL2/SDL_ttf.h
+ HINTS
+ ${SDL2_TTF_ROOT}
+ PATH_SUFFIXES include
+)
+
+find_library(SDL2_TTF_LIBRARY
+ NAMES SDL2_ttf
+ HINTS
+ ${SDL2_TTF_ROOT}/lib
+ PATH_SUFFIXES x86
+)
+
+if(SDL2_TTF_INCLUDE_DIR AND EXISTS "${SDL2_TTF_INCLUDE_DIR}/SDL2/SDL_ttf.h")
+ file(STRINGS "${SDL2_TTF_INCLUDE_DIR}/SDL2/SDL_ttf.h" SDL2_TTF_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_TTF_MAJOR_VERSION[ \t]+[0-9]+$")
+ file(STRINGS "${SDL2_TTF_INCLUDE_DIR}/SDL2/SDL_ttf.h" SDL2_TTF_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_TTF_MINOR_VERSION[ \t]+[0-9]+$")
+ file(STRINGS "${SDL2_TTF_INCLUDE_DIR}/SDL2/SDL_ttf.h" SDL2_TTF_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_TTF_PATCHLEVEL[ \t]+[0-9]+$")
+ string(REGEX REPLACE "^#define[ \t]+SDL_TTF_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_TTF_VERSION_MAJOR "${SDL2_TTF_VERSION_MAJOR_LINE}")
+ string(REGEX REPLACE "^#define[ \t]+SDL_TTF_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_TTF_VERSION_MINOR "${SDL2_TTF_VERSION_MINOR_LINE}")
+ string(REGEX REPLACE "^#define[ \t]+SDL_TTF_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_TTF_VERSION_PATCH "${SDL2_TTF_VERSION_PATCH_LINE}")
+ set(SDL2_TTF_VERSION_STRING ${SDL2_TTF_VERSION_MAJOR}.${SDL2_TTF_VERSION_MINOR}.${SDL2_TTF_VERSION_PATCH})
+ unset(SDL2_TTF_VERSION_MAJOR_LINE)
+ unset(SDL2_TTF_VERSION_MINOR_LINE)
+ unset(SDL2_TTF_VERSION_PATCH_LINE)
+ unset(SDL2_TTF_VERSION_MAJOR)
+ unset(SDL2_TTF_VERSION_MINOR)
+ unset(SDL2_TTF_VERSION_PATCH)
+endif()
+
+set(SDL2_TTF_INCLUDE_DIRS ${SDL2_TTF_INCLUDE_DIR} ${SDL2_TTF_INCLUDE_DIR}/SDL2)
+set(SDL2_TTF_LIBRARIES ${SDL2_TTF_LIBRARY})
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(SDL2_ttf
+ REQUIRED_VARS SDL2_TTF_INCLUDE_DIRS SDL2_TTF_LIBRARIES
+ VERSION_VAR SDL2_TTF_VERSION_STRING)
+
+mark_as_advanced(SDL2_TTF_INCLUDE_DIR SDL2_TTF_LIBRARY)
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..fbc457c
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,8 @@
+All information contained herein is, and remains
+the property of Puddle Jump Creative. The intellectual and technical
+concepts contained herein are proprietary to Puddle Jump Creative
+may be covered by U.S. and Foreign Patents, patents in process,
+and are protected by trade secret or copyright law.
+Dissemination of this information or reproduction of this material
+is strictly forbidden unless prior written permission is obtained
+from Puddle Jump Creative.
diff --git a/Scripts/SetupEnvironment.bat b/Scripts/SetupEnvironment.bat
new file mode 100644
index 0000000..0e24746
--- /dev/null
+++ b/Scripts/SetupEnvironment.bat
@@ -0,0 +1 @@
+"C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/vcvarsall.bat"
\ No newline at end of file
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
new file mode 100644
index 0000000..827a711
--- /dev/null
+++ b/Source/CMakeLists.txt
@@ -0,0 +1,224 @@
+cmake_minimum_required (VERSION 2.8)
+
+project (RetroFE)
+
+set(RETROFE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
+set(RETROFE_THIRD_PARTY_DIR "${RETROFE_DIR}/ThirdParty")
+list(APPEND CMAKE_MODULE_PATH "${RETROFE_DIR}/CMake")
+
+##############################################################
+# Setup some variables to help find external libraries
+##############################################################
+
+set(SQLITE3_ROOT "${RETROFE_THIRD_PARTY_DIR}/sqlite3")
+set(RAPIDXML_ROOT "${RETROFE_THIRD_PARTY_DIR}/rapidxml-1.13")
+
+if(WIN32)
+ set(CMAKE_PREFIX_PATH "${RETROFE_DIR}/ThirdParty/win32")
+ set(SDL2_ROOT "${RETROFE_THIRD_PARTY_DIR}/SDL2-2.0.3")
+ set(SDL2_IMAGE_ROOT "${RETROFE_THIRD_PARTY_DIR}/SDL2_image-2.0.0")
+ set(SDL2_MIXER_ROOT "${RETROFE_THIRD_PARTY_DIR}/SDL2_mixer-2.0.0")
+ set(SDL2_TTF_ROOT "${RETROFE_THIRD_PARTY_DIR}/SDL2_ttf-2.0.12")
+ set(ZLIB_ROOT "${RETROFE_THIRD_PARTY_DIR}/zlib128-dll")
+
+ set(GSTREAMER_ROOT "C:/gstreamer/1.0/x86" CACHE STRING "location of where your gstreamer include and lib folders reside")
+ set(GLIB2_ROOT "${GSTREAMER_ROOT}")
+ set(DIRENT_INCLUDE_DIR "${RETROFE_THIRD_PARTY_DIR}/dirent-1.20.1/include")
+endif()
+
+if(MSVC)
+ find_package(Glib2 REQUIRED)
+ find_package(GStreamer REQUIRED)
+ find_package(SDL2 REQUIRED)
+ find_package(SDL2_image REQUIRED)
+ find_package(SDL2_mixer REQUIRED)
+ find_package(SDL2_ttf REQUIRED)
+ find_package(ZLIB REQUIRED)
+else()
+ include(FindPkgConfig)
+ pkg_search_module(SDL2 REQUIRED sdl2)
+ pkg_search_module(SDL2_IMAGE REQUIRED SDL2_image)
+ pkg_search_module(SDL2_MIXER REQUIRED SDL2_mixer)
+ pkg_search_module(SDL2_TTF REQUIRED SDL2_ttf)
+ pkg_search_module(ZLIB REQUIRED zlib)
+ pkg_search_module(GSTREAMER REQUIRED gstreamer-1.0 gstbase-1.0)
+ pkg_search_module(Glib2 REQUIRED glib-2.0 gobject-2.0 gthread-2.0 gmodule-2.0)
+ find_package(Threads REQUIRED)
+endif()
+
+set(RETROFE_INCLUDE_DIRS
+ "${GLIB2_INCLUDE_DIRS}"
+ "${GSTREAMER_INCLUDE_DIRS}"
+ "${SDL2_INCLUDE_DIRS}"
+ "${SDL2_IMAGE_INCLUDE_DIRS}"
+ "${SDL2_MIXER_INCLUDE_DIRS}"
+ "${SDL2_TTF_INCLUDE_DIRS}"
+ "${ZLIB_INCLUDE_DIRS}"
+ "${SQLITE3_ROOT}"
+ "${RAPIDXML_ROOT}"
+ "${DIRENT_INCLUDE_DIR}"
+)
+
+set(RETROFE_LIBRARIES
+ ${GLIB2_LIBRARIES}
+ ${GSTREAMER_LIBRARIES}
+ ${SDL2_LIBRARIES}
+ ${SDL2_IMAGE_LIBRARIES}
+ ${SDL2_MIXER_LIBRARIES}
+ ${SDL2_TTF_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+)
+
+if(NOT MSVC)
+ LIST(APPEND RETROFE_LIBRARIES ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
+endif()
+
+set(RETROFE_HEADERS
+ "${RETROFE_DIR}/Source/Collection/CollectionInfo.h"
+ "${RETROFE_DIR}/Source/Collection/CollectionInfoBuilder.h"
+ "${RETROFE_DIR}/Source/Collection/Item.h"
+ "${RETROFE_DIR}/Source/Collection/MenuParser.h"
+ "${RETROFE_DIR}/Source/Control/UserInput.h"
+ "${RETROFE_DIR}/Source/Database/CollectionDatabase.h"
+ "${RETROFE_DIR}/Source/Database/Configuration.h"
+ "${RETROFE_DIR}/Source/Database/DB.h"
+ "${RETROFE_DIR}/Source/Database/MamelistMetadata.h"
+ "${RETROFE_DIR}/Source/Execute/Launcher.h"
+ "${RETROFE_DIR}/Source/Graphics/Animate/Tween.h"
+ "${RETROFE_DIR}/Source/Graphics/Animate/TweenTypes.h"
+ "${RETROFE_DIR}/Source/Graphics/ComponentItemBinding.h"
+ "${RETROFE_DIR}/Source/Graphics/Component/Component.h"
+ "${RETROFE_DIR}/Source/Graphics/Font.h"
+ "${RETROFE_DIR}/Source/Graphics/FontCache.h"
+ "${RETROFE_DIR}/Source/Graphics/Component/Image.h"
+ "${RETROFE_DIR}/Source/Graphics/Component/Text.h"
+ "${RETROFE_DIR}/Source/Graphics/PageBuilder.h"
+ "${RETROFE_DIR}/Source/Graphics/MenuNotifierInterface.h"
+ "${RETROFE_DIR}/Source/Graphics/Page.h"
+ "${RETROFE_DIR}/Source/Graphics/Component/ImageBuilder.h"
+ "${RETROFE_DIR}/Source/Graphics/Component/ReloadableMedia.h"
+ "${RETROFE_DIR}/Source/Graphics/Component/ReloadableText.h"
+ "${RETROFE_DIR}/Source/Graphics/Component/ScrollingList.h"
+ "${RETROFE_DIR}/Source/Graphics/Component/VideoComponent.h"
+ "${RETROFE_DIR}/Source/Graphics/Component/VideoBuilder.h"
+ "${RETROFE_DIR}/Source/Sound/Sound.h"
+ "${RETROFE_DIR}/Source/Utility/Log.h"
+ "${RETROFE_DIR}/Source/Utility/Utils.h"
+ "${RETROFE_DIR}/Source/Video/IVideo.h"
+ "${RETROFE_DIR}/Source/Video/GStreamerVideo.h"
+ "${RETROFE_DIR}/Source/Video/VideoFactory.h"
+ "${RETROFE_DIR}/Source/Graphics/ComponentItemBindingBuilder.h"
+ "${RETROFE_DIR}/Source/Graphics/ViewInfo.h"
+ "${RETROFE_DIR}/Source/RetroFE.h"
+ "${RETROFE_DIR}/Source/SDL.h"
+ "${RETROFE_DIR}/Source/Version.h"
+)
+
+set(RETROFE_SOURCES
+ "${RETROFE_DIR}/Source/Collection/CollectionInfo.cpp"
+ "${RETROFE_DIR}/Source/Collection/CollectionInfoBuilder.cpp"
+ "${RETROFE_DIR}/Source/Collection/Item.cpp"
+ "${RETROFE_DIR}/Source/Collection/MenuParser.cpp"
+ "${RETROFE_DIR}/Source/Control/UserInput.cpp"
+ "${RETROFE_DIR}/Source/Database/CollectionDatabase.cpp"
+ "${RETROFE_DIR}/Source/Database/Configuration.cpp"
+ "${RETROFE_DIR}/Source/Database/DB.cpp"
+ "${RETROFE_DIR}/Source/Database/MamelistMetadata.cpp"
+ "${RETROFE_DIR}/Source/Execute/Launcher.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Animate/Tween.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Font.cpp"
+ "${RETROFE_DIR}/Source/Graphics/FontCache.cpp"
+ "${RETROFE_DIR}/Source/Graphics/PageBuilder.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Page.cpp"
+ "${RETROFE_DIR}/Source/Graphics/ViewInfo.cpp"
+ "${RETROFE_DIR}/Source/Graphics/ComponentItemBindingBuilder.cpp"
+ "${RETROFE_DIR}/Source/Graphics/ComponentItemBinding.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Component/Component.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Component/Image.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Component/ImageBuilder.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Component/Text.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Component/ReloadableMedia.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Component/ReloadableText.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Component/ScrollingList.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Component/VideoBuilder.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Component/VideoComponent.cpp"
+ "${RETROFE_DIR}/Source/Sound/Sound.cpp"
+ "${RETROFE_DIR}/Source/Utility/Log.cpp"
+ "${RETROFE_DIR}/Source/Utility/Utils.cpp"
+ "${RETROFE_DIR}/Source/Video/GStreamerVideo.cpp"
+ "${RETROFE_DIR}/Source/Video/VideoFactory.cpp"
+ "${RETROFE_DIR}/Source/Main.cpp"
+ "${RETROFE_DIR}/Source/RetroFE.cpp"
+ "${RETROFE_DIR}/Source/SDL.cpp"
+ "${RETROFE_DIR}/Source/Version.cpp"
+ "${SQLITE3_ROOT}/sqlite3.c"
+)
+
+
+set(EXECUTABLE_OUTPUT_PATH "${RETROFE_DIR}/Build" CACHE PATH "Build directory" FORCE)
+set(LIBRARY_OUTPUT_PATH "${RETROFE_DIR}/Build" CACHE PATH "Build directory" FORCE)
+
+
+include_directories(${RETROFE_INCLUDE_DIRS})
+add_executable(RetroFE ${RETROFE_SOURCES} ${RETROFE_HEADERS})
+target_link_libraries(RetroFE ${RETROFE_LIBRARIES})
+set_target_properties(RetroFE PROPERTIES LINKER_LANGUAGE CXX)
+
+add_definitions(-DRETROFE_VERSION_MAJOR=${VERSION_MAJOR})
+add_definitions(-DRETROFE_VERSION_MINOR=${VERSION_MINOR})
+add_definitions(-DRETROFE_VERSION_BUILD=${VERSION_BUILD})
+
+if(MSVC)
+ set(CMAKE_DEBUG_POSTFIX "d")
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /WX")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP /WX")
+ set_target_properties(RetroFE PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
+endif()
+
+
+set(RETROFE_OUTPUT_PATH "../Build/Artifacts/RetroFE")
+
+
+ADD_CUSTOM_COMMAND(TARGET RetroFE POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E make_directory "../Build/Artifacts/RetroFE" )
+
+ADD_CUSTOM_COMMAND(TARGET RetroFE POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_directory "../Assets/Environment/Common" "${RETROFE_OUTPUT_PATH}" )
+
+if(WIN32)
+set(RETROFE_OUTPUT_CORE_PATH "${RETROFE_OUTPUT_PATH}/Core")
+ file(GLOB CORE_FILES
+ "${GSTREAMER_ROOT}/lib/*.dll"
+ "${GSTREAMER_ROOT}/lib/gstreamer-1.0/*.dll"
+ "${GSTREAMER_ROOT}/bin/*.dll"
+ "${SDL2_ROOT}/lib/x86/*.dll"
+ "${SDL2_IMAGE_ROOT}/lib/x86/*.dll"
+ "${SDL2_TTF_ROOT}/lib/x86/*.dll"
+ "${SDL2_MIXER_ROOT}/lib/x86/*.dll"
+ )
+
+ ADD_CUSTOM_COMMAND(TARGET RetroFE POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${RETROFE_OUTPUT_CORE_PATH}" )
+
+ ADD_CUSTOM_COMMAND(TARGET RetroFE POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_directory "../Assets/Environment/Windows" "${RETROFE_OUTPUT_PATH}" )
+
+
+ foreach(CORE_FILE ${CORE_FILES})
+ ADD_CUSTOM_COMMAND(TARGET RetroFE POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CORE_FILE}" "${RETROFE_OUTPUT_CORE_PATH}" )
+ endforeach()
+
+ ADD_CUSTOM_COMMAND(TARGET RetroFE POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy "../Build/Debug/RetroFE.exe" "${RETROFE_OUTPUT_CORE_PATH}" )
+
+else()
+ ADD_CUSTOM_COMMAND(TARGET RetroFE POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_directory "../Assets/Environment/Linux" "${RETROFE_OUTPUT_PATH}" )
+
+ ADD_CUSTOM_COMMAND(TARGET RetroFE POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy "../Build/RetroFE" "${RETROFE_OUTPUT_PATH}" )
+endif()
+
diff --git a/Source/Collection/CollectionInfo.cpp b/Source/Collection/CollectionInfo.cpp
new file mode 100644
index 0000000..3a47d7b
--- /dev/null
+++ b/Source/Collection/CollectionInfo.cpp
@@ -0,0 +1,67 @@
+/* This file is subject to the terms and conditions defined in
+ * file 'LICENSE.txt', which is part of this source code package.
+ */
+#include "CollectionInfo.h"
+#include "../Database/Configuration.h"
+#include
+
+CollectionInfo::CollectionInfo(std::string name,
+ std::string listPath,
+ std::string extensions,
+ std::string metadataType,
+ std::string metadataPath)
+: Name(name)
+, ListPath(listPath)
+, Extensions(extensions)
+, MetadataType(metadataType)
+, MetadataPath(metadataPath)
+{
+}
+
+CollectionInfo::~CollectionInfo()
+{
+}
+
+std::string CollectionInfo::GetName() const
+{
+ return Name;
+}
+
+std::string CollectionInfo::GetSettingsPath() const
+{
+ return Configuration::GetAbsolutePath() + "/Collections/" + GetName();
+}
+
+std::string CollectionInfo::GetListPath() const
+{
+ return ListPath;
+}
+
+std::string CollectionInfo::GetMetadataType() const
+{
+ return MetadataType;
+}
+
+std::string CollectionInfo::GetMetadataPath() const
+{
+ return MetadataPath;
+}
+
+std::string CollectionInfo::GetExtensions() const
+{
+ return Extensions;
+}
+
+void CollectionInfo::GetExtensions(std::vector &extensions)
+{
+ std::istringstream ss(Extensions);
+ std::string token;
+
+ while(std::getline(ss, token, ','))
+ {
+ extensions.push_back(token);
+ }
+}
+
+
+
diff --git a/Source/Collection/CollectionInfo.h b/Source/Collection/CollectionInfo.h
new file mode 100644
index 0000000..6bfaa1f
--- /dev/null
+++ b/Source/Collection/CollectionInfo.h
@@ -0,0 +1,28 @@
+/* This file is subject to the terms and conditions defined in
+ * file 'LICENSE.txt', which is part of this source code package.
+ */
+#pragma once
+
+#include
+#include
+
+class CollectionInfo
+{
+public:
+ CollectionInfo(std::string name, std::string listPath, std::string extensions, std::string metadataType, std::string metadataPath);
+ virtual ~CollectionInfo();
+ std::string GetName() const;
+ std::string GetSettingsPath() const;
+ std::string GetListPath() const;
+ std::string GetMetadataType() const;
+ std::string GetMetadataPath() const;
+ std::string GetExtensions() const;
+ void GetExtensions(std::vector &extensions);
+
+private:
+ std::string Name;
+ std::string ListPath;
+ std::string Extensions;
+ std::string MetadataType;
+ std::string MetadataPath;
+};
diff --git a/Source/Collection/CollectionInfoBuilder.cpp b/Source/Collection/CollectionInfoBuilder.cpp
new file mode 100644
index 0000000..a8c389e
--- /dev/null
+++ b/Source/Collection/CollectionInfoBuilder.cpp
@@ -0,0 +1,126 @@
+#include "CollectionInfoBuilder.h"
+#include "CollectionInfo.h"
+#include "../Database/Configuration.h"
+#include "../Utility/Log.h"
+#include
+#include
+
+CollectionInfoBuilder::CollectionInfoBuilder(Configuration *c)
+: Conf(c)
+{
+}
+
+CollectionInfoBuilder::~CollectionInfoBuilder()
+{
+ std::map::iterator it = InfoMap.begin();
+
+ for(it == InfoMap.begin(); it != InfoMap.end(); ++it)
+ {
+ delete it->second;
+ }
+
+ InfoMap.clear();
+}
+
+bool CollectionInfoBuilder::LoadAllCollections()
+{
+ std::vector collections;
+
+ Conf->GetChildKeyCrumbs("collections", collections);
+
+ if(collections.size() == 0)
+ {
+ Logger::Write(Logger::ZONE_ERROR, "Collections", "No collections were found. Please configure Settings.conf");
+ return false;
+ }
+
+ bool retVal = true;
+ std::vector::iterator it;
+
+ for(it = collections.begin(); it != collections.end(); ++it)
+ {
+ // todo: There is nothing that should really stop us from creating a collection
+ // in the main folder. I just need to find some time to look at the impacts if
+ // I remove this conditional check.
+ if(*it != "Main")
+ {
+ if(ImportCollection(*it))
+ {
+ Logger::Write(Logger::ZONE_INFO, "Collections", "Adding collection " + *it);
+ }
+ else
+ {
+ // Continue processing the rest of the collections if an error occurs during import.
+ // ImportCollection() will print out an error to the log file.
+ retVal = false;
+ }
+ }
+ }
+
+ return retVal;
+}
+
+void CollectionInfoBuilder::GetCollections(std::vector &collections)
+{
+ std::map::iterator InfoMapIt;
+
+ for(InfoMapIt = InfoMap.begin(); InfoMapIt != InfoMap.end(); ++InfoMapIt)
+ {
+ collections.push_back(InfoMapIt->second);
+ }
+}
+
+bool CollectionInfoBuilder::ImportCollection(std::string name)
+{
+ // create a new instance if one does not exist
+ if(InfoMap.find(name) != InfoMap.end())
+ {
+ return true;
+ }
+ std::string listItemsPathKey = "collections." + name + ".list.path";
+ std::string listFilterKey = "collections." + name + ".list.filter";
+ std::string extensionsKey = "collections." + name + ".list.extensions";
+ std::string launcherKey = "collections." + name + ".launcher";
+
+ //todo: metadata is not fully not implemented
+ std::string metadataTypeKey = "collections." + name + ".metadata.type";
+ std::string metadataPathKey = "collections." + name + ".metadata.path";
+
+ std::string listItemsPath;
+ std::string launcherName;
+ std::string extensions;
+ std::string metadataType;
+ std::string metadataPath;
+
+ if(!Conf->GetPropertyAbsolutePath(listItemsPathKey, listItemsPath))
+ {
+ Logger::Write(Logger::ZONE_INFO, "Collections", "Property \"" + listItemsPathKey + "\" does not exist. Assuming \"" + name + "\" is a menu");
+ return false;
+ }
+
+ if(!Conf->GetProperty(extensionsKey, extensions))
+ {
+ Logger::Write(Logger::ZONE_INFO, "Collections", "Property \"" + extensionsKey + "\" does not exist. Assuming \"" + name + "\" is a menu");
+ return false;
+ }
+
+ (void)Conf->GetProperty(metadataTypeKey, metadataType);
+ (void)Conf->GetProperty(metadataPathKey, metadataPath);
+
+ if(!Conf->GetProperty(launcherKey, launcherName))
+ {
+ std::stringstream ss;
+ ss << "Warning: launcher property \""
+ << launcherKey
+ << "\" points to a launcher that is not configured (launchers."
+ << launcherName
+ << "). Your collection will be viewable, however you will not be able to "
+ << "launch any of the items in your collection.";
+
+ Logger::Write(Logger::ZONE_WARNING, "Collections", ss.str());
+ }
+
+ InfoMap[name] = new CollectionInfo(name, listItemsPath, extensions, metadataType, metadataPath);
+
+ return (InfoMap[name] != NULL);
+}
diff --git a/Source/Collection/CollectionInfoBuilder.h b/Source/Collection/CollectionInfoBuilder.h
new file mode 100644
index 0000000..eb438bb
--- /dev/null
+++ b/Source/Collection/CollectionInfoBuilder.h
@@ -0,0 +1,25 @@
+/* This file is subject to the terms and conditions defined in
+ * file 'LICENSE.txt', which is part of this source code package.
+ */
+#pragma once
+
+#include
+#include