Yep I got it to work. If your running a built IDE does that pull standalone engines from the build folder?
Yes - if you run the IDE engine from within the build folder then the IDE will pick up all the binary components from the build folder. In particular, it will use Android and iOS engines for standalone building (and the 'Test' button). Note that at the moment the 'MODE' of the build is uniform - i.e. if you run a debug IDE engine, it will use debug standalone engines.
Since then I've been nutting away at seeing if I can get IDE support for the whole process. I've got ant building the jar, compiling the lcidl and calling ndk-build but it's rightly getting hung up on objective-c stuff in the mergPop lcidl that I'm using. I guess it's a tossup whether we change ldidlc to deal with this or I change my lcidl files but it does seem a shame to lose NSString to gain String...
I think we need to change lcidlc here - the suggestions we have been discussing I think will be more than fine for now (see below). Sounds like good progress on an easier way to build the android externals
I'm trying to make things as generic as possible so it can be reused but I'm having trouble with the proper LiveCode.h location in Application Support because of the space... ndk-build can't find it. So at the moment I'm relying on the user having a livecode repo in their home directory.
I must confess I still haven't come up with a reasonable way to deal with this. Having to 'install' files like LiveCode.h is a bit of a pain - particularly when it's evolving. I don't think people will mind having to checkout the LiveCode repo for now to develop externals - perhaps we should just tie the external building projects and makefiles etc. to a environment var pointing to a checked out repo. In the future this could perhaps change to a folder with the extracted bits just needed for external development.
I guess the question is mainly if it's necessary to mix implementation languages per platform on an individual command level or if it's sufficient to implement a single use clause at the top?
Well, I guess this depends on the external. If you imagine one which has some platform-specific commands, and some non-platform specific commands then it might be useful to be able to do so. Your suggestion of having an automatic 'platform not supported' result or exception does indicate that having some level of per-command configuration would be useful. However, it might be neater just to adjust the semantics of 'use' (or some variant) slightly - i.e. each handler picks up the current settings then you could do something like:
Code: Select all
use objc on ios, mac
use java on android
use none on windows, linux
command foobar in a as string
use c on all
command barfoo in a as string
This way you'd need to structure the lcidl file into blocks - but that has the advantage of handlers of a similar ilk all being together.
In terms of the 'none' (to indicate not supported), I'd advocate having it throw an error rather than return in the result as this fits with both commands and functions, and doesn't pollute the return values of them. Indeed, we could also make this case a special error code on the engine so the IDE could handle in perhaps a better way.