Freepascal inclusive LCL for MorphOS
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 345 from 2014/6/11
    From: Germany
    Quote:

    amigadave wrote:
    Quote:

    asrael22 wrote:
    Getting there:
    Cubic_Pascal_Highlighting.png



    I'm going to be busy working with Hollywood, probably all of this year, so I don't think I will attempt to add Pascal to my programming languages studies, but I did purchase CubicIDE a few years ago, so if/when I do decide I want to learn Pascal, I would like to use your pascal highlighter, if you would allow it to be downloaded by other programmers.


    Certainly.
    I'd still like to work a bit on the toolbars. There is only one button for compiling the source. And FreePascal is pretty intelligent, so when you give it the main source file to compile it will automatically compile all dependent units.
    But there is no button to run the compiled program.

    And then, some of this config is in the CubicIDE registry, not certain how to extract that and make it available separately, as a real plugin.

    [ Edited by asrael22 03.03.2018 - 06:44 ]
  • »03.03.18 - 06:43
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Chain-Q
    Posts: 332 from 2003/10/12
    From: 1 AU, EU, DE/HU
    @asrael22:

    As linked from the MorphOS FPC wiki page, there was a Pascal syntax highlight addon for GoldEd, which was later extended to CubicIDE.

    It's still available from here.

    Not sure how complete or useful is it though in practice, I only used it briefly, very long ago. Maybe there's still something to add from it to your work.
    [.PegasosII/G4.:.Efika.:.Amiga2000/060.]
    [.Free Pascal Compiler MorphOS Port.]
    [.Hosting AmigaSpirit.hu.]
  • »03.03.18 - 11:19
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 345 from 2014/6/11
    From: Germany
    Yeah, thanks. I believe I've tried it.
    Let me check again.
    In any case, I don't know why a custom compiled parser would be necessary. That only adds dependencies.
  • »03.03.18 - 19:37
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 345 from 2014/6/11
    From: Germany
    Quote:

    asrael22 wrote:
    Yeah, thanks. I believe I've tried it.
    Let me check again.
    In any case, I don't know why a custom compiled parser would be necessary. That only adds dependencies.


    Yeah, it is not fully compatible with the latest version of CubicIDE.
    I see requesters for version mismatch and other quirks.
    It does parse a few more things than the standard parser would be able to parse, i.e. the assignment ":=" and other things.
    But I can live without it.
  • »03.03.18 - 19:56
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 345 from 2014/6/11
    From: Germany
    Extended the ARexx wrapper for "Compile", "Compile&Run" and only "Run" commands.
    This can now be executed from Cubic IDE toolbar.

    Now I have little excuse anymore to not start doing something in FreePascal.

    CubicIDE_pascal_2.png
  • »04.03.18 - 18:23
    Profile
  • Butterfly
    Butterfly
    Posts: 95 from 2015/3/31
    @asrael:

    nice, do you mind to share your config or so. I would like to try as well, On classic I still search for a good editor with highlighting and compilation possibility for FPC.

    do you have any plans in FPC? something special you need support with?

    Have fun! :-D
  • »05.03.18 - 20:05
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 345 from 2014/6/11
    From: Germany
    Yep, I'll do that.
    Want to try it on my classic first and then I'll put together a package.

    I'd like to program a number of things. From some utility programs for my house automation to some classic games.
    Now I just need the motivation and time.
  • »06.03.18 - 06:26
    Profile
  • MorphOS Developer
    Nadir
    Posts: 130 from 2003/3/17
    Very cool stuff and the concept looks flexible enough to maybe even be useful for real projects (although that will be a challenge).

    Any chance to keep the design flexible enough so that code generators for other languages than Pascal can be added later on, either by you or someone else? Or would you be opposed to this? ;-)
  • »07.03.18 - 22:47
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    polluks
    Posts: 369 from 2007/10/23
    From: Gelsenkirchen,...
    Quote:

    ALB42 schrieb:
    The source for MoGit is now on Github https://github.com/alb42/MoGit

    I used already MoGit to add the files ;-). Also the MorphOS git client works nicely. My first real world use of it.

    Well, I could not compile the source because the icon unit is missing
    Code:
    > make
    FreePascal:bin/powerpc-morphos/fpc -FUunits/powerpc-morphos -Fuunits/powerpc-morphos -Tmorphos -Ppowerpc src/MUIClass.Area.pas
    Free Pascal Compiler version 3.1.1 [2016/03/06] for powerpc
    Copyright (c) 1993-2015 by Florian Klaempfl and others
    Target OS: MorphOS
    Compiling src/MUIClass.Area.pas
    MUIClass.Area.pas(7,50) Fatal: Can't find unit icon used by MUIClass.Area
    Fatal: Compilation aborted
    Error: Work:Developing/pp/bin/powerpc-morphos/ppcppc returned an error exitcode
    make: *** [units/powerpc-morphos/MUIClass.Area.o] Error 1

    Code:
    > fpc amunits/src/coreunits/icon.pas
    Free Pascal Compiler version 3.1.1 [2016/03/06] for powerpc
    Copyright (c) 1993-2015 by Florian Klaempfl and others
    Target OS: MorphOS
    Compiling amunits/src/coreunits/icon.pas
    Compiling amunits/src/coreunits/exec.pas
    exec.pas(1178,66) Error: Identifier not found "_ExecBase"
    exec.pas(1178,76) Error: 32 Bit-Integer or pointer variable expected
    exec.pas(1179,62) Error: Identifier not found "_ExecBase"
    exec.pas(1179,72) Error: 32 Bit-Integer or pointer variable expected
    [...]
    Pegasos II G4: MorphOS 3.9, Zalman M220W
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.10
  • »07.03.18 - 23:35
    Profile
  • Butterfly
    Butterfly
    Posts: 95 from 2015/3/31
    @Nadir:

    of course you (or anybody else ;-) ) can do everything you want with the Source, it's on github and unter CC0 (or unlicence as GitHub calls that, I like to call it "Do what the fuck you want Licence")

    https://github.com/alb42/MUIClass (The IDE is in ide/ folder)
    But (there is always a but isn't it) I don't believe an other Code Generator is possible because the Magic here is not in the IDE, the IDE is stupid, it doesn't know much about MUI objects and it's fields/methods. The "Magic" is in the MUIClass implementation which capsulate every MUI BOOPSI object into a real Pascal class, in principle you could write the same in C++ as well I guess.

    The idea is that you can use them like any other class/object.

    So instead of:
    Code:
    get(ListviewObj, MUIA_ListView_List, @ListObj);
    get(ListObj, MUIA_List_Active, @Idx);
    set(ListObj, MUIA_List_Active, NewIdx);


    you can write
    Code:
    Idx := ListViewObj.List.Active;
    ListViewObj.List.Active := NIdx;


    or for Methods:
    Code:
    DoMethod(ListObj, [MUIM_List_InsertSingle ,NewText, MUIV_List_Insert_Bottom]);

    you write
    Code:
    ListObj.InsertSingle(NewText, MUIV_List_Insert_Bottom);


    And so on and so on.
    The IDE uses RTTI to inspect which properties to show them in the property list so it does not know how the parameter in MUI (MUIA_xxx) looks like it doesn't even know the property names/types before it inspects the class, and you could give a completely new class to it without changing code.
    In the IDE there is for every new Type just a single line added (RegisterMUIClass) but before the wrapper must be written of course.
    So if you want to use that for a different language you have to write such wrapper first, of course it would be possible for C++ or so, but as long nobody did until now I guess it's not strongly demanded ;)

    @pollux:
    ehhmm look to the date of your fpc compiler ;-)
    it's 2 years old! did you think I sit on my hands for two years ;-) I implemented the icon.library wrapper already long time before.
    For MUIClass and the programs using it (MoGit/IDE) the latest 3.1.1 snapshot is needed. Download it here:

    http://build.alb42.de/fpcreleases/

    for you of course only the fpc powerpc-morphos would be interesting:

    http://build.alb42.de/fpcreleases/fpc-release.powerpc-morphos.lha

    The IDE and so on is also compiled every night:
    http://build.alb42.de/MUIClass/
    and there is also the Docomentation for the MUIClasses

    Have fun ;-)
  • »08.03.18 - 07:14
    Profile Visit Website
  • MorphOS Developer
    Nadir
    Posts: 130 from 2003/3/17
    Quote:

    ALB42 wrote:

    And so on and so on.
    The IDE uses RTTI to inspect which properties to show them in the property list so it does not know how the parameter in MUI (MUIA_xxx) looks like it doesn't even know the property names/types before it inspects the class, and you could give a completely new class to it without changing code.
    In the IDE there is for every new Type just a single line added (RegisterMUIClass) but before the wrapper must be written of course.
    So if you want to use that for a different language you have to write such wrapper first, of course it would be possible for C++ or so, but as long nobody did until now I guess it's not strongly demanded ;)




    OK, I see. Anyway, interesting concept. I look forward to follow your future progress and I will give this a try myself sometime.

    By the way, are the MUIClasses statically linked to the binary with FPC on MorphOS? Or do you have something like like a shared library interface?
  • »08.03.18 - 13:23
    Profile