Salut 4ian,
Je suis en train de retravailler l’extension Tableaux et je viens d’ajouter le fichier JsExtension.cpp qui déclare un clone de l’extension pour la plateforme Web. Or, mon extension n’est pas détectée sur la plateforme Web.
#if defined(GD_IDE_ONLY)
#include "GDCore/PlatformDefinition/PlatformExtension.h"
#include "GDCore/Tools/Version.h"
#include <boost/version.hpp>
#include <iostream>
#include <wx/intl.h>
//Ensure the wxWidgets macro "_" returns a std::string
#if defined(_)
#undef _
#endif
#define _(s) std::string(wxGetTranslation((s)).mb_str())
/**
* \brief This class declares information about the JS extension.
*/
class JsExtension : public gd::PlatformExtension
{
public:
/**
* Constructor of an extension declares everything the extension contains : Objects, actions, conditions and expressions.
*/
JsExtension()
{
SetExtensionInformation("Array",
_("Array"),
_("Extension to store values and text inside arrays."),
"Victor Levasseur",
"zlib/libpng License ( Open Source )");
CloneExtension("Game Develop C++ platform", "Array");
StripUnimplementedInstructionsAndExpressions(); //Unimplemented things are listed here:
};
virtual ~JsExtension() {};
};
/**
* Used by Game Develop to create the extension class
* -- Do not need to be modified. --
*/
extern "C" gd::PlatformExtension * GD_EXTENSION_API CreateGDJSExtension() {
return new JsExtension;
}
/**
* Used by Game Develop to destroy the extension class
* -- Do not need to be modified. --
*/
extern "C" void GD_EXTENSION_API DestroyGDJSExtension(gd::PlatformExtension * p) {
delete p;
}
#endif
EDIT : Ah, GDJS possède les chemins des extensions en dur mais ne lit pas le dossier. Quand est-ce que la plateforme cherchera elle-même les extensions ?