GDevelop JS Platform
Platform for developing HTML5/Javascript based games with GDevelop
Exporter.h
1 /*
2  * GDevelop JS Platform
3  * Copyright 2008-2016 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 #ifndef EXPORTER_H
7 #define EXPORTER_H
8 #include <map>
9 #include <set>
10 #include <string>
11 #include <vector>
12 
13 #include "GDCore/String.h"
14 namespace gd {
15 class Project;
16 class Layout;
17 class ExternalLayout;
18 class AbstractFileSystem;
19 } // namespace gd
20 namespace gdjs {
21 struct PreviewExportOptions;
22 struct ExportOptions;
23 }
24 
25 namespace gdjs {
26 
31 class Exporter {
32  public:
33  Exporter(gd::AbstractFileSystem& fileSystem,
34  gd::String gdjsRoot_ = "./JsPlatform");
35  virtual ~Exporter();
36 
45 
51  bool ExportWholePixiProject(const ExportOptions& options);
52 
56  const gd::String& GetLastError() const { return lastError; };
57 
63  void SetCodeOutputDirectory(gd::String codeOutputDir_) {
64  codeOutputDir = codeOutputDir_;
65  }
66 
67  private:
68  gd::AbstractFileSystem&
69  fs;
70  gd::String lastError;
71  gd::String
72  gdjsRoot;
73  gd::String codeOutputDir;
75 };
76 
77 } // namespace gdjs
78 #endif // EXPORTER_H
Export a project or a layout to a playable HTML5/Javascript based game.
Definition: Exporter.h:31
const gd::String & GetLastError() const
Return the error that occurred during the last export.
Definition: Exporter.h:56
void SetCodeOutputDirectory(gd::String codeOutputDir_)
Change the directory where code files are generated.
Definition: Exporter.h:63
bool ExportWholePixiProject(const ExportOptions &options)
Export the specified project, using Pixi.js.
Definition: Exporter.cpp:53
bool ExportProjectForPixiPreview(const PreviewExportOptions &options)
Create a preview for the specified options.
Definition: Exporter.cpp:47
The options used to export a project.
Definition: ExporterHelper.h:324
The options used to export a project for a preview.
Definition: ExporterHelper.h:34