9

I am contemplating designing a framework to allow for one C++ code base to become a desktop application and a web app for most major platforms (Mac OS, Windows, Linux, and possibly Android). I have decided Qt would be best for desktop builds, however I am conflicted between Google Native Client and Wt for the Web App part.

Wt code may be more easily compatible with the Qt code, however I heard Wt is actually AJAX output so I do not know how much this will impact performance (I plan to develop a game engine with this so I need performance).

On the other hand NaCl, is more, well... native. But it seems to be a mess, especially with the JS integration, I just want to write in C++ and be done with it. Additionally I don't know how compatible it would be with Qt.

I have been researching this for weeks and I do not know much about either. So it really boils down to:

A: Could I literally (or pretty much) replace all the W's in the front of the names of all Wt objects with Q's and have it be Qt compatible code?

B: Is Wt native at all, and how fast does it execute at run time (I cant seem to find an answer to this)?

  • 1
    No idea whats Wt, but it is possible to run Qt on NaCL. You don't need to know the NaCL interface and external JS integration neither. http://labs.qt.nokia.com/2010/06/25/qt-for-google-native-client-preview/ Anyway messing with HTML5 is bad idea. – Arpegius Jun 26 '12 at 02:43
  • @lionbest Wt: http://www.webtoolkit.eu/wt I saw the Qt on NaCl Lighthouse project before but my understanding was that it is very limited. Do you know how stable it is and what they have implemented? I'm am not sure where you got the part about HTML5 messaging. – The Floating Brain Jun 26 '12 at 22:23
  • 1
    Ok. Wt runs on server, and it push components as HTML and JS, so its slow as hell. – Arpegius Jun 27 '12 at 09:40
  • @lionbest Aaaaaaahh, thank you! That is exactly what I wanted to know! :-D I'm not much of a web developer (although I know most of the programming languages) so I do not know to much about all that. – The Floating Brain Jun 27 '12 at 16:28
  • 1
    Why maintaining two apps, one for desktop and one for web ? You can make the web app into a desktop app easily : run the server in one thread on an unused port, and open an in-app browser windows to the local adress (all OSes provide an empty browser window) – Offirmo Jun 28 '12 at 13:40
  • @Offirmo I am concerned about that. Can you do that with Chrome (I mean make Chrome in-App)? Not exactly the OS's standard browser I know but it would be the only way to do it. – The Floating Brain Jun 29 '12 at 17:29
  • 1
    @TheFloatingBrain Hello, chrome is fully open-source, so you can do whatever you want with it. This includes embedding it in your native app. And of course, people already have done it : http://code.google.com/p/chromiumembedded/ "a Web browser control based on the Google Chromium project". Good luck ! – Offirmo Jul 02 '12 at 08:19
  • @TheFloatingBrain: I have a similar problem. What did you do in the end? – Homunculus Reticulli Oct 31 '12 at 19:03
  • @HomunculusReticulli A friend and I are writing a custom abstraction layer for NaCl since it is so messy. Our "abstraction layer" also will generate a Google Packaged App (http://developer.chrome.com/apps/about_apps.html) so it will run on the desktop and in browser. Sorry if I could not be of to much assistance. I kinda gave up on the Qt idea since Qt for NaCl has not been worked on since 2011. Il keep you posted on our project though if you like :-) – The Floating Brain Nov 05 '12 at 03:21

1 Answers1

8

It would be possible to run Wt as a NaCL application as well, in fact, that would combine the best of both worlds. Wt itself (and its dependencies) build fine with the NaCL toolchain, it's only a connector library that is missing currently. There was an opening for a GSOC project to implement last year, but it didn't happen.

  • Whoa, the grand Wt author Koen Deforche has joined StackOverflow ! I won't have to answer all Wt questions anymore ! – Offirmo Jun 28 '12 at 14:04
  • 1
    I think it must be a change at StackOverflow, but it is now possible to comment without signing up, and this was what held me back in the past... besides, you and others are doing just fine! – Koen Deforche Jun 29 '12 at 08:09
  • 1
    First of all I would love to convey my gratitude for your comment, its an honor. Next I would like to tell you, thank you for the solution to my problem! I have been trying to get the Qt - NaCl tool chain running for the last couple of days, unfortunately it is rather outdated. If I may, I would like to ask: What does the connector library entail? – The Floating Brain Jun 29 '12 at 16:57