Generation of the Manifest and better configuration file

This commit is contained in:
Edouard DUPIN 2012-09-11 18:21:00 +02:00
parent ce198cd01d
commit 1b51dc051e
8 changed files with 207 additions and 18 deletions

2
Build

@ -1 +1 @@
Subproject commit 52b50f5e6b51ca2f7aed6f79fcaad74a1fa24753
Subproject commit 9c3bc9ecb3d34caa2351555d79d3b783affb19a6

View File

@ -23,7 +23,7 @@
*/
package com.__PROJECT_VENDOR__.__PROJECT_PACKAGE__;
package __PROJECT_ORG_TYPE__.__PROJECT_VENDOR__.__PROJECT_PACKAGE__;
@ -90,6 +90,7 @@ public class __PROJECT_NAME__ extends Activity {
ActivityParamSetArchiveDir(1, getFilesDir().toString());
ActivityParamSetArchiveDir(2, getCacheDir().toString());
// to enable extarnal storage: add in the manifest the restriction needed ...
//packageManager.checkPermission("android.permission.READ_SMS", myPackage) == PERMISSION_GRANTED;
//ActivityParamSetArchiveDir(3, getExternalCacheDir().toString());
// return apk file path (or null on error)
@ -117,11 +118,9 @@ public class __PROJECT_NAME__ extends Activity {
//getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
// hide keyboard :
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
//Force landscape
//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
// create bsurface system
mGLView = new interfaceSurfaceView(this);
mGLView = new interfaceSurfaceView(this, __CONF_OGL_ES_V__);
// create element audio ...
mStreams = new interfaceAudio();
@ -216,6 +215,20 @@ public class __PROJECT_NAME__ extends Activity {
// just for the test ...
interfaceJNI.TouchEvent();
}
public void CPP_OrientationChange(int screenMode)
{
if (screenMode == 1) {
//Force landscape
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} else if (screenMode == 2) {
//Force portrait
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
} else {
//Force auto Rotation
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
}
}
}

View File

@ -43,12 +43,14 @@ public class interfaceSurfaceView extends GLSurfaceView {
private interfaceOpenGL m_ewolDrawer;
public interfaceSurfaceView(Context context) {
public interfaceSurfaceView(Context context, int OpenGlVersion) {
// super must be first statement in constructor
super(context);
// Create an OpenGL ES 2.0 context
setEGLContextClientVersion(2);
if (OpenGlVersion == 2) {
setEGLContextClientVersion(2);
}
// je n'ai pas compris ...
m_ewolDrawer = new interfaceOpenGL();

View File

@ -5,7 +5,7 @@ include $(CLEAR_VARS)
# name of the librairy
LOCAL_MODULE := ewol
LOCAL_CONFIG_FILES := Config.in
LOCAL_CONFIG_FILES := Config.in ConfigAndroid.in
# get the tag of the current project :
LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags)
@ -23,13 +23,11 @@ LOCAL_CFLAGS := -Wno-write-strings \
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\"" \
-DDATA_IN_APK
#ifeq ("$(CONFIG__VIDEO__OPENGL_ES_2)","y")
LOCAL_CFLAGS += -D__VIDEO__OPENGL_ES_2
LOCAL_EXPORT_CFLAGS := -D__VIDEO__OPENGL_ES_2
ifeq ("$(CONFIG___VIDEO__OPENGL_ES_2)","y")
LOCAL_EXPORT_LDLIBS := -lGLESv2
#else
# LOCAL_EXPORT_LDLIBS := -lGLESv1_CM
#endif
else
LOCAL_EXPORT_LDLIBS := -lGLESv1_CM
endif
LOCAL_EXPORT_LDLIBS += -ldl -llog
@ -41,10 +39,10 @@ EWOL_TMP_PATH:=$(LOCAL_PATH)
$(FILE_ABSTRACTION_DEST): $(FILE_ABSTRACTION)
@mkdir -p $(dir $(EWOL_TMP_PATH)/$@)
cp -f $(FILE_ABSTRACTION) $(EWOL_TMP_PATH)/$@
sed -i "s|__PROJECT_VENDOR__|$(PROJECT_VENDOR)|" $(EWOL_TMP_PATH)/$@
sed -i "s|__PROJECT_NAME__|$(PROJECT_NAME)|" $(EWOL_TMP_PATH)/$@
sed -i "s|__PROJECT_PACKAGE__|$(PROJECT_PACKAGE)|" $(EWOL_TMP_PATH)/$@
@cp -f $(FILE_ABSTRACTION) $(EWOL_TMP_PATH)/$@
@sed -i "s|__PROJECT_VENDOR__|$(PROJECT_VENDOR)|" $(EWOL_TMP_PATH)/$@
@sed -i "s|__PROJECT_NAME__|$(PROJECT_NAME)|" $(EWOL_TMP_PATH)/$@
@sed -i "s|__PROJECT_PACKAGE__|$(PROJECT_PACKAGE)|" $(EWOL_TMP_PATH)/$@
# this is the abstraction file for Android

View File

@ -11,4 +11,42 @@ menu "General"
config __VIDEO__OPENGL_ES_2
bool "1: openGl ES 2.0"
endchoice
config __EWOL_APPL_NAME__
prompt "Application Name"
string
default "Ewol"
help
This is the application name
config __EWOL_APPL_BASIC_TITLE__
prompt "Application Title"
string
default "Ewol Basic Title"
help
This is the application Title
config __EWOL_APPL_ORGANISATION_TYPE__
prompt "OrganisationType"
string
default "com"
help
Can be manny things, but limit whith no space no special char and no Maj ... [a..z]
com : Commercial
net : Network??
org : Organisation
gov : Governement
mil : Military
edu : Education
pri : Private
museum : ...
config __EWOL_APPL_COMPAGNY__
prompt "Compagny Name"
string
default "Unknow"
help
This is the c name ...
endmenu

View File

@ -0,0 +1,133 @@
menu "Android"
config __EWOL_ANDROID_MINIMUM_SDK_VERSION__
prompt "Minimum android Version"
int
default 9
help
This is the minimum version of Android that is Requested
config __EWOL_ANDROID_SHOW_TITLE__
prompt "Application display title"
bool
default y
help
This Permit on android to hide title
choice
prompt "Display orientation mode"
default __EWOL_ANDROID_ORIENTATION_AUTO__
help
Force the display possibilities of this video settings
config __EWOL_ANDROID_ORIENTATION_AUTO__
bool "0: Automatic orientation (change automaticly)"
config __EWOL_ANDROID_ORIENTATION_LANDSCAPE__
bool "1: Lock in landscape mode"
config __EWOL_ANDROID_ORIENTATION_PORTRAIT__
bool "2: Lock in portrait mode"
endchoice
config __EWOL_ANDROID_ICON__
prompt "Select Icon"
string
default "@drawable/ic_luncher_ewol"
help
Select the source of the icon for the application ...
menu "Permissions"
config __ANDROID_PERMISSION__WRITE_EXTERNAL_STORAGE__
prompt "WRITE_EXTERNAL_STORAGE"
bool
default n
help
Allows an application to write to external storage.
config __ANDROID_PERMISSION__CAMERA__
prompt "CAMERA"
bool
default n
help
Required to be able to access the camera device.
config __ANDROID_PERMISSION__INTERNET__
prompt "INTERNET"
bool
default n
help
Allows applications to open network sockets.
config __ANDROID_PERMISSION__MODIFY_AUDIO_SETTINGS__
prompt "MODIFY_AUDIO_SETTINGS"
bool
default n
help
Allows an application to modify global audio settings.
config __ANDROID_PERMISSION__READ_CALENDAR__
prompt "READ_CALENDAR"
bool
default n
help
Allows an application to read the user''s calendar data.
config __ANDROID_PERMISSION__READ_CONTACTS__
prompt "READ_CONTACTS"
bool
default n
help
Allows an application to read the user''s contacts data.
config __ANDROID_PERMISSION__READ_FRAME_BUFFER__
prompt "READ_FRAME_BUFFER"
bool
default n
help
Allows an application to take screen shots and more generally get access to the frame buffer data
config __ANDROID_PERMISSION__READ_PROFILE__
prompt "READ_PROFILE"
bool
default n
help
Allows an application to read the user''s personal profile data.
config __ANDROID_PERMISSION__RECORD_AUDIO__
prompt "RECORD_AUDIO"
bool
default n
help
Allows an application to record audio
config __ANDROID_PERMISSION__SET_ORIENTATION__
prompt "SET_ORIENTATION"
bool
default n
help
Allows low-level access to setting the orientation (actually rotation) of the screen.
config __ANDROID_PERMISSION__VIBRATE__
prompt "VIBRATE"
bool
default n
help
Allows access to the vibrator
config __ANDROID_PERMISSION__ACCESS_COARSE_LOCATION__
prompt "ACCESS_COARSE_LOCATION"
bool
default n
help
Allows an application to access coarse (e.g., Cell-ID, WiFi) location.
config __ANDROID_PERMISSION__ACCESS_FINE_LOCATION__
prompt "ACCESS_FINE_LOCATION"
bool
default n
help
Allows an application to access fine (e.g., GPS) location.
endmenu
endmenu

View File

@ -21,6 +21,7 @@
*
*******************************************************************************
*/
#ifdef __VIDEO__OPENGL_ES_2
#include <ewol/oObject/2DTextShader.h>
#include <ewol/openGL/openGL.h>
@ -237,3 +238,4 @@ Vector2D<float> ewol::OObject2DTextShader::GetSize(const etk::UString& unicodeSt
return m_font->GetSize(unicodeString);
}
#endif

View File

@ -25,6 +25,8 @@
#ifndef __EWOL_O_OBJECT_2D_TEXT_SHADER_H__
#define __EWOL_O_OBJECT_2D_TEXT_SHADER_H__
#ifdef __VIDEO__OPENGL_ES_2
#include <ewol/oObject/OObject.h>
#include <ewol/font/DistantFieldFont.h>
#include <ewol/ResourceManager.h>
@ -75,3 +77,4 @@ namespace ewol {
#endif
#endif