2019-08-02 17:26:43 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016-2017 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2016-03-20 15:52:12 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include "ardour/luabindings.h"
|
2016-03-21 14:06:51 -04:00
|
|
|
#include "ardour/revision.h"
|
2016-03-20 15:52:12 -04:00
|
|
|
#include "luainstance.h"
|
2016-03-28 13:14:56 -04:00
|
|
|
#include "LuaBridge/LuaBridge.h"
|
2016-03-20 15:52:12 -04:00
|
|
|
|
2016-03-21 14:06:51 -04:00
|
|
|
#ifdef WAF_BUILD
|
|
|
|
#include "gtk2ardour-version.h"
|
|
|
|
#endif
|
|
|
|
|
2016-03-20 15:52:12 -04:00
|
|
|
int main (int argc, char **argv)
|
|
|
|
{
|
2016-03-30 19:11:05 -04:00
|
|
|
#ifdef LUABINDINGDOC
|
2016-03-20 15:52:12 -04:00
|
|
|
luabridge::setPrintBindings (true);
|
|
|
|
LuaState lua;
|
|
|
|
lua_State* L = lua.getState ();
|
|
|
|
#ifdef LUADOCOUT
|
2016-03-21 14:06:51 -04:00
|
|
|
printf ("-- %s\n", ARDOUR::revision);
|
2016-03-20 15:52:12 -04:00
|
|
|
printf ("doc = {\n");
|
|
|
|
#else
|
|
|
|
printf ("[\n");
|
2016-03-21 14:06:51 -04:00
|
|
|
printf ("{\"version\" : \"%s\"},\n\n", ARDOUR::revision);
|
2016-03-20 15:52:12 -04:00
|
|
|
#endif
|
|
|
|
LuaInstance::register_classes (L);
|
2017-08-16 15:00:23 -04:00
|
|
|
LuaInstance::register_hooks (L);
|
2016-03-20 15:52:12 -04:00
|
|
|
ARDOUR::LuaBindings::dsp (L);
|
|
|
|
#ifdef LUADOCOUT
|
|
|
|
printf ("}\n");
|
|
|
|
#else
|
|
|
|
printf ("{} ]\n");
|
|
|
|
#endif
|
|
|
|
return 0;
|
2016-03-30 19:11:05 -04:00
|
|
|
#else
|
|
|
|
return 1;
|
|
|
|
#endif
|
2016-03-20 15:52:12 -04:00
|
|
|
}
|