Freepascal inclusive LCL for MorphOS
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Watching the Virtual Lazarus vid..looks bad ass. Downloading the VM player image.

    On the vid, I see you running a VM called PowerMac G5. How are you doing that? Linux RDP into a MorphOS machine? Dude, this looks really bad ass.


    [ Edited by TheMagicM 11.01.2017 - 17:43 ]
  • »12.01.17 - 00:08
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 9047 from 2003/5/22
    From: Germany
    > On the vid, I see you running a VM called PowerMac G5.

    It's not a VM.

    > How are you doing that? Linux RDP into a MorphOS machine?

    From the video comments:
    "MorphOS is a PowerMac G5 via VNC, file access is done via smbfs."
  • »12.01.17 - 00:44
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Quote:

    Andreas_Wolf wrote:
    > On the vid, I see you running a VM called PowerMac G5.

    It's not a VM.

    > How are you doing that? Linux RDP into a MorphOS machine?

    From the video comments:
    "MorphOS is a PowerMac G5 via VNC, file access is done via smbfs."


    Had audio turned off. AAHH yea.. VNC...meant vnc not RDP.

    Either way.. damn, this is just bad ass. Develop on Linux and cross compile. Now this is a nice GUI + app builder.

    KUDOS ALB42!!

    [ Edited by TheMagicM 12.01.2017 - 07:23 ]
  • »12.01.17 - 14:21
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 9047 from 2003/5/22
    From: Germany
    >> From the video comments: [...]

    > Had audio turned off.

    Written comments below the video, not audio comments :-)
  • »12.01.17 - 15:00
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Quote:

    Andreas_Wolf wrote:
    >> From the video comments: [...]

    > Had audio turned off.

    Written comments below the video, not audio comments :-)


    HA! You got me! lmao

    Back to fpc and Lazarus. I think that this is what has been missing in terms of development. I havent tested what I can / cant do with this (obviously, just downloaded this). But if this makes building apps easier, this is whats been missing for a while. By missing I mean, AmigaBASIC came with the Amiga. This should be the default for MorphOS. Yes I know, gcc is avail and yes, MorphOS Dev Team has a bad ass SDK which I also have installed...but this all-in-one builder is very slick.

    I'm downloading the latest Lazarus and fpc for my Debian box, then I'll import the cross compiling stuff to see if it works with this. If so, I dont need his VM and can play with this at work.

    [ Edited by TheMagicM 12.01.2017 - 11:15 ]
  • »12.01.17 - 18:10
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 74 from 2015/3/31
    @TheMagicM:

    Quote:

    the Virtual Lazarus vid..looks bad ass.


    I agree :-P

    Sadly the latest Lazarus for Debian does not contain the neeed MUI Widget set for the Amiga Systems.
    I'm working on this Task First part ist done, waiting for the next part to be accepted.

    First you need the latest Freepascal Compiler for it (3.1.1), of course the linux binutils for MorphOS, the freepascal crosscompiler for MorphOS my current Lazarus source archive from github and have to compile everything.
    At first I wanted to publish a Lazarus for linux as ".deb" with crosscompiler.. but it went to difficult. Even to write a manual is much to complicated, especially because some of the binutils are no easy to compile (not the case for MOS, but m68k and even worse AOS4).
    So in the end I published it as virtual machine the other ways would be too difficult for the average user. Just too many things you have to worry about and remember, handle diffierent instances of FPC for compiling and cross compiling, just not easy.
    Thats also the reason I did not publish an "Updater" for the Virtual machine, which automatically updates the FPC and Lazarus because it just fail very often and even destroy the current lazarus in 2/5 cases. So would be more trouble than useful.
  • »12.01.17 - 18:25
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Quote:

    ALB42 wrote:
    @TheMagicM:

    Quote:

    the Virtual Lazarus vid..looks bad ass.


    I agree :-P

    Sadly the latest Lazarus for Debian does not contain the neeed MUI Widget set for the Amiga Systems.
    I'm working on this Task First part ist done, waiting for the next part to be accepted.

    First you need the latest Freepascal Compiler for it (3.1.1), of course the linux binutils for MorphOS, the freepascal crosscompiler for MorphOS my current Lazarus source archive from github and have to compile everything.
    At first I wanted to publish a Lazarus for linux as ".deb" with crosscompiler.. but it went to difficult. Even to write a manual is much to complicated, especially because some of the binutils are no easy to compile (not the case for MOS, but m68k and even worse AOS4).
    So in the end I published it as virtual machine the other ways would be too difficult for the average user. Just too many things you have to worry about and remember, handle diffierent instances of FPC for compiling and cross compiling, just not easy.
    Thats also the reason I did not publish an "Updater" for the Virtual machine, which automatically updates the FPC and Lazarus because it just fail very often and even destroy the current lazarus in 2/5 cases. So would be more trouble than useful.


    So its not really easy to setup Debian to be able to cross compile for MorphOS. Damn.. thats ok. A VM will have to do, I'll just copy it to my laptop.
  • »12.01.17 - 21:23
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    I was messing around and just threw together a screen with a button. Lame I know. Compiled it, ran it on my G5. Yea..this is cool as hell. Time to experiment.
  • »13.01.17 - 01:17
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Ok, i've been messing around with examples off the web. From simple stuff like a calculator (stuff I know how to write), then an example of a bouncing ball. Unedited. Loaded in ALB42's VM, compiled and ran under MorphOS. Works perfect. If there are people on the wall about programming and dont want to spend money on a off the shelf language, then this is for you.

    Pascal isnt difficult to learn. I took a class in high school. Used Delphi a little about 10 years ago and its coming back. I'm really interested to see if I can throw something together to read a sqlite db, bring back data etc. I know I can... time to play some more.
  • »13.01.17 - 02:20
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Synergy comes in handy but I get frequent disconnects :-/

    This works very very well. Code, compile on VM, run on MorphOS. How do we get the GUI we design to look more "MorphOS" like (fonts etc)?

    When I build a default form and add buttons, box etc, buttons are not WYSIWYG. I'm assuming thats just how it'll be. I'll have to manually move stuff to make it fit in the window and not get cut off, etc?

    Do I just keep replying to this thread if I have questions?


    Are Grids not working on the MorphOS side?

    [ Edited by TheMagicM 14.01.2017 - 22:55 ]
  • »15.01.17 - 05:05
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 74 from 2015/3/31
    Quote:


    Synergy comes in handy but I get frequent disconnects :-/



    :-O Synergy works? I never tried that. Disconnects? hmm some timing issue maybe, what exactly do you try? Do you have an example code?

    Quote:


    How do we get the GUI we design to look more "MorphOS" like (fonts etc)?

    When I build a default form and add buttons, box etc, buttons are not WYSIWYG. I'm assuming thats just how it'll be. I'll have to manually move stuff to make it fit in the window and not get cut off, etc?



    yeah thats a real problem, I did already much fixes for it, but the basic problem stays. The positioning philosophy on MUI and LCL are so much different (and I have some problem to understand the MUI side :-P, e.g. why a Button has a maximum height which is the same as the minimum height) And the user have much influence on the sizes by choosing different fonts and theming.
    I experimented a lot with it, especially for Mapparium (Prefs menu) but never got a very satisfying solution for it. It would be something need again much thinking and work when changing the behavior again.
    (especially because here MUI and Zune are so much different, Zune is much easier to handle, in topic of LCL implementation). I had some experience with Aligned elements (alTop, alLeft,....) inside Panels.

    Quote:


    Do I just keep replying to this thread if I have questions?



    fine by me for now. if too much we could make a own, but I guess not too noisy :-P and you do not feel disturbed by my official announcements from time to time :-P

    Quote:


    Are Grids not working on the MorphOS side?

    What grid you are talking about? TStringGrid for example or TValueGrid are working fine (used in Mapparium Statistics window for example) TDrawGrid also should work (I have a game here using it)
  • »16.01.17 - 16:51
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Quote:

    ALB42 wrote:
    :-O Synergy works? I never tried that. Disconnects? hmm some timing issue maybe, what exactly do you try? Do you have an example code?



    No..its just a comment.

    Quote:


    yeah thats a real problem, I did already much fixes for it, but the basic problem stays. The positioning philosophy on MUI and LCL are so much different (and I have some problem to understand the MUI side :-P, e.g. why a Button has a maximum height which is the same as the minimum height) And the user have much influence on the sizes by choosing different fonts and theming.
    I experimented a lot with it, especially for Mapparium (Prefs menu) but never got a very satisfying solution for it. It would be something need again much thinking and work when changing the behavior again.
    (especially because here MUI and Zune are so much different, Zune is much easier to handle, in topic of LCL implementation). I had some experience with Aligned elements (alTop, alLeft,....) inside Panels.



    I'll play around with it.

    Quote:


    Are Grids not working on the MorphOS side?
    What grid you are talking about? TStringGrid for example or TValueGrid are working fine (used in Mapparium Statistics window for example) TDrawGrid also should work (I have a game here using it)



    Mapparium is written in FPC, huh?

    Hmm..maybe I did something wrong (I believe its TDrawGrid). I basically put a Form with 2 buttons and a TDrawGrid but the TDrawGrid wasnt there after compiling and running on MorphOS. What I'm trying to accomplish is access a sqlite db and be able to search for results, then display them in a "text box" or something like that. It will have a few columns and rows with the ability to scroll....etc.


    [ Edited by TheMagicM 17.01.2017 - 07:00 ]
  • »17.01.17 - 13:56
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 74 from 2015/3/31
    Quote:


    Quote:


    Are Grids not working on the MorphOS side?
    What grid you are talking about? TStringGrid for example or TValueGrid are working fine (used in Mapparium Statistics window for example) TDrawGrid also should work (I have a game here using it)



    Mapparium is written in FPC, huh?



    Of course its 100% pure Lazarus Freepascal (also works for Windows/Linux/MacOSX) nearly no platform dependent code inside. (just go back 1-2 pages in this thread) I use it to study image handling and networking find bugs in LCL and to inspire people to use Lazarus/LCL/FreePascal for Amiga.

    Quote:


    Hmm..maybe I did something wrong (I believe its TDrawGrid). I basically put a Form with 2 buttons and a TDrawGrid but the TDrawGrid wasnt there after compiling and running on MorphOS. What I'm trying to accomplish is access a sqlite db and be able to search for results, then display them in a "text box" or something like that. It will have a few columns and rows with the ability to scroll....etc.



    hmm a Drawgrid do nothing without drawing event for the cells (like a PaintBox)
    I guess what you want is a TStringGrid.
    An Example code from
    https://github.com/alb42/fpc-tests/tree/master/lcl/StringGrid
    should look like this
    https://blog.alb42.de/2015/04/24/a-tree-on-the-backyard/
    hmm sqlite, possible but maybe a little bit difficult because you have to use the morphos sqlite.library for that. I think I wrote a unit to use the sqlite.library at morphos with a small test program. I check that.
  • »17.01.17 - 14:47
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Quote:

    ALB42 wrote:

    Of course its 100% pure Lazarus Freepascal (also works for Windows/Linux/MacOSX) nearly no platform dependent code inside. (just go back 1-2 pages in this thread) I use it to study image handling and networking find bugs in LCL and to inspire people to use Lazarus/LCL/FreePascal for Amiga.



    Its impressive, especially with no platform dependent code.

    Quote:


    hmm a Drawgrid do nothing without drawing event for the cells (like a PaintBox)
    I guess what you want is a TStringGrid.
    An Example code from
    https://github.com/alb42/fpc-tests/tree/master/lcl/StringGrid
    should look like this
    https://blog.alb42.de/2015/04/24/a-tree-on-the-backyard/
    hmm sqlite, possible but maybe a little bit difficult because you have to use the morphos sqlite.library for that. I think I wrote a unit to use the sqlite.library at morphos with a small test program. I check that.


    Thanks. I have sample code for sqlite that works under fpc. I"ll look over all of this. thanks!
  • »17.01.17 - 20:06
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Ok, its not a StringGrid that I want. If I retrieve data from a database....lets say I have a catalog of warez I want to keep track of (probably)...

    name.......location............size........type (util/game/etc).......
    PhotoShop../warez/photo/adobe..1GB.........Video
    ..etc

    So I would return multiple rows that have, lets say 4 columns. It'll be fixed columns and unknown rows. Could be more than whats displayed, so I'd need a scroll bar. The StringGrid is more of a spreadsheet which isnt what I'd want.


    [ Edited by TheMagicM 17.01.2017 - 20:23 ]
  • »18.01.17 - 03:13
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 74 from 2015/3/31
    @TheMagicM:

    hmm Tstringgrid does exactly that, hmm it seems it is still buggy. :-(

    btw you can also ask on http://www.amigacoding.de/ there are more Freepascal users around.
  • »01.02.17 - 18:30
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1047 from 2003/6/17
    Will do!
  • »02.02.17 - 13:29
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    ernsteiswuerfel
    Posts: 150 from 2015/6/18
    From: Funeralopolis
    Congrats ALB42! :-D

    [ Editiert durch ernsteiswuerfel 03.05.2017 - 23:31 ]
    PMac G5 11,2. PMac G5 7,3. PBook G4 5,8. PBook G4 5,6. [MorphOS 3.9 / Gentoo Linux / Ubuntu MATE 16.10] 2 x A1200. ACA-1233/55, ACA1232/40, Indivision AGA Mk2, 4 GiB CF. [Amiga OS 3.9]
  • »03.05.17 - 22:30
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    amigadave
    Posts: 2392 from 2006/3/21
    From: Lake Shastina,...
    Quote:

    ALB42 wrote:
    FreePascal is Project of the Month on SourceForge

    https://sourceforge.net/blog/may-2017-community-choice-project-of-the-month-free-pascal-compiler/

    Please note the text:

    cite:
    "The whole Amiga family (AROS, MorphOS, AmigaOS) made a lot of progress recently."

    :-D


    Congratulations ALB42! It is nice for you to get some recognition, for the work you have been doing, which is why I am posting this message. It is great to see developers who still care about MorphOS, and other Amiga-Like OSes, and I always try to support and encourage such programmers, when ever I can.

    I doubt I will use Freepascal for MorphOS, or any Amiga-Like OS, because I have invested into Hollywood, and should stick with that until I have made some more progress in learning the basics, before distracting myself with other programming languages (though I do read a bit about "C"/"C++" for Amiga-Like OSes, or general info for all platforms, occasionally.

    I believe that Hollywood allows embedded code from other languages, so I could probably insert portions of Freepascal code, into any Hollywood programming project, as well as C/C++, or maybe even AmigaE/PortablE code, which I had read a little about, and thought about learning first a while ago.

    Hollywood seems to be the best choice for me to learn right now, after a lot of thinking, reading and wasting my time, trying to decide which programming language to begin with (actually continue with, as I do have some limited experience programming/scripting, from years spent on a proprietary program used at my work years ago).

    I had spent lots of time thinking about learning C/C++ first, because of the huge amount of use, in Amiga legacy/history (as well as the huge amount of C/C++ use on all other platforms) and the great amount of examples and written tutorials and teaching books available, both specifically for the Amiga, and generally for all platforms. I have SAS/C manuals in great condition, as well as a purchased "new package" of Storm/C (version 4 I think) & Mesa, used copies of Aztec/C, & Manx/C (was Aztec & Manx the same thing? Can't remember),"back-in-the-day".

    One of my concerns for years, has been that much Amiga programming talent has left, and continues to leave our community, without any effort being made to transfer their knowledge to new coders, or preserve their knowledge in some kind of written, or visual (video tutorials) documentation, for future programmers to learn from. Since Amiga programming is very different in many ways from programming on any other platform, I think my concerns are valid and a real problem for our community.

    Anyway, sorry for such a long rant in your thread, and congratulations again ALB42.

    [ Edited by amigadave 04.05.2017 - 09:11 ]
    MorphOS - The best Next Gen Amiga choice.
  • »04.05.17 - 16:56
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 9047 from 2003/5/22
    From: Germany
    > was Aztec & Manx the same thing?

    Aztec was a product by Manx.
  • »04.05.17 - 19:54
    Profile
  • Butterfly
    Butterfly
    Posts: 74 from 2015/3/31
    @amigadave:

    I'm not sure what is the intention of your post (beside the advertisement for Hollywood ;-)). If you planed to start a language war, I have to disappoint you. I stay out of such discussion by purpose (same as which is the "better" Amiga-style system). All have pros and cons, I prefer Pascal, other prefer C, basic, brainfuck or whitespace, who cares, if it gets the work done and inspire people to do something with it, fine by me.

    P.S. I doubt Hollywood can use any FreePascal objects/code (except starting a compiled executable), because of the needed FreePascal startup code.
  • »05.05.17 - 08:30
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    OlafSch
    Posts: 160 from 2011/11/16
    Quote:

    ALB42 schrieb:
    @amigadave:

    I'm not sure what is the intention of your post (beside the advertisement for Hollywood ;-)). If you planed to start a language war, I have to disappoint you. I stay out of such discussion by purpose (same as which is the "better" Amiga-style system). All have pros and cons, I prefer Pascal, other prefer C, basic, brainfuck or whitespace, who cares, if it gets the work done and inspire people to do something with it, fine by me.

    P.S. I doubt Hollywood can use any FreePascal objects/code (except starting a compiled executable), because of the needed FreePascal startup code.


    you can execute amiga programs but not embedd code from different languages of course. I am also not aware of any native library support (in opposite to free pascal). It would make not much sense in a cross-platform environment of course
  • »05.05.17 - 10:01
    Profile
  • Butterfly
    Butterfly
    Posts: 74 from 2015/3/31
    writing and compiling of Pascal programs for Amiga systems in a Browser (with Javascript editor, Odyssey is powerful enough to show that) Compilation is even faster than directly on MorphOS
    YouTube Link
  • »16.06.17 - 17:58
    Profile Visit Website