ptmt / react-native-macos

[deprecated in favor of https://microsoft.github.io/react-native-windows/] React Native for macOS is an experimental fork for writing desktop apps using Cocoa
MIT License
11.24k stars 429 forks source link

Linux support #59

Open ptmt opened 8 years ago

ptmt commented 8 years ago

Qt or GTK or GTK#.

atilacamurca commented 8 years ago

Is there any docs how to get started in creating support for new graphical interfaces such as GTK?

ptmt commented 8 years ago

I've actually started to work on it (QT for now). It won't be hard to migrate to GTK later if needed. As soon as I get something I'll make the pull request to discuss.

atilacamurca commented 8 years ago

great, I'll be waiting.

JohnAppleSeed- commented 8 years ago

yes please

cesarandreu commented 8 years ago

@ptmt Have you considered trying to integrate with node instead of JSC?

polarathene commented 8 years ago

QT would be great! Wouldn't that also provide Window/OSX desktop apps too?(although I guess not as "native")

LukasBombach commented 8 years ago

although I guess not as "native"

That ^^

LukasBombach commented 8 years ago

What's up with this? https://github.com/grassator/react-qml Isn't that basically a react-QT-renderer?

ptmt commented 8 years ago

Yeah, looks nice if you don't need react native.

On Thu, 5 May 2016 at 14:21, Lukas Bombach notifications@github.com wrote:

What's up with this? https://github.com/grassator/react-qml Isn't that basically a react-QT-renderer?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ptmt/react-native-desktop/issues/59#issuecomment-217128171

LukasBombach commented 8 years ago

Ah right, it is only rendering QML/QT, not running natively. 👍

ptmt commented 8 years ago

i mean it's not the same concept where you writing Javascript for do your UI and logic. On Thu, 5 May 2016 at 15:44, Lukas Bombach notifications@github.com wrote:

Ah right, it is only rendering QML/QT, not running natively. 👍

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ptmt/react-native-desktop/issues/59#issuecomment-217143288

kamek-pf commented 8 years ago

I was actually wondering why you didn't target something like Qt from the get go. It would have allowed you to target all major desktops at the same time.

Any particular reason ? genuine curiosity :p

ptmt commented 8 years ago

Back then it really made sense to port from UIKit -> AppKit, since it allowed to re-use 90% of the code. Of course, next-gen RN ports will consist of C++ core (which RN already has) and the UI part implemented in different libraries, including Qt.

SuhairZain commented 8 years ago

Hi @ptmt any updates on the status? I've been waiting for this project for more than a month now. :)

ptmt commented 8 years ago

It requires full-time effort or at least being the main side-project, and my patreon has failed (predictable). There is also Electron, which got unbelievable adoption and suitable solution for 90% tasks. But I believe that Linux fork will happen this year, maybe even several attempts to achieve cross-platforming. (.NET, Qt, etc.). React Native is strong as never, and community is awesome. (And I'm not saying that I've stopped, just trying to earn some money to work on open source full-time.)

SuhairZain commented 8 years ago

Hi @ptmt . I know the struggle. :)

I've made electron apps before but this particular one requires file system access (as in full read/write & file watchers). I didn't find a way to do that in electron since it's basically a packaged HTML and JS file and it has it's limitations, which drew me to your project. Guess I'll have to wait.

I was also thinking about lending a hand to this project. Get started on something using GTK+, but I have no experience in native desktop development whatsoever, and it would be a great help if you could point me to something that could be useful.

kamek-pf commented 8 years ago

Electron embeds node, you can definitely access the file system with an Electron app.

SuhairZain commented 8 years ago

@kamek-pf I had seen that this was possible before, but couldn't find a single example for that. Now I did another search and found this one: https://github.com/hokein/electron-sample-apps/tree/master/file-explorer. More than enough to get started and hopefully can move slowly into RN once it's released. Thanks.

Mayzie commented 8 years ago

@ptmt Just wondering, how is this going? Thanks :-)

ptmt commented 8 years ago

It has been frozen since Canonical announced their react-native fork for Ubuntu.

zserge commented 7 years ago

In Canonical repo there seems to be no activity (in the last 7 months they only updated the readme once), also they don't seem to keep their react-native up to date.

LukasBombach commented 7 years ago

Also, I have tried to use it. There is no documentation and it seems very troublesome to really use it. On Wed, 12 Apr 2017 at 22:47, Serge Zaitsev notifications@github.com wrote:

In Canonical repo there seems to be no activity (in the last 7 months they only updated the readme once), also they don't seem to keep their react-native up to date.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ptmt/react-native-macos/issues/59#issuecomment-293702818, or mute the thread https://github.com/notifications/unsubscribe-auth/ACRPhMPAvN14AUJx1TcsribM_7oqjjkkks5rvThxgaJpZM4H-xcM .

ptmt commented 7 years ago

I can understand that, it's hard to maintain such monolith project without the dedicated team working on it. It's great that Microsoft have resources to maintain Windows fork, and I'm sad that Canonical hasn't been into desktop lately. I wish I could build a really solid and useful app to attract a big sponsor to whole RN for Desktop idea. Having lightweight alternatives to Electron could be helpful in some cases, especially for small developer utilities.

ndbroadbent commented 7 years ago

I think react-native-windows also needs a lot more resources and a dedicated team. There's a lot of bugs and missing features, and they're struggling to keep up with the last RN releases.

I have had a pretty good experience getting my app to run on Windows 10 UWP (both phone and desktop), so I don't think there is a need for QT on Windows.

I'm about to try out react-native-macos, and like you say, it shares 90% of the code with iOS, so QT is probably unnecessary on Mac.

Now there's react native for Ubuntu, which does use QT, but it doesn't look like anyone is working on that anymore. But even if it was being actively maintained, I think it's better to use this project on Mac OS. It's always better to match the look and feel of the platform by using native controls.

I wish I could build a really solid and useful app to attract a big sponsor to whole RN for Desktop idea.

I second this. A lot of people on HN are hating on Electron because it is so bloated, and uses a large amount of memory. I believe that React Native is a far better choice for desktop apps.

FWIW I'm working on a game that will be launched on mobile and Windows desktop, and maybe Mac if I can get react-native-macos working. Hopefully more people will start building desktop apps and games with React Native, and we can build a stronger community 🤞

clayrisser commented 7 years ago

Development has started on https://github.com/jamrizzi/react-gtk. Most of the development is currently focused on the gtk bindings for node. https://github.com/jamrizzi/node-gtk3.

LukasBombach commented 7 years ago

Awesome!

frol commented 7 years ago

There is a quite interesting project here https://github.com/yue/yue ("A library for creating native cross-platform GUI apps."), which seems to try (and those attempts look quite successful to me) to implement a common framework for cross-platform native GUI with bindings to JS and LUA already available.

P.S. The author of yue seems to work in Electron team, which makes me believe that something interesting is coming...

zserge commented 7 years ago

@frol There has been a recent discussion on HN (https://news.ycombinator.com/item?id=15218067) and it got some rather unimpressive feedback. I would be very careful about yue (possible copyright violations, restrictions for contributors etc). And their pricing model looks bizarre for a brand new library that may or may not be trustworthy.

beatgammit commented 7 years ago

I just found this project and I was wonderin, are you still working on the Qt port @ptmt? If so, what state is it in and do you have a clear way for someone (e.g. me) to help out? Also, what does licensing look like?

I'm interested in building cross platform applications with a common library. With the way you're building it, could I have a dynamically linked library that can be under different licensing terms than Qt? Writing a cross platform library seems a lot easier than writing a cross platform GUI these days...

ptmt commented 7 years ago

I actually never worked on Qt myself, I was doing GTK one, but not for a long, so it's in a very early state. Canonical tried to make react-native based on Qt, and there are some other attempts to build cross-platform GUI frameworks, some of them may or may not use React as a core paradigm, be sure to check all links in this thread. I strongly believe that in next year we will see something truly great.

I'm also not a great expert in licensing, unfortunately. But probably can help with tech if you decide to work on something like that.

On Sun, 12 Nov 2017 at 16:38 Jameson Little notifications@github.com wrote:

I just found this project and I was wonderin, are you still working on the Qt port @ptmt https://github.com/ptmt? If so, what state is it in and do you have a clear way for someone (e.g. me) to help out? Also, what does licensing look like?

I'm interested in building cross platform applications with a common library. With the way you're building it, could I have a dynamically linked library that can be under different licensing terms than Qt? Writing a cross platform library seems a lot easier than writing a cross platform GUI these days...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ptmt/react-native-macos/issues/59#issuecomment-343737944, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9SU4cfUb1Xrh9zh8UBpUmU3tcvpVYoks5s1vTygaJpZM4H-xcM .

clayrisser commented 7 years ago

@place1 and @jamrizzi are approaching this challenge by finishing the broken and outdated node-gir (GObject Introspection) bindings for nodejs. We're then using those bindings inside of react-native-gtk. We're approaching this with the JavaScript community in mind, so we're implementing full flex support. This project is cross-platform with all operating systems. If you want to join development, hit me up on gitter.

https://github.com/Place1/node-gir https://github.com/Place1/react-native-gtk

polarathene commented 7 years ago

Canonical tried to make react-native based on Qt

Their project got forked, seems to be showing active development, so you might be worth checking for anyone after Qt target(seems to be linux only for now).

beatgammit commented 6 years ago

so we're implementing full flex support

@jamrizzi Flexbox? If so, that's pretty sweet.

@polarathene I just noticed that this past weekend. I'm hopeful that it'll be ported to other Qt-supported platforms as well, but even if it's not, just having something reasonably reliable on Linux means that all major desktops are accounted for. There's also ReactXP, which was mentioned in #160.

clayrisser commented 6 years ago

Yes, we're implementing flexbox using yoga. https://github.com/facebook/yoga

LukasBombach commented 6 years ago

This is so cool! Totally looking forward to it!