Use RPM macro for cmake

Use RPM macro for cmake

Using the %cmake macro adds some defines to cmake that allow for proper
debuginfo extraction

Name:           @(Package)
Version:        @(Version)
Release:        @(RPMInc)%{?dist}
Summary:        ROS @(Name) package

Group:          Development/Libraries
License:        @(License)
@[if Homepage and Homepage != '']URL:            @(Homepage)@\n@[end if]Source0:        %{name}-%{version}.tar.gz
@[if NoArch]@\nBuildArch:      noarch@\n@[end if]
@[for p in Depends]Requires:       @p@\n@[end for]@[for p in BuildDepends]BuildRequires:  @p@\n@[end for]@[for p in Conflicts]Conflicts:      @p@\n@[end for]@[for p in Replaces]Obsoletes:      @p@\n@[end for]
%description
@(Description)

%prep
%setup -q

%build
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it.  It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
mkdir -p build && cd build
%cmake .. \
        -UINCLUDE_INSTALL_DIR \
        -ULIB_INSTALL_DIR \
        -USYSCONF_INSTALL_DIR \
        -USHARE_INSTALL_PREFIX \
        -ULIB_SUFFIX \
        -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
        -DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
        -DSETUPTOOLS_DEB_LAYOUT=OFF \
        -DCATKIN_BUILD_BINARY_PACKAGE="1" \

make %{?_smp_mflags}

%install
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it.  It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
cd build
make install DESTDIR=%{buildroot}

%files
@(InstallationPrefix)

%changelog@[for change_version, (change_date, main_name, main_email) in changelogs]@\n* @(change_date) @(main_name) <@(main_email)> - @(change_version)@\n- Autogenerated by Bloom@\n@[end for]

Name:           @(Package)
Version:        @(Version)
Release:        @(RPMInc)%{?dist}
Summary:        ROS @(Name) package

Group:          Development/Libraries
License:        @(License)
@[if Homepage and Homepage != '']URL:            @(Homepage)@\n@[end if]Source0:        %{name}-%{version}.tar.gz
@[if NoArch]@\nBuildArch:      noarch@\n@[end if]
@[for p in Depends]Requires:       @p@\n@[end for]@[for p in BuildDepends]BuildRequires:  @p@\n@[end for]@[for p in Conflicts]Conflicts:      @p@\n@[end for]@[for p in Replaces]Obsoletes:      @p@\n@[end for]
%description
@(Description)

%prep
%setup -q

%build
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it.  It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
mkdir -p build && cd build
cmake .. \
        -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
        -DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
        -DSETUPTOOLS_DEB_LAYOUT=OFF \
        -DCATKIN_BUILD_BINARY_PACKAGE="1" \

make %{?_smp_mflags}

%install
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it.  It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
cd build
make install DESTDIR=%{buildroot}

%files
@(InstallationPrefix)

%changelog@[for change_version, (change_date, main_name, main_email) in changelogs]@\n* @(change_date) @(main_name) <@(main_email)> - @(change_version)@\n- Autogenerated by Bloom@\n@[end for]


Add stress test example which runs a bunch of presence operations constantly, designed mainly to help track down shutdown errors.

/* This script is meant to stress test a bunch of features of
 * presences (and system). It executes a wide variety of functions and
 * does so very quickly. Ideally this allows you to find:
 *
 * 1. Relatively rare errors that only occur through a lot of
 * repetition.
 *
 * 2. Shutdown bugs. If we don't clean up properly in the C++ code,
 * this script runs stuff fast enough to make it likely that we'll
 * cause real errors.
 *
 * BE CAREFUL with this script. It will likely cause memory usage to
 * continuously grow because of how fast it does things -- it is best
 * to start it up, let it run for a very short time and then kill the
 * object host.
 */

system.require('std/core/repeatingTimer.em');

// Emitting events
function eventCallback() {
    system.event( function() { return; } );
};

// Presence properties:
// Position
(function() {
     var settings = [<0, 0, 0>, <0, 5, 0>];
     var curSetting = 0;

     setPositionCallback = function() {
         curSetting = (curSetting + 1) % settings.length;
         system.self.position = settings[curSetting];
     }
 })();
// Velocity
(function() {
     var settings = [<0, -5, 0>, <0, 5, 0>];
     var curSetting = 0;

     setVelocityCallback = function() {
         curSetting = (curSetting + 1) % settings.length;
         system.self.velocity = settings[curSetting];
     }
 })();
// Orientation
(function() {
     var settings = [
         new util.Quaternion(<0, 1, 0>, 0),
         new util.Quaternion(<0, 1, 0>, 3.14159/2),
         new util.Quaternion(<0, 1, 0>, 3.14159),
         new util.Quaternion(<0, 1, 0>, 3.14159*3/2)
     ];
     var curSetting = 0;

     setOrientationCallback = function() {
         curSetting = (curSetting + 1) % settings.length;
         system.self.orientation = settings[curSetting];
     }
 })();

// OrientationVel
(function() {
     var settings = [
         new util.Quaternion(<0, 1, 0>, -1),
         new util.Quaternion(<0, 1, 0>, 1)
     ];
     var curSetting = 0;

     setOrientationVelCallback = function() {
         curSetting = (curSetting + 1) % settings.length;
         system.self.orientationVel = settings[curSetting];
     }
 })();

// Mesh
(function() {
     var settings = [
         'meerkat:///jterrace/multimtl.dae/optimized/0/multimtl.dae',
         'meerkat:///jterrace/duck_triangulate.dae/optimized/0/duck_triangulate.dae'
     ];
     var curSetting = 0;

     setMeshCallback = function() {
         curSetting = (curSetting + 1) % settings.length;
         system.self.mesh = settings[curSetting];
     }
 })();

function initTimers() {
    timers = {
        'events' : new std.core.RepeatingTimer(.01, eventCallback),
        'setPosition' : new std.core.RepeatingTimer(.01, setPositionCallback),
        'setVelocity' : new std.core.RepeatingTimer(.01, setVelocityCallback),
        'setOrientation' : new std.core.RepeatingTimer(.01, setOrientationCallback),
        'setOrientationVel' : new std.core.RepeatingTimer(.01, setOrientationVelCallback),
        'setMesh' : new std.core.RepeatingTimer(.01, setMeshCallback)
    };
}

system.onPresenceConnected(initTimers);
if (system.self !== system) initTimers();

error: pathspec 'liboh/plugins/js/scripts/examples/testStressPresence.em' did not match any file(s) known to git


sftp.em: Don't increment file counters when bytes is 0.

# Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.

counter login_count by username
counter logout_count by username
counter bytes_read
counter files_read
counter bytes_written
counter files_written
counter user_bytes_read by username
counter user_files_read by username
counter user_bytes_written by username
counter user_files_written by username

/^(?P<date>\w+\s+\d+\s+\d+:\d+:\d+)\s+[\w\.-]+\s+sftp-server/ {
  strptime($date, "Jan _2 15:04:05")

  /session opened for local user (?P<username>\w+)/ {
    login_count[$username]++
  }

  /session closed for local user (?P<username>\w+)/ {
    logout_count[$username]++
  }

  /close "[^"]+" bytes read (?P<read>\d+) written (?P<written>\d+)/ {
    $read > 0 {
      bytes_read += $read
      files_read++
    }
    if $written > 0 {
      bytes_written += $written
      files_written++
    }

    /close "\/home\/(?P<username>[^\/]+)\/[^"]+"/ {
      if $read > 0 {
        user_bytes_read[$username] += $read
        user_files_read[$username] ++
      }
      if $written > 0 {
        user_bytes_written[$username] += $written
        user_files_written[$username] ++
      }
    }
  }
}

# Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.

counter login_count by username
counter logout_count by username
counter bytes_read
counter files_read
counter bytes_written
counter files_written
counter user_bytes_read by username
counter user_files_read by username
counter user_bytes_written by username
counter user_files_written by username

/^(?P<date>\w+\s+\d+\s+\d+:\d+:\d+)\s+[\w\.-]+\s+sftp-server/ {
  strptime($date, "Jan _2 15:04:05")

  /session opened for local user (?P<username>\w+)/ {
    login_count[$username]++
  }

  /session closed for local user (?P<username>\w+)/ {
    logout_count[$username]++
  }

  /close "[^"]+" bytes read (?P<read>\d+) written (?P<written>\d+)/ {
    bytes_read += $read
    files_read++
    bytes_written += $written
    files_written++

    /close "\/home\/(?P<username>[^\/]+)\/[^"]+"/ {
      user_bytes_read[$username] += $read
      user_files_read[$username] ++
      user_bytes_written[$username] += $written
      user_files_written[$username] ++
    }
  }
}


put the Conflicts and Replaces fields in the nongeneraal section

Source: @(Package)
Section: misc
Priority: extra
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends))
Homepage: @(Homepage)
Standards-Version: 3.9.2

Package: @(Package)
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends))
@[if Conflicts]Conflicts: @(', '.join(Conflicts))@\n@[end if]@
@[if Replaces]Replaces: @(', '.join(Replaces))@\n@[end if]@
Description: @(Description)

Source: @(Package)
Section: misc
Priority: extra
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends))
@[if Conflicts]Conflicts: @(', '.join(Conflicts))@\n@[end if]@
@[if Replaces]Replaces: @(', '.join(Replaces))@\n@[end if]@
Homepage: @(Homepage)
Standards-Version: 3.9.2

Package: @(Package)
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends))
Description: @(Description)


Add basic example program.

Add basic example program.

# Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.

/$/ {                                          # 4: match /$/
                                               # 5: jnm 9
  inc(line-count)                              # 6: inc line-count
}                                              # 7: ret true

error: pathspec 'examples/progs/linecount.em' did not match any file(s) known to git


Should refer to local file directory when scripting self.

system.require('std/core/bind.em');
system.require('std/core/deepCopy.em');

if (typeof(std) === "undefined") std = {};
if (typeof(std.script) === "undefined") std.script = {};

(function()
{
    function generateFolderName (vis)
    {
        var entToke = system.__entityToken();
        if (typeof(entToke) == 'undefined')
        {
            throw new Error ('Error generating a folder name when ' +
                             'receiving a file.  Have no token.');
        }

        return 'ishmael_scripting_receiver/'+entToke+'__'+vis.toString();
    }

    function fileReceiver(msg,sender)
    {
        var newFilename =
            generateFolderName(sender) + msg.filename;

        system.__debugFileWrite(msg.text,newFilename);
        msg.makeReply({}) >> [];
    }
    fileReceiver << [{'fileManagerUpdate'::},
                     {'filename'::},
                     {'version'::},
                     {'text'::}];

    //traditional script import

    var ns = std.script;

    /** A Scriptable is an object which listens for messages from
     *  other objects, executes their contents, and replies with the
     *  results.
     */
    ns.Scriptable = function() {
        var scriptRequestPattern = new util.Pattern("request", "script");
        var scriptRequestHandler = std.core.bind(this._handleScriptRequest, this);
        scriptRequestHandler << scriptRequestPattern;
    };

    ns.Scriptable.prototype._handleScriptRequest = function(msg, sender)
    {
        var prevPrefix = system.__getImportPrefix();
        try
        {

            if (sender.toString() != system.self.toString())
            {
                //any call to import from these files will first check in
                //these directories.
                system.__setImportPrefix(generateFolderName(sender));
            }

            if (!this._printer || sender != this._printer) {
                this._printer = sender;
                system.onPrint( std.core.bind(this._handlePrint, this) );
            }

            if (this._printerTimeout)
                this._printerTimeout.reset();
            this._printerTimeout = system.timeout(60, std.core.bind(this._handlePrinterTimeout, this));

            var cmd = msg.script;
            var result = undefined, excep = undefined;
            try {
                result = system.__evalInGlobal(cmd);
            } catch (ex) {
                // Currently, we need to do a deep copy because some
                // fields seem to be some sort of weird built in type (or
                // accessor) which the C++ V8 API doesn't seem to
                // expose. Copying forces the data to be evaluated into
                // real values. So far we've only seen this with
                // exceptions thrown by the V8 runtime (ones generated by
                // our C++ code are fine)
                excep = std.core.deepCopy(ex);
            }

            // This is the old version, not using makeReply. Now
            // deprecated, but leaving in so old scripts/clients continue
            // to work
            var retmsg = {
                'reply' : 'script',
                'value' : result,
                'exception' : excep,
                'deprecated' : true
            };
            retmsg >> sender >> [];

            // This is the new version and is the one you should actually
            // use now. Note that it *doesn't* contain the reply: 'script'
            // field. We don't need it since the reply is automatically
            // matched (more conservatively than the old style as well),
            // but also so that old style matching doesn't match this
            // message.
            var retmsg_new = {
                'value' : result,
                'exception' : excep
            };
            msg.makeReply(retmsg_new) >> [];
        }
        catch(excep)
        { }
        finally
        {
            system.__setImportPrefix(prevPrefix);
        }

    };

        ns.Scriptable.prototype._handlePrint = function() {
            var print_msg = {
                'request': 'print',
                'print': (arguments.length == 1 ? arguments[0] : arguments)
            };
            print_msg >> this._printer >> [];
        };

        ns.Scriptable.prototype._handlePrinterTimeout = function() {
            system.onPrint(undefined);
            this._timerPrintout = null;
        };

})();

system.require('std/core/bind.em');
system.require('std/core/deepCopy.em');

if (typeof(std) === "undefined") std = {};
if (typeof(std.script) === "undefined") std.script = {};

(function()
{
    function generateFolderName (vis)
    {
        var entToke = system.__entityToken();
        if (typeof(entToke) == 'undefined')
        {
            throw new Error ('Error generating a folder name when ' +
                             'receiving a file.  Have no token.');
        }

        return 'ishmael_scripting_receiver/'+entToke+'__'+vis.toString();
    }

    function fileReceiver(msg,sender)
    {
        var newFilename =
            generateFolderName(sender) + msg.filename;

        system.__debugFileWrite(msg.text,newFilename);
        msg.makeReply({}) >> [];
    }
    fileReceiver << [{'fileManagerUpdate'::},
                     {'filename'::},
                     {'version'::},
                     {'text'::}];

    //traditional script import

    var ns = std.script;

    /** A Scriptable is an object which listens for messages from
     *  other objects, executes their contents, and replies with the
     *  results.
     */
    ns.Scriptable = function() {
        var scriptRequestPattern = new util.Pattern("request", "script");
        var scriptRequestHandler = std.core.bind(this._handleScriptRequest, this);
        scriptRequestHandler << scriptRequestPattern;
    };

    ns.Scriptable.prototype._handleScriptRequest = function(msg, sender)
    {
        var prevPrefix = system.__getImportPrefix();
        try
        {
            //any call to import from these files will first check in
            //these directories.
            system.__setImportPrefix(generateFolderName(sender));

            if (!this._printer || sender != this._printer) {
                this._printer = sender;
                system.onPrint( std.core.bind(this._handlePrint, this) );
            }

            if (this._printerTimeout)
                this._printerTimeout.reset();
            this._printerTimeout = system.timeout(60, std.core.bind(this._handlePrinterTimeout, this));

            var cmd = msg.script;
            var result = undefined, excep = undefined;
            try {
                result = system.__evalInGlobal(cmd);
            } catch (ex) {
                // Currently, we need to do a deep copy because some
                // fields seem to be some sort of weird built in type (or
                // accessor) which the C++ V8 API doesn't seem to
                // expose. Copying forces the data to be evaluated into
                // real values. So far we've only seen this with
                // exceptions thrown by the V8 runtime (ones generated by
                // our C++ code are fine)
                excep = std.core.deepCopy(ex);
            }

            // This is the old version, not using makeReply. Now
            // deprecated, but leaving in so old scripts/clients continue
            // to work
            var retmsg = {
                'reply' : 'script',
                'value' : result,
                'exception' : excep,
                'deprecated' : true
            };
            retmsg >> sender >> [];

            // This is the new version and is the one you should actually
            // use now. Note that it *doesn't* contain the reply: 'script'
            // field. We don't need it since the reply is automatically
            // matched (more conservatively than the old style as well),
            // but also so that old style matching doesn't match this
            // message.
            var retmsg_new = {
                'value' : result,
                'exception' : excep
            };
            msg.makeReply(retmsg_new) >> [];
        }
        catch(excep)
        { }
        finally
        {
            system.__setImportPrefix(prevPrefix);
        }

    };

        ns.Scriptable.prototype._handlePrint = function() {
            var print_msg = {
                'request': 'print',
                'print': (arguments.length == 1 ? arguments[0] : arguments)
            };
            print_msg >> this._printer >> [];
        };

        ns.Scriptable.prototype._handlePrinterTimeout = function() {
            system.onPrint(undefined);
            this._timerPrintout = null;
        };

})();


Added a test of the new fakeroot that I added.  However, did not respond to prox callbacks.

system.print("\n\nRunning a test of fakeroot for context \n\n");

// function functionToExecuteInContext()
// {
//     fakeroot.print("\n\nExecuting print in context\n\n");
// }

function proxCallback(visibleBack)
{
    // var newContext = system.createContext(system.presences[0],
    //                                       visibleBack,
    //                                       true,
    //                                       true,
    //                                       true);

    // newContext.execute(functionToExecuteInContext);

    system.print("\n\nGot into prox callback\n\n");

}

system.presences[0].onProxAdded(proxCallback);
system.presences[0].setQueryAngle(.4);

error: pathspec 'liboh/plugins/js/scripts/test/testFakeroot.em' did not match any file(s) known to git


Fix for Windows separator issues when passing between python and cmake.

# generated from catkin/cmake/em/order_projects.cmake.em
@{
import os
from catkin.topological_order import get_message_generators, topological_order
ordered_stacks = topological_order(os.path.normpath(source_root_dir), whitelisted_stacks, blacklisted_stacks)
}@

set(CATKIN_ORDERED_PROJECTS "")
set(CATKIN_ORDERED_PROJECT_PATHS "")
@[for name, project_data in ordered_stacks]@
@[if not name]@
message(FATAL_ERROR "Circular dependency in subset of projects:\n@project_data")
@[end if]@
list(APPEND CATKIN_ORDERED_PROJECTS @(name))
list(APPEND CATKIN_ORDERED_PROJECT_PATHS @(project_data.path.replace(os.sep, '/')))
@[end for]@

@{
message_generators = get_message_generators(ordered_stacks)
}@
set(CATKIN_MESSAGE_GENERATORS @(' '.join(message_generators)))

# generated from catkin/cmake/em/order_projects.cmake.em
@{
from catkin.topological_order import get_message_generators, topological_order

ordered_stacks = topological_order(source_root_dir, whitelisted_stacks, blacklisted_stacks)
}@

set(CATKIN_ORDERED_PROJECTS "")
set(CATKIN_ORDERED_PROJECT_PATHS "")
@[for name, project_data in ordered_stacks]@
@[if not name]@
message(FATAL_ERROR "Circular dependency in subset of projects:\n@project_data")
@[end if]@
list(APPEND CATKIN_ORDERED_PROJECTS @(name))
list(APPEND CATKIN_ORDERED_PROJECT_PATHS @(project_data.path))
@[end for]@

@{
message_generators = get_message_generators(ordered_stacks)
}@
set(CATKIN_MESSAGE_GENERATORS @(' '.join(message_generators)))


This function helps me test the new when construct.

system.print("\n\nTesting when function\n\n");

var x = util.create_watched();
x.health = 22;

//1: a predicate function to check
//2: a callback function to callback
//3: null or a sampling period
//4-end: list of watchable args this depends on

util.create_when(
    function()
    {
        //if (x.health < 3)
        //return true;

        return true;
    },
    function ()
    {
        system.print("\n\nGot into print function\n\n");
    },
    5,
    x);

error: pathspec 'liboh/plugins/js/scripts/test/testWhen.em' did not match any file(s) known to git


Presence Pool for reusing many presences without recreating/disconnecting.

system.require('std/core/namespace.em');

Namespace('std.core').PresencePool = function(numPresences) {
    this.numPresences = numPresences;
    this._presences = [];
    this._allocated = [];
    this._connectCallback = null;
}

std.core.PresencePool.prototype.numConnected = function() {
    return this._presences.length;
}

std.core.PresencePool._clearPres = function(pres) {
    pres.setScale(0);
    pres.setMesh('');
    pres.setOrientation(new util.Quaternion(0, 0, 0, 1));
    pres.setModelOrientation(new util.Quaternion(0, 0, 0, 1));
    pres.setVelocity(<0, 0, 0>);
    pres.setOrientationVel(new util.Quaternion(0, 0, 0, 1));
}

std.core.PresencePool.prototype.connectCallback = function(pres) {
    this._presences.push(pres);
    this._clearPres(pres);
    system.__debugPrint('' + this._presences.length + '\n');
    if (this._presences.length == this.numPresences)
        this._connectCallback();
}

std.core.PresencePool.prototype.connectAll = function(callback) {
    if (this._presences.length > 0)
        return;

    this._connectCallback = callback;
    for (var i = 0; i < this.numPresences; i++) {
        system.createPresence({
            position: <0, 0, 0>,
            mesh: '',
            scale: 0,
            callback: std.core.bind(this.connectCallback, this)
        });
    }
}

std.core.PresencePool.prototype.allocate = function() {
    if (this._presences.length == 0)
        return null;
    var pres = this._presences.shift();
    this._allocated.push(pres);
    return pres;
}

std.core.PresencePool.prototype.free = function(presence) {
    var index = this._allocated.indexOf(presence);
    if (index == -1)
        return;
    this._presences.push(presence);
    this._allocated.splice(index, 1);
    this._clearPres(presence);
}

std.core.PresencePool.prototype.freeAll = function() {
    this._presences = this._presences.concat(this._allocated);
    this._allocated = [];
}

std.core.PresencePool.prototype.destroy = function() {
    for (var i = 0; i < this._presences.length; i++)
        this._presences[i].discononect();
}

error: pathspec 'liboh/plugins/js/scripts/std/core/presencePool.em' did not match any file(s) known to git


AnimationInfo class to disseminate info about running animations to other viewers

/*  Sirikata
 *  animationInfo.em
 *
 *  Copyright (c) 2011, Tahir Azim.
 *  All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are
 *  met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of Sirikata nor the names of its contributors may
 *    be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

system.require("std/library.em");

/** The AnimationInfo class enables the graphics system to send out
    notifications when an object starts or stops animating.
 */
std.graphics.AnimationInfo = system.Class.extend(
    {
        init: function(pres, sim) {
            this._pres = pres;

            this._subscription_group = [];

            this._simulator = sim;

            var p  = new util.Pattern("name", "support_animation");
            std.core.bind(this.onTestMessage, this) << p;
            this._pres.onProxAdded(std.core.bind(this.proxAddedCallback, this), true);
        },

        // Send a message to all current members of the chat group
        sendAll: function(msg) {
            for(var i = 0; i < this._subscription_group.length; i++) {
                system.__debugPrint("Sending anim msg to " + this._subscription_group[i] + " \n");
                msg >> this._subscription_group[i] >> [];
            }
        },

        // Handles requests from the UI to send a chat messages.
        sendAnimationInfo: function(cmd, vis_addr, anim_name) {
            if (cmd == 'AnimationInfo' && vis_addr && anim_name)
                this.sendAll( { 'animation_info' : '1', 'vis_addr' : vis_addr, 'anim_name' : anim_name } );
        },

        // Handler for animation msgs from others.
        onAnimationMessage: function(msg, sender) {
            system.__debugPrint("Received anim msg: " + msg.vis_addr + " : " + msg.anim_name + "\n");

            var visibleMap = system.getProxSet(system.self);
            for (var key in visibleMap) {
              system.__debugPrint(key + " compared to "  + msg.vis_addr + "\n");
              if (msg.vis_addr == key) {
                this._simulator.startAnimation(visibleMap[key], msg.anim_name, true);
              }
           }
        },

        // Handle an initial message from a new neighbor, adding them and listening for messages from them.
        handleNewAnimationSubscriber: function(msg, sender) {
            if (msg.support_animation != 'yes') return;

            for(var i = 0; i < this._subscription_group.length; i++) {
                if(this._subscription_group[i].toString() == sender.toString())
                    return;
            }

            system.__debugPrint("Adding "  + sender + " to subscription group\n");

            this._subscription_group.push(sender);
            var p = new util.Pattern("animation_info");
            std.core.bind(this.onAnimationMessage, this) << p << sender;
        },

        proxAddedCallback: function(new_addr_obj) {
            if(system.self.toString() == new_addr_obj.toString())
                return;

            this.sendIntro(new_addr_obj, 5);
        },

        sendIntro: function(new_addr_obj, retries) {
            if (retries == 0) return;

            var test_msg = { "name" : "support_animation" };
            //also register a callback
            test_msg >> new_addr_obj >> [std.core.bind(this.handleNewAnimationSubscriber, this), 2, std.core.bind(this.sendIntro, this, new_addr_obj, retries-1)];
        },

        // Reply to probes for what protocols we support.
        onTestMessage: function(msg, sender) {
            system.__debugPrint("Replying to intro msg\n");
            msg.makeReply( { "support_animation": "yes" } ) >> [];
        }
    }
);

error: pathspec 'liboh/plugins/js/scripts/std/graphics/animationInfo.em' did not match any file(s) known to git


Add missing drawing.em file.

Add missing drawing.em file.

/* drawing.em
 *
 * Author: Zhihong Xu
 *
 * A utility to create drawings in the local client
 */

(function() {
    system.require('std/core/namespace.em');
    var gr = Namespace('std.graphics');

    gr.Drawing = system.Class.extend({
        LINE_LIST: 2,
        LINE_STRIP: 3,

        /** @function
          * @description create a new drawing. This essentially creates a new node in the scene graph
          * @param simulator a std.graphics.Graphics object
          * @param obj the object to attach the axes to; axes are attached to the root scene node if omitted
          * @param inheritOrient a boolean to specify whether to inherit orientation from the parent scene node; true by default
          * @param inheritScale a boolean to specify whether to inherit scale from the parent scene node; true by default
          * @param visible a boolean to specify whether the scene node should be visible; true by default
          */
        init: function(simulator, obj, inheritOrient, inheritScale, visible) {
            this._sim = simulator;
            if (!gr.Drawing.SN) {
                gr.Drawing.SN = 1;
            } else {
                gr.Drawing.SN++;
            }
            this._name = gr.Drawing.SN.toString() + "std.graphics.Drawing";
            this._sim.newDrawing(this._name, obj, inheritOrient, inheritScale, visible);
        },

        /** @function
          * @description set emission to (r,g,b); r,g,b are integers from 0 to 255
          */
        setColor: function(r, g, b) {
            this._mat = this.setMat(r, g, b);
        },

        /** @function
          * @description set the current material (emission, diffuse, specular and ambient),
          * all parameters are integer from 0 to 255
          */
        setMat: function(er, eg, eb, dr, dg, db, sr, sg, sb, ar, ag, ab) {
            this._mat = this._sim.setMat(er, eg, eb, dr, dg, db, sr, sg, sb, ar, ag, ab);
        },

        /** @function
          * @description set visibility of the drawing
          */
        setVisible: function(visible) {
            this._sim.setVisible(this._name, visible);
        },

        /** @function
          * @description set whether to inherit orientation from parent scene node
          */
        setInheritOrient: function(inheritOrient) {
            this._sim.setInheritOrient(this._name, inheritOrient);
        },

        /** @function
          * @description set whether to inherit scale from parent scene node
          */
        setInheritScale: function(inheritScale) {
            this._sim.setInheritScale(this._name, inheritScale);
        },

        /** @function
          * @description draw a shape
          */
        shape: function(type, points, clear) {
            this._sim.shape(this._name, clear, type, points);
        },

        /** @function
          * @description draw lines
          * @param points an array of vectors, the first 2 specify the 1st line,
                          the 2nd 2 specify the 2nd and so on
          * @param clear a boolean to specify whether to clear the current drawing
                         before drawing the lines
          */
        lineList: function(points, clear) {
            this.shape(this.LINE_LIST, points, clear);
        },

        /** @function
          * @description draw lines
          * @param points an array of vectors, the first 2 specify the 1st line,
          *               the 2nd and the 3rd specify the 2nd line and so on
          * @param clear a boolean to specify whether to clear the current drawing
          *               before drawing the lines
          */
        lineStrip: function(points, clear) {
            this.shape(this.LINE_STRIP, points, clear);
        },

        /** @function
          * @description clear the drawing
          */
        clear: function() {
            this.shape(null, null, true);
        },

        toString: function() {
            return this._name;
        }
    });

})();

error: pathspec 'liboh/plugins/js/scripts/std/graphics/drawing.em' did not match any file(s) known to git


Added rsyncd example.

Added rsyncd example.

# Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.

# %d [%p]
/^(?P<date>\d+\/\d+\/\d+ \d+:\d+:\d+) \[(?P<pid>\d+)\] / {
  strptime($1, "%Y/%m/%d %H:%M:%S")

  # Transfer log
  # %o %h [%a] %m (%u) %f %l
  /(?P<operation>\S+) (\S+) \[\S+\] (?P<module>\S+) \(\S*\) \S+ (?P<bytes>\d+)/ {
    tag(operation, $1)
    tag(module, $3)
    inc(transfers_total)
  }

  # Connection
  /connect from \S+ \(\d+\.\d+\.\d+\.\d+\)/ {
    inc(connections_total)
    #push timestamp connections[$pid]
  }

  # Connection summary
  /sent (?P<sent>\d+) bytes  received (?P<received>\d+) bytes  total size \d+/ {
    tag(operation, sent)
    inc(bytes_total, $1)

    tag(operation, received)
    inc(bytes_total, $2)

    # FIXME
    # TODO(jaq): blurgh
    #inc(connection-time_total, timestamp - connections[$pid])
    #pop connections[$pid]
  }
}

error: pathspec 'examples/rsyncd.em' did not match any file(s) known to git


Add missing defaultcamera.em script.

Add missing defaultcamera.em script.

// Copyright (c) 2011 Sirikata Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

(
function() {

    /** DefaultCamera */
    std.graphics.DefaultCamera = system.Class.extend(
        {
            init: function(sim, pres) {
                this._tracking = pres;
                this._mode = 'first';

                this._sim = sim;
                this._sim.onTick(std.core.bind(this.onTick, this));

                this._offset = <0, 0, 0>;

                this._lastPosition = this._tracking.position;
                this._lastOrientation = this._tracking.orientation;

                this.reinit();
            },

            reinit : function() {
                this.setOffset(this._offset);
                this.setMode(this._mode);
            },

            mode : function() {
                 return this._mode;
            },

            setMode : function(mode) {
                this._mode = mode;

                var vis = (mode == 'first' ? false : true);
                this._sim.visible(this._tracking, vis);
            },

            setOffset: function(off) {
                this._offset = off;
            },

            onTick : function(t, dt) {
                var goalPos = this._tracking.position;
                var goalOrient = this._tracking.orientation;

                var pos;
                var orient;

                if (this._mode == 'first') {
                    // In first person mode we are tied tightly to the position of
                    // the object.
                    pos = goalPos;
                    orient = goalOrient;
                }
                else {
                    // In third person mode, the target is offset so we'll be behind and
                    // above ourselves and we need to interpolate to the target.
                    // Offset the goal.
                    // > 1 factor gets us beyond the top of the object
                    goalPos = goalPos + this._offset.mul(this._tracking.scale);
                    // Interpolate from previous positions
                    var toGoal = goalPos-this._lastPosition;
                    var toGoalLen = toGoal.length();
                    if (toGoalLen < 1e-06) {
                        pos = goalPos;
                        orient = goalOrient;
                    } else {
                        var step = util.exp(-dt*2);
                        pos = goalPos - toGoal.div(toGoalLen).mul(toGoalLen*step);
                        orient = (goalOrient.mul(1-step).add(this._lastOrientation.mul(step))).normal();
                    }
                }

                this._sim.setCameraPosition(pos);
                this._sim.setCameraOrientation(orient);

                this._lastPosition = pos;
                this._lastOrientation = orient;
            }

        }
    );

}
)();

error: pathspec 'liboh/plugins/js/scripts/std/graphics/defaultcamera.em' did not match any file(s) known to git


Forgot to include this simple testing script to ensure that changes are working okay.

function testSetPosition()
{
    var initialPosition = system.presences[0].getPosition();
    printVec3(initialPosition,"\n\n\nInitial position\n");
    var displacement = system.Vec3(1,1,1);

    system.presences[0].setPosition(addVec3(initialPosition,displacement));

}

function testSetOrientation()
{
    var initialPosition = system.presences[0].getOrientation();
    printQuat(initialPosition,"\n\n\nInitial orientation\n");
    var displacement = system.Quaternion(1,1,1,1);

    system.presences[0].setOrientation(addQuat(initialPosition,displacement));
}

function testSetVisual()
{
    var testMesh = "meerkat:///lily/milktruck.dae"
    //    var testMesh = "meerkat:///danielrh/cube.dae"

    system.print("\n\nChanging mesh\n\n");
    system.presences[0].setMesh(testMesh);

}

function testGetVisual()
{

    var visualMeshUri = system.presences[0].getMesh();
    system.print("\n\n\nMesh:");
    system.print(visualMeshUri);
    system.print("\n\n\n");
}

function addVec3(a,b)
{
    var returner = system.Vec3(a.x+b.x,a.y+b.y,a.z+b.z);
    return returner;
}

function printVec3(vec,stringToPrint)
{
    system.print(stringToPrint);
    system.print("x: ");
    system.print(vec.x);
    system.print("y: ");
    system.print(vec.y);
    system.print("z: ");
    system.print(vec.z);
    system.print("\n\n");
}

function addQuat(a,b)
{
    var returner = system.Quaternion(a.x+b.x,a.y+b.y,a.z+b.z, a.w+b.w);
    return returner;
}

function printQuat(quat,stringToPrint)
{
    system.print(stringToPrint);
    system.print("x: ");
    system.print(quat.x);
    system.print("y: ");
    system.print(quat.y);
    system.print("z: ");
    system.print(quat.z);
    system.print("w: ");
    system.print(quat.w);
    system.print("\n\n");
}

error: pathspec 'build/cmake/importFiles/mergeTest.em' did not match any file(s) known to git


WG copyright not used anymore

WG copyright not used anymore

  Copyright (c) @(YYYY), Willow Garage, Inc.
  All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:

      * Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.
      * Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
      * Neither the name of the Willow Garage, Inc. nor the names of its
        contributors may be used to endorse or promote products derived from
        this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.


Added a simpleStorage library.  Can save objects to its mChars field and a presence to its mPres field.  Using the new restore.db reader, can restore the presence and data contained.

if (typeof(std) == 'undefined')
    std = {};

if (typeof(std.simpleStorage) != 'undefined')
    throw 'Error in simple storage.  Should only import once.';

(function()
{
    system.require('std/shim/restore/persistService.em');

    std.simpleStorage = {  };

    var mSelfPres_field = 'mSelfPres';
    std.simpleStorage.setMPres = function(pres)
    {
        std.persist.checkpointPartialPersist(pres,mSelfPres_field);
    };

    var mCharacteristics_field = 'mChars';
    std.simpleStorage.setMChars = function(newChars)
    {
        mChars = newChars;
        std.persist.checkpointPartialPersist(newChars,mCharacteristics_field);
    };

    std.simpleStorage.restoreMChars = function ()
    {
        mChars = std.persist.restoreFrom(mCharacteristics_field);
    };

    std.simpleStorage.fullRestore = function(cb)
    {
        if (system.self != system)
            return;  //means that we've already got a presence.

        var restoredCB = function(restObjGraph,success,nServ)
        {
            if (! success)
            {
                throw 'Error: unsuccesful restore\n';
                system.print('\n\nError: unsuccesful restore\n');
                system.import('std/defaultAvatar.em');
                return;
            }
            system.require('std/script/scriptable.em');
            system.require('std/graphics/default.em');
            scriptable = new std.script.Scriptable();
            system.self.setQueryAngle(.00001);
            simulator = new std.graphics.DefaultGraphics(restObjGraph,'ogregraphics');
            if ((typeof(cb) != 'undefined') && (cb != null))
                cb(mChars);
        };

        std.simpleStorage.restoreMChars();
        std.persist.restoreFromAsync(mSelfPres_field,restoredCB);
    };

    std.simpleStorage.setRestoreScript = function (cb)
    {
        var scriptString = cb.toString();
        scriptString = 'std.simpleStorage.fullRestore( ' + scriptString + ');';
        var restObj = {
            'restString':scriptString
        };
        std.persist.checkpointPartialPersist(restObj,'restObj');
    };
}
)();

error: pathspec 'liboh/plugins/js/scripts/std/shim/restore/simpleStorage.em' did not match any file(s) known to git


Add a default avatar script so its easy to get all the functionality provided by emerson without writing your own avatar script.

/*  Sirikata
 *  default.em
 *
 *  Copyright (c) 2011, Ewen Cheslack-Postava
 *  All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are
 *  met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of Sirikata nor the names of its contributors may
 *    be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

// A sane, simple, default. Only includes functionality from libraries.
system.import('std/graphics/default.em');

system.onPresenceConnected(
    function(pres) {
        simulator = new std.graphics.DefaultGraphics(pres, 'ogregraphics');
    }
);

error: pathspec 'liboh/plugins/js/scripts/std/defaultAvatar.em' did not match any file(s) known to git


remove unnessary controller

remove unnessary controller

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/kydrenw/showas.git/'


Change the rsyncd.em example to experiment with a more expressive language.

# Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.

/^(?P<date>\d+\/\d+\/\d+ \d+:\d+:\d+) \[(?P<pid>\d+)\] / {
  strptime($date, "2006/01/02 15:04:05")

  # Transfer log
  # %o %h [%a] %m (%u) %f %l
  /(?P<operation>\S+) (\S+) \[\S+\] (?P<module>\S+) \(\S*\) \S+ (?P<bytes>\d+)/ {
    tag("operation", $operation)
    tag("module", $module)
    inc("transfers_total")
  }

  # Connection
  /connect from \S+ \(\d+\.\d+\.\d+\.\d+\)/ {
    inc("connections_total")
    connections[$pid] = timestamp
  }

  # Connection summary
  /sent (?P<sent>\d+) bytes  received (?P<received>\d+) bytes  total size \d+/ {
    tag("operation", "sent")
    inc("bytes_total", $sent)

    tag("operation", "received")
    inc("bytes_total", $received)

    inc("connection-time_total", timestamp - connections[$pid])
  }
}

# Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.

# %d [%p]
/^(?P<date>\d+\/\d+\/\d+ \d+:\d+:\d+) \[(?P<pid>\d+)\] / {
  strptime($date, "2006/01/02 15:04:05")

  # Transfer log
  # %o %h [%a] %m (%u) %f %l
  /(?P<operation>\S+) (\S+) \[\S+\] (?P<module>\S+) \(\S*\) \S+ (?P<bytes>\d+)/ {
    tag(operation, $operation)
    tag(module, $module)
    inc(transfers_total)
  }

  # Connection
  /connect from \S+ \(\d+\.\d+\.\d+\.\d+\)/ {
    inc(connections_total)
    #push timestamp connections[$pid]
  }

  # Connection summary
  /sent (?P<sent>\d+) bytes  received (?P<received>\d+) bytes  total size \d+/ {
    tag(operation, sent)
    inc(bytes_total, $sent)

    tag(operation, received)
    inc(bytes_total, $received)

    # FIXME
    # TODO(jaq): blurgh
    #inc(connection-time_total, timestamp - connections[$pid])
    #pop connections[$pid]
  }
}


Added a messaging file that should deal with all the details of sending messages.

if (typeof(std) == 'undefined')
    std = { };

if (typeof(std.messaging) != 'undefined')
    throw 'Error.  Already included messaging library.  Aborting instead of re-including.';

/**
 General idea: We want to support message pattern where we send a message as
 well as wait for a response for some time.  If we receive response within that
 time, we want to fire a user-defined "response" callback for that function.  If
 we do not receive a response within that time, then we fire a user-defined "no
 response" callback.
 */

(function()
{
    std.messaging ={};

    //FIXME: May want to build in some form of garbage collection for
    //the seqNumMap;

    //This keeps track of what sequence number we're on for each
    //sender, receiver pair.  Its keys are the sender.toString() +
    //receiver.toString().  Its values are the sequence number that
    //you should send on your next message.
    var seqNumMap = { };

    /**
     @param sender is the local presence that is going to send the
     message.
     @param receiver is the external presence (visible) that is
     supposed to receive the message.

     @return Returns a sequence number that we have not yet used for
     this connection.
     */
    function genSeqNumber(sender, receiver)
    {
        var key = sender.toString() + '--' + receiver.toString();

        if (!(key in seqNumMap))
            seqNumMap[key] = 0;

        var returner = seqNumMap[key];

        //this is a heuristic.  The basic idea is that if you send
        //more than one new message to a receiver, you don't want to
        //have the listening handlers that you set up overlap.
        //Roughly, putting 10 here says that all handlers for an alternate
        //stream will be closed by the time that you've sent 10
        //messages back and forth.  Note: may want to expand it.
        seqNumMap[key]+= 10;
        return returner;
    }

    /**
     Map.  Keys: receiver.toString + '---' + sender.toString + '|||' +
     seqNo.toString(); Values: An array.  First field of array contains the
     handler registered to listen for the response.  The second field contains
     the timeout registered to fire if haven't received a response in a certain
     period of time.
     */
    var openHandlers ={   };

    /**
     @param {string} recString the string address representing the receiver of
     the message that we're sending.
     @param {string} senderString the string address representing the sender of
     the message that we're sending.
     @param {int} seqNo. The sequence number that we're sending the message off
     with.

     @return Returns a key contructed from these three values that can be used
     to access the respHandler and onNoRespTimer stored in openHandlers.
     */
    function generateKey(recString,senderString,seqNo)
    {
        return recString + '---' + senderString + '|||' + seqNo.toString();
    }

    /**
     For description of recString,senderString, and seqNo, @see generateKey
     documentation.

     @param {handler} respHandler Handle to handler registered to fire when
     receive response message.

     @param {timeout} onNoRespTimer.  Handle to timeout registered to fire if
     haven't received a response within the proscribed time.

     Registers the key generated from recString,senderString,seqNo with value of
     a two-long array containing handles to the respHandler and onNoRespTimer.
     */
    function addOpenHandler(recString,senderString, seqNo,respHandler,onNoRespTimer)
    {
        var key = generateKey(recString,senderString,seqNo);
        openHandlers[key] = [respHandler,onNoRespTimer];
    }

    /**
     @see generateKey for recString,senderString, and seqNo.

     This cancels the onNoRespTimer and respHandler associated with the key
     generated from recString,senderString, and seqNo.  It also removes the key
     from openHandlers.
     */
    function cancelOpenHandler(recString,senderString,seqNo)
    {
        var key = generateKey(recString,senderString,seqNo);
        if (! (key in openHandlers))
            throw 'Error in successResponse.  Do not have key ' + key + ' in openHandlers.';

        //clear success handler
        openHandlers[key][0].clear();
        //clear timeout handler
        openHandlers[key][1].clear();

        delete openHandlers[key];
    }

    /**
     @param {object} msg.  Message we want to send to receiver from sender
     @param {visible} receiver.  The future recipient of msg and.
     @param {presence} sender.  The sender of msg.
     @param {function} onResp.  A function that executes if the receiver
     responds to the message.  The function takes two parameters: the new
     message received and the sender of that message (receiver).
     @param {float} timeToWait.  The amount of time to wait before
     de-registering the onResp handler and triggering the onNoResp function.
     @param {function} onNoResp.  A function to execute if timeToWait seconds
     have gone by and we haven't received a response to our message.
     @param {object} (optional) oldMsg.  The message that sendder received from
     receiver.  If provided, msg will be a response to oldMsg (will have next
     seqNo).

     */
    std.messaging.sendMessage = function (msg,receiver,sender, onResp, timeToWait,onNoResp, oldMsg)
    {
        if ('seqNo' in msg)
            throw 'Error.  Will not accept a messasge to send that already has a sequence number.';

        if ((typeof(oldMsg) != 'undefined') && ('seqNo' in oldMsg) &&(typeof(oldMsg.seqNo) == 'number'))
                msg.seqNo = oldMsg.seqNo + 1;  //generate the seqNo as a response to previous message.
        else
            msg.seqNo = genSeqNumber(sender,receiver); //generate freshSeqNo.

        //actually send the message.
        system.sendMessage(sender,msg,receiver);

        var recString = receiver.toString();
        var senderString = sender.toString();
        var seqNo = msg.seqNo;
        var wrapOnResp = function(msgRec,sndr)
        {
            cancelOpenHandler(recString,senderString,seqNo);
            onResp(msgRec,sndr);
        };

        var wrapOnNoResp = function()
        {
            cancelOpenHandler(recString,senderString,seqNo);
            onNoResp();
        };

        var respHandler    = system.registerHandler(wrapOnResp,{'seqNo': msg.seqNo+1: }, receiver );
        var onNoRespTimeout = system.timeout(timeToWait,wrapOnNoResp);

        addOpenHandler(recString,senderString,seqNo,respHandler,onNoRespTimeout);

    };

}
)();

error: pathspec 'liboh/plugins/js/scripts/std/shim/wrappedSendMessage/messaging.em' did not match any file(s) known to git


Remove static timestamping from linecount.em example program.

# Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.

counter line_count

/$/ {
  line_count++
}

# Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.

counter line_count

/$/ {
  strptime("2012/06/20 07:49:00", "2006/01/02 15:04:05")
  line_count++
}


Add support for Jenkins credential binding plugin (#716)

Right now, I'm authenticating with pulp using a username and password.
In order to store those credentials in Jenkins and make them accessible
to a script, I need to bind the credentials to environment variables so
that they don't get dumped to the logs as a command line argument.

This snippet takes a Jenkins credential ID and a prefix, and sets the
${PREFIX}_USERNAME and ${PREFIX}_PASSWORD environment variables for the
scripts to access.

    <org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper plugin="credentials-binding@@1.20">
      <bindings>
        <org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding>
          <credentialsId>@(credential_id)</credentialsId>
          <usernameVariable>@(env_var_prefix)_USERNAME</usernameVariable>
          <passwordVariable>@(env_var_prefix)_PASSWORD</passwordVariable>
        </org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding>
      </bindings>
    </org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper>

error: pathspec 'ros_buildfarm/templates/snippet/credentials_binding_plugin.xml.em' did not match any file(s) known to git


Add a pretty printing utility for js/emerson to aid in debugging.

/*  Sirikata
 *  pretty.js
 *
 *  Copyright (c) 2011, Ewen Cheslack-Postava
 *  All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are
 *  met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of Sirikata nor the names of its contributors may
 *    be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

if (typeof(std) === "undefined") std = {};
if (typeof(std.core) === "undefined") std.core = {};

/** Converts an object to a string in a 'pretty' format, i.e. so it is
 *  human-readable, multiple lines, and handles indentation. If the
 *  object is not a tree (i.e. it has circular references in it), then
 *  the normal toString version will be returned.  Generally this
 *  should only be used on small, tree-like objects.
 */
std.core.pretty = function(obj) {
    var visited = [];

    // Fast path -- if its not an object or array, we can just do the normal conversion
    if (typeof(obj) !== "object" || obj === null)
        return '' + obj;

    var longObject = function(obj) {
        return (Object.keys(obj).length > 1);
    };

    var output = '';
    var obj_stack = [ {obj: obj, idx: -1} ];
    var indent = '';
    while(obj_stack.length != 0) {
        var cur = obj_stack.pop();
        // Check if we need to start this object
        if (cur.idx == -1) {
            // Start the object
            output += '{';
            indent += ' ';
            obj_stack.push( {obj: cur.obj, idx: cur.idx+1} );
        }
        else if (cur.idx < Object.keys(cur.obj).length) {
            // Setup processing of next child

            // Add a comma and either space or newline as appropriate
            if (cur.idx != 0)
                output += ',';
            if (longObject(cur.obj))
                output += '\n' + indent;
            else
                output += ' ';

            obj_stack.push( {obj: cur.obj, idx: cur.idx+1} );
            // And process this one, possibly triggering recursion
            var key = Object.keys(cur.obj)[cur.idx];
            var child = cur.obj[key];
            output += key + ': ';
            if (typeof(child) === "object" && child !== null)
                obj_stack.push( {obj: child, idx: -1} );
            else
                output += child;
        }
        else {
            // Close this object
            indent = indent.substr(1);

            if (longObject(cur.obj))
                output += '\n' + indent;
            else
                output += ' ';

            output += '}';

            // No object stack push, we've finished with this object
        }
    }

    return output;
};

error: pathspec 'liboh/plugins/js/scripts/std/core/pretty.em' did not match any file(s) known to git


Added file still causes a seg fault that I cannot debug.  Try to find it!

function getNumber()
{
    return 3;
}

var x = 5;
when( x < `y`)
{
    system.print("\n\nThis is x: " + x + "\n\n");
}

error: pathspec 'liboh/plugins/js/scripts/test/testErrorNewWhen.em' did not match any file(s) known to git


Add missing moveAndRotate.em script.

Add missing moveAndRotate.em script.

/*  Sirikata
 *  movement.em
 *
 *  Copyright (c) 2011, Ewen Cheslack-Postava
 *  All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are
 *  met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of Sirikata nor the names of its contributors may
 *    be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

system.require('movement.em');

/** MoveAndRotate gives you intuitive control over moving and
 *  rotating. The most common use for this is when you want to combine
 *  movement and rotation simultaneously, but prefer to specify
 *  velocity post-rotation. For example, if you want to specify that
 *  an object continues to move 'forward' by specifying a single
 *  velocity, but also have the object continue even as rotation
 *  occurs.
 */
std.movement.MoveAndRotate = system.Class.extend(
    {
        init: function(pres) {
            this._pres = pres;
            this._localVel = pres.velocity;
        },
        moving: function() {
            return this._pres.velocity.lengthSquared() > 1e-08;
        },
        rotating: function() {
            return this._pres.orientationVel.lengthSquared() > 1e-08;
        },
        move: function(vel, scaling) {
            var scaled_vel = vel.mul(scaling);
            this._localVel = this._localVel.add(scaled_vel);
            this._pres.velocity = this._pres.velocity.add(
                this._pres.orientation.mul(scaled_vel)
            );
            this._startReeval();
        },
        rotate: function(axis, angle) {
            this._pres.orientationVel = this._pres.orientationVel.mul(
                new util.Quaternion(axis, angle)
            );
            this._startReeval();
        },
        _startReeval: function() {
            // Usually people expect that holding down forward and left/right
            // will result in moving in a curve, i.e. that the velocity is in
            // local coordinates and gets updated automatically with rotation.
            if (this.moving() && this.rotating())
                system.timeout(.1, std.core.bind(this._reeval, this));
        },
        _reeval: function() {
            this._pres.velocity = this._pres.orientation.mul(this._localVel);
            this._startReeval();
        }
    }
);

error: pathspec 'liboh/plugins/js/scripts/std/movement/moveAndRotate.em' did not match any file(s) known to git


Only put one maintainer in the debian control file

And do not use quotes

Source: @(Package)
Section: misc
Priority: extra
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= 7.0.50~), @(', '.join(BuildDepends))
Homepage: @(Homepage)
Standards-Version: 3.9.2

Package: @(Package)
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends))
Description: @(Description)

Source: @(Package)
Section: misc
Priority: extra
Maintainer: "@(Maintainers)"
Build-Depends: debhelper (>= 7.0.50~), @(', '.join(BuildDepends))
Homepage: @(Homepage)
Standards-Version: 3.9.2

Package: @(Package)
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends))
Description: @(Description)


Update the groovy-extract-warnings script. (#887)

In particular, it may be the case that no previous step set
a status.  If that is the case, just set one before trying
to change it.

Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@openrobotics.org>

@(SNIPPET(
    'builder_system-groovy',
    command=
"""// EXTRACT WARNINGS AND MARK BUILD UNSTABLE
import java.io.BufferedReader
import java.util.regex.Matcher
import java.util.regex.Pattern

import hudson.model.Result

println "# BEGIN SECTION: Look for warnings"

try {
  // search build output for warning messages
  r = build.getLogReader()
  br = new BufferedReader(r)
  pattern = Pattern.compile(".*WARNING:.*")
  ignore_pattern = Pattern.compile(".*WARNING: (You're not using the default seccomp profile|No swap limit support).*")
  def warnings = []
  def line
  while ((line = br.readLine()) != null) {
    if (pattern.matcher(line).matches()) {
      if (ignore_pattern.matcher(line).matches()) continue
      warnings << line
    }
  }
  if (warnings.size() == 0) {
    println "No warnings found"
  } else {
    println "Found " + warnings.size() + " warnings:"
    println ""
    for (warning in warnings) {
      println "- " + warning
      println ""
    }
    if (build.getResult().equals(null)) {
      // Handle the case where no previous step set a result
      build.setResult(Result.SUCCESS)
    }
    if (build.getResult().isBetterThan(Result.UNSTABLE)) {
      println "Marking build as unstable"
      build.setResult(Result.UNSTABLE)
    }
  }
} finally {
  println "# END SECTION"
}
""",
    script_file=None,
))@

@(SNIPPET(
    'builder_system-groovy',
    command=
"""// EXTRACT WARNINGS AND MARK BUILD UNSTABLE
import java.io.BufferedReader
import java.util.regex.Matcher
import java.util.regex.Pattern

import hudson.model.Result

println "# BEGIN SECTION: Look for warnings"

try {
  // search build output for warning messages
  r = build.getLogReader()
  br = new BufferedReader(r)
  pattern = Pattern.compile(".*WARNING:.*")
  ignore_pattern = Pattern.compile(".*WARNING: (You're not using the default seccomp profile|No swap limit support).*")
  def warnings = []
  def line
  while ((line = br.readLine()) != null) {
    if (pattern.matcher(line).matches()) {
      if (ignore_pattern.matcher(line).matches()) continue
      warnings << line
    }
  }
  if (warnings.size() == 0) {
    println "No warnings found"
  } else {
    println "Found " + warnings.size() + " warnings:"
    println ""
    for (warning in warnings) {
      println "- " + warning
      println ""
    }
    if (build.getResult().isBetterThan(Result.UNSTABLE)) {
      println "Marking build as unstable"
      build.setResult(Result.UNSTABLE)
    }
  }
} finally {
  println "# END SECTION"
}
""",
    script_file=None,
))@


Initial commit.

Initial commit.

// Emerald Language

doc html

html
  head
    link rel="stylesheet", href="css/main.css"
    script src="js/script"

  body
    header
      h1 Emerald
      h2 An html5 markup language designed with scope in mind.

    main
      p Click me!
      button
      *
        border 1px solid #000
      $
        click
          log "I was clicked!"
        end

    footer
      Still in the works!


mixins!

mixins!

mixin Herd.LiveAssets
  init: ->
    @_super()

    if Herd.RAILS_ENV is 'development'
      source = new EventSource '/herd/assets/live'
      source.addEventListener 'assets', (e) =>
        Ember.run =>
          @store.pushPayload JSON.parse(e.data)

error: pathspec 'app/assets/javascripts/herd/mixins/live_assets.js.em' did not match any file(s) known to git


Add the mock config for RPM source/binary builds (#730)

This is the core configuration file for the mock root, which will be used to build source and
binary RPMs.

include('/etc/mock/default.cfg')

# Change the root name since we're modifying the chroot
config_opts['root'] += '-ros-buildfarm'

# Add python3-rpm-macros to resolve %{python3_pkgversion} in rosdep rules
config_opts['chroot_setup_cmd'] += ' python3-rpm-macros'

# Install weak dependencies to get group members
config_opts['yum_builddep_opts'] = config_opts.get('yum_builddep_opts', []) + ['--setopt=install_weak_deps=True']
config_opts['dnf_builddep_opts'] = config_opts.get('dnf_builddep_opts', []) + ['--setopt=install_weak_deps=True']
config_opts['microdnf_builddep_opts'] = config_opts.get('microdnf_builddep_opts', []) + ['--setopt=install_weak_deps=True']

# Disable debug packages until infrastructure can handle it
config_opts['macros']['debug_package'] = '%{nil}'

# Hack the %{dist} macro to allow release suffixing
config_opts['macros']['%dist'] = '.' + config_opts['dist'] + '%{?dist_suffix}'

# Required for running mock in Docker
config_opts['use_nspawn'] = False

@[if os_name in ['centos', 'rhel'] and os_code_name == '7']@
# Inject g++ 8 into RHEL 7 builds
config_opts['chroot_setup_cmd'] += ' devtoolset-8-gcc-c++ devtoolset-8-make-nonblocking'
config_opts['macros']['_buildshell'] = '/usr/bin/scl enable devtoolset-8 -- /bin/sh'
@[else]@
# Add g++, which is an assumed dependency in ROS
config_opts['chroot_setup_cmd'] += ' gcc-c++ make'
@[end if]@

config_opts['yum.conf'] += """
@[for i, url in enumerate(distribution_repository_urls)]@
[ros-buildfarm-@(i)]
name=ROS Buildfarm Repository @(i) - $basearch
baseurl=@(url)
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ros-buildfarm-@(i)
gpgcheck=@(1 if i < len(distribution_repository_keys) and distribution_repository_keys[i] else 0)
enabled=1

@[end for]@
@[if target_repository]@
[ros-buildfarm-target-source]
name=ROS Buildfarm Repository Target - SRPMS
baseurl=@(target_repository)
gpgcheck=0
enabled=0

@[end if]@
"""

error: pathspec 'ros_buildfarm/templates/release/rpm/mock_config.cfg.em' did not match any file(s) known to git


Adding eol template

Adding eol template

@(TEMPLATE(
    'snippet/add_generated_comment.Dockerfile.em',
    user_name=user_name,
    tag_name=tag_name,
    source_template_name=template_name,
))@
@(TEMPLATE(
    'snippet/from_base_image.Dockerfile.em',
    template_packages=template_packages,
    os_name=os_name,
    os_code_name=os_code_name,
    arch=arch,
    base_image=base_image,
    maintainer_name=maintainer_name,
))@

# setup source.list to eol
RUN sed -i -e 's/archive/old-releases/g' /etc/apt/sources.list

@[if 'packages' in locals()]@
@[if packages]@

# install packages
RUN apt-get update && apt-get install -y --no-install-recommends \
    @(' \\\n    '.join(packages))@  \
    && rm -rf /var/lib/apt/lists/*

@[end if]@
@[end if]@
# setup keys
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116

# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu @os_code_name main" > /etc/apt/sources.list.d/ros-latest.list

# setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

# install ros packages
ENV ROS_DISTRO @rosdistro_name
RUN apt-get update && apt-get install -y \
    @(' \\\n    '.join(ros_packages))@  \
    && rm -rf /var/lib/apt/lists/*

# setup entrypoint
COPY ./ros_entrypoint.sh /

@[if 'entrypoint_name' in locals()]@
@[if entrypoint_name]@
@{
entrypoint_file = entrypoint_name.split('/')[-1]
}@
ENTRYPOINT ["/@entrypoint_file"]
@[end if]@
@[end if]@
@{
cmds = [
'bash',
]
}@
CMD ["@(' && '.join(cmds))"]

error: pathspec 'docker_templates/templates/docker_images/create_ros_eol_image.Dockerfile.em' did not match any file(s) known to git


explicitly export -DNDEBUG on debian binary builds

fixes #327

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v --buildsystem=cmake
# TODO: remove the LDFLAGS override.  It's here to avoid esoteric problems
# of this sort:
#  https://code.ros.org/trac/ros/ticket/2977
#  https://code.ros.org/trac/ros/ticket/3842
export LDFLAGS=
export PKG_CONFIG_PATH=@(InstallationPrefix)/lib/pkgconfig
# Explicitly enable -DNDEBUG, see:
# 	https://github.com/ros-infrastructure/bloom/issues/327
export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG

%:
	dh  $@@

override_dh_auto_configure:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_auto_configure -- \
		-DCATKIN_BUILD_BINARY_PACKAGE="1" \
		-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
		-DCMAKE_PREFIX_PATH="@(InstallationPrefix)"

override_dh_auto_build:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_auto_build

override_dh_auto_test:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	echo -- Running tests. Even if one of them fails the build is not canceled.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_auto_test || true

override_dh_shlibdeps:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_shlibdeps -l$(CURDIR)/debian/@(Package)/@(InstallationPrefix)/lib/

override_dh_auto_install:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_auto_install

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v --buildsystem=cmake
# TODO: remove the LDFLAGS override.  It's here to avoid esoteric problems
# of this sort:
#  https://code.ros.org/trac/ros/ticket/2977
#  https://code.ros.org/trac/ros/ticket/3842
export LDFLAGS=
export PKG_CONFIG_PATH=@(InstallationPrefix)/lib/pkgconfig

%:
	dh  $@@

override_dh_auto_configure:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_auto_configure -- \
		-DCATKIN_BUILD_BINARY_PACKAGE="1" \
		-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
		-DCMAKE_PREFIX_PATH="@(InstallationPrefix)"

override_dh_auto_build:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_auto_build

override_dh_auto_test:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	echo -- Running tests. Even if one of them fails the build is not canceled.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_auto_test || true

override_dh_shlibdeps:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_shlibdeps -l$(CURDIR)/debian/@(Package)/@(InstallationPrefix)/lib/

override_dh_auto_install:
	# In case we're installing to a non-standard location, look for a setup.sh
	# in the install tree that was dropped by catkin, and source it.  It will
	# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
	if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
	dh_auto_install


Adding an ecell test module

Adding an ecell test module

#
# A very simple model with one michaelis-uni-uni reaction.
#

# Stepper ODEStepper( DE1 )
Stepper FixedODE1Stepper( DE1 )
{
	# no property
}

System System( / )
{
        Name "The root system";
	StepperID	DE1;

	Variable Variable( SIZE )
	{
		Value	1e-18;
	}

	Variable Variable( S )
	{
		Value	1000000;
	}

	Variable Variable( P )
	{
		Value	0;
	}

	Variable Variable( E )
	{
		Value	1000;
	}

	Process MichaelisUniUniFluxProcess( E )
	{
		VariableReferenceList	[ S0 :.:S -1 ]
 					[ P0 :.:P 1 ]
					[ C0 :.:E 0 ];
		KmS	1;
		KcF	10;
	}
}

error: pathspec 'sandbox/ecell_testing/simple_ecell_mod.em' did not match any file(s) known to git


i think this is the one...

i think this is the one...

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v

%:
	dh  $@@

override_dh_auto_configure:
	dh_auto_configure -Scmake -- \
		-DCMAKE_INSTALL_PREFIX="@(CMAKE_INSTALL_PREFIX)" \
		-DCMAKE_PREFIX_PATH="@(CMAKE_PREFIX_PATH)" \
		-DCATKIN_PACKAGE_PREFIX="@(CATKIN_PACKAGE_PREFIX)" \
		-DCATKIN=YES

error: pathspec 'cmake/em/rules.cmake.em' did not match any file(s) known to git


Adding ros2 library tempate

Adding ros2 library tempate

Maintainers: @(',\n             '.join(maintainers))
GitRepo: @(repo_url)
@[  for release_name, release_data in release_names.items()]@

################################################################################
# Release: @(release_name)

@[      for os_name, os_data in release_data['os_names'].items()]@
@[          for os_code_name, os_code_data in os_data['os_code_names'].items()]@
########################################
# Distro: @(os_name):@(os_code_name)

@[              for tag_name, tag_data in os_code_data['tag_names'].items()]@
Tags: @(', '.join(tag_data['Tags']))
Architectures: @(', '.join(tag_data['Architectures']))
GitCommit: @(tag_data['GitCommit'])
Directory: @(tag_data['Directory'])

@[              end for]@
@[          end for]@
@[      end for]@
@[  end for]@

error: pathspec 'docker_templates/templates/docker_library/ros2.em' did not match any file(s) known to git


Actually add and commit the animatable class.

/*  Sirikata
 *  movable.em
 *
 *  Copyright (c) 2011, Ewen Cheslack-Postava
 *  All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are
 *  met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of Sirikata nor the names of its contributors may
 *    be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

if (typeof(std) === "undefined") std = {};
if (typeof(std.movement) === "undefined") /** @namespace*/ std.movement = {};

system.require('std/core/bind.em');
system.require('std/movement/movement.em');

(
function() {

    var ns = std.movement;

    /** @namespace
     *  An Animatable listens for requests from other objects for animation
     *  information. The animatable keeps track of the current animation
     *  running on it and informs any newly joining cameras. When a graphical
     *  client changes an object's animation, it also informs the animatable
     *  about the new animation. The animatable
     *  then forwards this information to all subscribing cameras.
     *
     */
    std.movement.Animatable = function(only_self) {
        var animationRequestHandler = std.core.bind(this._handleRequest, this, only_self);
        animationRequestHandler << [{"animationRequest"::}];

        // Set up a bunch of handlers based on request name so we can
        // easily dispatch them
        this._handlers = {
            intro : std.core.bind(this._handleIntro, this),
            currentAnimationName : std.core.bind(this._handleGetCurrentAnimation, this),
            setAnimation : std.core.bind(this._handleSetAnimation, this),
        };

        this._currentAnimation = "";
        this._currentMesh = "";
        this._subscription_group = [];
    };

    std.movement.Animatable.prototype._handleRequest = function(only_self, msg, sender) {
        if (only_self && !sender.checkEqual(system.self))
            return;

        for(var f in msg) {
            var handler = this._handlers[f];
            if (handler) {
                handler(msg, sender);
            }
        }
    };

    /**
     *  Handle an introduction message from a new camera by sending it animation
     *  information.
     */
    std.movement.Animatable.prototype._handleIntro = function(msg, sender) {
       this._subscription_group.push(sender);

       if (this._currentAnimation != "") {
          if (system.self.getMesh() == this._currentMesh) {

            this._sendAnimationInfo( sender, 0 );
          }
          else {
            /* If the mesh has changed since the last time an animation was
               started, set the current animation to "".
            */

            this._currentAnimation = "";
          }
       }

       msg.makeReply( { } ) >> [];
    };

    /**
     *   Return the current animation running on this animatable object.
     */
    std.movement.Animatable.prototype._handleGetCurrentAnimation = function(msg, sender) {
        if (this._currentAnimation != "") {
          if (system.self.getMesh() != this._currentMesh) {
            this._currentAnimation = "";
          }
        }

        msg.makeReply( {'currentAnimation' : this._currentAnimation } ) >> [];
    };

    /**
     * Set a new animation on this animatable and inform all subscribers about it.
     */
    std.movement.Animatable.prototype._handleSetAnimation = function(msg, sender) {
        this._currentAnimation = msg.animationName;
        this._currentMesh = system.self.getMesh();

        for(var i = 0; i < this._subscription_group.length; i++) {
          if (sender.toString() != this._subscription_group[i].toString() ) {
            this._sendAnimationInfo(this._subscription_group[i], 0);
          }
        }

        msg.makeReply( { } ) >> [];
    };

    /**
     *  Send animation information to the specified destination.
     */
    std.movement.Animatable.prototype._sendAnimationInfo = function(dest, retryAttempt) {
      if (retryAttempt == 5) {
        var idx = this._subscription_group.indexOf(dest);
        if (idx != -1) {
          this._subscription_group.splice(idx, 1);
        }
        return;
      }

      if (system.self.getMesh() != this._currentMesh) return;

      var animationMsg = { "animationInfo" : "1", "animationName" : this._currentAnimation  };

      animationMsg >> dest >> [ std.core.bind(function(){}, undefined),
                                5,
                                std.core.bind(this._sendAnimationInfo, this, dest, retryAttempt+1) ];
    };

})();

error: pathspec 'liboh/plugins/js/scripts/std/movement/animatable.em' did not match any file(s) known to git


Initial copy of 'example_rx.cpp' to 'example_rx.cpp.em'.

/** \file example_rx.cpp
 *  \brief Example of using ibisami to build a Rx model.
 *
 * Original author: David Banas <br>
 * Original date:   May 20, 2015
 *
 * Copyright (c) 2015 David Banas; all rights reserved World wide.
 */

#include <string>
#include <vector>
#include "include/ami_rx.h"

#define PI 3.14159
#define RX_BW 30.0e9
#define CTLE_DC_GAIN 1.0
#define NUM_DFE_TAPS 5
#define DFE_DUMP_FILE "example_rx_dfe_dump.csv"
#define DFE_INPUT_FILE "example_rx_dfe_input.csv"

/// An example device specific Rx model implementation.
class MyRx : public AmiRx {
    typedef AmiRx inherited;

 public:
    /// Constructor
    MyRx() { }

    /// Destructor
    ~MyRx() { }

    /// Initializer
    void init(double *impulse_matrix, const long number_of_rows,
            const long aggressors, const double sample_interval,
            const double bit_time, const std::string& AMI_parameters_in) override {
        // Let our base class do its thing.
        inherited::init(impulse_matrix, number_of_rows, aggressors,
            sample_interval, bit_time, AMI_parameters_in);

        std::ostringstream msg;

        // Grab our parameters and configure things accordingly.
        std::vector<std::string> node_names; node_names.clear();

        // - CTLE
        node_names.push_back("ctle_mode");
        int ctle_mode = get_param_int(node_names, 0);
        node_names.pop_back();
        node_names.push_back("ctle_freq");
        double ctle_freq = get_param_float(node_names, 1.0 / (2.0 * bit_time_));  // Use fNyquist as default.
        node_names.pop_back();
        node_names.push_back("ctle_mag");
        int ctle_mag = get_param_int(node_names, 0);
        node_names.pop_back();
        if (ctle_mode) {
            // Calculate the zero and poles needed to meet the response spec.
            double p2 = -2. * PI * RX_BW;
            double p1 = -2. * PI * ctle_freq;
            double z  = p1 / pow(10., ctle_mag / 20.);

            // Use matched-z transform to convert them to numerator/denominator of transfer function.
            z = exp(z * sample_interval);
            p1 = exp(p1 * sample_interval);
            p2 = exp(p2 * sample_interval);
            std::vector<double> num = {1.0, -z, 0.0};
            for (auto i = 0; i < num.size(); i++)
                num[i] *= (1 - p1) * (1 - p2) * CTLE_DC_GAIN / (1 - z);
            std::vector<double> den = {1.0, -(p1 + p2), p1 * p2};
            ctle_ = new DigitalFilter(num, den);
            if (!ctle_)
                throw std::runtime_error("ERROR: MyRx::init() could not allocate a DigitalFilter for its CTLE!");
        }

        // - DFE
        node_names.push_back("dfe_mode");
        int dfe_mode = get_param_int(node_names, 0);
        node_names.pop_back();
        char tmp_str[32];
        double dfe_taps[NUM_DFE_TAPS];
        for (auto i = 0; i < NUM_DFE_TAPS; i++) {
            sprintf(tmp_str, "dfe_tap%d", i + 1);
            node_names.push_back(tmp_str);
            dfe_taps[i] = get_param_float(node_names, 0);
            node_names.pop_back();
        }
        node_names.push_back("dfe_vout");
        double dfe_vout = get_param_float(node_names, 0);
        node_names.pop_back();
        node_names.push_back("dfe_gain");
        double dfe_gain = get_param_float(node_names, 0);
        node_names.pop_back();
        if (dfe_mode) {
            std::vector<double> tap_weights; tap_weights.clear();
            for (auto i = 0; i < NUM_DFE_TAPS; i++)
                tap_weights.push_back(dfe_taps[i]);
            dfe_ = new DFE(dfe_vout, dfe_gain, dfe_mode, sample_interval, bit_time, tap_weights);
            if (!dfe_)
                throw std::runtime_error("ERROR: MyRx::init() could not allocate a DFE!");
            std::vector<double> max_weights {0.5, 0.4, 0.3, 0.2, 0.1};
            std::vector<double> min_weights {-0.5, -0.4, -0.3, -0.2, -0.1};
            dfe_->set_max_weights(max_weights);
            dfe_->set_min_weights(min_weights);
        }

        // - Debug
        node_names.push_back("debug");
        node_names.push_back("enable");
        int dbg_enable = get_param_int(node_names, 0);
        node_names.pop_back();
        node_names.push_back("dump_dfe_adaptation");
        dump_dfe_adaptation_ = get_param_int(node_names, 0);
        node_names.pop_back();
        node_names.push_back("dump_adaptation_input");
        dump_adaptation_input_ = get_param_int(node_names, 0);
        node_names.pop_back();
        node_names.pop_back();
        if (dbg_enable) {
            if (dump_dfe_adaptation_) {
                dfe_dump_file_ = DFE_DUMP_FILE;
            }
            if (dump_adaptation_input_) {
                dfe_input_file_ = DFE_INPUT_FILE;
            }
        }

        // Fill in message string.
        msg << "ibisami example Rx model was configured successfully, as follows:\n";
        if (ctle_mode)
            msg << "\tCTLE: " << ctle_mag << " dB boost at " << ctle_freq / 1.0e9 << " GHz\n";
        else
            msg << "\tCTLE: not present\n";
        if (dfe_mode) {
            msg << "\tDFE: mode: " << dfe_mode << "  vout: " << dfe_vout << "  gain: " << dfe_gain << "\n";
            std::vector<double> tmp_weights = dfe_->get_weights();
            for (auto i = 0; i < NUM_DFE_TAPS; i++)
                msg << "\t\ttap" << i + 1 << ": " << tmp_weights[i] << "\n";
        }
        else
            msg << "\tDFE: not present\n";
        msg_ += msg.str();
    }
} my_rx;

AMIModel *ami_model = &my_rx;  ///< The pointer required by the API implementation.

error: pathspec 'example/example_rx.cpp.em' did not match any file(s) known to git


fix typo in dhcpd.em

fix typo in dhcpd.em


Forgot to add the script that starts up an ogregraphics instance.

system.print("\n\n\nSTARTING A CAMERA OBJECT\n\n\n");
system.presences[0].runGraphics("ogregraphics");

error: pathspec 'build/cmake/importFiles/startupCamera.em' did not match any file(s) known to git


upload view!

upload view!

class Herd.AssetsUploadView extends Ember.View
  templateName: 'assets/upload'
  progressStyle: 'width: 0%'

  actions:
    uploadProgressed: (e) ->
      @progressStyle = "width: #{e.percent}%"

error: pathspec 'app/assets/javascripts/herd/views/assets/upload_view.js.em' did not match any file(s) known to git


Added a simple way to print object positions to make rbsheth's physics life easier.

system.import('std/core/bind.js');
system.import('std/core/repeatingTimer.em');

//alt + s to pull up scripting window for object
//call system.import('test/testPlacePrint.em'); in scripting window
//should print position of object 1/sec
//to get it to stop.  In scripting window, type repTimer.suspend();
//to get it to start again: type repTimer.reset();

function testCallback()
{
    var mPos = system.presences[0].getPosition();
    system.print("\n\n");
    system.print("x: ");
    system.print(mPos.x);
    system.print("y: ");
    system.print(mPos.y);
    system.print("z: ");
    system.print(mPos.z);
    system.print("\n\n");
    system.print("\nReceived callback\n");
}

var repTimer = new std.core.RepeatingTimer(1,testCallback);

error: pathspec 'liboh/plugins/js/scripts/test/testPlacePrint.em' did not match any file(s) known to git


Manually specify lib dir in RPM spec file

This will only affect those CMakeLists.txt which use GNUInstallDirs

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/nayomal/bloom.git/'


Add Emscripten Makefile

Add Emscripten Makefile

It still doesn't properly work, but it's a start

CXX = em++

CXXFLAGS = -Wall -std=c++14 -O2 -g -DSDLSW -DVGA -DEA_PLATFORM_SAMSUNG_TV -Iinclude -c -Istb -fpermissive -fomit-frame-pointer -fno-exceptions -ffast-math -I../fixed_point/include -IDOS-version -Iinclude -I../stb -I../noudar-core/noudar-core/include  -I../noudar-core/EASTL/include -I../noudar-core/EASTL/test/packages/EABase/include/Common -I../noudar-rendering -I../gles2-renderer -fpermissive -Wno-narrowing -DUSE_ITEMS_INSTANTLY --preload-file data.pfs --use-preload-plugins
LDFLAGS = -O3 -s USE_ZLIB=1 -s USE_LIBPNG=1 -s --preload-file data.pfs --use-preload-plugins

OBJS = main.o \
        SDLVersion/CSDLRenderer.o \
	    OPL2LPT/MusicSDL.o \
        src/CRenderer.o \
        src/RasterizerCommon.o \
        src/NativeBitmap.o \
        src/CTile3DProperties.o \
	src/CPackedFileReader.o \
	src/VisibilityStrategy.o \
	../gles2-renderer/Logger.o \
        ../gles2-renderer/LoadPNG.o \
        ../noudar-core/noudar-core/src/Vec2i.o \
        ../noudar-core/noudar-core/src/CActor.o \
        ../noudar-core/noudar-core/src/CMonster.o \
        ../noudar-core/noudar-core/src/CMonsterGenerator.o \
        ../noudar-core/noudar-core/src/CTeam.o \
        ../noudar-core/noudar-core/src/CMap.o \
        ../noudar-core/noudar-core/src/Common.o \
        ../noudar-core/noudar-core/src/CCharacter.o \
        ../noudar-core/noudar-core/src/CCharacterArchetype.o \
        ../noudar-core/noudar-core/src/CDoorway.o \
        ../noudar-core/noudar-core/src/IFileLoaderDelegate.o \
        ../noudar-core/noudar-core/src/IMapElement.o \
        ../noudar-core/noudar-core/src/CGame.o \
        ../noudar-core/noudar-core/src/CItem.o \
        ../noudar-core/noudar-core/src/CStorageItem.o \
        ../noudar-core/noudar-core/src/CPlainFileLoader.o \
        ../noudar-core/noudar-core/src/CGameDelegate.o \
        ../noudar-core/noudar-core/src/commands/IGameCommand.o \
        ../noudar-core/noudar-core/src/commands/CMoveActorCommand.o \
        ../noudar-core/noudar-core/src/commands/CLoadNewLevelCommand.o \
        ../noudar-core/noudar-core/src/commands/CTurnActorCommand.o \
        ../noudar-core/noudar-core/src/commands/CQuitCommand.o \
        ../noudar-core/noudar-core/src/commands/CNullCommand.o \
        ../noudar-core/noudar-core/src/commands/CEndTurnCommand.o \
        ../noudar-core/noudar-core/src/commands/CPickItemCommand.o \
        ../noudar-core/noudar-core/src/commands/CDropItemCommand.o \
        ../noudar-core/noudar-core/src/commands/CUseCurrentItemCommand.o \
        ../noudar-core/noudar-core/src/commands/CCycleNextItemCommand.o \
        ../noudar-core/noudar-core/src/commands/CCyclePreviousItemCommand.o

TARGET = noudar.html

$(TARGET):	$(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS)

all:   $(TARGET)

clean:
	rm -f $(OBJS) $(TARGET)

packager:
	rm -f ./packer
	g++ -std=c++14 -opacker packer.cpp

data:	packager
	rm -f ./data.pfs
	ls res/*.*  | xargs ./packer

demodata:	packager
	rm -f ./data.pfs
	ls resDemo/*.*  | xargs ./packer

error: pathspec 'DungeonsOfNoudar486/Makefile.em' did not match any file(s) known to git


Only insert Conflicts and Replaces if any

Source: @(Package)
Section: misc
Priority: extra
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends))
@[if Conflicts]Conflicts: @(', '.join(Conflicts))@\n@[end if]
@[if Replaces]Replaces: @(', '.join(Replaces))@\n@[end if]
Homepage: @(Homepage)
Standards-Version: 3.9.2

Package: @(Package)
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends))
Description: @(Description)

Source: @(Package)
Section: misc
Priority: extra
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends))
Conflicts: @(', '.join(Conflicts))
Replaces: @(', '.join(Replaces))
Homepage: @(Homepage)
Standards-Version: 3.9.2

Package: @(Package)
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends))
Description: @(Description)