Recent

Author Topic: Forking/Flavouring Free Pascal and Lazarus  (Read 12966 times)

Laksen

  • Hero Member
  • *****
  • Posts: 658
    • J-Software
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #15 on: August 14, 2015, 08:45:57 pm »
No need for extra tools like fpcup.

Now you have my attention!  Both my Windows (ReactOS) and Linux (Debian) small virtual machine examples (http://wiki.freepascal.org/Small_Virtual_Machines) are stuck at getting fpcup (or requirements) to work.

Could Git be used (by a beginner) to help compile an ARM Embedded compiler for Teensy?  I'd like to see how simple it could be done!
Building FPC for embedded from source by hand is very easy on almost any source platform. I never quite understood why you would need a virtual machine for it.

Could you try to express what part of the process is hard to get through? That way the relevant parts of the Wiki could be updated.

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #16 on: August 14, 2015, 11:28:28 pm »
I didn't follow your "small virtual machine" discussions, so I don't really know what problem you are experiencing.

If you are not familiar with Git, please take a look at the Pro Git book - available online, offline HTML, MOBI, ePUB, PDF etc. Like I said, with such good documentation, anybody can learn the basics of git in a few minutes.

Thanks Graeme for the link to the book.  I read some of it today and it does look real nice.


Building FPC for embedded from source by hand is very easy on almost any source platform. I never quite understood why you would need a virtual machine for it.

Could you try to express what part of the process is hard to get through? That way the relevant parts of the Wiki could be updated.

I'm trying to develop stuff for a beginner, not myself.  Is there a wiki page that someone who buys a Teensy can use to start programming it using Free Pascal?

The small virtual machines should serve two purposes:
1) They show how a "standard PC" can be used to run a program.  So if you are having problems running the program on your PC you can see how it works on a different PC.  This mIght also be good for testing (as fpcup seems to need a little more of).
2) If the small VM is easy to download and run then you can simply do that.  The LevinUx stuff at the bottom of the wiki page shows how easy that could be: http://wiki.freepascal.org/Small_Virtual_Machines

For fifteen years I've used the Parallax What's a Microcontroller kit (https://www.parallax.com/product/28152) to introduce beginners to electronics and programming in several hours.  You can read the PDFs here: https://www.parallax.com/downloads/whats-microcontroller-text  How can I do that with Teensy and Free Pascal?  I've done it (no electronics) with Free Pascal using the Hello World downloads (http://turbocontrol.com/helloworld.htm) followed by the Simple Serial downloads (http://turbocontrol.com/simpleserial.htm) and then the Easy fpGUI downloads (http://turbocontrol.com/easyfpgui.htm).

Sorry that I haven't communicated my goals very well (help needed).
Regards,
Paul Breneman
www.ControlPascal.com

lagprogramming

  • Full Member
  • ***
  • Posts: 159
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #17 on: August 15, 2015, 12:38:36 pm »
   I wrote that FCS is a close sourced project, not a commercial product. I also didn't said that involved projects would depend on FCS.
   We know Graeme is a huge fan of Git, but as far as I know Git doesn't really fit the purpose.

   I haven't looked at mseGUI yet but I'm surprised that Graeme tries to mock what I consider a flaw of fpgui. The "--assureconfigurationfile" parameter is just an idea, here comes the history behind it.
1. I've tried to install the latest stable fpgui but I couldn't because fpgui's building script had a "-dRELEASE" parameter or something like that. The presence of this parameter made the script useless, unable to build fpgui on my system. Hmmmmmm...
2. I've removed the parameter and then I've realized that the script is not able to build fpgui using neither a specific fpc compiler executable, neither using a custom saved fpc.cfg. I reffer to the path of these two files. OOO boy...
3. After that, I've noticed that the build script doesn't build fpgui's IDE(Maximus) neither the UIDesigner. This means that the building process requires running different scripts located in different directories. OOO mama...
4. Knowing that Paul Breneman has experience with fpgui I've said OK, I will completely ignore fpgui's building scripts and write new ones within the flavour file, but there was an additional problem. fpgui's IDE doesn't have a setting(macro) for setting the fpc configuration file. This means that even if FCS would build fpgui using a fpc compiler and fpc.cfg files located in a directory that doesn't belong to the PATH environment then the IDE would be useless. Maximus would be useless because it has to build projects using custom located fpc installation and it doesn't have an entry for the fpc's default config file path. Curses...
5. If you don't install fpc in default locations the configuration is important. Building the IDE and immediately storing involved variables is great in this situation. I think it would be great if installing scripts would fill the values by default but they don't. Imagine building the IDE with a fpc(including its config file) located in /home/xxxx/yyyy/NOTINPATH/fpcinstalldir. When the user opens the IDE he has to fill lots of empty values. Lazarus is one step ahead, it uses some default values and tries to verify them, Maximus doesn't do that. Also, if FCS would try to fill those values it can't do that because it doesn't know where the configuration file is stored and if it has usable content. I'm losing temper here...
6. Obviously, after the above nightmare, I'm still unable to build a project using fpgui's IDE.  :-[

   So, here was my proposal to all of you main developers. Can we do something to improve the experience of building/configuring/installing the fpc and the IDEs, or not!? You can improve that without FCS or myself. Do you think I would be glad to write scripts within the flavour for an IDE that I don't use!? It's just that, for different reasons, people wait for others to do something and I don't want to share this attitude. I don't believe in licenses either, reason why we have this discussion here.

lagprogramming

  • Full Member
  • ***
  • Posts: 159
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #18 on: August 15, 2015, 05:05:15 pm »
   I've just looked at mse* and I've probably been in building heaven: a single "fpc parameters" command. Like fpGUI, apparently mseIDE doesn't have a macro for custom saved default fpc.cfg files. I reffer to using default fpc.cfg files when they are not in default paths like home folder, current directory, /etc/,.... Environment variable might be a workaround for this kind of situations. Also, I couldn't build a demo project yet due to an "mseguiintf.pas(27,14) Fatal: Can't find unit xlib used by mseguiintf" error.
   Because mse agreed to involve mseIDE/GUI in this process I'll continue at mse*'s home or privately.

Graeme

  • Hero Member
  • *****
  • Posts: 1430
    • Graeme on the web
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #19 on: August 15, 2015, 07:03:41 pm »
   I wrote that FCS is a close sourced project, not a commercial product.
It's the same thing to me.

Quote
I'm surprised that Graeme tries to mock what I consider a flaw of fpgui.
I don't believe I ever mocked you. Sorry if you felt like that, it definitely wasn't my intention.

Quote
6. Obviously, after the above nightmare, I'm still unable to build a project using fpgui's IDE.  :-[
You are totally exaggerating. The only problem you had was that due to an incorrect -d option in the released v1.4, you couldn't build the other projects included with fpGUI - they framework itself would have built fine, but with not the ideal compiler parameters. The fix was very small, and I told you this was already discovered and fixed in the fixes_1.4 branch.

If you also bothered to read the documentation, you would have know that the build script was only for the framework, and that every other project and demos need to be built individually - steps are clearly documented, even for multiple environments (command prompt, FP Text IDE, Lazarus etc). I guess some developers just don't bother reading documentation (even a small INSTALL readme file) these days. That's not my fault.

As for any other issues with Maximus. As I mentioned, and again it is clearly documented in the README file, Maximus is what I consider and elaborate demo. It is NOT a fully functional IDE, but I welcome others to contribute to make it such. I on occasion extend it too, to make it more useful in a pinch - if no other editor or IDE exists. Maximus also has a nice project build configuration with multiple build modes - I find that useful for release builds of my projects.

And to be clear AGAIN.... I did agree to add the config parameter you requested for FCS, and I did add your other suggestion to my todo list.

Regards,
  Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

lagprogramming

  • Full Member
  • ***
  • Posts: 159
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #20 on: August 15, 2015, 09:20:02 pm »
so using git in order to patch it probably is more appropriate than a commercial patch tool.
Exactly, and the last thing I want is to be dependent on commercial software so I can update open source software - it makes no sense to me. But I'll humour the guy and add the command line parameter to fpGUI's experimental IDE.

ps @lagprogramming:
Now if you used Git, you could have cloned fpGUI, created a branch with the new functionality (a new command line parameter), pushed it to some public server (Github, SF.net etc) and emailed me a pull request. That way I could review the change and update the official repository if the change was good. Just the way open source software collaboration should work. ;-)

   I'm known for disagreing with main developers and I also know your temper. I'm pretty sure that at the moment I don't have resources to waste on adding any application into an automated installation process just to be part of english hummor. I've looked at fpgui first because Paul Breneman's experience is biased to support it.
   Customdrawn is not mature enough to build Lazarus. Fpgui and mseIDE totally ignore default fpc configuration file that lies in custom paths. I've given lots of attention to fpgui and I think it's fair to do the same thing with any pascal written IDE that wants to be involved in this process, especially because it's not clear to me if you want to involve fpgui in this experiment just for fun, or not.

   Request for Teensy support has been done at May 27, 2015 and has been fully implemented within fpc at June 03, 2015. How long will it take for pascal written IDE developers to be able to provide a simple X server IDE that fulfils basic needs for embedded programming in a pleasant to the eye way!?
   Paul Breneman promotes fpgui at his homepage and you acknowledged that at your homepage. Doesn't "Small Virtual Machines" wiki page status scratch your retina a little bit!? I've just read it and now it's in a better shape, probably due to Laksen's intervention.
   What I see is an opportunity to promote fpc and fpc derived IDEs, an opportunity that may be wasted. Martin expressed his agreement so now I'll look into mse*, but this doesn't mean that I have a grudge against fpgui. If you want to involve fpgui in this experiment because you think something good might get out of it, say it out loud and we'll continue on your webnews or in private messages.

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #21 on: August 15, 2015, 11:43:24 pm »
Like fpGUI, apparently mseIDE doesn't have a macro for custom saved default fpc.cfg files.
Custom macros can be added in 'Settings'-'Configure MSEide'-'Global Macros' or 'Project'-'Options'-'Macros' or by the --macrodef command line parameter. The compiler command line is constructed in 'Project'-'Options'-'Make'-'Make Options'. Suggestion:
Make a script in order to call your FPC in your environment and set the COMPILER macro to the script.
BTW I made a FPC fixes_3_0 version of the crossarm development environment:
http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/
A native eabihf FPC fixes_3_0 is here:
http://sourceforge.net/projects/mseide-msegui/files/fpcarm/

Edit:
MSEide git master 2f2ca8aa8642a4b21aa05184f5148013b5bee842 does not automatically quote the make command. Please use COMPILER macro
Code: [Select]
"<your FPC>" -n @<your config file>
in order to start your custom FPC.
« Last Edit: August 17, 2015, 06:52:54 am by mse »

Graeme

  • Hero Member
  • *****
  • Posts: 1430
    • Graeme on the web
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #22 on: August 17, 2015, 09:38:15 am »
Fpgui and mseIDE totally ignore default fpc configuration file that lies in custom paths.
No, maybe you just don't know how to do it, or don't listen to what Martin and I are telling you.

In both Maximus and MSEide you can use macros to change default values that the IDE uses. Also in both IDE's you can specify project compiler options, which get passed directly to the FPC compiler. Simply and "-n @</path/to/your/custom/fpc.cfg>" as one of those compiler options and it should use your custom config file and not the system wide one or the default $HOME/.fpc.cfg - really it is not that hard.  All fpGUI's demos and tools use the exact same compiler parameter syntax. eg:  fpc @extrafpc.cfg <some_project>
That overrides the default parameters or adds new ones. If you really don't want any default fpc.cfg info read, add the -n before the @extrafpc.cfg parameter.

Just listen to what people tell you, and actually pay attention to the options available in the products you are trying to use.

Quote
Doesn't "Small Virtual Machines" wiki page status scratch your retina a little bit!?
I have no idea what that means. Paul is free to do whatever he wants - we have no prior arrangements of any kind. I'm definitely not bother about the community using or not using fpGUI. I developed fpGUI to solve my own problems, and it does that perfectly. If it helps the community... Great, they will be better off. If not, then they are free to choose whatever fulfils their needs, or submit patches to the fpGUI project.

Regards,
  Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

lagprogramming

  • Full Member
  • ***
  • Posts: 159
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #23 on: August 17, 2015, 04:16:20 pm »
In both Maximus and MSEide you can use macros to change default values that the IDE uses. Also in both IDE's you can specify project compiler options, which get passed directly to the FPC compiler. Simply and "-n @</path/to/your/custom/fpc.cfg>" as one of those compiler options and it should use your custom config file and not the system wide one or the default $HOME/.fpc.cfg - really it is not that hard.  All fpGUI's demos and tools use the exact same compiler parameter syntax. eg:  fpc @extrafpc.cfg <some_project>
That overrides the default parameters or adds new ones. If you really don't want any default fpc.cfg info read, add the -n before the @extrafpc.cfg parameter.

   Indeed.
   The configuration window for both Maximus and mseIDE shows a series of macros that need to be filled. Most of them require file/directory paths. Mseide also has a "Path to compiler (ppc386)." hint at the ${COMPILER} macro. I wrongfully considered that the macro value would have to be strict and require a compiler executable path only(without additional parameters).
   Lazarus has an entry on the subject at Menu/Project/Project_Options/Compiler_Options/Config_and_Target, so Lazarus users that want to try fpgui's IDE(Maximus) and mseIDE with custom fpc configurations better read this and don't do the same assumption as I did.
   Thank you Graeme and Martin.

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #24 on: August 17, 2015, 06:09:18 pm »
Your assumption was correct for MSEide 3.8 which automatically quoted whole COMPILER macros if it contained spaces. I made the support for path + params in COMPILER macro in MSEide 3.9 (git master) after your request. ;-)
I like to point out that MSEide has no hardcoded macros, the predefined  global name / value pairs in 'Settings'-'Configure MSEide' are for convenience only.
Please see 'Project'-'Options'-'Make'-'Make Options' where the compiler commandline is constructed. You are free to use other patterns. Project macros can be defined by the MSEide commandline parameter --macrodef or in 'Project'-'Options'-'Macros'.
Because of your questions I assume Lazarus has another principle.
Please keep in mind that MSEide+MSEgui is no Delphi clone, if you act on the assumption that everything should be done like in Delphi you probably will have a hard time with MSEide+MSEgui. ;-)

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Forking/Flavouring Free Pascal and Lazarus
« Reply #25 on: August 26, 2015, 06:51:21 am »
I'm trying to develop stuff for a beginner, not myself. 

I just started this new wiki page: http://wiki.freepascal.org/Control_Pascal_Tutorial

I hope to keep improving these tutorials to provide a way for beginners to get started with Free Pascal (help appreciated).
Regards,
Paul Breneman
www.ControlPascal.com

 

TinyPortal © 2005-2018