Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-21 Thread Bo Berglund
On Sun, 21 Apr 2019 10:43:35 +0200, "Mgr. Janusz Chmiel"
 wrote:

>Thank you very much for yours help.
>Yours advice helped Me. And I have finally downloaded really whole 
>source code of Free Pascal including compiler and with The
>utils/fpcm
>folders.
>But I Am getting error from make about system unit, so I do not know 
>where to set The path. To The units from downloaded sources or from 
>folder, where I have compiler which compiles 3.0.0 version of compiler 
>for ME?
>It will be big adventure for Me to finally get PPCJVM prepared to 
>compile Android classes.

Questions:
1) Which platform are you trying to compile fpc on?
Linux, Windows. MacOs etc and which CPU (i386, armx64, 

2) Did you download the seed compiler 2.6.4 from somewhere?
The binary is needed as a bootstrap to build fpc 3.0.0

There is a readme here for how to build fpc:
https://svn.freepascal.org/svn/fpc/tags/release_3_0_0/compiler/README.txt

I am using these commands whenever I need to build fpc (all in Linux)
(the fpc version number changes of course):

mkdir /home//bin
cd /home//dev/fpc/3.0.0/
make clean
make all FPC=
make install PREFIX=/home/
make sourceinstall PREFIX=/home/
/home//lib/fpc/3.0.0/samplecfg /home//lib/3.0.0
/home/
mv /home//fpc.cfg /home//.fpc.cfg

The seed compiler for building 3.0.0 is the previous release 2.6.4
compiler. You only need the binary for that compiler during build of
fpc 3.0.0.
Maybe you can find the seed compiler here:
https://sourceforge.net/projects/freepascal/files/Bootstrap/2.6.4/


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-21 Thread Mgr. Janusz Chmiel

Thank you very much for yours help.
Yours advice helped Me. And I have finally downloaded really whole 
source code of Free Pascal including compiler and with The

utils/fpcm
folders.
But I Am getting error from make about system unit, so I do not know 
where to set The path. To The units from downloaded sources or from 
folder, where I have compiler which compiles 3.0.0 version of compiler 
for ME?
It will be big adventure for Me to finally get PPCJVM prepared to 
compile Android classes.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-20 Thread Bo Berglund
On Sat, 20 Apr 2019 12:19:14 +0200, "Mgr. Janusz Chmiel"
 wrote:

>Who of you know The command which will allow Me to download source code 
>of Free Pascal compiler 3.0.0

The servers are now on line again, so on Linux do this to place the
sources in dev/fpc inside your home dir:


mkdir -p ~/dev/fpc
cd ~/dev/fpc
svn co https://svn.freepascal.org/svn/fpc/tags/release_3_0_0/ 3.0.0

This will get you the complete sources for FreePascal 3.0.0

The svn command on Windows is exactly the same but the creation of the
directory tree is not.


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-20 Thread Bo Berglund
On Sat, 20 Apr 2019 12:19:14 +0200, "Mgr. Janusz Chmiel"
 wrote:

>Who of you know The command which will allow Me to download source code 
>of Free Pascal compiler 3.0.0

Normally available via svn from this URL:
https://svn.freepascal.org/svn/fpc/
select the tag you want and then just checkout or export from svn.

However, this weekend the team is doing updates on the server hosting
fpc and lazarus sources so svn is unavailable until they have
finished.

This is what Michael Van Canneyt sent out a while ago:


Hello,

This afternoon (for GMT+1) you will experience downtime in the website
of FPC,
The subversion service for FPC/Lazarus and the bugtracker.

The host machine needs maintenance and this will result in some
downtime of some services.

FTP, Lazarus website, wiki and mailinglists will be unaffected as they
are
hosted on different machines.

Michael.
-- 


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-20 Thread Mgr. Janusz Chmiel

Dear specialists,
Who of you know The command which will allow Me to download source code 
of Free Pascal compiler 3.0.0

Does somebody of you know The link for downloading this specific version?
I AM using Pandroid and compiled classes can not be converted to .dex 
format by none of The available Android build-tools versions.
Sure, I have found out, that compilation have been finished without 
errors when I have used latest stable PPCJVM and JVMANDROID mode.
But resulting .class files can not be converted to .dex format by 
Android buildtools.


Thank you very much for provided link.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Alexander Grotewohl

Don't bring OS/2 into this. The creators of REXX are saints. lmao

On 4/18/19 7:48 PM, Tomas Hajny wrote:

On Thu, April 18, 2019 20:33, Sven Barth via fpc-pascal wrote:

  .
  .

Huh? What about

=== code begin ===

if CONDITION (
      BLA1
      BLA2
      BLA3
)

=== code end ===

I'm using that construct quite often at work...

OK, sorry; MS managed to make at least some progress in batch files since
the DOS (and OS/2) times, I wasn't aware of that. ;-) I didn't miss it
though, because the goto and call solutions still allow handling all
required cases.

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Tomas Hajny
On Thu, April 18, 2019 20:33, Sven Barth via fpc-pascal wrote:

 .
 .
> Huh? What about
>
> === code begin ===
>
> if CONDITION (
>      BLA1
>      BLA2
>      BLA3
> )
>
> === code end ===
>
> I'm using that construct quite often at work...

OK, sorry; MS managed to make at least some progress in batch files since
the DOS (and OS/2) times, I wasn't aware of that. ;-) I didn't miss it
though, because the goto and call solutions still allow handling all
required cases.

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Sven Barth via fpc-pascal

Am 18.04.2019 um 12:46 schrieb Tomas Hajny:

On Thu, April 18, 2019 12:32, Mgr. Janusz Chmiel wrote:
  .
  .

I have also started to transform build.sh to Windows batch file.
Which issues AM I facingnow?

  .
  .

echo ppcjvm -
$TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm

$environment_variable in shell scripts = %environment_variable% in Windows
batch files.


  .
  .

I have modified The builddebug.sh script which is available inside
C:\usr\local\pandroid\example\Vibrator\android
folder
But I do not know, if I can replace fi command by pause?

  .
  .

"fi" (in shell scripts) = "$ENDIF" (in Pascal); there's no alternative to
that in the Windows batch files, because those only allow executing a
single command based on the result of the "if" condition. If longer blocks
of commands need to be invoked, the Windows batch file alternative is
either moving those blocks to another batch file (and calling that batch
file in from the IF condition), or using a label and goto in the batch
file.

Huh? What about

=== code begin ===

if CONDITION (
    BLA1
    BLA2
    BLA3
)

=== code end ===

I'm using that construct quite often at work...

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

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Mgr. Janusz Chmiel

Thank you very much for yours good advice.
First part of .bat file is allready usable, it produces functioning 
signed debug .apk packages with The previously generated Java classes, 
which is The part of Pandroid.zip downloaded from Github. Now I must 
solve JVM part and The most complex programmers task will be to modify 
pandroid pascal files, which are being automatically opened from .lpy 
files if Lazarus for Linux have been used.
It will not be The walk through A garden but if I want to have 
functioning and reliable Pascal bundle which support Android API calls 
and .so library calling, I do not have other choice.
The advantage is, that apps, which have been compiled by JVMandroid mode 
of  PPCJVM are very accessible and The responsiveness of this GUI is 
very fast, similar if I would use Eclipse or Android studio.
Everything is on my control. Thank you very much for yours patience and 
for yours advices.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Tomas Hajny
On Thu, April 18, 2019 12:32, Mgr. Janusz Chmiel wrote:
 .
 .
> I have also started to transform build.sh to Windows batch file.
> Which issues AM I facingnow?
 .
 .
> echo ppcjvm -
> $TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm

$environment_variable in shell scripts = %environment_variable% in Windows
batch files.


 .
 .
> I have modified The builddebug.sh script which is available inside
> C:\usr\local\pandroid\example\Vibrator\android
> folder
> But I do not know, if I can replace fi command by pause?
 .
 .

"fi" (in shell scripts) = "$ENDIF" (in Pascal); there's no alternative to
that in the Windows batch files, because those only allow executing a
single command based on the result of the "if" condition. If longer blocks
of commands need to be invoked, the Windows batch file alternative is
either moving those blocks to another batch file (and calling that batch
file in from the IF condition), or using a label and goto in the batch
file.

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Mgr. Janusz Chmiel
I have found out that Pandroid bundle is The onlyone project which is 
able to call .so libraryes in JVM mode and is also able to support all 
Android API functions call, I have big plea to you.

I have started to transform this big bundle from Linux mode to Windows.

Project is available here:

https://github.com/zeljkoc/pandroid
What have Iallready done?
1. I have used SDK manager for Windows and I have put necessary 
buildtools and Platform tools and Platform to The corresponding Pandroid 
folder after I have unzipped it to Windows NTFS file system.

I have also started to transform build.sh to Windows batch file.
Which issues AM I facingnow?
1. is it necessary to really use so old FPCJVM compiler, which is The 
part of Pandroid? Or can I use never from DEC 2017?
How to transform The following series of build commands from Linux BASH 
shell style to Windows batch file?

Here are The commands.

echo ppcjvm -
$TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm 
@$TYPHON/fpcsrc/rtl/android/jvm/rtl.cfg -Ur -Tandroid -Pjvm -Ur -Xs -O2 
-n -Fi$TYPHON/fpcsrc/rtl/inc -Fi$TYPHON/fpcsrc/rtl/jvm 
-Fi$TYPHON/fpcsrc/rtl/java -FE. -Fi$TYPHON/fpcsrc/rtl/android/jvm 
-FUbin/classes -djvm -dRELEASE -Us -Sg $TYPHON/fpcsrc/rtl/java/system.pp
$TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm 
@$TYPHON/fpcsrc/rtl/android/jvm/rtl.cfg -Ur -Tandroid -Pjvm -Ur -Xs -O2 
-n -Fi$TYPHON/fpcsrc/rtl/inc -Fi$TYPHON/fpcsrc/rtl/jvm 
-Fi$TYPHON/fpcsrc/rtl/java -FE. -Fi$TYPHON/fpcsrc/rtl/android/jvm 
-FUbin/classes -djvm -dRELEASE $TYPHON/fpcsrc/rtl/inc/uuchar.pp
$TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm 
@$TYPHON/fpcsrc/rtl/android/jvm/rtl.cfg -Ur -Tandroid -Pjvm -Ur -Xs -O2 
-n -Fi$TYPHON/fpcsrc/rtl/inc -Fi$TYPHON/fpcsrc/rtl/jvm 
-Fi$TYPHON/fpcsrc/rtl/java -FE. -Fi$TYPHON/fpcsrc/rtl/android/jvm 
-FUbin/classes -djvm -dRELEASE $TYPHON/fpcsrc/rtl/java/objpas.pp
$TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm 
@$TYPHON/fpcsrc/rtl/android/jvm/rtl.cfg -Ur -Tandroid -Pjvm -Ur -Xs -O2 
-n -Fi$TYPHON/fpcsrc/rtl/inc -Fi$TYPHON/fpcsrc/rtl/jvm 
-Fi$TYPHON/fpcsrc/rtl/java -FE. -Fi$TYPHON/fpcsrc/rtl/android/jvm 
-Fu$PANDROID/units -FUbin/classes -djvm -dRELEASE $PROJECT/Vibrator.lpr


#$PANDROID/compiler/ppcjvm -n -Tandroid -Fu$PANDROID/units/typhon 
-Fu$PANDROID/units -FEbin/classes $PROJECT/Vibrator.lpr



I have modified The builddebug.sh script which is available inside
C:\usr\local\pandroid\example\Vibrator\android
folder
But I do not know, if I can replace fi command by pause?
Or can I remove fi and add ppcjvm to The next line with The options?
Because there are no other free project based on JVMandroid Pascal 
except JavaVCL or Pandroid. Lamw required position values for every object.
And I have tried precompiled examples for Pandroid and all of them are 
working smoothly, including calling API functions and author have 
introduce very strange technique for calling .so libraryes even without 
using JNI.

Inside examples
C:\usr\local\pandroid\example\Vibrator
and
C:\usr\local\pandroid\example\DemoPModule
There is other but very strange technique for calling .so library.
All provided examples are working so I think, that his project is very 
probably The best available free solution for writing applications by 
using JVMandroid mode and Android API and .so libraries call is supported.
I Am standing at The crossing. Combine some units from Pandroid with 
units from Javavcl, or should I had to really transform Pandroid to Windows?
Pandroid also contain unit StdCtrls, for writing GUI apps with no need 
to add position values so for little GUI with not many items it should 
also work for Me.
Resulting .dex file is very small, only needed units are being merged 
to it.

Any help will be very welcomed.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal