Coder Social home page Coder Social logo

mb_runner's Introduction

mb_runner

A helper-script to enable ConnectIQ-development on UNIX-systems

Due to the lack of a dedicated CIQ-SDK for Linux, this script aims to provide some basic automated tasks to make developing CIQ-apps on UNIX-systems possible nevertheless.
Originally this script was meant to mitigate the pain of not having a native CIQ-SDK for Linux. Although there is a Linux version of the SDK available now, this script can still be helpful for automated builds or if you don't want to use the Eclipse-CIQ-plugin for development.

These features are available:

  • compiling (re)sources and building a PRG-file for testing
  • run unit-tests (requires a running simulator)
  • creating a signed IQ-file package for publishing
  • cleaning up previously built files
  • starting the ConnectIQ-simulator
  • pushing the generated PRG-file to the running simulator

There are two ways to utilize this script:

  • Manually copy the mb_runner.sh-file plus your customized mb_runner.cfg-file into your project root.

    Your directory should then look similar to this:

     .
     ├── manifest.xml
     ├── monkey.jungle
     ├── mb_runner.sh
     ├── mb_runner.cfg
     ├── resources
     │   ├── strings.xml
     │   └── ...
     ├── resources-deu
     │   ├── strings.xml
     │   └── ...
     └── source
         ├── main.mc
         └── ...  
    
  • Or use this repository as a git-submodule of your project/repository.

    Simply execute ...

    git submodule add https://github.com/4ch1m/mb_runner.git
    

    ... to get the mb_runner.sh-file in a mb_runner-subfolder.

    You still will have to create a customized mb_runner.cfg-file in your project.

    Then your directory structure should look similar to this:

     .
     ├── manifest.xml
     ├── monkey.jungle
     ├── mb_runner
     │   ├── mb_runner.cfg.sample
     │   ├── mb_runner.sh
     │   └── README.md
     ├── mb_runner.cfg
     ├── resources
     │   ├── strings.xml
     │   └── ...
     ├── resources-deu
     │   ├── strings.xml
     │   └── ...
     └── source
         ├── main.mc
         └── ...  
    

    The benefit of this approach is a way more convenient way to update the mb_runner-script by using ...

    git submodule update --remote --merge
    

    ... once updates are available.

For more details please see the comments in the script itself: mb_runner.sh.

Additional Notes

The script should be run with your project's root-directory as current working directory.

Also the script expects your source-files to be in a folder called source, and your resources in folders named resources*.

However this can be customized by passing your full project-root-path, the resources-folder-name and the source-folder-name as 2nd, 3rd, and 4th parameter respectively.

With the introduction of jungle.files you don't need to manually specify your (re)sources for compilation anymore. (However, the script still accepts your (re)source-folder(s) as parameter(s) to provide compatibility for legacy-projects.)

If you have more than one jungle.file, you can override/add more within the config-file; e.g.:

JUNGLE_FILES="${PROJECT_HOME}/monkey.jungle "
JUNGLE_FILES+="${PROJECT_HOME}/directory1/monkey.jungle "
JUNGLE_FILES+="${PROJECT_HOME}/directory2/monkey.jungle "
JUNGLE_FILES+="${PROJECT_HOME}/directory3/monkey.jungle "
...

Technical Side Note

  • How to determine all available devices (listed in mb_runner.cfg.sample):
    xmlstarlet sel -t -v "/monkeybrains/devices/device/@id" ${MB_HOME}/bin/devices.xml
    
  • How to determine target-SDK versions (listed in mb_runner.cfg.sample):
    xmlstarlet sel -t -v "/compilerInfo/targetSdkVersions/version" ${MB_HOME}/bin/compilerInfo.xml
    grep "<version>" ${MB_HOME}/bin/compilerInfo.xml | tail -n +2
    

Have fun! 😄

mb_runner's People

Contributors

4ch1m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

matei-tm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.