Comipation work on Linux and Android
This commit is contained in:
parent
41f18d97cd
commit
e031dc0b8f
13
Makefile
13
Makefile
@ -6,7 +6,9 @@
|
||||
PROJECT_PATH=$(shell pwd)
|
||||
PROJECT_NDK?=$(PROJECT_PATH)/../android/ndk-r7/
|
||||
PROJECT_SDK?=$(PROJECT_PATH)/../android/sdk-r15/
|
||||
|
||||
PROJECT_MODULE?=$(PROJECT_PATH)/../
|
||||
|
||||
EWOL_FOLDER=$(PROJECT_MODULE)ewol
|
||||
|
||||
# group name or constructor ... (no dot, no MAJ no Numerical char)
|
||||
@ -14,6 +16,10 @@ PROJECT_VENDOR=heeroyui
|
||||
# Binary name ... (no dot, no MAJ no Numerical char)
|
||||
PROJECT_NAME=ewoldrawer
|
||||
|
||||
#dependence of the librairies :
|
||||
#PROJECT_LIB_DEPENDENCY= ewol
|
||||
|
||||
PROJECT_FILE_DIRECTORY=jni
|
||||
|
||||
# get the tag of the current project :
|
||||
PROJECT_VERSION_TAG=$(shell git describe --tags)
|
||||
@ -36,13 +42,16 @@ else
|
||||
PROJECT_CXXFLAGS = -DPROJECT_DEBUG_LEVEL=3
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_VERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
|
||||
endif
|
||||
DEFINE+= -DPROJECT_VERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_VERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
||||
|
||||
PROJECT_LDFLAGS=
|
||||
PROJECT_CXXFLAGS+= -I$(EWOL_FOLDER)/Sources/
|
||||
|
||||
PROJECT_LDFLAGS= -L$(EWOL_FOLDER)
|
||||
|
||||
PROJECT_SOURCES= jni/ewolAndroidAbstraction.cpp \
|
||||
jni/Main.cpp
|
||||
|
||||
PROJECT_SOURCES= Main.cpp
|
||||
|
||||
#include the specific platefom makefile
|
||||
include $(EWOL_FOLDER)/Build/Makefile.$(PLATFORM).mk
|
||||
|
30
jni/Main.cpp
30
jni/Main.cpp
@ -100,10 +100,34 @@ void APP_Init(int argc, char *argv[])
|
||||
//fontID = GetFontIdWithFileName("dataTest/TextMonospace.ebt");
|
||||
}
|
||||
*/
|
||||
|
||||
// set the default Path of the application :
|
||||
#ifdef PLATFORM_Linux
|
||||
etk::String homedir;
|
||||
#ifdef NDEBUG
|
||||
homedir = "/usr/share/"PROJECT_NAME"/";
|
||||
#else
|
||||
char cCurrentPath[FILENAME_MAX];
|
||||
if (!getcwd(cCurrentPath, FILENAME_MAX)) {
|
||||
homedir = "./assets/";
|
||||
} else {
|
||||
cCurrentPath[FILENAME_MAX - 1] = '\0';
|
||||
homedir = cCurrentPath;
|
||||
homedir += "/assets/";
|
||||
}
|
||||
#endif
|
||||
SetBaseFolderData(homedir.c_str());
|
||||
SetBaseFolderDataUser("~/."PROJECT_NAME"/");
|
||||
SetBaseFolderCache("/tmp/"PROJECT_NAME"/");
|
||||
#endif
|
||||
|
||||
ewol::SetFontFolder("Font");
|
||||
//ewol::SetDefaultFont("freefont/FreeMono", 14);
|
||||
//ewol::SetDefaultFont("ebtfont/Monospace", 14);
|
||||
ewol::SetDefaultFont("ebtfont/Monospace", 33);
|
||||
#ifdef EWOL_USE_FREE_TYPE
|
||||
ewol::SetDefaultFont("freefont/FreeMono", 14);
|
||||
#else
|
||||
//ewol::SetDefaultFont("ebtfont/Monospace", 14);
|
||||
ewol::SetDefaultFont("ebtfont/Monospace", 33);
|
||||
#endif
|
||||
//ewol::theme::LoadDefault("dataTest/exemple.eol");
|
||||
/*
|
||||
etk::File fileTmp("exemple.eol", etk::FILE_TYPE_DATA);
|
||||
|
Loading…
x
Reference in New Issue
Block a user