DeskGap
DeskGap copied to clipboard
C Building of DeskGap
Hello, Do you have any plan to impingement library for lunching just by using C ? Something like webview-x ? If is it possible currently, could you please describe how can i do this ?
DeskDap does not provide this out of box. However the JavaScript wrappers, the platform-independent headers and the platform-specific implementations are clearly separated, so it's totally possible to extract a pure C++ library and wrap a C binding around it.
This is not what I focus right now. If you are interested in doing this I recommend to take a look at core/binding.gyp to get started.
This is something I am very interested in as well. I have a project which is very much like DeskGap but for Go. We need to find a replacement for our current C library for interacting with the native renderers and DeskGap solves this problem beautifully. It would be a shame to split efforts on this as there is clearly a need. Is separating the underlying library from node something you can reconsider? Thanks.
@leaanthony Hi. I hope this is still relevant.
I have restarted working on this project and successfully separated the non-nodejs part of Deskgap into an independent CMake project: libdeskgap.
For now most of the public APIs are in C++. I'd like to keep it that way, and plan to wrap them into C APIs side by side. It will not be much of a complex task, but rather repetitive. See https://github.com/patr0nus/DeskGap/blob/master/lib/src/wrappers/app_c.cc if you are interested in this.
Hi! This is perfect timing. I will investigate this shortly. And thank you!!
On Wed, 27 Nov 2019 at 20:43, Wang, Chi [email protected] wrote:
@leaanthony https://github.com/leaanthony Hi. I hope this is still relevant.
I have restarted working on this project and successfully separated the non-nodejs part of Deskgap into an independent CMake project: libdeskgap https://github.com/patr0nus/DeskGap/tree/master/lib.
For now most of the public APIs https://github.com/patr0nus/DeskGap/tree/master/lib/src/include/deskgap are in C++. I'd like to keep it that way, and plan to wrap them into C APIs side by side. It will not be much of a complex task, but rather repetitive. See https://github.com/patr0nus/DeskGap/blob/master/lib/src/wrappers/app_c.cc if you are interested in this.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/patr0nus/DeskGap/issues/14?email_source=notifications&email_token=AAO2SYEAIRLIT3S7HYTWORDQVY6KJA5CNFSM4G2RHRR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFI5EVA#issuecomment-559010388, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO2SYGYUFAXAZNQA2MBIHDQVY6KJANCNFSM4G2RHRRQ .
@patr0nus - What is your plan for the library? Will you create a new repo for it? I'm keen to get a Go wrapper around it and would like to know he best approach for this.
@leaanthony I think I'm gonna keep this "monorepo" approach. You will need CMake to make use of libdeskgap. Specifically, there are two ways:
-
Clone/git-submodule-add this repo, and
add_subdirectory
the path of thelib
folder in your own CMakeLists.txt, like what I did here. This gives you a chance to modify libdeskgap but makes the build steps complex. -
Use the
ExternalProject_Add
orFetchContent_Declare
function in your own CMakeLists.txt to let CMake take care of the source code fetching. This way is more simple but if you need to modify libdeskgap you will have to fork it on GitHub first.