Giter Club home page Giter Club logo

zproject's Introduction

# zproject - rfc/21 project generator ## Contents

OverviewScope and Goals

Sample configuration

Installationautotools

Generate build environment in your project

Removalautotools

## Overview ### Scope and Goals

zproject has these goals:

  • generate files for cross-platform build environments.
  • generate public and private headers.
  • generate rfc/21 compliant header and source skeletons for new classes
  • generate CI setup for travis.

zproject grew out of the work that has been done to automatically generate the build environment in CZMQ.

All you need is a project.xml in the project's root directory which is your

One file to rule them all

The following build environments are currently supported:

  • android (not tested)
  • autotools (tested)
  • cmake (not tested)
  • mingw32 (not tested)
  • qt-android (tested)
  • vs2008 (not tested)
  • vs2010 (not tested)
  • vs2012 (not tested)
  • vs2013 (not tested)

All classes in the project.xml are automatically added to all build environments. Further as you add new classes to your project you can generate skeleton header and source files according to rfc/21.

## Sample configuration

The following snippet is the project.xml from zproject with explains all available tags and attributes.

<!--
    Includes are processed first, so XML in included files will be
    part of the XML tree
-->
<include filename = "license.xml" />

<!-- 
    Current version of your project. 
    This will be used to package your distribution 
-->
<version major = "1" minor = "0" patch = "0" />

<!--
    Specify which other projects this depends on; these projects must be
    known by zproject, and you do not have to specify subdependencies.
    Known projects are zyre, czmq, and zmq.
<use project = "zyre" min_major= "1" min_minor = "1" min_patch = "0" />
-->

<!-- 
    The pkg-config based dependencies are added to _CPPFLAGS and _LDADD
<package_dependency name="zmq" pkg_name="libzmq" for_all="1" />
-->

<!-- Header Files 
     name := The name the header file to include without file ending
<header name = "myproject_prelude" />
-->

<!-- 
    Classes, if the class header or source file doesn't exist this will
             generate a skeletons for them.
             use private = "1" for internal classes
<class name = "myclass">Public class description</class>
<class name = "someother" private = "1">Private class description</class>
-->

<!--
    Main programs built by the project
             use private = "1" for internal tools
<main name = "progname">Exported public tool</class>
<main name = "progname" private = "1">Internal tool</class>
-->

<!-- 
    Models that we build using GSL. 
    This will generate a 'make code' target to build the models.
<model name = "sockopts" />
<model name = "zgossip" />
<model name = "zgossip_msg" />

    If a model should be generated using a specific gsl script,
    this can be set through the script attribute:
<model name = "hydra_msg" script = "zproto_codec_java.gsl" />

    Additional parameters to the script can be set via nested
    param elements:
<model name = "hydra_msg" script = "zproto_codec_java.gsl">
  <param name = "root_path" value = "../main" />
</model>
-->

<!-- Other source files that we need to package
<extra name = "some_ressource" />
-->

<!-- 
    Stuff that needs to be installed:
    
    * Linux -> /usr/local/bin
-->
<bin name = "zproject.gsl" />
<bin name = "zproject_projects.gsl" />
<bin name = "zproject_mkman" />

<bin name = "zproject_android.gsl" />
<bin name = "zproject_autoconf.gsl" />
<bin name = "zproject_automake.gsl" />
<bin name = "zproject_ci.gsl" />
<bin name = "zproject_class.gsl" />
<bin name = "zproject_cmake.gsl" />
<bin name = "zproject_docs.gsl" />
<bin name = "zproject_git.gsl" />
<bin name = "zproject_lib.gsl" />
<bin name = "zproject_mingw32.gsl" />
<bin name = "zproject_qt_android.gsl" />
<bin name = "zproject_tools.gsl" />
<bin name = "zproject_vs2008.gsl" />
<bin name = "zproject_vs2010.gsl" />
<bin name = "zproject_vs2012.gsl" />
<bin name = "zproject_vs2013.gsl" />
## Installation

Before you start you'll need to install the code generator GSL (https://github.com/imatix/gsl) on your system. Then execute the generate.sh script to generate the build environment files for zproject.

./generate.sh

After that proceed with your favorite build environment. (Currently only autotools!)

### autotools

The following will install the zproject-*.gsl files to /usr/local/bin where gsl will find them if you use zproject in your project.

./autogen.sh
./configure
make
make install
## Generate build environment in your project

Copy the project.xml and generate.sh to your project or an empty directory and adjust the values accordingly.

Run ./generate.sh

## Removal ### autotools
make uninstall

zproject's People

Contributors

hintjens avatar jemc avatar lovmoen avatar mknoszlig avatar pmienk avatar sappo avatar

Watchers

 avatar  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.