From d9a291f6411f2e571c181da0ac89f550ba73f681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 12 Oct 2016 20:37:38 +0200 Subject: ogg/vorbis/opus: Make them modules and unbundle thirdparty libs Took the opportunity to undo the Godot changed made to the opus source. The opus module should eventually be built in its own environment to avoid polluting others with too many include dirs and defines. TODO: Fix the platform/ stuff for opus. --- modules/ogg/SCsub | 20 ++++++++++++++++++++ modules/ogg/config.py | 6 ++++++ modules/ogg/register_types.cpp | 35 +++++++++++++++++++++++++++++++++++ modules/ogg/register_types.h | 30 ++++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+) create mode 100644 modules/ogg/SCsub create mode 100644 modules/ogg/config.py create mode 100644 modules/ogg/register_types.cpp create mode 100644 modules/ogg/register_types.h (limited to 'modules/ogg') diff --git a/modules/ogg/SCsub b/modules/ogg/SCsub new file mode 100644 index 0000000000..42d593f88e --- /dev/null +++ b/modules/ogg/SCsub @@ -0,0 +1,20 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +if (env["libogg"] != "system"): # builtin + thirdparty_dir = "#thirdparty/libogg/" + thirdparty_libogg_sources = [ + "bitwise.c", + "framing.c", + ] + thirdparty_libogg_sources = [thirdparty_dir + file for file in thirdparty_libogg_sources] + + env_modules.add_source_files(env.modules_sources, thirdparty_libogg_sources) + env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/ogg/config.py b/modules/ogg/config.py new file mode 100644 index 0000000000..368e97e152 --- /dev/null +++ b/modules/ogg/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/ogg/register_types.cpp b/modules/ogg/register_types.cpp new file mode 100644 index 0000000000..823ca510ca --- /dev/null +++ b/modules/ogg/register_types.cpp @@ -0,0 +1,35 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +// Dummy module as libogg is needed by other modules (vorbis, theora, opus, ...) + +void register_ogg_types() {} + +void unregister_ogg_types() {} diff --git a/modules/ogg/register_types.h b/modules/ogg/register_types.h new file mode 100644 index 0000000000..b5268a1df4 --- /dev/null +++ b/modules/ogg/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_ogg_types(); +void unregister_ogg_types(); -- cgit v1.2.3