Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F131205
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
6 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/.travis.yml b/.travis.yml
index 1bae74e..887650b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,42 +1,40 @@
os:
- linux
- osx
compiler:
- gcc
- clang
# sudo: required
# dist: trusty
language: cpp
# compiler:
# - gcc
addons:
apt:
packages:
- libsfml-dev
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
osx_image: xcode7.2
# before_script:
# - sudo apt-get install -y libjpeg62-dev libsndfile1-dev libglew1.5 libglew1.5-dev libfreetype6 libjpeg-turbo8 libjpeg8 libopenal-data libopenal1 libxrandr2 libxrender1 libsoil1 cppcheck libsfml-dev
script:
lsb_release -a
qmake -makefile pagan_board.pro && make && make && cppcheck . --enable=all
before_install:
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade cmake ; fi
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sfml ; fi
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sh scripts/travis_before_install_osx.sh; fi
script:
- cmake .
- - make
\ No newline at end of file
+ - make
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4fc610..22fff95 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,62 +1,85 @@
-#Change this if you need to target a specific CMake version
+ #Change this if you need to target a specific CMake version
cmake_minimum_required(VERSION 3.1)
set (CMAKE_CXX_STANDARD 11)
# Here must be also current version - opposite to debian files which has latest release version
-set(DEERPORTAL_MAJOR_VERSION 0)
-set(DEERPORTAL_MINOR_VERSION 7)
-set(DEERPORTAL_PATCH_VERSION 2)
-set(DEERPORTAL_VERSION
- ${DEERPORTAL_MAJOR_VERSION}.${DEERPORTAL_MINOR_VERSION}.${DEERPORTAL_PATCH_VERSION})
+#set(DEERPORTAL_MAJOR_VERSION 0)
+#set(DEERPORTAL_MINOR_VERSION 7)
+#set(DEERPORTAL_PATCH_VERSION 2)
+#set(DEERPORTAL_VERSION
+# ${DEERPORTAL_MAJOR_VERSION}.${DEERPORTAL_MINOR_VERSION}.${DEERPORTAL_PATCH_VERSION})
+
+#file (STRINGS "version.txt" DEERPORTAL_VERSION_MAJOR REGEX "^([0-9]+)")
+#file (STRINGS "version.txt" DEERPORTAL_VERSION_MINOR REGEX "^[0-9]+\\.([0-9]+)")
+file (STRINGS "version.txt" DEERPORTAL_VERSION)
+#string(REGEX REPLACE <regular_expression>
+# <replace_expression> <output variable>
+# <input> [<input>...])
+#
+
+string(REGEX MATCH "^([0-9]+)" DEERPORTAL_VERSION_MAJOR ${DEERPORTAL_VERSION})
+string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\2" DEERPORTAL_VERSION_MINOR ${DEERPORTAL_VERSION})
+string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+.*)" "\\3" DEERPORTAL_VERSION_PATCH ${DEERPORTAL_VERSION})
+MESSAGE( STATUS "DEERPORTAL_VERSION: " ${DEERPORTAL_VERSION} )
+MESSAGE( STATUS "DEERPORTAL_VERSION_MAJOR: " ${DEERPORTAL_VERSION_MAJOR} )
+MESSAGE( STATUS "DEERPORTAL_VERSION_MINOR: " ${DEERPORTAL_VERSION_MINOR} )
+MESSAGE( STATUS "DEERPORTAL_VERSION_PATCH: " ${DEERPORTAL_VERSION_PATCH} )
+
# Enable debug symbols by default
# must be done before project() statement
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
endif()
# (you can also set it on the command line: -D CMAKE_BUILD_TYPE=Release)
project(myproject)
#target_compile_definitions(DeerPortal PRIVATE FOO=1 BAR=1)
add_definitions(-DDEERPORTAL_VERSION="${DEERPORTAL_VERSION}.${CMAKE_BUILD_TYPE}")
# Set version information in a config.h file
# configure_file(
# "${PROJECT_SOURCE_DIR}/config.h.in"
# "${PROJECT_BINARY_DIR}/config.h"
# )
include_directories("${PROJECT_BINARY_DIR}")
include_directories(${YOUR_DIRECTORY})
# Define sources and executable
set(EXECUTABLE_NAME "DeerPortal")
file( GLOB SRCS src/*.cpp src/*.h )
add_executable(${EXECUTABLE_NAME} ${SRCS})
-
+#set(RESOURCE_FILES
+# assets
+#)
# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
#Find any version 2.X of SFML
#See the FindSFML.cmake file for additional details and instructions
find_package(SFML 2 REQUIRED network audio graphics window system)
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
endif()
-
+set_target_properties(${EXECUTABLE_NAME} PROPERTIES
+ MACOSX_BUNDLE TRUE
+ MACOSX_FRAMEWORK_IDENTIFIER org.cmake.ExecutableTarget
+ RESOURCE "${RESOURCE_FILES}"
+)
# Install target
install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin)
-
+install(DIRECTORY assets DESTINATION share/games/deerportal)
# CPack packaging
include(InstallRequiredSystemLibraries)
# set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
-set(CPACK_PACKAGE_VERSION_MAJOR "${DEERPORTAL_MAJOR_VERSION}")
-set(CPACK_PACKAGE_VERSION_MINOR "${DEERPORTAL_MINOR_VERSION}.${DEERPORTAL_PATCH_VERSION}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${DEERPORTAL_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${DEERPORTAL_VERSION_MINOR}.${DEERPORTAL_VERSION_PATCH}")
include(CPack)
diff --git a/debian/control b/debian/control
index 1d0d2d3..ab28071 100644
--- a/debian/control
+++ b/debian/control
@@ -1,17 +1,17 @@
Source: deerportal
Section: games
Priority: optional
Maintainer: Rafal Zawadzki <bluszcz@devcarpet.net>
-Build-Depends: debhelper (>= 8.0.0), qt5-qmake, qt5-default, libsfml-dev
+Build-Depends: debhelper (>= 8.0.0), libsfml-dev, cmake
Standards-Version: 3.9.4
Homepage: https://devcarpet.net/deerportal/
#Vcs-Git: git://git.debian.org/collab-maint/deerportal.git
#Vcs-Browser: http://git.debian.org/?p=collab-maint/deerportal.git;a=summary
Package: deerportal
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A board game driven by the classical elements.
Deer Portal is a board game where you can experience madness of being ex pagan
who wants to be become an ancient Deer God. To achieve this, you have to play
a dreadful game where classical elements are involved. Reach portal or die.
diff --git a/scripts/travis_before_install_osx.sh b/scripts/travis_before_install_osx.sh
new file mode 100644
index 0000000..6a25785
--- /dev/null
+++ b/scripts/travis_before_install_osx.sh
@@ -0,0 +1,3 @@
+brew update
+brew upgrade cmake
+brew install sfml
diff --git a/src/utils.cpp b/src/utils.cpp
new file mode 100644
index 0000000..53b59bd
--- /dev/null
+++ b/src/utils.cpp
@@ -0,0 +1,8 @@
+#include "utils.h"
+
+namespace DP {
+ std::string get_assets_path(std::string path) {
+ return "hello";
+ };
+
+}
\ No newline at end of file
diff --git a/src/utils.h b/src/utils.h
new file mode 100644
index 0000000..ce24a53
--- /dev/null
+++ b/src/utils.h
@@ -0,0 +1,13 @@
+#ifndef UTILS_H
+#define UTILS_H
+#include <string>
+
+// DEERPORTAL_PATH_ASSETS
+
+namespace DP {
+ std::string get_assets_path(std::string);
+
+
+}
+
+#endif //UTILS_H
\ No newline at end of file
diff --git a/version.txt b/version.txt
new file mode 100644
index 0000000..c7d2522
--- /dev/null
+++ b/version.txt
@@ -0,0 +1 @@
+0.7.2-dev
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jun 16, 12:08 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70578
Default Alt Text
(6 KB)
Attached To
Mode
R82 deerportal
Attached
Detach File
Event Timeline