Re: [fpc-other] I need ppcjvm for ARM64 architecture

2020-05-14 Thread Mgr. Janusz Chmiel via fpc-other
Viola. Thanks to Mr Bart, I have finally compiled cppjvm binary for Linux
ARM64. I will have to fight with Android target from standard PC, because
finding fully functioning Android NDK for Android which will build binary
directly for Android is heavy task.
For now, I will adapt Pandroid bundle. I will add The required binary Pascal
modules to its source tree such as ppcjvm for Lnux ARM 64 instead of
included FPC for X64 for Linux.
I have The chance. It will be copy operation and folders and files
mamanipulation adventure.
Ihave used FPC sources from Git hub and really, PPCJVM could be compiled
perfectly.
Thanks to yours step by step instructions MR Bart, I will have 100 % The
success.

___
fpc-other maillist  -  fpc-other@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] I need ppcjvm for ARM64 architecture

2020-05-14 Thread Mgr. Janusz Chmiel via fpc-other
I have deeply analysed my possibilities and I have came to The following
most realistic programmers solution.
I do not have enough experience to recode open JDK so it would run directly
from Android with no need to use Busybox or special .so libraryes, which
Termux uses.
Even if I would compile PPCJVM which would generate .class files, it is too
little for my goal. Since I need to use. Jasmin Java Assembler, which need
JRE or somilar Java environment. Termux has offered Open JDK but The running
app have been too unstable, it has allocated too much CPU resources so it
could even cause colt phone or Android device reboot.
As A contrast, Termux, Proot and running Debian, Ubuntu or similar matured
Linux distro is giving Me much more chances. Why? Because Proot allocates
system resources very smartly and it is even possible to build very complex
Gradle based projects, which require complex communication with running Java
virtual machine. OpenJDK is running smoothly there een for several minutes.
And I would had to base my attempts to Pandroid bundle. Because Mr
Swianovicz and Horiakus have allready developed all complex tasks including
Pascal units development, finding how to build Java classes by using Apache
ANT.
I would never been able to collect so much information from Internet and
they have also introduced functioning approach for calling .so with no need
to use JNI technique. They have also introduced Pascal source to work with
Java ctivity such as main activity. Android API calls support, etc.
So what can I do for now?

I will install some Lazarus package for ARM64 Linux distro. Such as Debian,
Ubuntu. I will try to find, if there is An ppcjvm allready compiled.
Sure, it would not run directly on Android without some Linux terminal for
Android. 
The most complex fight will be with Android Build tools. The question is, if
Android build tools compiled for Linux X64 will work with Open JDK for ARM64
Linux on Android device. If Java bite code for Linux X64 will be compatible
with Open JDk virtual machine which will by using Proot, Termux and some
Linux distro.


Next task will be to use RFO Basic for ANdroid with GW.bas library, which
combines Basic language with Javascript. This approach create very
attractive GUI. In this case, Webview Android engine to interpret code of
WEB pages is being used. The positive fact is, that in this case, GUI will
look very attractive even for sighted people and I will have chance to
interact with command line tools by using RFO Basic.
One programmer have allready developed special compiler, which uses Eclipse
compatible with Android and it run even without using Proot and Termux.
It even create Java classes and some technique which even creates .dex file.
His technique do not cause phone freeze. He is also using his own GW.bas.
Because RFO Basic is ideal for projects, which require some macro language.
Better than nothing and I must only hope, that it will work.

___
fpc-other maillist  -  fpc-other@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] I need ppcjvm for ARM64 architecture

2020-04-28 Thread Mgr. Janusz Chmiel via fpc-other
Dear MR Barth,
You are elite programmer and thank you very very much for yours detailed and
professional description.
To be honest, I have occured The most positive feeling thanks to Pascal
language. Because PPCJVM creates .class files and Android build tools
transfer it to .dex format. I can run many variousapps on Android.
The most exciting fact is, that There are two projects which can enable
visually impaired users with no sight at all program for Android. Resulting
GUI of apps are fully accessible with screen readers. Code is reliable and
memory allocations are very friendly, if developer work as he should work
with his source code and Pascal commands.
javavcl-code-r1007
Contain VCL units. Author have been inspired by Borland Delphi VCL. Sure
code have been his and adapted for PPCJVM Android development. Visually
impaired users and not only those users can specify adjectives to specify
object to left, top, bottom, ETC.
There are even adjectives to speciy font name, size.
Sure. Java programmers can also do that. But I love Pascal very much. I do
not like combining .java with .xml files. Pascal language is structured and
its procedural form enable Me to develop more effectively. Pandroid from MR
Swianovitz contain various modules and I can develop with noneed to add
object position values in Pixels. It is not easy to imagine The value if
developer do not see at all. But thanks to people, who have develop unique
aalgorithms, object position values are only volunteer not mandatory.
GUI is acceptable even by sighted users. No data are overlapping and there
are even no system crashes. Mr Swianovitz is very kind to Me. He has helped
Me very very much and I would like to publicly thank him for his complex
work.
He has generated bass Pascal unit for Me. And he has shown Me how to call
Android APi functions.
The most difficult task is to generate Android Pascal headers. Android
28.inc, etc.
Process is so complex that it can not be develop to work fully automated. It
is necessary to deeply know Java and Pascal and it is necessary to swap
lines.
It is really work for professional. But eljuko have done it not only for Me.
He was very patient and I Am deeply appreciating his approach to My ples and
he is good programmer.
Pandroid even allow to combine not only to .dex but Pascal sources can be
even compiled to .so libraryes by using ARM instructions machine code.
And resulting GUI is fully accessible.

___
fpc-other maillist  -  fpc-other@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] I need ppcjvm for ARM64 architecture

2020-04-28 Thread Sven Barth via fpc-other

Am 27.04.2020 um 13:38 schrieb Mgr. Janusz Chmiel via fpc-other:

Dear specialists,
My long term dream is to develop simple Android IDE which will be able to
compile Pascal app based on PPCJVM to The fully functional .apk package. The
first what I would like to plea you is to give Me direct link to download
PPCJVM for ARM64. So PPCJVM, which can compile Pascal sources to .class
files.
Unfortunately, I do not know, who have developed Android build tools for
Android, not for Windows or for Linux and if those build tools can be
legally downloaded from somewhere.


We do not provide a compiler that can run on Android, but you can 
compile it yourself. Please note that I have not fully tested the 
following steps, but please feel free to ask back if you have problems.


You'll need the following:
- a FPC 3.2 RC1 installation (at least for now until we've released the 
final version); you can find it here: 
ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/ (just to avoid 
confusion: the aarch64-android mentioned there is *not* what you want 
right now)

- the sources for FPC 3.2 RC1 also available on that site
- the fpcjvmutilities.zip, if you don't have it already; it's available 
here: ftp://ftp.freepascal.org/pub/fpc/contrib/jvm/fpcjvmutilities.zip

- the NDK for the Android version you want to target

For this example I'll assume that you installed FPC 3.2 RC1 on a Linux 
in /opt/fpc. Thus the fpc binary will be available in /opt/fpc/bin/fpc 
and the units will be in /opt/fpc/lib/fpc/3.2.0rc1/units. The sources I 
assume to be in ~/sources/fpc/3.2.0 and the NDK (the directory 
containing "as" and "ld") as well as the fpcjvmutiltities I assume to be 
available in $PATH, otherwise you'll need to specify their paths using 
CROSSBINDIR for their corresponding steps.


First we create the Java compatible units and class files.

For this go to the directory with the FPC sources and execute the 
following (here you need to specify the fpcjvmutilties using CROSSBINDIR 
if you don't have them in PATH):


make crossall FPC=/opt/fpc/bin/fpc OS_TARGET=android CPU_TARGET=jvm

If this was successful do the following (the INSTALL_PREFIX will be the 
same directory you installed FPC in, in our example /opt/fpc):


make crossinstall FPC=/opt/fpc/bin/fpc OS_TARGET=android CPU_TARGET=jvm 
INSTALL_PREFIX=/opt/fpc


As next step you need to create a cross compiler for aarch64-android 
(here you need to specify the NDK using CROSSBINDIR if you don't have 
them in PATH):


make crossall FPC=/opt/fpc/bin/fpc OS_TARGET=android CPU_TARGET=aarch64

If this was successful you do a

make crossinstall FPC=/opt/fpc/bin/fpc OS_TARGET=android 
CPU_TARGET=aarch64 INSTALL_PREFIX=/opt/fpc


As the last step we need to cross compile the JVM compiler for 
aarch64-android. For this change into the compiler directory and execute:


make all FPC=/opt/fpc/bin/ppcrossa64 JVM=1

This will create a ppcjvm that you can run on an Android device. 
Additionally you will need all the files that were copied to the 
/opt/fpc/lib/3.2.0rc1/units/jvm-android directory. Now you only need to 
supply a suitable fpc.cfg file to the compiler and hope that the 
jasmin.jar assembler can run on Android.


I hope this helps you.

Regards,
Sven
___
fpc-other maillist  -  fpc-other@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other