Recent

Author Topic: LiteZarus 1.0 +Laz4Android  (Read 16074 times)

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
LiteZarus 1.0 +Laz4Android
« on: May 30, 2014, 07:17:42 pm »
Hi!

I am glad to announce release 1.0 of LiteZarus (after getting good feedback from Lazarus team).
Now, you can get LiteZarus feature within Lazarus since Lazarus rev 45216,45217.

Another good news:
I have rewrite the LiteZarus work, this one is based on Laz4Android v1.1 rev42641.
It requires old fpc 2.7.1 (which is available in L4A download) to play with.

AFAIK,
It is also possible to upgrade to Lazarus 1.2.2, except the fact that Lazarus v1.2.2 requires newer fpc 2.7.1 (which is in fpc trunk);
Unfortunatelly, I failed to compile fpc trunk, so we lack to have L4A based 1.2.2

So, my question is:
1. How to resolve compiling fpc 2.7.1 with error : You need GNU utils. ?  >:D
2. How to build android-arm fpc compiler?

I have all fpc binaries compiled, but the error occurred while compiling Lazarus with fpc 2.7.1 trunk.
---------------------
PS:
LiteZarus for L4A download: https://github.com/x2nie/LiteZarus/releases

Thanks you!
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: LiteZarus 1.0 +Laz4Android
« Reply #1 on: May 30, 2014, 07:49:58 pm »
Thank you!

I will try some experiments with  "Android Module Wizard" !

Note: there is some change to  "propedits.pp"  [...\ideintf\ ]  ? because all my  attempts to fix Laz4Android with your "replacements" failed there!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: LiteZarus 1.0 +Laz4Android
« Reply #2 on: May 30, 2014, 08:12:12 pm »
Note: there is some change to  "propedits.pp"  [...\ideintf\ ]  ? because all my  attempts to fix Laz4Android with your "replacements" failed there!

Yes, I found it fails too. That is why I create another new branch based on Laz4Android (Lazarus 1.1).
Beside it is a bit outdated (now is Lazarus 1.3 trunk / 1.2.2 production) after a year ago, so...
if you found bug please point an issue to my repository https://github.com/x2nie/LiteZarus/issues
if you want to contribute / track development, the link is https://github.com/x2nie/LiteZarus/tree/laz4android

I feel better if you fork me in github, but I dont want to intimidate you to do so.  8-)
Just let me know if we could make it better. O:-)
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: LiteZarus 1.0 +Laz4Android
« Reply #3 on: May 31, 2014, 01:49:05 am »
Ok. I Got my LiteZarus4A !

My Way:

1. Copy  C:\laz4android\fpc to new C:\LiteZarus4A\fpc
2. Copy C:\laz4android\mingw to new C:\LiteZarus4A\fpc
3. Configure "build.bat" : SET FPC_BIN_PATH=C:\LiteZarus4A\fpc\2.7.1
4. Execute "build.bat"
5. install "notlcldesigner.lpk" from C:\LiteZarus4A\examples\designnonlcl
6. Load "NonLCL1.lpi" from C:\LiteZarus4A\examples\designnonlcl\project

7.Edit "NonLCL1.lpr"

Code: [Select]
begin
  writeln('Hello LiteZarus For Android World!');
  readln;
end.   

8. Run -> Build

NonLCL1.lpr(16,1) Error: Can't open resource file "C:\LiteZarus4A\examples\designnonlcl\project\NonLCL1.rc"

9. Edit  "NonLCL1.lpr"

Comment this line:

//{$IFDEF WINDOWS}{$R NonLCL1.rc}{$ENDIF}

10. Edit "Unit1.pas"

change:

//{$I unit1.lrs}  to
{$R unit1.lfm}   

11. Build -> Run

Thank you!





« Last Edit: May 31, 2014, 01:52:47 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: LiteZarus 1.0 +Laz4Android
« Reply #4 on: May 31, 2014, 02:20:12 am »
Quote
Ok. I Got my LiteZarus4A !

Awesome.
Where does the Linux solution stand? Noticed it seems windows only so far. Also, will this fpc/laz installation install 'portably' and get along with my normal install?

Thanks and congrats!


jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: LiteZarus 1.0 +Laz4Android
« Reply #5 on: May 31, 2014, 03:39:47 am »
Hi CaptBill,

1. LiteZarus is for Linux too!

2.LiteZarus for Android is a  modified version of Laz4Android  (the @TrueTom cross compile solution from windows to Arm-Android using FPC 2.7.1). Yes, just Windows.

Thank you!

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

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: LiteZarus 1.0 +Laz4Android
« Reply #6 on: June 08, 2014, 07:06:48 pm »
Hi x2nie!

"Android Module Wirzard" for "LIteZarus4A" is is on the way!

Here is a preview of the new form designer  [Attachments]

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

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: LiteZarus 1.0 +Laz4Android
« Reply #7 on: June 08, 2014, 10:45:30 pm »
That's great, Jmpessoa.

picstart

  • Full Member
  • ***
  • Posts: 236
Re: LiteZarus 1.0 +Laz4Android
« Reply #8 on: June 09, 2014, 01:59:46 pm »
This is really good news

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: LiteZarus 1.0 +Laz4Android
« Reply #9 on: June 09, 2014, 02:24:36 pm »

by x2nie  ;D
Code: [Select]
.. .Now, you can get LiteZarus feature within Lazarus since Lazarus rev 45216,45217 ...
So I think the trial "Android Wizard" for LiteZarus  that I am developing will be for all Lazarus!

Here is a "update" preview of the new form designer  [Attachments]

Thanks to All!


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

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: LiteZarus 1.0 +Laz4Android
« Reply #10 on: June 10, 2014, 01:11:36 pm »

by x2nie  ;D
Code: [Select]
.. .Now, you can get LiteZarus feature within Lazarus since Lazarus rev 45216,45217 ...
So I think the trial "Android Wizard" for LiteZarus  that I am developing will be for all Lazarus!


I think there was a misunderstanding (because of we are in progress of development).
The LiteZarus's first goal was to improve the non-LCL designer. above revisions is for general non-LCL designer, using fpc 2.6.4
Next, for Android purpose, LiteZarus require fpc 2.7.1, and I failed to have a proper fpc 2.7.1.


if you download fpc 2.7.1 from trunk(freepascal svn), and successful compile them, so Yes: you have single LiteZarus for both general non-LCL & Android purpose.
If you download fpc 2.7.1 from Laz4Android distro, you only able to play with LiteZarus-v1.0.4A (which has different code than LiteZarus v1.0)


I repeat: I failed to compile fpc 2.7.1, so currently we ended up with 2 separated LiteZarus, because each one only accept one specific fpc.
* LiteZarus 1.0.4A ==> fpc 2.7.1 from laz4Android website (recomended)
* LiteZarus 1.0 ==> fpc 2.6.4 (recomended)
* LiteZarus 1.0 ==> fpc 2.7.1 from latest trunk, you need to build the fpc code (I failed here).  :-X
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: LiteZarus 1.0 +Laz4Android
« Reply #11 on: June 10, 2014, 03:02:52 pm »
 Yes, that is ok!

Thank you!

Note: there is a new compilation: laz4android1.3-43585-FPC2.7.1 

http://sourceforge.net/projects/laz4android/files/?source=navbar

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

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: LiteZarus 1.0 +Laz4Android
« Reply #12 on: June 10, 2014, 05:19:29 pm »
Nice.


Anyway, I curious of how you paint your widget. I see there were some different colors used by different widget classes.  8-)


I provide new non-LCL widgetset in LiteZarus named "carpet".
Currently, it only has panel (TCarpet), and label (TCarpetLabel).
The new LiteZarus trick is my new TCarpetCanvas class, which allow individual widget to introduce / to implement individual Paint method, so we can focus on how each widget will be rendered; rather than hard-coded render function in DesignerMediator.
The trick is TCarpetCanvas has different implementation between runtime and designtime.
In designtime, TCarpetCanvas will use LCL TCanvas (graphics.pas) to render each widget into LCL form.
in runtime, it possible to use different implementation of how widget will be rendered (currently no drawing in runtime because we use it as TDataModule).


Currently, in runtime the Carpet widgetset wouldn't require Graphics.pas, so we can use Carpet form as known as TDataModule. But in designtime, Carpet widgetset will decorate your TDataModule with coloured panel/groupbox, label, and possibly image/icon (in progress).


Maybe, if you are rendering your Android widgetset by yourself (custom drawn), you might take a look Carpet codes and got the idea.
--------------------


I plan to continue explore usability of non-LCL designer using this new widgetset.
Possibly, I will introduce TCarpetImage, TCarpetImageList and so on. All widgetset wouldn't depend on Graphics.pas and LCL when in runtime.

My secondary goal of developing Carpet widgetset is seeking bug on non-LCL designer of LiteZarus/Lazarus.


bugfixed :
* (copy) paste non-LCL GUI component.
* location of pasted non-LCL GUI component.
known bug:
* move multiple selection of non-LCL GUI component
* move multiple selection of iconic component within DesignMediator


Thanks you a lot of your sharing idea!


---------
edit:
Carpet widgetset repository:
 https://github.com/x2nie/LiteZarus/tree/litezarus/examples/carpet_datamodule
« Last Edit: June 10, 2014, 05:29:30 pm by x2nie »
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

picstart

  • Full Member
  • ***
  • Posts: 236
Re: LiteZarus 1.0 +Laz4Android
« Reply #13 on: June 10, 2014, 07:11:53 pm »
IDE does run and will run a hello world but it won't rebuild

I'm not able to rebuild the IDE with the downloaded 1.3 IDE above by impressa
.....the fpc.exe file is in the directory C:/Program Files (x86)/laz4android/fpc/2.7.1/bin/i386-win32
fpc.exe 12/24/2013 8:50PM 95kb
but it errors
Makefile:134: *** Compiler C:/Program Files (x86)/laz4android/fpc/2.7.1/bin/i386-win32/fpc.exe not found.  Stop.


jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: LiteZarus 1.0 +Laz4Android
« Reply #14 on: June 10, 2014, 07:55:16 pm »
@x2nie:

Yes, the "dummies" widgets are hard coded in  DesignerMediator at designer time... ""Android Module Wizard" do not use  none "custom draw"  widgets, just native android widgets.

@picstart:

1. I got the (*.7z)

http://sourceforge.net/projects/laz4android/files/laz4android1.3-43585-FPC2.7.1-New.7z/download

2. Then I extracted it to C:\laz4android13

3. I edited "build.bat" as:

   SET FPC_BIN_PATH=C:\laz4android13

4. Execute "build.bat"
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018