Building for multiple platforms

I’ve just gotten exposed to Xojo and am excited about what I see… My question is: can I build once and compile to multiple platforms, or is it just that I can choose to build for whichever I need to? If the former, how is this done? If the latter, can I easily reuse code?

Write once, compile for all, nearly.

You choose the platform for witch you build the application (this one, these, etc.).

Can you narrow your question (after reading stuff at www.xojo.com, maybe ?)

„Build“ is compile.

You write your code, you put a checkmark on the targets you want (eg Mac, Windows, Linux) and the compiler builds your app for these targets, each in their own folder.

Download Xojo, learn to write an app with it, buy a license when your app is ready to be distributed and/or sold.

There are build settings in the IDE to select which targets to compile for. For example, if you check Mac and Windows, it will build both at the same time and produce two built apps.

You can write on one platform and debug on another, using the Remote Debugger stubs. I code on Mac and often target Windows.

Regarding code reuse, there are very few things that don’t work under both Mac and Windows, and in these situations you can put #Target conditionals in your code. For the most part, it’s write once, compile for all, as Emile said.

“Write Once, Compile All” is not 100% correct.

  • macOS, Windows, Linux… true, with the exception of target specific issues (#Target as Julia mentioned)
  • Raspberry, Web and iOS … not quite. its a matter of creating platform specific projects, these cannot compile directly from a desktop project code base

For Desktp (macOS/Win/Linux) you can have one code base (and should)… you also can write on one platform and using the remote debugger run it on another as long as you have a machine (or VM) with the target OS available. I write all my code on an iMac, and have an old MacPro running Win10 to test that platform… but I control everything from the Mac

However I should point out that there are some serious problems on Windows, namely slow drawing to the screen after the move to Direct2D, and the inability to print at higher than 96 dpi. Many still stick with Xojo 2016 R3 for their Windows work, but then you can get a lot of flicker.

There’s also the issue of Framework. iOS can’t use the Classic Framework, so if you want to reuse code you might want to stick with the new Xojo Framework.

Thanks for all the helpful responses! I’ll be asking some follow-up questions… just one for now, before I head to bed!

Is there a good reason to use the classic framework at all, seeing that I’d be starting totally new and therefore without any need for backward compatibility?

If you’re writing desktop applications, I’d recommend staying with Classic, especially in light of what we’ve heard from XDC this week. It’s simpler, more mature, and more consistent imo.

Yes. Basically the new framework never got accepted (for good reason), so Xojo is abandoning it and will instead integrate the improvements into the old framework. Read more about it on Bob’s blog at https://www.bkeeneybriefs.com or if you understand German also https://xojoblog.me/2018/04/26/neu-ist-das-neue-alt/

On the Windows side, Xojo is very limited and buggy. Very slow typing speed, unproductive navigator despite organizing and structure the project.

Even when you build for other platforms, you need to test on each platform you support.

Despite all this, Xojo is still a good choice if you want a Rapid Application Development tool which I like to use.

Chris: no offense from me. I took your two sentences, but I could have taken text from others above (to far above) too. I have the same mixed reaction, but on the overhaul (not this conversation) everyone is happy with Xojo.

[quote=385332:@Chris Verberne]On the Windows side, Xojo is very limited and buggy[/quote] etc.

What Joe Newbie will think after reading these two pieces of text ?

No offense taken. It was my intention to describe the reality I am experiencing with Xojo.

I didn’t lie about the bugs, the slow typing and the unproductive navigator. People are complaining for a very long time about this. There is very little love for the Windows side.

If somebody ask for advice or a honest opinion, would you tell him otherwise? I do appreciate honesty above all the rest, even when it conflicts with my opinions.

After reading those threads coming from XDC 2018, I really do hope Xojo inc. finally will do what they promised there. If they succeed in bringing their good intentions to reality, it will make Xojo great again!

I think the best way to find out if Xojo forfill ones expectations is just download, install and try out Xojo for themselves. See if they can live with the overal Xojo experience.

Despite what I wrote above, I like to work with Xojo.

It was not my intention to be falsely negative or positive. I just intended to give my point of view but when too short. I hope this correct my former post.

Chris

Note that Chris is talking about running the IDE on Windows, not Windows applications built with Xojo.

Hmmm … currently I would not release a Windows application build with 2018R1 . Better use 2017R3, and if you need printing quality you have to stick to 2016R3.

@Joost Rongen the OP’s question was

so a discussion of the various Xojo versions is slightly OT. I was only pointing out that the “slow typing” and “little love” issues raised by Chris had to do with the IDE and not built applications.

Hi Chris,
I understand your answer (both that one and the previous one).

I am happy to read that.

To be honest, I do not know what to say: you already says all.

Reuben, what kind of software do you want to create (if you can disclose that) ?

Note to all:
a project I started with the current Xojo version 2018r1, running in the IDE proved to be faster than when I rolled back to 2015r1 (the one I have a license to). FWIW. (that project print droped image into a PDF file).

If a new user would buy a license now, then this doesn’t apply to them. As they can’t use 2017R3 since their license will start from the last xojo release at this time 2018R1.

Sorry@Julia Truchsess .

Really? I didn’t know that - I thought you could use older versions with any license.