How to create GUI applications in macos High Sierra without Lazarus lazarus / 31-LCL ---------------------------------------------------------------------- gop · 2018-02-28 00:15 Hello to all. Unfortunately I am a mac user. I have installed in my system both fpc and fpc-src but not Lazarus (due to well known issues with gdb, which is not supported in High Sierra (*) ). So, I was wondering if it is possible to create a GUI application for macos, by implementing the minimum possible amount of tools (say, the compiler, a code editor, etc). I would appreciate any detailed answer, since I am new to Object Pascal. Thank you in advance. (*) I do know that there are some "hacking" ways of resolving the gdb problem, but I would not like to use them. ---------------------------------------------------------------------- Phil · 2018-02-28 00:20 Quote from: gop on February 28, 2018, 01:15:25 amSo, I was wondering if it is possible to create a GUI application for macos, by implementing the minimum possible amount of tools (say, the compiler, a code editor, etc). Sure is. Look at the ProjectXC article here: https://macpgmr.github.io/ You can develop with Pascal in Xcode. Or you can use Lazarus and then debug in Xcode. You can have it both ways. ---------------------------------------------------------------------- gop · 2018-02-28 00:58 Hello Phil thank you for the feedback. To be honest I am looking for a solution involving say... sublime text editor, fpc and command line tools. I would not like to mess with neither gdb nor xcode. Thank you again. ---------------------------------------------------------------------- Phil · 2018-02-28 01:01 Quote from: gop on February 28, 2018, 01:58:03 amthank you for the feedback. To be honest I am looking for a solution involving say... sublime text editor, fpc and command line tools. I would not like to mess with neither gdb nor xcode. Are you just writing command line apps? If so, that would work fine. Just debug with lldb, as described in article link. Works fine. If you need to create a GUI, you'll probably want a UI designer of some sort. Lazarus and Xcode both have those. I doubt if "sublime" does (never heard of it - I use BBEdit and Visual Studio Code on Mac). ---------------------------------------------------------------------- gop · 2018-02-28 01:04 Hello again. No, I would like to develop GUI applications... so leaving aside the command line tools (which are necessary either a way) and, say with VSC or BBBeditorm what else I am going to need? ---------------------------------------------------------------------- Phil · 2018-02-28 01:07 Quote from: gop on February 28, 2018, 02:04:17 amNo, I would like to develop GUI applications... so leaving aside to command line tools (which are necessary either a way) and, say with VSC or BBBeditorm what else I am going to need? Lazarus or Xcode for designing the UI. ---------------------------------------------------------------------- gop · 2018-02-28 01:08 So there is not a third way... I see. Again, thank you very much. ---------------------------------------------------------------------- Phil · 2018-02-28 01:11 Quote from: gop on February 28, 2018, 02:08:38 amSo there is no a third way... I see. Obviously you could do it all in code, but I wouldn't advise that (it's 2018, after all). I don't imagine it's documented very well either since the assumption of almost all docs would be that you're using a designer. ---------------------------------------------------------------------- gop · 2018-02-28 01:17 One last question: is there any detailed manual on how to produce gui apps using Xcode? ---------------------------------------------------------------------- Phil · 2018-02-28 01:31 Quote from: gop on February 28, 2018, 02:17:12 amOne last question: is there any detailed manual on how to produce gui apps using Xcode? Do you mean with Pascal or just using Xcode in general? If the latter, see the Xcode help or Apple's many docs and videos or docs and videos produced by many other sites. If the former, I would suggest just following the simple example given and see how that feels to you. There's something to be said for successfully completing even a simple task with something brand new: maybe you'll see that it's not really that hard. The main disadvantage of using Xcode with Pascal is that Xcode doesn't know much about Pascal other than syntax highlighting, so you won't have code completion or help with Pascal syntax in the Xcode code editor. That's why it might make sense to do code editing in Lazarus since you'll have those things there, and do everything else in Xcode (debugging, setting Info.plist and entitlement data, codesigning, etc.). Pretty much everything else that you see documented about GUI design in Xcode, debugging, etc. applies to Pascal as well. After all, all Xcode is doing when it compiles is running a series of command line tools. When you use Pascal, you're just adding a couple more to the list - not too complicated, really. ---------------------------------------------------------------------- dbannon · 2018-02-28 03:43 Quote I would not like to mess with neither gdb nor xcode. Well, if its the gdb install you are trying to avoid, you can install Lazarus without gdb, there is an option in Lazarus 1.8 to run without any debugger. Obviously you then won't have a debugger but if you write better code than me you may get away with it. Incidentally, I had little trouble installing gdb on Sierra, is the issue you want to avoid specific to High Sierra ? Anyway, having Lazarus installed just to do the editing of source and GUI would be a very good idea IMHO. Even if you want to save and then compile (and run) from command line that should work OK too. Davo ---------------------------------------------------------------------- heejit · 2018-02-28 06:55 You can check the examples project comes with Lazarus some gui created in code only like notebk.lpi or try fpGUI ---------------------------------------------------------------------- gop · 2018-02-28 11:04 Thank all of your for your replies.