GithubHelp home page GithubHelp logo

devenv's Introduction

SOLVCON Development Environment

UNDER DEVELOPMENT

This project is a set of (Bourne again) shell scripts to align the environment for developing SOLVCON and related projects in (Ubuntu) Linux and macOS. The features include:

  1. Build dependencies from source and retain the source code for debugger.
  2. Unprivileged installation. No root permission is required.
  3. Switchable environments.
  4. Download source code from a repository or a tarball.

Installation

Clone the repository to where you want to install, usually somewhere under your home directory (e.g., ~/devenv):

git clone [email protected]:solvcon/devenv.git ~/devenv

(Or use https:)

git clone https://github.com/solvcon/devenv ~/devenv

Enabling

DEVENV requires bash and you need to turn it on in the shell:

source ~/devenv/scripts/init

It can be done automatically if you add the following line in the startup file (~/.bashrc or ~/.bash_profile):

if [ -f ~/devenv/scripts/init ]; then source ~/devenv/scripts/init; fi

Usage

The tool uses a bash function devenv for all its commends:

$ devenv
no active flavor: $DEVENVFLAVOR not defined

Usage: devenv [command]

Description:
    Tool to manage development environment in console

Variables:
    DEVENVROOT=/path/to
    DEVENVDLROOT=/path/to/var/downloaded
    DEVENVFLAVOR=
    DEVENVFLAVORROOT=/path/to/flavors
    DEVENVCURRENTROOT=/dev/null

Commands:
    list   - list all available environments
    use    - activate an environment
    off    - deactivate the environment
    add    - create a new environment directory
    del    - delete a existing environment directory
    build  - build a package in the active environment
    launch - launch an application
    show   - print the current environment

There is no environment ("flavor") available in the beginning. You need to create one using devenv add:

$ devenv add prime
create 'prime' dev environment.

The new flavor will be shown in the list:

$ devenv list
prime

Adding a flavor does not enable it:

$ devenv show
no flavor in use

Run the following command to use (enable) the flavor prime we just created:

$ devenv use prime
now using 'prime'
$ devenv show
current flavor is prime

We can turn the flavor off:

$ devenv off
'prime' to be turned off
$ devenv show
no flavor in use

Development

Build Scripts

Shared library (-fPIC) should be preferred in the build script for a package because it saves memory for the applications using the dependency.

Unit Tests

shunit2 is used as the unit-test framework. The test cases are placed in <root>/tests. To run the unit tests, shunit2 needs to be initialized:

git submodule update --init

Go to <root>/tests and run the test driver:

$ cd tests
$ ./runner.sh

You may also initialize the test library while cloning the repository:

git clone [email protected]:solvcon/devenv.git --recurse-submodules

devenv's People

Contributors

yungyuc avatar tai271828 avatar j8xixo12 avatar terrychan999 avatar alan-kuan avatar chestercheng avatar xingularity avatar yenpeichen07 avatar yuhow avatar buganini avatar dboyliao avatar

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.