You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Pat Deegan <pa...@psychogenic.com> on 2018/01/04 22:06:20 UTC

Cordova CLI integration for Linux Wrapper

Greets,

Made a post to JIRA (https://issues.apache.org/jira/browse/CB-13723) but
was advised this would be a more appropriate venue. Also, sorry if this
is a dupe--wasn't subscribed to the list at time of original send, and
can't see it in the archive on markmail, so I'm trying again...


*** Cordova-Ubuntu is Dead ***

To recap, I create apps using cordova and ionic.  I had been using
cordova-ubuntu for Ubuntu releases of the apps, but that's been dead for
a while and there's nothing for us with Ubuntu 17.x.

To address this, and to address the fact that cordova apps were
restricted to *Ubuntu*, I've created Coraline:
https://coraline.psychogenic.com/

It's basically a webkit renderer plus a plugin system so we can use the
same codebase for iOS/Android/Win as for Linux.

*** Coraline: Cordova wrapper for Linux ***

Coraline is the same as cordova-ubuntu in that it renders the web-tech
apps and gives you access to the native system through plugins, using
the standard interfaces.

It's different from cordova-ubuntu in that:

  * it doesn't rely on the ubuntu-sdk, of course, or Qt--it's straight
up C++, though plugins _can_ use Qt;

  * in theory, it runs on any flavour of Linux;

  * plugins are dynamically loadable, and shared--no need to install the
same functionality with every app (though there are facilities for
app-specific plugins);

  * because of the above point, apps don't actually need to be compiled
–you just need a directory with all the html/js/resources, massaged
appropriately to get rid of the Node stuff.


You can get details, and see a walk-through video, on linux deployment
at: https://coraline.psychogenic.com/developers/deployment/

The short of it is that the ideal procedure is to create a bundle (.deb
or .rpm, say) that includes the transpiled JS/HTML and other resources,
along with desktop shortcuts and such.

*** Plugins ***

The plugins need only:
  * be dynamically loadable
  * implement the Coraline Plugin interface
  * have standard functions to actually get a handle on an instance

I've got a wrapper that maps the CPlugin/Qt stuff to integrate old
ubuntu plugins (though it requires some manual tweaking), and have
ported a few (Device and SQLite), so we can rescue the existing
cordova-ubuntu plugins.

*** Wish List ***

The reason I'm writing is that I'd like to know what it would take to
integrate coraline app "builds" with the cordova CLI.

In my ideal scenario, we'd have a new "linux" target that would allow
creation of coraline-compatible bundles.
	
It shouldn't take too much effort, but I'd like to both gauge interest
and get pointers on how integration with the cordova CLI build actually
happens.  In short, I want to know what it would take to get integration
going, and some ideas on how to do it.

Any input on this, feedback on Coraline, or questions are welcome.

Thanks!
Pat Deegan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: Linux Platform Integration Alpha (Api.js etc)

Posted by julio cesar sanchez <jc...@gmail.com>.
That ugly message is caused probably by Cordova lib, I think we "broke"
something when switching from a pinned npm to the system one, all the
errors are appearing like that now.

2018-01-16 3:08 GMT+01:00 Shazron <sh...@gmail.com>:

> 3. Promises, ugh. Try reject OR throw, not both.
> https://github.com/psychogenic/cordova-linux/blob/
> 69a4dc92cae54e86761ad286c38710df8693b244/src/cordova/Api.js#L256
> reject does not terminate the execution, it will still throw after the
> reject here...
>
> 4. "cordova clean -> Cleanup project from build artifacts". Are they
> "produced" by the build? Then you clean that up.
>
> On Tue, Jan 16, 2018 at 9:49 AM, Pat Deegan <pat.cordovadev@psychogenic.
> com>
> wrote:
>
> > Hi,
> >
> > First off, thanks for the answers.
> >
> > On 2018-01-15 08:25 PM, Shazron wrote:
> > > 1. Core platforms get the reserved names. Third-party platforms are
> named
> > > after what I presume is their repo name (not 100% sure on that last
> > part).
> >
> > Ok, cool--I can wait for a nice reserved name, down the road.
> >
> > >
> > > 2. I would check out a platform example, i.e. 'ios':
> > > Is this what you were looking for?
> >
> > Yes, perfect.  Will base mods on that.
> >
> > >
> > > 3. What do you mean by ugly? Example. AFAIK it's just "throw new
> > > CordovaError('error string')"
> >
> > Ok.  By ugly I mean instead of getting some:
> >
> >   "Error, cannot proceed: error string"
> >
> > or something similar, the output is instead:
> >
> > === snip ===
> >
> > (node:1025) UnhandledPromiseRejectionWarning: Error
> > [ERR_UNHANDLED_ERROR]: Unhandled error. (error string)
> >     at EventEmitter.emit (events.js:140:19)
> >     at EventEmitter.module.exports.emit
> > (/tmp/SomeApp/node_modules/cordova-common/src/events.js:71:17)
> >     at Object.module.exports.error
> > (/tmp/SomeApp/platforms/cordova-linux/cordova/logger.js:54:12)
> >     at Api.rejectAndThrow
> > (/tmp/SomeApp/platforms/cordova-linux/cordova/Api.js:258:9)
> >     at /tmp/SomeApp/platforms/cordova-linux/cordova/Api.js:280:8
> >     at new Promise (<anonymous>)
> >     at Api.build (/tmp/SomeApp/platforms/cordova-linux/cordova/Api.js:
> > 270:9)
> >     at
> > /usr/local/lib/node_modules/cordova/node_modules/cordova-
> > lib/src/cordova/compile.js:40:30
> >     at
> > /usr/local/lib/node_modules/cordova/node_modules/cordova-
> > lib/src/util/promise-util.js:30:24
> >     at _fulfilled
> > (/usr/local/lib/node_modules/cordova/node_modules/cordova-
> > lib/node_modules/q/q.js:787:54)
> > (node:1025) UnhandledPromiseRejectionWarning: Unhandled promise
> > rejection. This error originated either by throwing inside of an async
> > function without a catch block, or by rejecting a promise which was not
> > handled with .catch(). (rejection id: 2)
> > (node:1025) [DEP0018] DeprecationWarning: Unhandled promise rejections
> > are deprecated. In the future, promise rejections that are not handled
> > will terminate the Node.js process with a non-zero exit code.
> >
> >
> > === /snip ===
> >
> > Yeah, it contains the error string up there, at the top, but seems like
> > a pretty messy exit.
> >
> > I guess I kind of expect a catch somewhere above my call to make this
> > output more user friendly. Maybe it's an issue with my setup?
> >
> >
> > >
> > > 4. I couldn't find a question in there.
> >
> > Yeah, I sent the email somewhat incomplete there... the short of it was
> > "is it a faux pas to leave some built packages from previous versions
> > lying around after a 'clean'?".
> >
> > It's currently setup such that all the generated files/intermediate
> > results of a build are cleaned up on 'clean', but the versioned packages
> > created are left intact (unless you actually remove the platform).  I
> > like the "safety" of keeping older versions around, but will eliminate
> > them on 'clean' if it's the convention/expectation.
> >
> >
> > >
> > > TBH you would be the only person working on this, and there is no point
> > in
> > > putting this in the dead cordova-ubuntu repo. I would keep it in your
> > repo
> > > for now since that will be the fastest to iterate on since you won't
> have
> > > Apache committer privileges yet, and you will be blocked by us having
> to
> > > pull it in. Once it gets to a usable state, send a proposal to donate
> > your
> > > repo to Cordova in this dev@ list and we will proceed from there.
> >
> >
> > Sounds great, will do.
> >
> > Thanks,
> > P
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> > For additional commands, e-mail: dev-help@cordova.apache.org
> >
> >
>

Re: Linux Platform Integration Alpha (Api.js etc)

Posted by Shazron <sh...@gmail.com>.
3. Promises, ugh. Try reject OR throw, not both.
https://github.com/psychogenic/cordova-linux/blob/69a4dc92cae54e86761ad286c38710df8693b244/src/cordova/Api.js#L256
reject does not terminate the execution, it will still throw after the
reject here...

4. "cordova clean -> Cleanup project from build artifacts". Are they
"produced" by the build? Then you clean that up.

On Tue, Jan 16, 2018 at 9:49 AM, Pat Deegan <pa...@psychogenic.com>
wrote:

> Hi,
>
> First off, thanks for the answers.
>
> On 2018-01-15 08:25 PM, Shazron wrote:
> > 1. Core platforms get the reserved names. Third-party platforms are named
> > after what I presume is their repo name (not 100% sure on that last
> part).
>
> Ok, cool--I can wait for a nice reserved name, down the road.
>
> >
> > 2. I would check out a platform example, i.e. 'ios':
> > Is this what you were looking for?
>
> Yes, perfect.  Will base mods on that.
>
> >
> > 3. What do you mean by ugly? Example. AFAIK it's just "throw new
> > CordovaError('error string')"
>
> Ok.  By ugly I mean instead of getting some:
>
>   "Error, cannot proceed: error string"
>
> or something similar, the output is instead:
>
> === snip ===
>
> (node:1025) UnhandledPromiseRejectionWarning: Error
> [ERR_UNHANDLED_ERROR]: Unhandled error. (error string)
>     at EventEmitter.emit (events.js:140:19)
>     at EventEmitter.module.exports.emit
> (/tmp/SomeApp/node_modules/cordova-common/src/events.js:71:17)
>     at Object.module.exports.error
> (/tmp/SomeApp/platforms/cordova-linux/cordova/logger.js:54:12)
>     at Api.rejectAndThrow
> (/tmp/SomeApp/platforms/cordova-linux/cordova/Api.js:258:9)
>     at /tmp/SomeApp/platforms/cordova-linux/cordova/Api.js:280:8
>     at new Promise (<anonymous>)
>     at Api.build (/tmp/SomeApp/platforms/cordova-linux/cordova/Api.js:
> 270:9)
>     at
> /usr/local/lib/node_modules/cordova/node_modules/cordova-
> lib/src/cordova/compile.js:40:30
>     at
> /usr/local/lib/node_modules/cordova/node_modules/cordova-
> lib/src/util/promise-util.js:30:24
>     at _fulfilled
> (/usr/local/lib/node_modules/cordova/node_modules/cordova-
> lib/node_modules/q/q.js:787:54)
> (node:1025) UnhandledPromiseRejectionWarning: Unhandled promise
> rejection. This error originated either by throwing inside of an async
> function without a catch block, or by rejecting a promise which was not
> handled with .catch(). (rejection id: 2)
> (node:1025) [DEP0018] DeprecationWarning: Unhandled promise rejections
> are deprecated. In the future, promise rejections that are not handled
> will terminate the Node.js process with a non-zero exit code.
>
>
> === /snip ===
>
> Yeah, it contains the error string up there, at the top, but seems like
> a pretty messy exit.
>
> I guess I kind of expect a catch somewhere above my call to make this
> output more user friendly. Maybe it's an issue with my setup?
>
>
> >
> > 4. I couldn't find a question in there.
>
> Yeah, I sent the email somewhat incomplete there... the short of it was
> "is it a faux pas to leave some built packages from previous versions
> lying around after a 'clean'?".
>
> It's currently setup such that all the generated files/intermediate
> results of a build are cleaned up on 'clean', but the versioned packages
> created are left intact (unless you actually remove the platform).  I
> like the "safety" of keeping older versions around, but will eliminate
> them on 'clean' if it's the convention/expectation.
>
>
> >
> > TBH you would be the only person working on this, and there is no point
> in
> > putting this in the dead cordova-ubuntu repo. I would keep it in your
> repo
> > for now since that will be the fastest to iterate on since you won't have
> > Apache committer privileges yet, and you will be blocked by us having to
> > pull it in. Once it gets to a usable state, send a proposal to donate
> your
> > repo to Cordova in this dev@ list and we will proceed from there.
>
>
> Sounds great, will do.
>
> Thanks,
> P
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: Linux Platform Integration Alpha (Api.js etc)

Posted by Pat Deegan <pa...@psychogenic.com>.
Hi,

First off, thanks for the answers.

On 2018-01-15 08:25 PM, Shazron wrote:
> 1. Core platforms get the reserved names. Third-party platforms are named
> after what I presume is their repo name (not 100% sure on that last part).

Ok, cool--I can wait for a nice reserved name, down the road.

> 
> 2. I would check out a platform example, i.e. 'ios':
> Is this what you were looking for?

Yes, perfect.  Will base mods on that.

> 
> 3. What do you mean by ugly? Example. AFAIK it's just "throw new
> CordovaError('error string')"

Ok.  By ugly I mean instead of getting some:

  "Error, cannot proceed: error string"

or something similar, the output is instead:

=== snip ===

(node:1025) UnhandledPromiseRejectionWarning: Error
[ERR_UNHANDLED_ERROR]: Unhandled error. (error string)
    at EventEmitter.emit (events.js:140:19)
    at EventEmitter.module.exports.emit
(/tmp/SomeApp/node_modules/cordova-common/src/events.js:71:17)
    at Object.module.exports.error
(/tmp/SomeApp/platforms/cordova-linux/cordova/logger.js:54:12)
    at Api.rejectAndThrow
(/tmp/SomeApp/platforms/cordova-linux/cordova/Api.js:258:9)
    at /tmp/SomeApp/platforms/cordova-linux/cordova/Api.js:280:8
    at new Promise (<anonymous>)
    at Api.build (/tmp/SomeApp/platforms/cordova-linux/cordova/Api.js:270:9)
    at
/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/compile.js:40:30
    at
/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/promise-util.js:30:24
    at _fulfilled
(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
(node:1025) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was not
handled with .catch(). (rejection id: 2)
(node:1025) [DEP0018] DeprecationWarning: Unhandled promise rejections
are deprecated. In the future, promise rejections that are not handled
will terminate the Node.js process with a non-zero exit code.


=== /snip ===

Yeah, it contains the error string up there, at the top, but seems like
a pretty messy exit.

I guess I kind of expect a catch somewhere above my call to make this
output more user friendly. Maybe it's an issue with my setup?


> 
> 4. I couldn't find a question in there.

Yeah, I sent the email somewhat incomplete there... the short of it was
"is it a faux pas to leave some built packages from previous versions
lying around after a 'clean'?".

It's currently setup such that all the generated files/intermediate
results of a build are cleaned up on 'clean', but the versioned packages
created are left intact (unless you actually remove the platform).  I
like the "safety" of keeping older versions around, but will eliminate
them on 'clean' if it's the convention/expectation.


> 
> TBH you would be the only person working on this, and there is no point in
> putting this in the dead cordova-ubuntu repo. I would keep it in your repo
> for now since that will be the fastest to iterate on since you won't have
> Apache committer privileges yet, and you will be blocked by us having to
> pull it in. Once it gets to a usable state, send a proposal to donate your
> repo to Cordova in this dev@ list and we will proceed from there.


Sounds great, will do.

Thanks,
P


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: Linux Platform Integration Alpha (Api.js etc)

Posted by Shazron <sh...@gmail.com>.
1. Core platforms get the reserved names. Third-party platforms are named
after what I presume is their repo name (not 100% sure on that last part).

2. I would check out a platform example, i.e. 'ios':
    -
https://github.com/apache/cordova-ios/blob/8edd13aaee16d6996a4560a74d17798437b42c6f/bin/templates/scripts/cordova/Api.js#L464
    -
https://github.com/apache/cordova-ios/blob/8edd13aaee16d6996a4560a74d17798437b42c6f/bin/templates/scripts/cordova/lib/check_reqs.js#L185

Is this what you were looking for?

3. What do you mean by ugly? Example. AFAIK it's just "throw new
CordovaError('error string')"

4. I couldn't find a question in there.

TBH you would be the only person working on this, and there is no point in
putting this in the dead cordova-ubuntu repo. I would keep it in your repo
for now since that will be the fastest to iterate on since you won't have
Apache committer privileges yet, and you will be blocked by us having to
pull it in. Once it gets to a usable state, send a proposal to donate your
repo to Cordova in this dev@ list and we will proceed from there.


On Mon, Jan 15, 2018 at 6:36 AM, Pat Deegan <pa...@psychogenic.com>
wrote:

> Hi all,
>
> Anyone have input on my Qs from the 5th?
>
> I'm especially interested in the second question, related to setting up
> Api.prototype.requirements, and in anything else I'd need to do to
> polish things up before making a pull request.
>
> Also, which repo would this request be made on?
>
> Thanks!
> PatD
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: Linux Platform Integration Alpha (Api.js etc)

Posted by Pat Deegan <pa...@psychogenic.com>.
Hi all,

Anyone have input on my Qs from the 5th?

I'm especially interested in the second question, related to setting up
Api.prototype.requirements, and in anything else I'd need to do to
polish things up before making a pull request.

Also, which repo would this request be made on?

Thanks!
PatD


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Linux Platform Integration Alpha (Api.js etc)

Posted by Pat Deegan <pa...@psychogenic.com>.
Aloha,

Ok, so it's still a bit rough around the edges but I've got a
linux/coraline platform running (and a few related questions).

It's available at https://github.com/psychogenic/cordova-linux.git

Assuming you have:
	- a linux box,
	- cordova,
	- cmake/cpack (https://cmake.org/),
	- coraline (https://coraline.psychogenic.com)
	and some way to build linux bundles (I've got debuild and alien)

You should be able to do:

$ cordova create SomeApp com.example.someapp SomeApp
$ cd SomeApp
$ cordova platform add https://github.com/psychogenic/cordova-linux.git
$ cordova build

And wind up with some interesting files in
	...SomeApp/platforms/cordova-linux/packages

What I get in there:
 someapp_1.0.0.deb
 someapp_1.0.0.rpm
 someapp_1.0.0.zip

with all the right stuff within (at least for the deb, can't really test
the RPMs and don't know how to setup their dependencies etc).

The name of the bundles/content directory is generated from the id
(bla.bla.thiswillbethename), the versions are taken from the config
file, etc.  So everything (hopefully) works as you'd expect.


*** 4 Questions ***

* 1) by what magic do the other platforms get nice names?
The android platform, for instance, has seems to have "name":
"cordova-android" but `platform ls` shows:

$ cordova platform ls
Installed platforms:
  cordova-linux 0.0.6
Available platforms:
  android ~7.0.0
  browser ~5.0.1
  ios ~4.5.4
  osx ~4.0.1
  windows ~5.0.0
  www ^3.12.0

I can't bring myself to call my package "linux" (!) but why is it called
"cordova-linux" in the listing?

* 2) how am I supposed to use Api.prototype.requirements?  The test
sample doesn't make it obvious.  I'd like to ensure cmake and coraline
are actually installed.

* 3) how do we throw CordovaError?  The system barfs in an ugly way when
I do so.

* 4) at this time, I've elected to preserve older packages in that
output directory (.../cordova-linux/packages).  So if you
	cordova clean
the build directories and all that go away, but the various versions of
bundles/zip files are preserved unless you do a `platform rm`.  Is


*** Further Improvements ***

So, if this is a good start and it's likely to get included, I'll do a
little more legwork on the plugins side to ensure the bundles have any
plugins requested as dependencies, and such.

I'd also like to know if there's anything I'm not doing correctly or
should otherwise change to be more compliant with expectations.

Also, if anyone is capable of testing on an RPM-based distro, that'd be
cool as I'm flying completely blind in this department for the moment.

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: Cordova CLI integration for Linux Wrapper

Posted by Jesse <pu...@gmail.com>.
Yeah, the electron is really just an example, I do not think there is
overlap.
Let me know if you bump into any issues. I will have a deeper look soon.


@purplecabbage
risingj.com

On Thu, Jan 4, 2018 at 3:50 PM, Pat Deegan <pa...@psychogenic.com>
wrote:

> Hi,
>
> First off thanks for your answer and info.
>
> I'm still working on wrapping my head on where electron and coraline
> overlap and/or where they might work together.
>
> I've got the exec bridge part done, and am calling into plugins like
> SQLite and ble-central, basically using the exact same www/ JS file as
> for other platforms--so that's part all good.
>
> The Druid Builder app uses SQLite, Device and In-App browser, and it's
> the same code (typescript/JS) as I used for Windows.
>
> Now I'm going to look into that bare minimum platform.  My impression is
> that it wouldn't be much to do, as coraline doesn't care about the DHTML
> contents (they could be ionic, electron... anything that runs in a
> browser), and doesn't require any compilation step at all.
>
> All we'd need to do is:
>         * copy the config.xml file into the content root
>         * create deb/rpm or whatever packages, optionally generating a
> desktop
> shortcut file.
>
> and it should just work.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: Cordova CLI integration for Linux Wrapper

Posted by Pat Deegan <pa...@psychogenic.com>.
Hi,

First off thanks for your answer and info.

I'm still working on wrapping my head on where electron and coraline
overlap and/or where they might work together.

I've got the exec bridge part done, and am calling into plugins like
SQLite and ble-central, basically using the exact same www/ JS file as
for other platforms--so that's part all good.

The Druid Builder app uses SQLite, Device and In-App browser, and it's
the same code (typescript/JS) as I used for Windows.

Now I'm going to look into that bare minimum platform.  My impression is
that it wouldn't be much to do, as coraline doesn't care about the DHTML
contents (they could be ionic, electron... anything that runs in a
browser), and doesn't require any compilation step at all.

All we'd need to do is:
	* copy the config.xml file into the content root
	* create deb/rpm or whatever packages, optionally generating a desktop
shortcut file.

and it should just work.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: Cordova CLI integration for Linux Wrapper

Posted by Jesse <pu...@gmail.com>.
electron currently does not support the plugin definitions and this is a
bit of an architectural oversight, and my next steps when I find time.

currently plugins are required to implement a tag ala <platformName/> which
defines their source files that get added to a project, and lately we have
found ourselves with overlap. cordova-electron technically can use the same
plugin code as cordova-browser, but there is no way to make this happen
currently.

The key parts of implementing a platform for cordova are to create an exec
bridge, and implement a platformAPI (js) that the tooling can use to
create/build/run your platform.

A bare minimum platform can be found here: https://github.com/
apache/cordova-test-platform
The platform API def:
https://github.com/apache/cordova-discuss/blob/master/proposals/cordova-lib%20refactoring/PlatformApi.js
Info on creating a plugin can be found here: http://cordova.apache.
org/docs/en/7.x/guide/hybrid/plugins/index.html

Some discussion on platform API and how platforms can be added:
https://github.com/apache/cordova-discuss/pull/12




@purplecabbage
risingj.com

On Thu, Jan 4, 2018 at 2:35 PM, Pat Deegan <pa...@psychogenic.com>
wrote:

> Hi,
>
> On 2018-01-04 05:24 PM, Darryl Pogue wrote:
> > Are there benefits to Coraline over
> > something like Electron?
>
> Honestly, I don't know electron--I'm an embedded guy, mostly using
> cordova (and ionic atop of it) for talking BLE from Android to hardware.
>
> Just had a very cursory look but the main thing I'm interested is
> _plugins_... I talk to stuff, over bluetooth, over serial USB, etc.
>
> Does electron actually support the cordova plugin system?
>
> You can run an ionic app in a browser, no problem, but if you want to
> access the filesystem, use bluetooth, etc, you need something like cordova.
>
> That's why I wanted my cordova-ubuntu replacement--both for distributing
> apps, and so I can dev my Android etc under Linux.
>
> I'll take a deeper look at your links and the Api.js.
>
> Thanks,
> P
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: Cordova CLI integration for Linux Wrapper

Posted by Pat Deegan <pa...@psychogenic.com>.
Hi,

On 2018-01-04 05:24 PM, Darryl Pogue wrote:
> Are there benefits to Coraline over
> something like Electron?

Honestly, I don't know electron--I'm an embedded guy, mostly using
cordova (and ionic atop of it) for talking BLE from Android to hardware.

Just had a very cursory look but the main thing I'm interested is
_plugins_... I talk to stuff, over bluetooth, over serial USB, etc.

Does electron actually support the cordova plugin system?

You can run an ionic app in a browser, no problem, but if you want to
access the filesystem, use bluetooth, etc, you need something like cordova.

That's why I wanted my cordova-ubuntu replacement--both for distributing
apps, and so I can dev my Android etc under Linux.

I'll take a deeper look at your links and the Api.js.

Thanks,
P

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: Cordova CLI integration for Linux Wrapper

Posted by Jesse <pu...@gmail.com>.
Good stuff Pat!
Super cool, I'll try to look deeper in the next week.

Re: electron ( sorry for the thread hijack ... )
I just pushed my PR that adds full platformAPI support and turns electron
into a fully capable platform.


@purplecabbage
risingj.com

On Thu, Jan 4, 2018 at 2:24 PM, Darryl Pogue <dv...@gmail.com> wrote:

> That looks really cool!
>
> There's been talk for a while of creating a platform based on
> Electron[1] for Cordova apps to run cross-platform on desktop.
> Electron is the WebView-based packaging behind apps like Slack,
> VisualStudio Code, and Atom. There have been a few attempts at making
> a cordova-electron project[2][3] over the years, but they don't look
> particularly well maintained.
>
> Are there plans to bring Coraline to other platforms (macOS in
> particular, Windows should already be covered by the existing
> cordova-windows platform)? Are there benefits to Coraline over
> something like Electron?
>
>
> In terms of integrating with the CLI, that should be much easier now!
> You just need to provide a cordova/Api.js file in your application
> template, with an API that implements the common actions (prepare,
> build, etc.) for your platform. (See cordova-browser as an example[4])
>
>
> 1: https://electronjs.org/
> 2: https://github.com/apache/cordova-electron
> 3: https://github.com/zyra/cordova-electron
> 4: https://github.com/apache/cordova-browser/blob/master/
> bin/template/cordova/Api.js
>
> On Thu, Jan 4, 2018 at 2:06 PM, Pat Deegan
> <pa...@psychogenic.com> wrote:
> >
> > Greets,
> >
> > Made a post to JIRA (https://issues.apache.org/jira/browse/CB-13723) but
> > was advised this would be a more appropriate venue. Also, sorry if this
> > is a dupe--wasn't subscribed to the list at time of original send, and
> > can't see it in the archive on markmail, so I'm trying again...
> >
> >
> > *** Cordova-Ubuntu is Dead ***
> >
> > To recap, I create apps using cordova and ionic.  I had been using
> > cordova-ubuntu for Ubuntu releases of the apps, but that's been dead for
> > a while and there's nothing for us with Ubuntu 17.x.
> >
> > To address this, and to address the fact that cordova apps were
> > restricted to *Ubuntu*, I've created Coraline:
> > https://coraline.psychogenic.com/
> >
> > It's basically a webkit renderer plus a plugin system so we can use the
> > same codebase for iOS/Android/Win as for Linux.
> >
> > *** Coraline: Cordova wrapper for Linux ***
> >
> > Coraline is the same as cordova-ubuntu in that it renders the web-tech
> > apps and gives you access to the native system through plugins, using
> > the standard interfaces.
> >
> > It's different from cordova-ubuntu in that:
> >
> >   * it doesn't rely on the ubuntu-sdk, of course, or Qt--it's straight
> > up C++, though plugins _can_ use Qt;
> >
> >   * in theory, it runs on any flavour of Linux;
> >
> >   * plugins are dynamically loadable, and shared--no need to install the
> > same functionality with every app (though there are facilities for
> > app-specific plugins);
> >
> >   * because of the above point, apps don't actually need to be compiled
> > –you just need a directory with all the html/js/resources, massaged
> > appropriately to get rid of the Node stuff.
> >
> >
> > You can get details, and see a walk-through video, on linux deployment
> > at: https://coraline.psychogenic.com/developers/deployment/
> >
> > The short of it is that the ideal procedure is to create a bundle (.deb
> > or .rpm, say) that includes the transpiled JS/HTML and other resources,
> > along with desktop shortcuts and such.
> >
> > *** Plugins ***
> >
> > The plugins need only:
> >   * be dynamically loadable
> >   * implement the Coraline Plugin interface
> >   * have standard functions to actually get a handle on an instance
> >
> > I've got a wrapper that maps the CPlugin/Qt stuff to integrate old
> > ubuntu plugins (though it requires some manual tweaking), and have
> > ported a few (Device and SQLite), so we can rescue the existing
> > cordova-ubuntu plugins.
> >
> > *** Wish List ***
> >
> > The reason I'm writing is that I'd like to know what it would take to
> > integrate coraline app "builds" with the cordova CLI.
> >
> > In my ideal scenario, we'd have a new "linux" target that would allow
> > creation of coraline-compatible bundles.
> >
> > It shouldn't take too much effort, but I'd like to both gauge interest
> > and get pointers on how integration with the cordova CLI build actually
> > happens.  In short, I want to know what it would take to get integration
> > going, and some ideas on how to do it.
> >
> > Any input on this, feedback on Coraline, or questions are welcome.
> >
> > Thanks!
> > Pat Deegan
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> > For additional commands, e-mail: dev-help@cordova.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: Cordova CLI integration for Linux Wrapper

Posted by Darryl Pogue <dv...@gmail.com>.
That looks really cool!

There's been talk for a while of creating a platform based on
Electron[1] for Cordova apps to run cross-platform on desktop.
Electron is the WebView-based packaging behind apps like Slack,
VisualStudio Code, and Atom. There have been a few attempts at making
a cordova-electron project[2][3] over the years, but they don't look
particularly well maintained.

Are there plans to bring Coraline to other platforms (macOS in
particular, Windows should already be covered by the existing
cordova-windows platform)? Are there benefits to Coraline over
something like Electron?


In terms of integrating with the CLI, that should be much easier now!
You just need to provide a cordova/Api.js file in your application
template, with an API that implements the common actions (prepare,
build, etc.) for your platform. (See cordova-browser as an example[4])


1: https://electronjs.org/
2: https://github.com/apache/cordova-electron
3: https://github.com/zyra/cordova-electron
4: https://github.com/apache/cordova-browser/blob/master/bin/template/cordova/Api.js

On Thu, Jan 4, 2018 at 2:06 PM, Pat Deegan
<pa...@psychogenic.com> wrote:
>
> Greets,
>
> Made a post to JIRA (https://issues.apache.org/jira/browse/CB-13723) but
> was advised this would be a more appropriate venue. Also, sorry if this
> is a dupe--wasn't subscribed to the list at time of original send, and
> can't see it in the archive on markmail, so I'm trying again...
>
>
> *** Cordova-Ubuntu is Dead ***
>
> To recap, I create apps using cordova and ionic.  I had been using
> cordova-ubuntu for Ubuntu releases of the apps, but that's been dead for
> a while and there's nothing for us with Ubuntu 17.x.
>
> To address this, and to address the fact that cordova apps were
> restricted to *Ubuntu*, I've created Coraline:
> https://coraline.psychogenic.com/
>
> It's basically a webkit renderer plus a plugin system so we can use the
> same codebase for iOS/Android/Win as for Linux.
>
> *** Coraline: Cordova wrapper for Linux ***
>
> Coraline is the same as cordova-ubuntu in that it renders the web-tech
> apps and gives you access to the native system through plugins, using
> the standard interfaces.
>
> It's different from cordova-ubuntu in that:
>
>   * it doesn't rely on the ubuntu-sdk, of course, or Qt--it's straight
> up C++, though plugins _can_ use Qt;
>
>   * in theory, it runs on any flavour of Linux;
>
>   * plugins are dynamically loadable, and shared--no need to install the
> same functionality with every app (though there are facilities for
> app-specific plugins);
>
>   * because of the above point, apps don't actually need to be compiled
> –you just need a directory with all the html/js/resources, massaged
> appropriately to get rid of the Node stuff.
>
>
> You can get details, and see a walk-through video, on linux deployment
> at: https://coraline.psychogenic.com/developers/deployment/
>
> The short of it is that the ideal procedure is to create a bundle (.deb
> or .rpm, say) that includes the transpiled JS/HTML and other resources,
> along with desktop shortcuts and such.
>
> *** Plugins ***
>
> The plugins need only:
>   * be dynamically loadable
>   * implement the Coraline Plugin interface
>   * have standard functions to actually get a handle on an instance
>
> I've got a wrapper that maps the CPlugin/Qt stuff to integrate old
> ubuntu plugins (though it requires some manual tweaking), and have
> ported a few (Device and SQLite), so we can rescue the existing
> cordova-ubuntu plugins.
>
> *** Wish List ***
>
> The reason I'm writing is that I'd like to know what it would take to
> integrate coraline app "builds" with the cordova CLI.
>
> In my ideal scenario, we'd have a new "linux" target that would allow
> creation of coraline-compatible bundles.
>
> It shouldn't take too much effort, but I'd like to both gauge interest
> and get pointers on how integration with the cordova CLI build actually
> happens.  In short, I want to know what it would take to get integration
> going, and some ideas on how to do it.
>
> Any input on this, feedback on Coraline, or questions are welcome.
>
> Thanks!
> Pat Deegan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org