Other ramblings‎ > ‎

    mancode - an application for code management

    Preamble

    This application was written using Visual Basic .Net 2010 Express Edition. As a result, it flickers like hell when re-sized. This is no fancy tool, it's just an application that should help the developer compile projects with numerous dependencies using various tool chains.
    To skip the cit-chat and get the application go to download section.

    Table of contents


     The main part that was developed so far is related to library management. Most of the libraries that are listed can be queried about versions and one of the version or, at least, latest (trunk) version may be retrieved.
     The page has three main parts:
    • the list on the left holds all the libraries that application knows of; only one library may be selected at a time and all information that is displayed relates to that library
    • bottom right part, labeled Generic data for library tells you all about selected library and has some tools that operates on it
    • top right part, not very inspired named Version specific data holds the list of versions for current library and, for selected version, some data and tools.
     
     A special tab panel is dedicated to running tasks (and was named Activities). Whenever a thread needs to be created for performing various tasks (getting a list of versions, getting a particular version from web, building a library,...) a new action is added at the top. The action has same name as the target (library, application, ..) and the icon tells if it's running (arrows icon) or has ended it's execution (reddish icon). Each action (button) represents a thread internally and, possibly, a child process (svn, cvs, git, ...). Close and Stop buttons act on current action and are capable of forcing the exit of running tasks. Close also removes the action from the list at the top.
     Command line at the bottom is not implemented yet. It's there because some future commands may require the user to interact with running process. However, this needs to be the very last resort, as the program is intended to make the things run by themselves.
     
      Settings panel is quick and dirty. Variables that start with an underscore are internal and have no effect when changed. Important variables are those holding paths to various external components; these need to be set-up before starting to actually use the program.  

    Retrievers

    These are (internal, for now) modules that are used to get the content associated with a library. Future plans include a plug-in model where you can write a shared library for custom needs. The user may select a retriever for library and one for each version. In most circumstances, when using automated query, version that were detected are assigned same template as library and an url, so user only has to select an template for library.
    Internally, each template exposes a common interface used to get:
    • a list of versions
    • a specific version
    • latest version
    • all versions
    • an integer number for a given version name (used to determine latest version)
    As variables, the retrievers are allowed to use: library name, version name, library url and version url. If any given retriever can't do it's job based on this information, a new one needs to be created and additional information hard coded.
    Below is a list of retrievers created so far. Each has a description giving hints about it's usage and a tag ([like this]) telling if this is thought to be generic or specific for a library or groups of libraries.
    In this context, some special symbols are used:
    • %L_URL% - the url provided by the library
    • %L_NAME% - the name provided by the library
    • %V_URL% - the url provided by the version
    • %V_NAME% - the name provided by the version

    Manual [generic]

    This is just a placeholder. If an url is assigned, it will be opened in default browser.

    Subversion [generic]

    Prerequisites: subversion package needs to be installed and svn_bin setting has to hold the path to where svn.exe may be found.
    For detecting versions, the module lists all entries under %L_URL%/tags. To form a name, the entry is stripped from library name (%L_NAME%) or the word "release". The url that is assigned is formed by adding the listed name to %L_URL%/tags/. To locate most recent version (aka the trunk, development version) in the repository, the module attempts to find a folder named "trunk" in %L_URL%/tags and in %L_URL%, then, if no versions were located (tag missing), it tries to get the %L_URL% and to consider this a trunk.
    When latest version is requested either trunk version is downloaded (if a version named like so is present) or a numeric value is computed for each version and the largest value marks newest version.
    Specific versions are downloaded by simply asking svn to place output in lb_src inside version folder.

    This module may be used to download virtually any package that organizes itself in trunk / tags / branches structure and uses svn.

    CVS [generic]

    Prerequisites: cvs package needs to be installed and cvs_bin setting has to hold the path to where cvs.exe may be found.
    As I didn't find a proper way of listing the versions using cvs (did't struggle too much, I admit), this module only generates a single (trunk) version from %L_URL%. The input url must look like so: :pserver:anonymous@librs.cvs.sourceforge.net:/cvsroot/librs

    Mercurial [generic]

    Prerequisites: mercurial package needs to be installed and mercurial_bin setting has to hold the path to where hgs.exe may be found.
    As I have no experience with mercurial, this is not really working right now. Was created before creating GMP-Mercurial to give a false sense of inheritance. :)

    Git [generic]

    Prerequisites: git package needs to be installed and git_bin setting has to hold the path to where git.exe may be found.
    Version detection is done using %L_URL% and "refs/tags/"; the trunk is located with "refs/heads/" and "master" keyword. If found, library name is stripped from the version name.
    Because of the trickery that is required to bring the content in lb_src folder, old folder needs to be deleted, so this will not be an upgrade action, but a replace action(!!!)

    Sourceforge - http [generic]

    Prerequisites: none
    This module works by downloading the page it is targeted to and parsing the received html source; this parse is very superficial at this time so it may be broken by changes in their scripts. The code looks for "net.sf.files" table and extracts the files and url. Text (.txt) entries are filtered out.
    Downloading works by first figuring out a file name for download and searching that file in cache. The file is only downloaded (using information found in "net.sf.files" table) if it's not present in cache. By the way, the cache folder's location needs to be set in cache_folder setting. By default, a folder is created in same folder as executable.

    FreeLing - SVN [specific]

    Prerequisites: subversion package needs to be installed and svn_bin setting has to hold the path to where svn.exe may be found.
    The repository does not follow the trunk / tags / branches structure and hosts three packages: freeling, fries and omlet. This retriever may be used for all three.

    GMP - Mercurial [specific]

    Prerequisites: mercurial package needs to be installed and mercurial_bin setting has to hold the path to where hgs.exe may be found.
    For version detection a trickery is used: the web page is downloaded and parsed. What's found is feed to mercurial when a version needs to be downloaded.

    CGAL - http [specific]

    Prerequisites: none
    Another one that relies on html page parsing. Specific format is used to find files suitable for download. The retriever also uses the cache mechanism to avoid downloading same file more than once.

    Per-library status

    This section lists libraries that were added so far to this system and the status for each. Libraries that are marked manual in retriever column need more work / hack to be fully automated.
     
     Library  Retrieve status  Build status
     zlib not attempted yet
     pcre
    • works by using Subversion and this url: svn://vcs.exim.org/pcre/code/
    • only the trunk and version 8.12.1 were retrieved, but others should work just as smooth
    not attempted yet
     boost not attempted yet
     db (Oracle Berkeley DB) not attempted yet
     icu not attempted yet
     freeling
     omlet
     fries
    not attempted yet 
     gmp
    • special GMP - Mercurial type and http://gmplib.org:8000/ url shall be used in order to obtain any version including the trunk
    not attempted yet
     cfg+ not attempted yet 
     curl
    • uses GIT with this URL: git://github.com/bagder/curl.git; outputs a long list of tags, but trunk and actual versions are spread among them; trunk and a version were tested and work
    not attempted yet  
     cgal not attempted yet 
     mpfr not attempted yet  
     rs
    • standard cvs and :pserver:anonymous@librs.cvs.sourceforge.net:/cvsroot/librs conduct to trunk only being retrieved
    not attempted yet   
     taucs not attempted yet    
     xstdlib not attempted yet  
     
    For these libraries listed here downloads section has text files that allows you to load them in a running session.


    Legal notice: Terms and product names used in this document may be trademarks or registered trademarks of their respective companies and are hereby acknowledged.