1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-05 03:50:07 +00:00

Javascript: Move javascript implementation into a separate module

This commit is contained in:
Anthony Nicholls 2024-11-05 13:50:57 +00:00
parent 637226addc
commit df6f3f8e28
69 changed files with 941 additions and 1351 deletions

View file

@ -50,6 +50,7 @@ juce_add_modules(
juce_graphics
juce_gui_basics
juce_gui_extra
juce_javascript
juce_midi_ci
juce_opengl
juce_osc

View file

@ -190,9 +190,8 @@
#include "time/juce_Time.cpp"
#include "unit_tests/juce_UnitTest.cpp"
#include "containers/juce_Variant.cpp"
#include "javascript/juce_JSON.cpp"
#include "javascript/juce_JSONUtils.cpp"
#include "javascript/juce_Javascript.cpp"
#include "json/juce_JSON.cpp"
#include "json/juce_JSONUtils.cpp"
#include "containers/juce_DynamicObject.cpp"
#include "xml/juce_XmlDocument.cpp"
#include "xml/juce_XmlElement.cpp"
@ -294,7 +293,7 @@
#include "maths/juce_MathsFunctions_test.cpp"
#include "misc/juce_EnumHelpers_test.cpp"
#include "containers/juce_FixedSizeFunction_test.cpp"
#include "javascript/juce_JSONSerialisation_test.cpp"
#include "json/juce_JSONSerialisation_test.cpp"
#include "memory/juce_SharedResourcePointer_test.cpp"
#include "text/juce_CharPointer_UTF8_test.cpp"
#include "text/juce_CharPointer_UTF16_test.cpp"

View file

@ -302,7 +302,7 @@ JUCE_END_IGNORE_WARNINGS_MSVC
#include "misc/juce_ConsoleApplication.h"
#include "containers/juce_Variant.h"
#include "containers/juce_NamedValueSet.h"
#include "javascript/juce_JSON.h"
#include "json/juce_JSON.h"
#include "containers/juce_DynamicObject.h"
#include "containers/juce_HashMap.h"
#include "containers/juce_FixedSizeFunction.h"
@ -327,10 +327,9 @@ JUCE_END_IGNORE_WARNINGS_MSVC
#include "files/juce_WildcardFileFilter.h"
#include "streams/juce_FileInputSource.h"
#include "logging/juce_FileLogger.h"
#include "javascript/juce_JSONUtils.h"
#include "json/juce_JSONUtils.h"
#include "serialisation/juce_Serialisation.h"
#include "javascript/juce_JSONSerialisation.h"
#include "javascript/juce_Javascript.h"
#include "json/juce_JSONSerialisation.h"
#include "maths/juce_BigInteger.h"
#include "maths/juce_Expression.h"
#include "maths/juce_Random.h"

View file

@ -32,10 +32,6 @@
==============================================================================
*/
#define choc juce::detail::choc
#include <juce_core/javascript/choc/javascript/choc_javascript_QuickJS.h>
#undef choc
namespace juce
{

View file

@ -0,0 +1,50 @@
/*
==============================================================================
This file is part of the JUCE framework.
Copyright (c) Raw Material Software Limited
JUCE is an open source framework subject to commercial or open source
licensing.
By downloading, installing, or using the JUCE framework, or combining the
JUCE framework with any other source code, object code, content or any other
copyrightable work, you agree to the terms of the JUCE End User Licence
Agreement, and all incorporated terms including the JUCE Privacy Policy and
the JUCE Website Terms of Service, as applicable, which will bind you. If you
do not agree to the terms of these agreements, we will not license the JUCE
framework to you, and you must discontinue the installation or download
process and cease use of the JUCE framework.
JUCE End User Licence Agreement: https://juce.com/legal/juce-8-licence/
JUCE Privacy Policy: https://juce.com/juce-privacy-policy
JUCE Website Terms of Service: https://juce.com/juce-website-terms-of-service/
Or:
You may also use this code under the terms of the AGPLv3:
https://www.gnu.org/licenses/agpl-3.0.en.html
THE JUCE FRAMEWORK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL
WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED.
==============================================================================
*/
#ifdef JUCE_JAVASCRIPT_H_INCLUDED
/* When you add this cpp file to your project, you mustn't include it in a file where you've
already included any other headers - just put it inside a file on its own, possibly with your config
flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
header files that the compiler may be using.
*/
#error "Incorrect use of JUCE cpp file"
#endif
#include "juce_javascript.h"
#define choc juce::detail::choc
#include <juce_javascript/choc/javascript/choc_javascript_QuickJS.h>
#undef choc
#include "javascript/juce_Javascript.cpp"

View file

@ -0,0 +1,65 @@
/*
==============================================================================
This file is part of the JUCE framework.
Copyright (c) Raw Material Software Limited
JUCE is an open source framework subject to commercial or open source
licensing.
By downloading, installing, or using the JUCE framework, or combining the
JUCE framework with any other source code, object code, content or any other
copyrightable work, you agree to the terms of the JUCE End User Licence
Agreement, and all incorporated terms including the JUCE Privacy Policy and
the JUCE Website Terms of Service, as applicable, which will bind you. If you
do not agree to the terms of these agreements, we will not license the JUCE
framework to you, and you must discontinue the installation or download
process and cease use of the JUCE framework.
JUCE End User Licence Agreement: https://juce.com/legal/juce-8-licence/
JUCE Privacy Policy: https://juce.com/juce-privacy-policy
JUCE Website Terms of Service: https://juce.com/juce-website-terms-of-service/
Or:
You may also use this code under the terms of the AGPLv3:
https://www.gnu.org/licenses/agpl-3.0.en.html
THE JUCE FRAMEWORK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL
WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED.
==============================================================================
*/
/*******************************************************************************
The block below describes the properties of this module, and is read by
the Projucer to automatically generate project code that uses it.
For details about the syntax and how to create or use a module, see the
JUCE Module Format.md file.
BEGIN_JUCE_MODULE_DECLARATION
ID: juce_javascript
vendor: juce
version: 8.0.3
name: JUCE Javascript interpreter
description: Javascript interpreter.
website: http://www.juce.com/juce
license: AGPLv3/Commercial
minimumCppStandard: 17
dependencies: juce_core
END_JUCE_MODULE_DECLARATION
*******************************************************************************/
#pragma once
#define JUCE_JAVASCRIPT_H_INCLUDED
#include <juce_core/juce_core.h>
#include "javascript/juce_Javascript.h"