// Provide additional material and descriptions for your module. You can
// provide this for multiple modules if you like.
// The purpose of this file is to allow the developers to provide additional
// material for their module, like documentation links, video tutorials and
// similar. You should always write such a META file for your module, even
// if you do not provide additional material (for now at least).
// An extensively commented example of a META file can be
// found in src/modules/template/resources
"#name#"
{
// Provide an icon with this name in the same directory as this file.
icon="WM#name#Icon.png";
website = "http://www.openwalnut.org";
author = "OpenWalnut Project";
"OpenWalnut Project"
{
url="http://www.openwalnut.org";
email="contact\@openwalnut.org";
what="Design, Development and Bug fixing";
};
};
EOF
;
die"Need exactly one command line argument (module name).\nPlease execute this script in the src/modules directory with the desired module name.\n"unless$#ARGV==0;
$dirname=lcfirst($ARGV[0]);# directory has to have lower case first letter
...
...
@@ -228,13 +266,20 @@ $modulename = ucfirst($ARGV[0]); # name has to have upper case first letter
print"Generating for ".$modulename." in ".$parentdir.$dirname.".\n";
mkdir$dirname;
$resourcesDirName="${dirname}/resources";
print$resourcesDirName;
mkdir$resourcesDirName;
$header=~s/\#name\#/$modulename/gm;
$impl=~s/\#name\#/$modulename/gm;
$meta=~s/\#name\#/$modulename/gm;
# Set the header guards in capitals
$header=~s/\#NAME\#/\U$modulename/gm;
open(FILE,">${dirname}/WM${modulename}.h")ordie;
printFILE$header;
close(FILE);
...
...
@@ -243,6 +288,12 @@ open( FILE, ">${dirname}/WM${modulename}.cpp" ) or die;
printFILE$impl;
close(FILE);
open(FILE,">${dirname}/resources/META")ordie;
printFILE$meta;
close(FILE);
print"Generating completed.\n";
print"\n";
print"Look at the template module for an introduction to module programming.\n";
print"\n";
print"Do not forget to add the new module to a module-*.toolbox file in order to introduce it to the build system.\n";