语言

Menu
Sites
Language
Support Z1 device

Hi,

 I have two approved apps in Tizen store, but both of them show "Supported Devices 0 / 1 Devices".

 These apps were made with SDK 2.2, they are supporting "Screen size: normal" and have these features: "http://tizen.org/feature/platform.core.cpu.arch.armv7,
http://tizen.org/feature/screen.size.normal, http://tizen.org/feature/platform.core.fpu.arch.vfpv3".

 What do I have to change to make Z1 supported device? Is it enough only to rebuild app with SDK 2.3? Or is app with 2.2 SDK compatble with 2.3? Is there also some feature that must be added (or removed)?

Thanks,

Tomas

 

响应

8 回复

Native or web apps?

Native sdk has been changed from OSP c++ style to EFL C style..

I don't know about web apps

 

Tomas Rychnovsky

Nour, thanks for answer. Both are native apps. I have strictly divided "system" part (Tizen, Android, iOS) from game/engine part. Can I still use C++ for my app (game/engine)?

 

 

Well, I don't think OSP C++ is coming back. It might be available as plug-in but that no one can confirm now

However, EFL working on automatic bindings for C++, Python, Lua, Javascript etc..

When C++ will be ready? I don't know


 

read this topic

 

https://developer.tizen.org/forums/native-application-development/update-on-primary-native-api-tizen-2.3

Tomas Rychnovsky

thanks for help, but I am totally dizzy :( On this link I found that some C++ binding exist (https://trac.enlightenment.org/e/wiki/EFLxx) But what I need is to mix "Tizen" C with my "generic" library (generic = no dependency on Tizen). I beleave I am not the only one who need this. Just imagine using library like box2D which is also C++. It all shrinks to question how to make instance of my C++ core game class from EFL and call its methods like update and render, while the Tizen interaction stays on EFL side.

Peter Wegner

You have tested your Apps on Z1?

Maybe on RTL Z1 ?

http://developer.samsung.com/remotetestlab/rtlDeviceList.action#

What exactly happens?

Z1 can install but not start... Z1 crashes or we could see any kind of message... not supported or something like that?

 

Thanx in advance.

 

Best Regards

Tomas Rychnovsky

Peter, thanks for answer.

RTL says that: "MyApp.tpk is in incorrect format". But this is not my problem. I understand that for some reasons Tizen changed from C++ to C. But there are libraries like Box2D or my simple game engine, which are C++ and are platform independent. All is needed is "somehow" from current Tizen C EFL environment get into these libraries. In my engine I have separate "system" part and game/engine part. "System" part is different for Android, iOS, Tizen, bada. I understand I will have to rewrite this part for Tizen to change from Osp to EFL. But I am pretty sure, that no one wants developers to rewrite code like for Box2D from C++ onto C.

 So far I have no luck to find any example of instancing / calling C++ class from EFL. Adding simple class like "class Foo {public: Foo();};" into separate Foo.h (or Foo.hpp) file just results in "unknown type name 'class'" during compilation, which means I cannot add C++ classes into native project. As well as doing domething like this Foo* foo = new Foo(); does not work ("use of undeclared identifier 'new'"), which is clear because C does not know "new".

 I believe there must be some way how to use C++ libraries with EFL, but I cannot find way...

I am confused myself and don't know what to do. I have apps also using external library but most of my apps are not. EFL C seems the most "secure" option for future update without breaking up my apps

Also I am considering recoding some apps to HTML5 from native

 

Tomas Rychnovsky

I found a way. It is probably trivial for experienced C/C++ developers, but it took me some time, so I am putting here to share:

If you have C++ classes and want to call it from C create header for your class like this:

/*
 * MyClass.h
 */

#ifndef MYCLASS_H_
#define MYCLASS_H_

#ifdef __cplusplus
void createClass();
void doSomething();

class MyClass {
public:
    MyClass();
	void add();

private:
	int mMyVar;
};

#else
void c_createClass();
void c_doSomething();
#endif

#endif /* MYCLASS_H_ */

And implementation llike this:

/*
 * MyClass.cpp
 */

#include "MyClass.h"
#include <stddef.h>

static MyClass* myClass = NULL;

MyClass::MyClass() {
    mMyVar = 100;
}

void MyClass::add() {
	mMyVar += 100;
}

void createClass() {
	myClass = new MyClass();
}

void doSomething() {
	myClass->add();
}

extern "C" {
    void c_createClass() {
    	createClass();
    }

    void c_doSomething() {
    	doSomething();
    }
}

Now you can add #include "MyClass.h" into main native app C file and it will compile without errors as the compiler will only see functions:

void c_createClass();
void c_doSomething();

To test it  you can put following lines into main C file:

static void
app_resume(void *data)
{
    /* Take necessary actions when application becomes visible. */
	c_createClass();
	c_doSomething();
}