Introducing new version naming

parent 43132ccd
......@@ -28,6 +28,18 @@ if( NOT DEFINED ITA_VA_MATLAB_BUILD_WITH_INTERNAL_CORE )
set( ITA_VA_MATLAB_BUILD_WITH_INTERNAL_CORE OFF CACHE BOOL "Build a VACore into VAMatlab instead of using a network adapter (not recommended)" )
endif( NOT DEFINED ITA_VA_MATLAB_BUILD_WITH_INTERNAL_CORE )
if( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR )
set( ITA_VAMATLAB_VERSION_MAJOR "v2016" CACHE STRING "VAMatlab version major (usually 'v' and year)" )
endif( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR )
if( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR )
set( ITA_VAMATLAB_VERSION_MINOR "a" CACHE STRING "VAMatlab version minor (usually a,b,c ...)" )
endif( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR )
if( NOT DEFINED ITA_VAMATLAB_SHOW_BANNER )
set( ITA_VAMATLAB_SHOW_BANNER ON CACHE BOOL "Show VA banner on Matlab init" )
endif( NOT DEFINED ITA_VAMATLAB_SHOW_BANNER )
vista_use_package( VABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( VANet REQUIRED FIND_DEPENDENCIES )
vista_use_package( Matlab REQUIRED FIND_DEPENDENCIES )
......@@ -59,6 +71,13 @@ if( ITA_VA_MATLAB_BUILD_WITH_INTERNAL_CORE )
add_definitions( -DVAMATLAB_INTERNAL_CORE )
endif( ITA_VA_MATLAB_BUILD_WITH_INTERNAL_CORE )
add_definitions( "-DVAMATLAB_VERSION_MAJOR=\"${ITA_VAMATLAB_VERSION_MAJOR}\"" )
add_definitions( "-DVAMATLAB_VERSION_MINOR=\"${ITA_VAMATLAB_VERSION_MINOR}\"" )
if( ITA_VAMATLAB_SHOW_BANNER )
add_definitions( "-DVAMATLAB_SHOW_BANNER" )
endif( ITA_VAMATLAB_SHOW_BANNER )
# Sources
set( VAMATLAB_SRC
......
......@@ -52,25 +52,9 @@
#undef PlaySound
#endif
// Matlab executable version number
#define VAMATLAB_VERSION_MAJOR 1
#define VAMATLAB_VERSION_MINOR 25
#define SVN_DATE "$Date: 2016-03-23 19:58:33 +0100 (Mi, 23 Mrz 2016) $"
#define SVN_REVISION "$Revision: 4664 $"
static std::string sSVNDate = std::string(SVN_DATE).substr(7, 10);
static std::string sSVNRevBase = std::string(SVN_REVISION);
static std::string sSVNRev = sSVNRevBase.substr(11, sSVNRevBase.length()-13);
// Show startup banner when the MEX is called first time?
#define VAMATLAB_BANNER 1
// Maximum number of parallel connections
const int VAMATLAB_MAX_CONNECTIONS = 16;
// Use a VACore inside mex library
#define VAMATLAB_INTEGRATED 0
// Connection handle datatype
typedef int32_t ConnectionHandle;
const mxClassID CONNECTIONHANDLE_CLASS_ID = mxINT32_CLASS;
......@@ -179,9 +163,9 @@ void banner()
mexPrintf(" VVV VVV A Virtual Acoustics (VA)\n");
mexPrintf(" VVV VVV AAA Real-time auralization for acoustic virtual environments\n");
#if VAMATLAB_INTEGRATED == 1
mexPrintf(" VVV VVV AAA VA Matlab with integrated VA core, version %i.%i (Rev. %s)\n", VAMATLAB_VERSION_MAJOR, VAMATLAB_VERSION_MINOR, sSVNRev.c_str() );
mexPrintf(" VVV VVV AAA VA Matlab with integrated VA core, version %s.%s\n", VAMATLAB_VERSION_MAJOR, VAMATLAB_VERSION_MINOR );
#else
mexPrintf(" VVV VVV AAA VA Matlab network client, version %i.%i (Rev. %s)\n", VAMATLAB_VERSION_MAJOR, VAMATLAB_VERSION_MINOR, sSVNRev.c_str() );
mexPrintf(" VVV VVV AAA VA Matlab network client, version %s.%s\n", VAMATLAB_VERSION_MAJOR, VAMATLAB_VERSION_MINOR );
#endif
mexPrintf(" VVV VVV AAA (c) Copyright 2015-today, Institute of Technical Acoustics (ITA)\n");
mexPrintf(" VVVVVV AAA RWTH Aachen University, http://www.akustik.rwth-aachen.de\n");
......@@ -204,7 +188,7 @@ void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
if( g_bFirst )
{
g_bFirst = false;
#if (VAMATLAB_BANNER==1)
#ifdef VAMATLAB_SHOW_BANNER
banner();
#endif
}
......@@ -282,7 +266,12 @@ REGISTER_PRIVATE_FUNCTION( getVersion );
void getVersion( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
std::stringstream ss;
ss << "VA Matlab version " << VAMATLAB_VERSION_MAJOR << " Revision " << sSVNRev << " (" << sSVNDate << ")";
ss << "VAMatlab " << VAMATLAB_VERSION_MAJOR << "." << VAMATLAB_VERSION_MINOR;
#ifdef DEBUG
ss << " (debug)";
#else
ss << " (release)";
#endif
if( nlhs == 1 )
plhs[0] = mxCreateString( ss.str().c_str() );
......@@ -430,14 +419,11 @@ void connect(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
pConnection->pCoreInterface = pConnection->pClient->GetCoreInstance();
pConnection->pVAMatlabTracker->pVACore = pConnection->pCoreInterface;
/*
CVACoreVersionInfo oRemoteCoreVersion;
pConnection->pCoreInterface->GetVersionInfo( &oRemoteCoreVersion );
CVANetVersionInfo oNetVersion;
GetVANetVersionInfo( &oNetVersion );
*/
}
catch (...)
{
......@@ -3198,7 +3184,6 @@ DECLARE_FUNCTION_REQUIRED_INARG( setRenderingModuleMuted, bMuted, "logical-1x1",
void setRenderingModuleMuted( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 3 );
ConnectionHandle hHandle = GetConnectionHandle(prhs[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment