[fpc-pascal] Vehicle management
Jon Foster
jon-lists at jfpossibilities.com
Thu May 11 18:14:28 CEST 2017
On 05/11/2017 01:29 AM, Felipe Monteiro de Carvalho wrote:
> On Thu, May 11, 2017 at 1:19 AM, Jon Foster
> <jon-lists at jfpossibilities.com> wrote:
>> Yeah. The wiki is cluttered with inaccurate and abandoned information for
>> Android development. It needs a serious scrubbing. And access to needed
>> sources is somewhat hidden. I've combed it for a few years, now, to try and
>> deduce what's real and what's not. I'm not even sure where I got the bits of
>> source I'm using now. I've just been clinging to it like a shipwreck
>> survivor clinging to flotsam.
> I don't think the wiki page I posted is inaccurate, all the stuff
> there is valid AFAIK, but it is simply very incomplete. A lot more
> should be written, and also note that there are 2 different ways:
>
> 1> Via NDK combining native Pascal + Java
> 2> Via JVM compiler
>
> The wiki I posted is only for approach 1, even a link to a full
> compilable example is posted there (thought it is for OpenGL). I never
> used approach 2 and dont plan on using it.
Thanks for the info Felipe. I'll bookmark that page somewhere. I was also
referring to the many other Android pages on the wiki that are misleading.
Its hard for us outsiders to know what's authoritative and current.
I would like to hazard there is, yet, another way:
3> #1 w/o Java - pure native.
However that would never be entirely accurate as all "native activities"
have to be chaperoned by a Java "Activity". And JNI will have to be used to
interface to any Android supplied services as everything else is stuck in
Dalvik land. All part of what makes Android so inefficient. But my intent
is not to have to do Java once an FPC based activity is launched. Might
have to build a better "NativeActivity" class with ppcjvm too... I think
that's something Lazarus did/does.
I should also throw out here that it would be *REALLY* nice, and even
somewhat needful on the Android front, if FPC could interface directly with
C++ libs and use their classes and objects. Besides Java, Google prefers to
use C++ (for obvious reasons) and their supplied native code libraries are
C++. If you look at Google's software architecture diagram they say they
use FreeType2. But, even rooted, if you search the Android file system you
won't find a FT2 lib anywhere. Digging through the AOSP source base it
turns out that FT2 is statically linked into Skia. Skia is a C++ library
used by Dalvik (and other places) to do the usual 2D text/graphics
rendering. This acts much like AggPas, used by Graeme's AggCanvas. I did
find it exports a limited set FT2 functions in standard C style. But it
looks like, for full functionality, I'm going to have to bridge the C++ divide.
Anyhow tips on the FPC->C++ front would be appreciated. I will probably
search the list archives as I know this topic comes up repeatedly. I don't
understand how ginormous an undertaking this might be but maybe I can
contribute something on this front.
--
Sent from my Debian Linux workstation -- http://www.debian.org/intro/about
Jon Foster
JF Possibilities, Inc.
jon at jfpossibilities.com
More information about the fpc-pascal
mailing list