cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pat Deegan <pat.cordova...@psychogenic.com>
Subject Linux Platform Integration Alpha (Api.js etc)
Date Sat, 06 Jan 2018 02:37:24 GMT
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


Mime
View raw message