Recent

Author Topic: Beginner question: building the fp text-mode IDE standalone  (Read 572 times)

Aruna

  • Hero Member
  • *****
  • Posts: 787
Beginner question: building the fp text-mode IDE standalone
« on: January 25, 2026, 01:48:49 am »
Hello,

I just asked this question in fpc-devel@lists.freepascal.org then remembered Marcov and PascalDragon and lots of others are right here on this forum so decided to ask here as well.

I’m fairly new to working with the Free Pascal IDE sources and I’d like to build fp by itself for learning and testing purposes.

I’m using Linux (Debian), and while looking through the installed FPC source tree I found this file:

/usr/share/fpcsrc/3.2.2/packages/ide/fp.pas

Is this the correct main source file for the fp text-mode IDE, or am I looking in the wrong place?

As a beginner, I’m mainly trying to understand:
  • where the fp text-mode IDE “starts”,
  • how it is normally built, and
  • whether there is a simple or recommended way to build fp on its own for experimentation and learning.
If there is any beginner-friendly documentation, Makefile targets, or suggested build steps for working with fp independently, I’d really appreciate any pointers.

Thank you for your time, and for making Free Pascal available to learn from.

Best regards,
Aruna Hewapathirane

Thausand

  • Sr. Member
  • ****
  • Posts: 458
Re: Beginner question: building the fp text-mode IDE standalone
« Reply #1 on: January 25, 2026, 06:43:32 am »
Is this the correct main source file for the fp text-mode IDE, or am I looking in the wrong place?
Yes, that main program file for make fp ide.

Can have option:
1 build FPC compiler complete with use make. This is also make fp IDE.
2 Lazarus have load fpx64.lpi and can change project options if want.
  Then do same create when do for normal lazarus project and build project
  For me is result 64-bit is create <project-path>/bin/x86_64-linux/fp and is TUI IDE
3 same 2 but have command-line: lazbuild fpx64.lpi
4 If want make manual then is little more difficult but is same when use lazbuild. Have need fpc 3.2.2 or 3.3.1 and have good configurate (fpc.cfg) for compile

Code: Bash  [Select][+][-]
  1. mkdir -p "bin" "lib/x86_64-linux" && \
  2. fpc -B -dNODEBUG -dx86_64 \
  3. -FE"bin" \
  4. -FU"lib/x86_64-linux" \
  5. -Fu"../../compiler;../../compiler/x86;../../compiler/x86_64;../../compiler/systems" \
  6. -Fi"../../compiler;../../compiler/x86_64" \
  7. fp.pas
  8.  


Quote
As a beginner, I’m mainly trying to understand:
where the fp text-mode IDE “starts”,
fp.pas

Quote
how it is normally built, and
option 1

Quote
whether there is a simple or recommended way to build fp on its own for experimentation and learning.
option 2, 3 or 4

I not know but maybe there more option for make ide...

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: Beginner question: building the fp text-mode IDE standalone
« Reply #2 on: January 25, 2026, 10:35:27 am »
One important note: fp is build with a statically linked full compiler that is part of the executable. In that sense you can not build fp without also building the compiler, because it is integrated. It is not that fp calls ppcx or fpc: the compiler is built-in.
That differs a great deal from the Lazarus IDE, which calls out to stand-alone compiler binaries.
And don't confuse with fv, which is the freevision demo.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

Aruna

  • Hero Member
  • *****
  • Posts: 787
Re: Beginner question: building the fp text-mode IDE standalone
« Reply #3 on: January 26, 2026, 01:40:22 am »
Is this the correct main source file for the fp text-mode IDE, or am I looking in the wrong place?
Yes, that main program file for make fp ide.

Can have option:
1 build FPC compiler complete with use make. This is also make fp IDE.
2 Lazarus have load fpx64.lpi and can change project options if want.
  Then do same create when do for normal lazarus project and build project
  For me is result 64-bit is create <project-path>/bin/x86_64-linux/fp and is TUI IDE
3 same 2 but have command-line: lazbuild fpx64.lpi
4 If want make manual then is little more difficult but is same when use lazbuild. Have need fpc 3.2.2 or 3.3.1 and have good configurate (fpc.cfg) for compile

Code: Bash  [Select][+][-]
  1. mkdir -p "bin" "lib/x86_64-linux" && \
  2. fpc -B -dNODEBUG -dx86_64 \
  3. -FE"bin" \
  4. -FU"lib/x86_64-linux" \
  5. -Fu"../../compiler;../../compiler/x86;../../compiler/x86_64;../../compiler/systems" \
  6. -Fi"../../compiler;../../compiler/x86_64" \
  7. fp.pas
  8.  


Quote
As a beginner, I’m mainly trying to understand:
where the fp text-mode IDE “starts”,
fp.pas

Quote
how it is normally built, and
option 1

Quote
whether there is a simple or recommended way to build fp on its own for experimentation and learning.
option 2, 3 or 4

I not know but maybe there more option for make ide...
Hello Thausand. Thank you very much what you have shared helps a lot!

Aruna

  • Hero Member
  • *****
  • Posts: 787
Re: Beginner question: building the fp text-mode IDE standalone
« Reply #4 on: January 26, 2026, 01:47:40 am »
One important note: fp is build with a statically linked full compiler that is part of the executable. In that sense you can not build fp without also building the compiler, because it is integrated. It is not that fp calls ppcx or fpc: the compiler is built-in.
That differs a great deal from the Lazarus IDE, which calls out to stand-alone compiler binaries.
And don't confuse with fv, which is the freevision demo.
Thaddy, I was told the same thing more or less on fpc-devel@lists.freepascal.org by Michael Van Canneyt

Michael said: It uses Free Vision, and runs a message loop, which is 'hidden' in IDEApp.Run;

Michael also said: It's not really standalone, because the IDE contains the compiler.Your best bet is still simply to use 'make all' in the toplevel or packages directory of the sources.

So I am going to test that later tonight and I found a tutorial on freevison but it is in German. What would be the most painless way to translate this to English?

git-repo is here: Lazarus-FreeVision-Tutorial

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: Beginner question: building the fp text-mode IDE standalone
« Reply #5 on: January 26, 2026, 09:24:05 am »
Michael also said: It's not really standalone, because the IDE contains the compiler.Your best bet is still simply to use 'make all' in the toplevel or packages directory of the sources.
  For FP that is exactly what I mean. FP is a stand-alone application that contains a statically linked full compiler and is a single binary. So it is stand-alone. Maybe there was a misunderstanding in the question or was the discussion about FV, not FP.

I meant standalone binary that contains IDE+Compiler
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

 

TinyPortal © 2005-2018