PDA

View Full Version : make MacOSX applications with RS XE2 (step-by-step)



AirPas
05-10-2011, 08:22 PM
i've found this link
some good points about how to setting up Delphi XE2 in OSX

http://www.simonjstuart.com/2011/09/03/rad-studio-xe2-setting-it-up-for-a-mac-step-by-step-illustrated-guide/

Ingemar
06-10-2011, 04:38 PM
Interesting, and it is a move in the right direction of Embarcadero. Still, I feel it is quite a compomise. Developing Mac programs on a PC, cross-compiling, that doesn't feel right, feels like a detour. The opposite was possible in the past, when Metrowerks made a PC compiler that ran on the Mac. I never touched it.

czar
06-10-2011, 05:23 PM
Personally I am finding it awesome. I can work on my PC with my comfortable environment on my 27" screen - and compile and watch the result on my MacBook. So far there have been many hurdles and working out what does and does not work on the Mac but my first cross platform app is now about 50% done.

LP
07-10-2011, 12:02 AM
Interesting, and it is a move in the right direction of Embarcadero. Still, I feel it is quite a compomise. Developing Mac programs on a PC, cross-compiling, that doesn't feel right, feels like a detour. The opposite was possible in the past, when Metrowerks made a PC compiler that ran on the Mac. I never touched it.

Actually, I'm on this with Czar. You make an application on your main PC with FireMonkey and even debug it. Then, you simply change platform in IDE and viola, it works and looks exactly the same on Mac! The difference in specs between my main PC and Mac is quite large, so I'm glad I can keep working on main PC and test stuff on the Mac remotely (it will be quite expensive to match the Mac with my PC, getting Core i7 and high-performance RAM). Also, on Mac in the majority of IDEs, Lazarus included, I found the 3-key shortcuts and all these weird-looking special buttons difficult to get used to.

By the way, those who develop for iOS using Delphi XE 2 should get Update 1, which improves performance by large margin (I'm surprised there's no news about it here on PGD).

Stoney
07-10-2011, 10:53 AM
Also, on Mac in the majority of IDEs, Lazarus included, I found the 3-key shortcuts and all these weird-looking special buttons difficult to get used to.

There is just one 3-key shortcut you need on Lazarus: CTRL+SHIFT+C , which is code completion: You have made the interface section of your class, place your cursor in there somewhere and press this combination and Lazarus magically builds you the implementation part. (It's also the same combination as on any other platform.)
Most other useful combination are just two keys:
CMD + R : Run and debug application (Lazarus and Xcode)
CMD + U : Unindent code block
CMD + I : Indent code block


My setup is exactly the other way round: I'm using Lazarus on Mac OS X with a display port adapter for my big screen if I need it. Debugging is working, I made a tutorial on how to set it up a while back and for Windows I made a FPC cross-compiler. Everything works smoothly (granted, sometimes Lazarus is not as responsive on Mac OS X as on Windows), but I didn't use Windows for development in quite a while.

LP
07-10-2011, 03:24 PM
There is just one 3-key shortcut you need on Lazarus: CTRL+SHIFT+C , which is code completion:
The 3-key combinations I find particularly annoying are Step into/Step over, Toggle form/unit view, View Object Inspector, View Units and View Forms. In Delphi/Lazarus on Windows the first three are 1-key, while the other two are 2-key. Debugging keys are essential and very common to use; I can't believe you have to hit 3 keys for every single line of code, same applies to Form/Unit view.


Most other useful combination are just two keys:
CMD + R : Run and debug application (Lazarus and Xcode)
CMD + U : Unindent code block
CMD + I : Indent code block
In Delphi they are F9, Tab and Shift+Tab respectively (Delphi versions previous to XE 2 need CnWizards for code block indentation). They are shorter and more intuitive.

Stoney
07-10-2011, 03:46 PM
I think after a while you get used to the shortcuts, at least that has always been my experience.
I don't think the Lazarus team will change the shortcuts on Mac OS, as most of them are the same on Xcode, which is I find rather pleasing, personally, as I've been doing a lot of Xcode development these days.

Ingemar
09-10-2011, 02:38 PM
Also, on Mac in the majority of IDEs, Lazarus included, I found the 3-key shortcuts and all these weird-looking special buttons difficult to get used to.

I can assure you that it is even worse to use a PC when you are used to the Mac, with a totally illogical mix of F-number, ctrl-something, alt-and-then-something, etc. I have seen mixes of all three in one program. And surely there are multi-key shortcuts too? I just wish all the PC programs could do the fairly reasonable ctrl-something (except that the ctrl key is badly placed for the task).

I have worked a lot on the PC, with CodeWarrior in particular, and never got used to the mix. It really is three different systems in parallel. On the Mac, all programs use the command-something system (with extra modifiers when you run out of keys, can be very intuitive when done right, cmd-R for run, cmd-alt-R for run with debugger, for instance).

Thus, the solution won't attract any people from the Mac side. It looks like a pure port-to-Mac solution. But if you never get to like and understand the Mac systems, won't your ports be bad?

code_glitch
09-10-2011, 03:28 PM
Ingemar: Don't worry, windows may be bad, but I find mac atrocious. I use linux almost the entire time (bar school computers 30mins a week) and although there are differences between the two, eg. the number of times I hit alt+F2 or Ctrl+alt+t on windows is frightening I find mac horrible: where ctrl + C is copy on just about everything under the sun mac goes and screws up all the standard ones...

Although I agree with the last thing about ports, I think it is more to get windows devs to get windows apps to mac - not the other way round... It would not surprise me one bit to learnt hat apple wants all the windows apps too but give nothing back...

As to what was said earlier, 3 key shortcuts are generally a no-no but in the case of ctrl+alt+t I love that one :)

LP
09-10-2011, 05:29 PM
Thus, the solution won't attract any people from the Mac side. It looks like a pure port-to-Mac solution. But if you never get to like and understand the Mac systems, won't your ports be bad?
Because in business, not always you develop an application you like, for a platform you like. Sometimes you don't even have enough time to fully understand the platform you are developing for because of limited time-frames and budget.

By the way, there's a web page that illustrates some applications and poor GUI design choices. If you haven't already seen it, check Interface Hall of Shame (http://homepage.mac.com/bradster/iarchitect/shame.htm).

Ingemar
11-10-2011, 05:42 AM
where ctrl + C is copy on just about everything under the sun mac goes and screws up all the standard ones...
The "standard ones" in my book are cmd-ZXCV (undo, cut, copy, paste) plus cmd-SNOW (save, new, open, close). They are really, really universal in all Mac programs, and on Windows the ctrl-ZXCV keys are a straight copy of that. (Yes, it is the Mac's fault that Windows has too many different systems.)

On Linux, however, ctrl-C is by tradition "break" so Linux is in considerable conflict between "copy" and "break". I know some significant programs where it gets pretty bad (Terminal in particular).

Anyway, I didn't intend to prove any platform better than another, the point was that with only cross-compilation, it isn't a full cross-platform solution yet. But it is certainly better than without the cross-compilation option.

LP
11-10-2011, 04:00 PM
Anyway, I didn't intend to prove any platform better than another, the point was that with only cross-compilation, it isn't a full cross-platform solution yet. But it is certainly better than without the cross-compilation option.
Actually, from your posts it seemed exactly the opposite. You started to defend Mac at all costs after people mentioned that it was easier for them to develop on PC and compile for Mac. Sure, Delphi IDE ported to other platforms would be great, but it's not out yet. However, for all previous Delphi versions, this cross-compilation is an enormous jump and a huge improvement.

If you don't like and/or don't use Delphi and don't have plans on getting it, why commenting in this thread at all? Keep using XCode or whatever IDE/text editor of your preference, you can even write the machine code yourself if you want to, nobody is forcing you to switch.

czar
11-10-2011, 06:47 PM
it isn't a full cross-platform solution yet.

When you say 'it' you mean Delphi - I don't see how you can it is not cross-platform. Delphi clearly is capable of developing cross-platform applications. If you want to run Delphi IDE on a Mac then you may have to wait a while. However, even if you only have a Mac you can run Delphi in a VM so I would rather not see effort going towards achieving that goal. I would prefer to see iOS development being exactly like MacOS development, i.e. F9 on my PC and seeing app running on my iPad.

Ingemar
12-10-2011, 05:49 AM
Actually, from your posts it seemed exactly the opposite. You started to defend Mac at all costs after people mentioned that it was easier for them to develop on PC and compile for Mac. Sure, Delphi IDE ported to other platforms would be great, but it's not out yet. However, for all previous Delphi versions, this cross-compilation is an enormous jump and a huge improvement.

If you don't like and/or don't use Delphi and don't have plans on getting it, why commenting in this thread at all? Keep using XCode or whatever IDE/text editor of your preference, you can even write the machine code yourself if you want to, nobody is forcing you to switch.
But I only said that it was insufficient for people like me, from the Mac side. We don't want to work 100% on a PC. And that makes it a PC-to-Mac porting option, that is a bit limited.

Pascal options for the Mac are very much do-it-yourself, so I would have been very happy to see full Mac support.

czar
12-10-2011, 07:49 AM
Use a windows VM. If I was making decisions at EMB I would not put in any immediate effort into building delphi ID for Mac. There would be zero chance of getting any ROI any time soon. The cross-platform is aimed squarely at windows developers wanting to bridge onto a mac. I believe you would be maybe one of a handful people in the world working on Mac only and wanting to use pascal.