Recent

Author Topic: Free Pascal Text Mode IDE for macOS  (Read 1730 times)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Free Pascal Text Mode IDE for macOS
« on: November 08, 2024, 12:03:26 am »
Am I right in thinking that the FP Text Mode IDE is not available for macOS? I've searched within my FPC installation for an executable called fp (I believe that's what it's called) but I can't find anything.
"It builds... ship it!"

Thaddy

  • Hero Member
  • *****
  • Posts: 16201
  • Censorship about opinions does not belong here.
Re: Free Pascal Text Mode IDE for macOS
« Reply #1 on: November 08, 2024, 02:01:39 pm »
open a terminal and type fp
It used to work on MacOS, but don't know if there is some regression for newer versions.
If I smell bad code it usually is bad code and that includes my own code.

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Free Pascal Text Mode IDE for macOS
« Reply #2 on: November 08, 2024, 02:17:30 pm »
open a terminal and type fp
It used to work on MacOS, but don't know if there is some regression for newer versions.

Thanks, Thaddy! I guess it is not included in later versions. There is no file named fp anywhere on my computer :o
"It builds... ship it!"

JdeHaan

  • Full Member
  • ***
  • Posts: 150
Re: Free Pascal Text Mode IDE for macOS
« Reply #3 on: November 08, 2024, 07:24:57 pm »
I'm on MacOS Sequoia, and just out of curiosity tried Thaddy's suggestion so typed 'fp' in a terminal window. See picture. However, I don't know how to operate it using the mouse/touchpad... it doesn't respond.

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Free Pascal Text Mode IDE for macOS
« Reply #4 on: November 08, 2024, 08:01:13 pm »
I'm on MacOS Sequoia, and just out of curiosity tried Thaddy's suggestion so typed 'fp' in a terminal window. See picture. However, I don't know how to operate it using the mouse/touchpad... it doesn't respond.

Interesting! I did manage to install DosBox on macOS 14.6.1 Somona and install Turbo Pascal 7.0 (downloaded from archive.org!). It looks very similar to your screen shot. With the DocBox/TP7.0 combo I found that if I clicked the menu bar twice, it switched into "text mode mouse mode" so to speak, and I was able to access the menu items.

How did you install FPC on your machine?

I should point out that there is no pressing need for me to install fp, apart from curiosity ;)
« Last Edit: November 08, 2024, 08:05:34 pm by carl_caulkett »
"It builds... ship it!"

JdeHaan

  • Full Member
  • ***
  • Posts: 150
Re: Free Pascal Text Mode IDE for macOS
« Reply #5 on: November 08, 2024, 08:56:07 pm »
Also out of curiosity. I work in Lazarus normally.

I found a fp executable in this folder:
Macintosh HD > usr > local > bin >

The fp executable is from 2018, whereas the Lazarus+FPC is from 2023, which is the last time I installed an 'official' release.
Usually I install from FPCUpDeluxe, in different folders, but in these there is no fp executable

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Free Pascal Text Mode IDE for macOS
« Reply #6 on: November 08, 2024, 09:26:14 pm »
I found a fp executable in this folder:
Macintosh HD > usr > local > bin >

I recently deleted any trace of the old FPC installation from /usr/local/bin since it was causing problems with Lazarus 4.0rc1 :o

I've just checked on https://www.freepascal.org/download.html and the link to old releases just gives a 404 :(

@JdeHaan, any chance of uploading the fp executable here, on the off-chance that it doesn't have any dependencies 😉
« Last Edit: November 08, 2024, 10:41:11 pm by carl_caulkett »
"It builds... ship it!"

JdeHaan

  • Full Member
  • ***
  • Posts: 150
Re: Free Pascal Text Mode IDE for macOS
« Reply #7 on: November 09, 2024, 07:40:37 am »
The file is bigger than 500K, so that doesn't work.
But I put the file on Github for you to copy:

https://github.com/jdehaan2014/FP_TextMode

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Free Pascal Text Mode IDE for macOS
« Reply #8 on: November 09, 2024, 11:42:51 am »
The file is bigger than 500K, so that doesn't work.
But I put the file on Github for you to copy:

https://github.com/jdehaan2014/FP_TextMode

That's great, thanks 🙏🏽. I see what you mean about the lack of mouse-response! You can access the menu options by pressing Option + The letter highlighted in red. But, even going into Options --> Environment -> Keyboard & Mouse doesn't seem to offer any likely fix.

Also, the default colour scheme is sub-optimal, if I'm being honest  ;)

This is a shame because fp has enough about it to be a useful alternative  🤔
"It builds... ship it!"

PascalDragon

  • Hero Member
  • *****
  • Posts: 5766
  • Compiler Developer
Re: Free Pascal Text Mode IDE for macOS
« Reply #9 on: November 09, 2024, 03:03:56 pm »
Am I right in thinking that the FP Text Mode IDE is not available for macOS? I've searched within my FPC installation for an executable called fp (I believe that's what it's called) but I can't find anything.

The text mode IDE is not considered supported on macOS due to issues with the terminal.

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Free Pascal Text Mode IDE for macOS
« Reply #10 on: November 17, 2024, 08:59:46 pm »
The only problem I can see from a UI point of view is that there does not seem to be anyway of editing the background colour of the FP editor directly from with FP. I notice however that there is a config file fp.ini which consists of these lines...
Code: Text  [Select][+][-]
  1. [Compile]
  2. CompileMode=DEBUG
  3. PrimaryFile=
  4.  
  5. [Help]
  6. Files=""
  7.  
  8. [Editor]
  9. DefaultTabSize=8
  10. DefaultIndentSize=1
  11. DefaultFlags=20599
  12. DefaultSaveExt=.pas
  13.  
  14. [Highlight]
  15. Exts="*.pas;*.pp;*.inc;*.dpr;*.lpr"
  16. NeedsTabs="make*;make*.*;fpcmake.loc"
  17.  
  18. [Colors]
  19. Palette_1_40=#$03#$03#$08#$0B#$30#$28#$30#$17#$1F#$1A#$31#$31#$1E#$71#$1F#$37#$3F#$3A#$13#$13#$3E#$21#$3F#$0B#$03#$7A#$13#$13#$70#$7F#$7E#$70#$70#$78#$78#$70#$70#$70#$7F#$7E
  20. Palette_41_80=#$20#$2B#$2F#$78#$2E#$70#$30#$3F#$3E#$3F#$2F#$1A#$20#$72#$31#$31#$30#$2F#$3E#$31#$13#$38#$00#$17#$1F#$1A#$71#$71#$1E#$17#$1F#$1E#$20#$2B#$2F#$78#$2E#$10#$30#$3F
  21. Palette_81_120=#$3E#$70#$2F#$7A#$20#$12#$31#$31#$30#$2F#$3E#$31#$13#$38#$00#$37#$3F#$3A#$13#$13#$3E#$30#$3F#$3E#$20#$2B#$2F#$78#$2E#$30#$70#$7F#$7E#$1F#$2F#$1A#$20#$32#$31#$71
  22. Palette_121_160=#$70#$2F#$7E#$71#$13#$38#$00#$70#$7F#$7A#$13#$13#$70#$70#$7F#$7E#$20#$2B#$2F#$78#$2E#$70#$30#$3F#$3E#$1F#$2F#$1A#$20#$72#$31#$31#$30#$2F#$3E#$31#$13#$38#$00#$30
  23. Palette_161_200=#$3E#$1E#$70#$30#$3F#$3A#$08#$03#$03#$03#$03#$03#$71#$1F#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$88#$88
  24. Palette_201_240=#$06#$03#$0B#$0E#$0A#$07#$07#$70#$0B#$20#$02#$0A#$04#$4E#$31#$02#$0A#$02#$0A#$0A#$31#$3F#$0A#$20#$3E#$3F#$70#$20#$FF#$3A#$37#$FF#$FF#$FF
  25.  
  26. [SourcePath]
  27. SourceList=""
  28.  
  29. [Mouse]
  30. DoubleDelay=8
  31. ReverseButtons=0
  32. AltClickAction=6
  33. CtrlClickAction=1
  34.  
  35. [Keyboard]
  36. EditKeys=microsoft
  37.  
  38. [Search]
  39. FindFlags=4
  40.  
  41. [Breakpoints]
  42. Count=0
  43.  
  44. [Watches]
  45. Count=0
  46. Watch0=
  47.  
  48. [Preferences]
  49. DesktopFileFlags=209
  50. CenterCurrentLineWhileDebugging=1
  51. AutoSaveFlags=6
  52. MiscOptions=6
  53. DesktopLocation=1
  54.  
  55. [Misc]
  56. ShowReadme=0
  57.  
  58. [Run]
  59. Parameters=
  60.  
  61. [Files]
  62. OpenExts="*.pas;*.pp;*.inc;*.dpr;*.lpr"
  63. PrinterDevice=prn
  64.  
  65. [Tools]
  66. Title1="Format code"
  67. Params1="ptop $EDNAME $EDNAME"
  68. HotKey1=0
  69.  


The [colors] section looks as if it might be some help, but how on earth do the numbers map on to actual colours?

Just in case anyone pipes up saying "why don't you use the Color selection dialog in Options -> Environment?", the reason is that on the version I'm using... Free Pascal IDE for Darwin for x86_64, Target CPU: x86_64, Version 1.0.12 2018/07/28, that option is not there!
« Last Edit: November 17, 2024, 09:51:40 pm by carl_caulkett »
"It builds... ship it!"

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Free Pascal Text Mode IDE for macOS
« Reply #11 on: November 17, 2024, 11:39:42 pm »
I'm on MacOS Sequoia, and just out of curiosity tried Thaddy's suggestion so typed 'fp' in a terminal window. See picture. However, I don't know how to operate it using the mouse/touchpad... it doesn't respond.

I've recently upgraded my macOS to v15.1 Sequoia, and I've made a bit of a breakthrough on the FP Text Mode Editor. If you look for the file ./fpcsrc/packages/ide/fparm.lpi, you should be able to load it into Lazarus as a project and build it to produce an executable in ./fpcsrc/packages/ide/bin/aarch64-darwin/fp. No tweaks are needed, and the app seems to work fine with the mouse 😃

I've still got to sort out the colours, but that's a task for a new day 😉
"It builds... ship it!"

JdeHaan

  • Full Member
  • ***
  • Posts: 150
Re: Free Pascal Text Mode IDE for macOS
« Reply #12 on: November 18, 2024, 08:19:02 pm »
Thanks Carl. I was also able to compile it, then run it. Brings back memories...
However, under compiler - target, there is no MacOS target (Darwin, etc), so I'm unable to use it, other than for editing files.

Thaddy

  • Hero Member
  • *****
  • Posts: 16201
  • Censorship about opinions does not belong here.
Re: Free Pascal Text Mode IDE for macOS
« Reply #13 on: November 19, 2024, 12:36:08 pm »
What's this then ? (compiled on aarch64, supports Apple M series )
Choose compile|target (if your mouse doesn't work simply alt-c then t and scroll with up/down keys.
This is a RPi5/aarch64, but if the toolchain is there it will compile for apples too.
I expect my new mini M4 to arrive soon, but I see no reason that would not work about the same.
If the correct targets are not there you probably did something wrong.
« Last Edit: November 19, 2024, 12:44:16 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

TRon

  • Hero Member
  • *****
  • Posts: 3658
Re: Free Pascal Text Mode IDE for macOS
« Reply #14 on: November 19, 2024, 12:42:59 pm »
@Thaddy:
I believe JdeHaan literally meant macos and not aarch.

And that is correct. The textmode IDE is not able to cross-compile.
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

 

TinyPortal © 2005-2018