Recent

Author Topic: Preparing my Stack for Android and Blockchain  (Read 24777 times)

Webdrifter

  • Jr. Member
  • **
  • Posts: 68
Preparing my Stack for Android and Blockchain
« on: October 28, 2021, 10:35:19 pm »
Hello,

I want to make a client program for mobile phones.

I want to start with android as the target OS,
and maybe later when program catches on I want to have it run
on Windows and IOS also.

The clients have to communicate with a server program which I want to run on a windows 7 for now, since that is what I have running on my laptop. But later on it will have to run on Windows server 2019, and when it really catches on it will have to run on Linux or FreeBSD.

On the server I will have to run a PostgreSQL database.

The server will have tot create smartcontracts with the clients,
for this I wish to create a blockchain with Hyperledger Sawtooth.
I want to program this blockchain using DAML (and maybe I will also need to make use of Rosetta ?).

These contract must result in real payments between clients and server.
For this I would like to use Ethereum (and maybe bitcoin).

And as you can guess, I would like to work as much as possible using FreePascal (unless you all advise me it's better to use another language).

I have Freepascal, Lazarus, MS Visual Code and Android Studio installed on my laptop. I also have JRE 8.0.3110.11 (32- and 64-bit) and Gradle 7.2 installed. All of them installed using the free version of Chocolatey (standard install using the GUI).

Can you guys tell me please what for me would be the best way to go forward in preparing my laptop for this project (especially preparing Lazarus for Android)?

(I tried to read up on this in the forum and on the Wiki. But It only confuses me.)

Off course well explained Ideas on changing or improving the stack for this project are always welcome.

But mostly I need step by step plan for installing the needed stack in the best way!

Thanks in  advance. 

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Preparing my Stack for Android and Blockchain
« Reply #1 on: October 28, 2021, 11:51:21 pm »
I would suggest LAMW:
https://github.com/jmpessoa/lazandroidmodulewizard

Read its LAMW_Getting_Started.txt

Webdrifter

  • Jr. Member
  • **
  • Posts: 68
Re: Preparing my Stack for Android and Blockchain
« Reply #2 on: October 29, 2021, 11:07:51 pm »
As said i had already installed:

.   Freepascal 3.0.4
.   Lazarus 2.0.12
.   MS Visual Code 1.61.2
.   Android Studio 2020.3.25
.   JRE 8.0.3110.11 (32- and 64-bit)
.   Gradle 7.2

I have now also installed (using Chocolatey):

.   Android SDK 26.1.1
.   Android NDK 21.5
.   Ant 1.10.12
.   NVM 1.1.5

https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/LAMW_Getting_Started.txt

Next speaks of 4 options:

.Option 1) Laz4Android
.Option 2) Fpcupdeluxe
.Option 3) LAMW Manager
.Option 4) Lazarus + FPC 3.2.0

Which should I choose (Considering my previously mentioned wishes and actions)?

Or should I first do something else?







jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Preparing my Stack for Android and Blockchain
« Reply #3 on: October 30, 2021, 12:49:54 am »

Quote
Which should I choose ...

Any,  but:

 "LAMW Manager" will do a COMPLETE Laz4Android for you!
installing all necessary dependencies (JDK, SDK, GRADLE, ANT,  LAMW....!



Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Webdrifter

  • Jr. Member
  • **
  • Posts: 68
Re: Preparing my Stack for Android and Blockchain
« Reply #4 on: October 30, 2021, 02:16:25 pm »

Quote
Which should I choose ...

Any,  but:

 "LAMW Manager" will do a COMPLETE Laz4Android for you!
installing all necessary dependencies (JDK, SDK, GRADLE, ANT,  LAMW....!

OK but as said above, I have most of that already installed through Chocolatey, and I wish to do that as much as possible.
Because this helps me to keep everything up to date more easily.

So from that point off view, what would be best next steps to take?


jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Preparing my Stack for Android and Blockchain
« Reply #5 on: October 30, 2021, 08:28:41 pm »
The easiest "Option 1" : Laz4Android   (but only Android 32 bits  ....)

What about "Option 4"? (here you have full control over what you are doing! )

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Webdrifter

  • Jr. Member
  • **
  • Posts: 68
Re: Preparing my Stack for Android and Blockchain
« Reply #6 on: October 31, 2021, 03:27:59 pm »
Off course i want to support 64bit.
So option 4 seems great however in that case I will need at least FPC 3.2.0.
And as said above Chocolatey until now only has 3.0.4 in its package.

It is impossible to reach the maintainer of this package.
So I have asked the Chocolatey team to adopt the package and make
version 3.2.2 available. However they have not responded yet.

Maybe some hotshot within the FP community could use their leverage,
or maybe somebody within the FP community could take it upon himself to maintain this Chocolatey package?

(Sorry, I want to put all my time in the project mentioned above. And for now I would not even know how to maintain such a package).

Would it for now be a solution to install FP 3.2.0? Would that not mess up the possibility to easily update in the future once Chocolatey supports a newer version?




« Last Edit: October 31, 2021, 03:29:46 pm by Webdrifter »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Preparing my Stack for Android and Blockchain
« Reply #7 on: October 31, 2021, 06:02:22 pm »
Quote
So option 4 seems great however in that case I will need at least FPC 3.2.0......

Yes!  But NOW Lazarus 2.2  (canonical) comes ready with FPC 3.2.0!

So, you can try   "Option 4"  from here:

    "After install the LAMW packages [section II] go to:"
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Webdrifter

  • Jr. Member
  • **
  • Posts: 68
Re: Preparing my Stack for Android and Blockchain
« Reply #8 on: October 31, 2021, 08:11:20 pm »
Sorry, I don't do release candidates, only final releases.

And as said above I already have Lazarus 2.0.12 installed.
I see that this comes with FPC 3.2.0, so that should be enough. Or not?

Which leaves me with the question: Do I need to keep Freepascal 3.0.4 installed next to Lazarus (as I have it right now) or is this redundant?

Webdrifter

  • Jr. Member
  • **
  • Posts: 68
Re: Preparing my Stack for Android and Blockchain
« Reply #9 on: October 31, 2021, 08:45:42 pm »
And how does this work:

II. LAMW: Lazarus Android Module Wizard
   .ref. https://github.com/jmpessoa/lazandroidmodulewizard/archive/master.zip
   
   .Packages Installations order.

      tfpandroidbridge_pack.lpk   [..../android_bridges]
      lazandroidwizardpack.lpk   [..../android_wizard]
      amw_ide_tools.lpk      [..../ide_tools]

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Preparing my Stack for Android and Blockchain
« Reply #10 on: November 01, 2021, 05:59:21 am »

Quote
I see that this comes with FPC 3.2.0, so that should be enough.

Yes!

Quote
Do I need to keep Freepascal 3.0.4 installed next to Lazarus (as I have it right now) or is this redundant?

Yes, it is  redundant!

Quote
And how does this work:

Unzip it!  And do the packages Installations in that order :

      tfpandroidbridge_pack.lpk   [..../android_bridges]
      lazandroidwizardpack.lpk   [..../android_wizard]
      amw_ide_tools.lpk      [..../ide_tools]

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Webdrifter

  • Jr. Member
  • **
  • Posts: 68
Re: Preparing my Stack for Android and Blockchain
« Reply #11 on: November 01, 2021, 10:59:49 pm »
Thanks but how do I install those packages the proper way?

I started this thread in the beginners section. This had a reason.  ;)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Preparing my Stack for Android and Blockchain
« Reply #12 on: November 02, 2021, 06:52:16 pm »
Go to Lazarus menu:  "Package"  --> "Open Package File (*.lpk)"

and follow the pictures...   (repeat for all packages)
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Webdrifter

  • Jr. Member
  • **
  • Posts: 68
Re: Preparing my Stack for Android and Blockchain
« Reply #13 on: November 03, 2021, 12:15:32 am »
When I try to compile, I get the next error:


jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Preparing my Stack for Android and Blockchain
« Reply #14 on: November 03, 2021, 09:42:22 pm »

My test is OK (compile and install) !

What about put your LAMW folder in "C:\lazarus2012\components"   folder?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018