This repository contains scripts that support creating and managing projects in independent project directories. These scripts work with the existing unmodified installations of IoTivity and IoTivity-lite. Currently, these scripts have only been tested on Linux systems using bash.
To install all the scripts and changes to ~/.bashrc (and environment variables to be set on startup), just type the following command.
This command will do a number of things:
- Clone the Project-Support-Scripts repository (which includes all the scripts). This repository includes several updated scripts (ending in "2") that support building projects in any directory. There are different versions of each script that are designed for IoTivity and IoTivity-lite. There is also a script to set up environment variables to support switching between different implementations of OCF (just IoTivity and IoTivity-lite for now).
To change the implementation of OCF to use, type the following command:
- set_ocf_version.sh [iot | iot-lite]
- source ~/.bashrc
A number of convenience scripts have been written to make the development cycle easier.
- Run the following development cycle as needed
- create_project.sh project_name - create a new project and name it anything you want.
- This isn't a script, but you need to "cd project_name" to run all the other scripts.
- edit_input2.sh - edit the device description input file (.json) if necessary.
- gen2.sh - generate the code, introspection file, PICS file, and onboarding file from the device description file.
- build2.sh - compile and link everything
- edit_code2.sh - edit the server source code if necessary.
- reset2.sh - reset the sever to RFOTM by copying a fresh onboarding file
- run2.sh - run the currently compiled server in the appropriate directory