Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F131419
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
7 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2322ed8..baa4c62 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,126 +1,131 @@
PROJECT(meandmyshadow)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
#Option if the game should be compiled with hardware acceleration.
option (HARDWARE_ACCELERATION "Use openGL as rendering backend" ON)
option (DEBUG_MODE "Compile the game with debug mode enabled" OFF)
#Find the required libraries.
Find_Package(SDL REQUIRED)
Find_Package(SDL_ttf REQUIRED)
Find_Package(SDL_image REQUIRED)
Find_Package(SDL_mixer REQUIRED)
Find_Package(SDL_gfx REQUIRED)
Find_Package(CURL REQUIRED)
Find_Package(LibArchive REQUIRED)
Find_Package(OpenSSL REQUIRED)
+
#Use openGL only when compiling with HARDWARE_ACCELERATION.
+#Otherwise we try to find XLib.
if(HARDWARE_ACCELERATION)
Find_Package(OpenGL REQUIRED)
+else(HARDWARE_ACCELERATION)
+ INCLUDE(FindX11)
endif(HARDWARE_ACCELERATION)
#Add the include dirs of the libraries.
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLIMAGE_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLMIXER_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLTTF_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLGFX_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${LibArchive_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
#Use openGL only when compiling with HARDWARE_ACCELERATION.
if(HARDWARE_ACCELERATION)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
endif(HARDWARE_ACCELERATION)
if ( NOT SDL_FOUND )
message(FATAL_ERROR "SDL not found !")
endif ( NOT SDL_FOUND )
if ( NOT SDLTTF_FOUND )
message(FATAL_ERROR "SDL_ttf not found !")
endif ( NOT SDLTTF_FOUND )
if ( NOT SDLMIXER_FOUND )
message(FATAL_ERROR "SDL_mixer not found !")
endif ( NOT SDLMIXER_FOUND )
if ( NOT SDLGFX_FOUND )
message(FATAL_ERROR "SDL_gfx not found !")
endif ( NOT SDLGFX_FOUND )
if ( NOT CURL_FOUND )
message(FATAL_ERROR "CURL not found !")
endif ( NOT CURL_FOUND )
if ( NOT LibArchive_FOUND )
message(FATAL_ERROR "LIBARCHIVE not found !")
endif ( NOT LibArchive_FOUND )
if ( NOT OPENSSL_FOUND )
message(FATAL_ERROR "OpenSSL not found !")
endif ( NOT OPENSSL_FOUND )
if ( HARDWARE_ACCELERATION AND NOT OPENGL_FOUND )
message(FATAL_ERROR "OpenGL not found !")
endif ( HARDWARE_ACCELERATION AND NOT OPENGL_FOUND )
#Parse the configure file.
configure_file (
"${PROJECT_SOURCE_DIR}/src/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
set(SRC_DIR ${PROJECT_SOURCE_DIR}/src)
include_directories(
${PROJECT_BINARY_DIR}
${SDL_INCLUDE_DIR}
${SDLTTF_INCLUDE_DIR}
${SDLMIXER_INCLUDE_DIR}
${SDLIMAGE_INCLUDE_DIR}
${SDLGFX_INCLUDE_DIR}
${OPENSSL_INCLUDE_DIR}
${OPENGL_INCLUDE_DIR}
)
file(GLOB tinygettext ${SRC_DIR}/libs/tinygettext/*.cpp)
file(GLOB findlocale ${SRC_DIR}/libs/findlocale/*.c)
# Déclaration de l'exécutable
file(GLOB Sources ${SRC_DIR}/*.cpp)
add_executable(meandmyshadow ${Sources} ${tinygettext} ${findlocale})
target_link_libraries(
meandmyshadow
${SDL_LIBRARY}
${SDLTTF_LIBRARY}
${SDLIMAGE_LIBRARY}
${SDLMIXER_LIBRARY}
${SDLGFX_LIBRARY}
${CURL_LIBRARY}
${LibArchive_LIBRARY}
${OPENSSL_LIBRARIES}
${CRYPTO_LIBRARY}
${OPENGL_LIBRARY}
+ ${X11_LIBRARIES}
)
# Path options
set(BINDIR "bin" CACHE STRING "Where to install binaries")
set(DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location")
set(ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.")
set(DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.")
# install locations
install(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${DATAROOTDIR}/meandmyshadow/)
install(TARGETS meandmyshadow RUNTIME DESTINATION ${BINDIR})
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
install(FILES meandmyshadow.desktop DESTINATION ${DESKTOPDIR})
install(FILES icons/16x16/meandmyshadow.png DESTINATION ${ICONDIR}/hicolor/16x16/apps/)
install(FILES icons/32x32/meandmyshadow.png DESTINATION ${ICONDIR}/hicolor/32x32/apps/)
install(FILES icons/48x48/meandmyshadow.png DESTINATION ${ICONDIR}/hicolor/48x48/apps/)
install(FILES icons/64x64/meandmyshadow.png DESTINATION ${ICONDIR}/hicolor/64x64/apps/)
endif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
diff --git a/README b/README
new file mode 100644
index 0000000..1e8bd49
--- /dev/null
+++ b/README
@@ -0,0 +1,64 @@
+Me and My Shadow
+====================
+Me and My Shadow is a free libre puzzle/platform game in which you try to reach
+the exit by solving puzzles. Spikes, moving blocks, fragile blocks and much
+more stand between you and the exit. Record your moves and let your shadow
+mimic them to reach blocks you couldn't reach alone.
+
+ - Tutorial for beginners
+ - 2 level packs containing over 40 levels
+ - 18 different block types
+ - Built-in level editor
+ - Easily installable addons
+ - Original music by Juho-Petteri Yliuntinen
+ - Cross platform
+
+
+
+Compiling on Linux
+====================
+
+You will need the following packages (and their -dev(el) files) to be installed:
+
+ * libSDL
+ * libSDL_image
+ * libSDL_ttf
+ * libSDL_mixer
+ * libSDL_gfx
+ * libcurl
+ * libarchive
+ * cmake
+ * C++ compiler (found in packages like g++, gcc-c++, gcc)
+
+The process is simple. Enter a terminal and move to directory containing
+MeAndMyShadow. Then just type
+
+ cmake .
+
+to generate the Makefile. If everything configured properly you don't see any
+errors and then you can start compiling by typing
+
+ make
+
+Finally you can run MeAndMyShadow with
+
+ ./meandmyshadow
+
+To install MeAndMyShadow on your system, run following as root
+
+ make install
+
+
+
+Compiling without GL
+====================
+In some cases you might want to compile Me and My Shadow without openGL
+hardware accelaration. In order to do this follow the steps above but replace the
+cmake call with:
+
+ cmake -DHARDWARE_ACCELERATION=OFF .
+
+Note that you can always run Me and My Shadow in SDL mode by setting gl to 0 in
+the config file or by running it as following:
+
+ meandmyshadow -set gl 0
\ No newline at end of file
diff --git a/docs/Compiling.txt b/docs/Compiling.txt
deleted file mode 100644
index 110c2aa..0000000
--- a/docs/Compiling.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-Compiling on Linux
-==================
-
-You will need the following packages (and their -dev(el) files) to be installed:
-
- * libSDL
- * libSDL_image
- * libSDL_ttf
- * libSDL_mixer
- * libSDL_gfx
- * libcurl
- * libarchive
- * cmake
- * C++ compiler (found in packages like g++, gcc-c++, gcc)
-
-The process is simple. Enter a terminal and move to directory containing
-MeAndMyShadow. Then just type
-
- cmake .
-
-to generate the Makefile. If everything configured properly you don't see any
-errors and then you can start compiling by typing
-
- make
-
-Finally you can run MeAndMyShadow with
-
- ./meandmyshadow
-
-To install MeAndMyShadow on your system, run following as root
-
- make install
-
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jun 16, 12:13 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70691
Default Alt Text
(7 KB)
Attached To
Mode
R79 meandmyshadow
Attached
Detach File
Event Timeline