monkey.jungle

Former Member
Former Member
Sorry, im not a very advanced developer just been mucking around making some app.

since the newest update and you have to support the monkey.jungle, how does it work, i have an app that i have been working on for a while and when i updated the sdk the new monkey.jungle file has to be written.

BUILD: WARNING: The command line options -x, -m, -z, and source file agruments have been deprecated. Please use jungle files to specify source / resource files, the manifest file, and build exclusions.

could someone please inform me and help me through this process?.

reagrds Flynn
  • Would be fine to have an illustrated jungle book for dummies, which allows to translate the-x, -m and -z arguments (to avoid 'agrument warnings')...

    As I do use a simple text editor and some scripts (all combined by my screeny tool:) ) I am starting the compiler with calls like:

    java -cp "[...]monkeybrains.jar"; [...]Monkeybrains -a "[...]api.db" -u "[...]devices.xml" -o AppName.prg -m [...]manifest.xml --warn --device fr935 --release -z [...]resources.xml;[...]strings.xml;... [...]source\*.mc -y Key.der

    What would be the correct way in SDK 2.4 to make everything correct now?
  • The Programmer's Guide discusses this in a few different sections (mostly the Build Configuration via Jungles section).

    The -m manifest.xml on the build line is replaced by the project.manifest = manifest.xml in the jungle file.

    If you setup resource files as documented in the Overriding Resources section, you may not need to do anything for the -z [...]resources.xml;[...]strings.xml;... section of the compile line. The default jungle processing will handle all of the resource files that are in appropriately named resource folders, and then apply resources for each device, family, and localization qualifier for the build that is being performed.

    For build exclusions, only the annotation type of exclusion is currently supported. This is done via the excludeAnnotations property applied to any valid qualifier. As an example, I have an application that has unique views for devices with screen rotation support (devices.xml lists edge_1000, oregon_7xx, rhino_7xx device monikers as supporting this feature). I create an initial exclusion that applies to all device form factors...

    # disable rotation support for all devices
    base.excludeAnnotations = has_rotation_support


    Then, I apply a different value of the excludeAnnotations property for the devices with rotation support.

    # enable rotation support for the 240x400 devices
    rectangle-240x400.excludeAnnotations = no_rotation_support


    Since each of the devices with rotation support happen to be 240x400, this works out just fine. If I wanted to be very specific to which device to apply this to, I could be explicit...

    edge_1000.excludeAnnotations = no_rotation_support
    oregon_7xx.excludeAnnotations = no_rotation_support
    rhino_7xx.excludeAnnotations = no_rotation_support


    Now that I've got the jungle file, I can build the app with a command line similar to this..

    [...]monkeyc -o bin\myApp.prg myApp.mc -d fr935 --warn --release -y developer_key.der -f monkey.jungle [...]source\*.mc
  • Actually I have some time to do a rewrite of my Screeny tool (portable program which replaces the eclipse IDE for small projects, controls the simulator.exe, shows font files and other things) to be fit for the SDK 3.0 (a little bit late, I know)...
    ...anyhow I am still a silly monkey lost in the big jungle :(

    I would like to "translate" the command line:
    java -cp "...\Bin\monkeybrains.jar"; com.garmin.monkeybrains.Monkeybrains -a "...\Bin\api.db" -u "...\Bin\devices.xml" -o "AppName.prg" -m "...\manifest.xml" --warn --device fr935 -z "...\resources.xml" "...\font.xml" "...\bitmap.xml" "...\Main.mc" "...\AddOn.mc" -y "...\Key.der"

    ...with a simple manifest.xml and nothing special in the resource.xml files (app name and icon, bitmap and font definitions) to fit to the new system, when I try to call:
    java -cp "...\Bin\monkeybrains.jar"; com.garmin.monkeybrains.Monkeybrains -a "...\Bin\api.db" -u "...\Bin\devices.xml" -o "AppName.prg" -f "...\monkey.jungle" --warn --device fr935 "...\Main.mc" "...\AddOn.mc" -y "...\Key.der"


    ...I get an error that the -f can't be used with a source file, without the sources I get endless errors starting with:
    line 317:0 extraneous input 'C_Program_Files_System_Connect_IQ_' expecting {'nop', 'incsp', 'ipush', 'fpush', 'spush', 'bpush', 'npush', 'lpush', 'dpush', 'frpush', 'popv', 'addv', 'subv', 'mulv', 'divv', 'andv', 'orv', 'modv', 'shlv', 'shrv', 'xorv', 'invv', 'getv', 'putv', 'invokem', 'invokef', 'agetv', 'aputv', 'lgetv', 'lputv', 'getm', 'newa', 'newba', 'newc', 'newd', 'return', 'ret', 'news', 'goto', 'eq', 'lt', 'lte', 'gt', 'gte', 'ne', 'isnull', 'isa', 'canhazplz', 'jsr', 'bt', 'bf', 'dup', 'throw', 'cpush', 'argc', 'PERMISSIONS', 'DATA', 'BYTES', 'EXTENDS', 'CODE', 'CLASSDEF', 'APPTYPE', 'PERMISSIONREQUIRED', 'METHOD', 'CLASS', 'MODULE', 'NULL', 'PARENT', 'STRING', 'INT', 'FLOAT', 'SYMBOLTABLE', 'STATICENTRY', 'MODULEID', 'LINENUM', 'END', 'LINKTABLE', 'RESOURCES', 'EXCEPTIONS', 'SETTINGS', 'NaN', Iddef}
    line 317:34 token recognition error at: '+'
    :
    line 325:0 extraneous input 'C_Program_Files_System_Connect_IQ_' expecting {'nop', 'incsp', 'ipush', 'fpush', 'spush', 'bpush', 'npush', 'lpush', 'dpush', 'frpush', 'popv', 'addv', 'subv', 'mulv', 'divv', 'andv', 'orv', 'modv', 'shlv', 'shrv', 'xorv', 'invv', 'getv', 'putv', 'invokem', 'invokef', 'agetv', 'aputv', 'lgetv', 'lputv', 'getm', 'newa', 'newba', 'newc', 'newd', 'return', 'ret', 'news', 'goto', 'eq', 'lt', 'lte', 'gt', 'gte', 'ne', 'isnull', 'isa', 'canhazplz', 'jsr', 'bt', 'bf', 'dup', 'throw', 'cpush', 'argc', 'PERMISSIONS', 'DATA', 'BYTES', 'EXTENDS', 'CODE', 'CLASSDEF', 'APPTYPE', 'PERMISSIONREQUIRED', 'METHOD', 'CLASS', 'MODULE', 'NULL', 'PARENT', 'STRING', 'INT', 'FLOAT', 'SYMBOLTABLE', 'STATICENTRY', 'MODULEID', 'LINENUM', 'END', 'LINKTABLE', 'RESOURCES', 'EXCEPTIONS', 'SETTINGS', 'NaN', Iddef}
    line 325:34 token recognition error at: '+'
    line 336:0 no viable alternative at input 'putvC_Program_Files_System_Connect_IQ_'
    line 336:34 token recognition error at: '+'
    line 349:34 token recognition error at: '+'
    :


    Can anyone give me a clue what should be done?
  • I can't say for sure, but it looks like you may be running into problems with path names having unexpected characters in them. If you don't mind my asking, what is the absolute path to Main.mc on your system?

    Also, are you certain you want three periods in those path names? Typically a single period represents the current directory, and two represents the parent directory of the current directory. Three periods is not something I've ever seen.
  • Travis, thanks for your help, I stripped some information to keep my posting readable (that's what I've thought at least)...

    The full path for the source file is "C:\Program Files\System\Connect IQ\Samples\Watchface\BirdWatch\source". The three dots are just place holder in my post, in the original command line the full paths are specified (like seen above for the source file), sorry for the confusion.

    Maybe someone has a small project (including all jungle and resource files) which I could test here - this could help to find if there's an error in the command line or within my jungle.monkey settings.

    Even when my tool works like a charm with the old SDK now, I want to see it working with the actual SDK version, before I want to publish it here...
  • Still couldn't do the trick do update my all-in-one-tool for creating Connect IQ apps because of the jungle issues I have (see above). So I did a quick rework of one of my other tools - ScreenyFont, which gives a quick overview about a defined font from reading the fnt and png files.

    Here's a screen shot of the help page above a loaded font...

  • Clearly you're doing something wrong, but I'm not sure what it is. I was able to build a sample from the SDK with this...

    C:\connectiq-sdks\connectiq-sdk-win-3.0.8-2019-1-23-8f00e4f\samples>for /d %i in (*) do (
    More? pushd %i
    More? monkeyc -o bin\myApp.prg -d fr935 --release -y c:\projects\developer_key.der -f monkey.jungle
    More? popd
    More? )


    Here is the output

    C:\connectiq-sdks\connectiq-sdk-win-3.0.8-2019-1-23-8f00e4f\samples>(
    pushd AccelMag
    monkeyc -o bin\myApp.prg -d fr935 --release -y c:\projects\developer_key.der -f monkey.jungle
    popd
    )

    C:\connectiq-sdks\connectiq-sdk-win-3.0.8-2019-1-23-8f00e4f\samples>(
    pushd ActivityTracking
    monkeyc -o bin\myApp.prg -d fr935 --release -y c:\projects\developer_key.der -f monkey.jungle
    popd
    )
    .
    .
    .
    C:\connectiq-sdks\connectiq-sdk-win-3.0.8-2019-1-23-8f00e4f\samples>(
    pushd WebRequest
    monkeyc -o bin\myApp.prg -d fr935 --release -y c:\projects\developer_key.der -f monkey.jungle
    popd
    )


  • Thanks for your help - it would be interesting how the monkey.jungle looks like (does it contain references to the resources?). Could you post the content of the file?

    Meantime my program is doing a fine job - it scans the computer automatically to find the java SDK and the Garmin IQ directory (see screenshot in the middle), and after adding the name of the source file everything is done very quickly, the compiler will be started and after that the simulator and the compiled app will be started as well.

    There are still some things to do here and there (and the monkey.jungle thing is also waiting) but for doing small projects this portable program is working fine already...



    [IMG2=JSON]{"data-align":"none","data-linktype":"1","data-linkurl":"https:\/\/drive.google.com\/file\/d\/1tLNHqxxSY6x1E_sK6lLWsetDmrIK-AtH\/view","data-size":"full","height":"189","width":"190","src":"https:\/\/lh3.googleusercontent.com\/M1WXTPT2ON5UOzITiGbrvfLNgcx5peTNLzL8N-Y29o_AE55wKgi3FhNEycGDcTRw3Nwj8xiT8XE=s190"}[/IMG2][IMG2=JSON]{"data-align":"none","data-linktype":"1","data-linkurl":"https:\/\/drive.google.com\/file\/d\/1nY6YsNkHZ8SAeepFVw19ZOIwY7fJQOTV\/view","data-size":"full","height":"141","width":"190","src":"https:\/\/lh3.googleusercontent.com\/iXW67k6KCOfRtRoKHsEQhtoG37DNMLPM5u5AO6NBKEnDMYjMF_rzYHHW--oyteqF3SaIrTex7_I=s190"}[/IMG2][IMG2=JSON]{"data-align":"none","data-linktype":"1","data-linkurl":"https:\/\/drive.google.com\/file\/d\/1Jv6V5W8FRiwKUAr6-DVXyG2hg935cYvh\/view","data-size":"full","height":"141","width":"190","src":"https:\/\/lh3.googleusercontent.com\/YVid0wxtnu8pABFs5gkQjHr3l7PppARJojDR5zY9Nhd2An-5U74H2AU-icAZAhY_L_H9SEZFSYE=s190"}[/IMG2]
  • In it's simplest form, monkey.jungle contains a single line:

    project.manifest = manifest.xml