2 apps in one directory with 2 monkey.jungle files and manifest.xml-s and launch.json

Short question: how can I pass the jungle file in launch.json?

Long explanation:

I've reached a point where I can't add more features to my app for devices that have only 32K DF memory. Since this includes popular devices that can be still bought (and I own 2 watches like that) I'd like to find a solution. Until now I had something like this in 1 app:

old devices: no graphic, only the basic features
newer devices: graphic, all features

Now I have the option to do:

old devices: no graphic, only the basic features
newer devices: graphic, most features
newest devices: graphic, all features

But the next feature I am working on is a big one and one that I'm pretty sure will be interesting to owners of "newer devices" (like myself), so I'm thinking how can I provide it for them. So I thought that I can split the app into 2 for "newer devices":
App A: features as now
App B: the new feature

old devices and newest devices would be the same app as App A (as now).

I don't want to have a barrel, I don't feel it's worth the hassle, so I'd like to keep the resources and code organized as now, in the same root directory, and have separate monkey.jungle and manifest.xml for the 2 apps.

  • For example, git diff and blame (in the git extension) won't work as expected. For a diff, on one side you'll see the symlink itself (i.e. as if it were a text file with the target path, same as it's shown in git) and on the other side you'll see the text of the linked file. Then again, command line git utilities don't follow links, but at least they work in a consistent fashion.

    git commit should work fine though. And you can always use the command line, github desktop or sublime merge for all your git stuff anyway.

    It's really not a huge deal as long as you have both projects open at the same time, because in that case you can always work on the originals of any symlinked files. It's only more of a concern if you only have the sub project open, and you were hoping to have full source control integration in the IDE.

  • It doesn't work. Something is not yet configured...

    I have now:

    .vscode/launch.json
    source
    resources
    monkey.jungle
    manifest.xml # for developing + beta
    manifest-prod.xml # for exporting for production
    monkey-appb.jungle
    manifest-appb.xml # for developing + beta
    manifest-appb-prod.xml # for exporting for production
    AppB/.vscode -> ../.vscode
    AppB/sources -> ../sources

    AppB/resources -> ../resources
    AppB/monkey.jungle -> ../monkey-appb.jungle
    AppB/manifest.xml -> ../manifest-appb.xml

    No natter what I do I get an error in VSC: No devices available to build for AntHRV. Download devices using the SDK Manager.

    (BTW for now the jungle file and the manifest file are identical to the originals, so it should just start the "regular" app in the simulator)

  • Under AppB, try making .vscode, monkey.jungle and manifest.xml regular files instead of symlinks. It worked fine for me when my only symlinks were pointing to resources/ and source/. Also, not sure if it's just a typo in your comment, but your source folder is named "source", but the symlilnk is pointing to "../sources".

    Also, dumb question, but does monkey-appb.jungle refer to "manifest.xml" or "manifest-appb.xml" (or something else)? Not to state the obvious, but any relative paths are going to be evaluated with respect to the location of the symlink, not to the target. (Assuming you are building in the AppB folder.)

  • ok, copying the files over worked

  • ok, copying the files over worked

    nice! now you can try making them symlinks again (if you want) one-by-one. I'm gonna guess it was .vscode that was the problem but I'm not 100% sure.

  • no, it has nothing to do with the symlinks. All files are symlinks now and it works. The catch is that there has to be a file called manifest.xml in the root of the project (in this case in AppB/manifest.xml -> ../manifest-appb.xml) when the window of VSC is opened. It's a bug in the Monkey C plugin that I already reported here: https://forums.garmin.com/developer/connect-iq/i/bug-reports/vsc-doesn-t-respect-monkey-jungle-s-manifest-setting What confised me is that in my "old" project I use it like this:

    manifest.xml for development and beta app
    manifest-prod.xml for release

    and monkey.jungle has:

    # project.manifest = manifest-prod.xml # production
    project.manifest = manifest.xml # beta
    and I switch the comment on the first 2 lines before I release to production. I didn't notice the problem because when I do that the CSV window is already open usually.
  • interesting, thanks for following up with that