GDevelop JS Platform
Platform for developing HTML5/Javascript based games with GDevelop
ExporterHelper.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 #pragma once
7 
8 #include <map>
9 #include <set>
10 #include <string>
11 #include <unordered_map>
12 #include <vector>
13 
14 #include "GDCore/IDE/CaptureOptions.h"
15 #include "GDCore/String.h"
16 namespace gd {
17 class Project;
18 class Layout;
19 class ExternalLayout;
20 class SerializerElement;
21 class AbstractFileSystem;
22 class ResourcesContainer;
23 class SourceFileMetadata;
24 class WholeProjectDiagnosticReport;
25 class CaptureOptions;
26 class Screenshot;
27 class InGameEditorResourceMetadata;
28 } // namespace gd
29 
30 namespace gdjs {
31 
40  PreviewExportOptions(gd::Project &project_, const gd::String &exportPath_)
41  : project(project_),
42  exportPath(exportPath_),
43  useWindowMessageDebuggerClient(false),
44  useMinimalDebuggerClient(false),
45  nativeMobileApp(false),
46  fullLoadingScreen(false),
47  isDevelopmentEnvironment(false),
48  isInGameEdition(false),
49  nonRuntimeScriptsCacheBurst(0),
50  inAppTutorialMessageInPreview(""),
51  inAppTutorialMessagePositionInPreview(""),
52  fallbackAuthorId(""),
53  fallbackAuthorUsername(""),
54  playerId(""),
55  playerUsername(""),
56  playerToken(""),
57  allowAuthenticationUsingIframeForPreview(false) {};
58 
64  const gd::String &address, const gd::String &port) {
65  websocketDebuggerServerAddress = address;
66  websocketDebuggerServerPort = port;
67  return *this;
68  }
69 
75  const gd::String &message, const gd::String &position) {
76  inAppTutorialMessageInPreview = message;
77  inAppTutorialMessagePositionInPreview = position;
78  return *this;
79  }
80 
85  PreviewExportOptions &SetFallbackAuthor(const gd::String &id,
86  const gd::String &username) {
87  fallbackAuthorId = id;
88  fallbackAuthorUsername = username;
89  return *this;
90  }
91 
97  const gd::String &username,
98  const gd::String &token) {
99  playerId = id;
100  playerUsername = username;
101  playerToken = token;
102  return *this;
103  }
104 
110  useWindowMessageDebuggerClient = true;
111  return *this;
112  }
113 
118  useMinimalDebuggerClient = true;
119  return *this;
120  }
121 
127  nativeMobileApp = enable;
128  return *this;
129  }
130 
134  PreviewExportOptions &SetLayoutName(const gd::String &layoutName_) {
135  layoutName = layoutName_;
136  return *this;
137  }
138 
144  const gd::String &externalLayoutName_) {
145  externalLayoutName = externalLayoutName_;
146  return *this;
147  }
148 
154  const gd::String &eventsBasedObjectType_) {
155  eventsBasedObjectType = eventsBasedObjectType_;
156  return *this;
157  }
158 
164  const gd::String &eventsBasedObjectVariantName_) {
165  eventsBasedObjectVariantName = eventsBasedObjectVariantName_;
166  return *this;
167  }
168 
173  PreviewExportOptions &SetIncludeFileHash(const gd::String &includeFile,
174  int hash) {
175  includeFileHashes[includeFile] = hash;
176  return *this;
177  }
178 
183  shouldClearExportFolder = enable;
184  return *this;
185  }
186 
191  shouldReloadProjectData = enable;
192  return *this;
193  }
194 
199  shouldReloadLibraries = enable;
200  return *this;
201  }
202 
207  shouldGenerateScenesEventsCode = enable;
208  return *this;
209  }
210 
216  fullLoadingScreen = enable;
217  return *this;
218  }
219 
225  isDevelopmentEnvironment = enable;
226  return *this;
227  }
228 
233  isInGameEdition = enable;
234  return *this;
235  }
236 
240  PreviewExportOptions &SetInGameEditorSettingsJson(const gd::String &inGameEditorSettingsJson_) {
241  inGameEditorSettingsJson = inGameEditorSettingsJson_;
242  return *this;
243  }
244 
248  PreviewExportOptions &SetEditorId(const gd::String &editorId_) {
249  editorId = editorId_;
250  return *this;
251  }
252 
257  SetEditorCameraState3D(const gd::String &cameraMode, double positionX,
258  double positionY, double positionZ,
259  double rotationAngle, double elevationAngle,
260  double distance) {
261  editorCamera3DCameraMode = cameraMode;
262  editorCamera3DPositionX = positionX;
263  editorCamera3DPositionY = positionY;
264  editorCamera3DPositionZ = positionZ;
265  editorCamera3DRotationAngle = rotationAngle;
266  editorCamera3DElevationAngle = elevationAngle;
267  editorCamera3DDistance = distance;
268  return *this;
269  }
270 
277  nonRuntimeScriptsCacheBurst = value;
278  return *this;
279  }
280 
288  const gd::String &electronRemoteRequirePath_) {
289  electronRemoteRequirePath = electronRemoteRequirePath_;
290  return *this;
291  }
292 
298  const gd::String &gdevelopResourceToken_) {
299  gdevelopResourceToken = gdevelopResourceToken_;
300  return *this;
301  }
302 
311  bool allowAuthenticationUsingIframeForPreview_) {
312  allowAuthenticationUsingIframeForPreview =
313  allowAuthenticationUsingIframeForPreview_;
314  return *this;
315  }
316 
321  const gd::String &crashReportUploadLevel_) {
322  crashReportUploadLevel = crashReportUploadLevel_;
323  return *this;
324  }
325 
329  PreviewExportOptions &SetPreviewContext(const gd::String &previewContext_) {
330  previewContext = previewContext_;
331  return *this;
332  }
333 
338  const gd::String &gdevelopVersionWithHash_) {
339  gdevelopVersionWithHash = gdevelopVersionWithHash_;
340  return *this;
341  }
342 
347  const gd::String &projectTemplateSlug_) {
348  projectTemplateSlug = projectTemplateSlug_;
349  return *this;
350  }
351 
355  PreviewExportOptions &SetSourceGameId(const gd::String &sourceGameId_) {
356  sourceGameId = sourceGameId_;
357  return *this;
358  }
359 
365  const gd::String &signedUrl,
366  const gd::String &publicUrl) {
367  gd::Screenshot screenshot;
368  screenshot.SetDelayTimeInSeconds(delayTimeInSeconds);
369  screenshot.SetSignedUrl(signedUrl);
370  screenshot.SetPublicUrl(publicUrl);
371  captureOptions.AddScreenshot(screenshot);
372  return *this;
373  }
374 
375  gd::Project &project;
376  gd::String exportPath;
377  gd::String websocketDebuggerServerAddress;
378  gd::String websocketDebuggerServerPort;
379  bool useWindowMessageDebuggerClient;
380  bool useMinimalDebuggerClient;
381  gd::String layoutName;
382  gd::String externalLayoutName;
383  gd::String eventsBasedObjectType;
384  gd::String eventsBasedObjectVariantName;
385  gd::String fallbackAuthorUsername;
386  gd::String fallbackAuthorId;
387  gd::String playerId;
388  gd::String playerUsername;
389  gd::String playerToken;
390  gd::String inAppTutorialMessageInPreview;
391  gd::String inAppTutorialMessagePositionInPreview;
392  bool nativeMobileApp;
393  std::map<gd::String, int> includeFileHashes;
394  bool shouldClearExportFolder = true;
395  bool shouldReloadProjectData = true;
396  bool shouldReloadLibraries = true;
397  bool shouldGenerateScenesEventsCode = true;
398  bool fullLoadingScreen;
399  bool isDevelopmentEnvironment;
400  bool isInGameEdition;
401  gd::String editorId;
402  gd::String editorCamera3DCameraMode;
403  gd::String inGameEditorSettingsJson;
404  double editorCamera3DPositionX = 0;
405  double editorCamera3DPositionY = 0;
406  double editorCamera3DPositionZ = 0;
407  double editorCamera3DRotationAngle = 0;
408  double editorCamera3DElevationAngle = 0;
409  double editorCamera3DDistance = 0;
410  unsigned int nonRuntimeScriptsCacheBurst;
411  gd::String electronRemoteRequirePath;
412  gd::String gdevelopResourceToken;
413  bool allowAuthenticationUsingIframeForPreview;
414  gd::String crashReportUploadLevel;
415  gd::String previewContext;
416  gd::String gdevelopVersionWithHash;
417  gd::String projectTemplateSlug;
418  gd::String sourceGameId;
419  gd::CaptureOptions captureOptions;
420 };
421 
430  ExportOptions(gd::Project &project_, const gd::String &exportPath_)
431  : project(project_),
432  exportPath(exportPath_),
433  target(""),
434  fallbackAuthorId(""),
435  fallbackAuthorUsername("") {};
436 
441  ExportOptions &SetFallbackAuthor(const gd::String &id,
442  const gd::String &username) {
443  fallbackAuthorId = id;
444  fallbackAuthorUsername = username;
445  return *this;
446  }
447 
454  ExportOptions &SetTarget(const gd::String &target_) {
455  target = target_;
456  return *this;
457  }
458 
459  gd::Project &project;
460  gd::String exportPath;
461  gd::String target;
462  gd::String fallbackAuthorUsername;
463  gd::String fallbackAuthorId;
464 };
465 
471  public:
472  ExporterHelper(gd::AbstractFileSystem &fileSystem,
473  gd::String gdjsRoot_,
474  gd::String codeOutputDir);
475  virtual ~ExporterHelper() {};
476 
480  const gd::String &GetLastError() const { return lastError; };
481 
494  static gd::String ExportProjectData(
495  gd::AbstractFileSystem &fs, gd::Project &project, gd::String filename,
496  const gd::SerializerElement &runtimeGameOptions, bool isInGameEdition,
497  const std::vector<gd::InGameEditorResourceMetadata> &inGameEditorResources);
498 
508  static void SerializeProjectData(gd::AbstractFileSystem &fs,
509  const gd::Project &project,
510  const PreviewExportOptions &options,
511  gd::SerializerElement &projectDataElement,
512  const std::vector<gd::InGameEditorResourceMetadata> &inGameEditorResources);
513 
525  static void
526  SerializeRuntimeGameOptions(gd::AbstractFileSystem &fs,
527  const gd::String &gdjsRoot,
528  const PreviewExportOptions &options,
529  std::vector<gd::String> &includesFiles,
530  gd::SerializerElement &runtimeGameOptionsElement);
531 
542  static void ExportResources(gd::AbstractFileSystem &fs,
543  gd::Project &project,
544  gd::String exportDir);
545 
549  void AddLibsInclude(bool pixiRenderers,
550  bool pixiInThreeRenderers,
551  bool isInGameEdition,
552  bool includeWebsocketDebuggerClient,
553  bool includeWindowMessageDebuggerClient,
554  bool includeMinimalDebuggerClient,
555  bool includeCaptureManager,
556  bool includeInAppTutorialMessage,
557  gd::String gdevelopLogoStyle,
558  std::vector<gd::String> &includesFiles);
559 
563  void RemoveIncludes(bool pixiRenderers,
564  std::vector<gd::String> &includesFiles);
565 
576  bool ExportIncludesAndLibs(const std::vector<gd::String> &includesFiles,
577  gd::String exportDir,
578  bool exportSourceMaps);
579 
590  const gd::Project &project,
591  gd::String outputDir,
592  std::vector<gd::String> &includesFiles,
593  gd::WholeProjectDiagnosticReport &wholeProjectDiagnosticReport,
594  bool exportForPreview);
595 
599  bool ExportEffectIncludes(gd::Project &project,
600  std::vector<gd::String> &includesFiles);
601 
619  bool ExportIndexFile(const gd::Project &project,
620  gd::String source,
621  gd::String exportDir,
622  const std::vector<gd::String> &includesFiles,
623  const std::vector<gd::SourceFileMetadata> &sourceFiles,
624  unsigned int nonRuntimeScriptsCacheBurst,
625  gd::String additionalSpec = "");
626 
643  bool CompleteIndexFile(gd::String &indexFileContent,
644  gd::String exportDir,
645  const std::vector<gd::String> &includesFiles,
646  unsigned int nonRuntimeScriptsCacheBurst,
647  gd::String additionalSpec);
648 
656  const gd::String GenerateWebManifest(const gd::Project &project);
657 
665  bool ExportCordovaFiles(const gd::Project &project,
666  gd::String exportDir,
667  std::set<gd::String> usedExtensions);
668 
676  bool ExportElectronFiles(const gd::Project &project,
677  gd::String exportDir,
678  std::set<gd::String> usedExtensions);
679 
687  bool ExportBuildResourcesElectronFiles(const gd::Project &project,
688  gd::String exportDir);
689 
697  bool ExportFacebookInstantGamesFiles(const gd::Project &project,
698  gd::String exportDir);
699 
706  bool ExportHtml5Files(const gd::Project &project, gd::String exportDir);
707 
717  std::vector<gd::String> &includesFiles);
718 
726  static gd::String GetExportedIncludeFilename(
727  gd::AbstractFileSystem &fs, const gd::String &gdjsRoot,
728  const gd::String &include, unsigned int nonRuntimeScriptsCacheBurst = 0);
729 
735  void SetCodeOutputDirectory(gd::String codeOutputDir_) {
736  codeOutputDir = codeOutputDir_;
737  }
738 
739  static void AddDeprecatedFontFilesToFontResources(
740  gd::AbstractFileSystem &fs,
741  gd::ResourcesContainer &resourcesManager,
742  const gd::String &exportDir,
743  gd::String urlPrefix = "");
744 
745  gd::AbstractFileSystem
746  &fs;
747  gd::String lastError;
748  gd::String
750  gd::String codeOutputDir;
752 
753  private:
754  static void
755  SerializeUsedResources(gd::SerializerElement &rootElement,
756  std::set<gd::String> &projectUsedResources,
757  std::unordered_map<gd::String, std::set<gd::String>>
758  &layersUsedResources,
759  std::unordered_map<gd::String, std::set<gd::String>>
760  &eventsBasedObjectVariantsUsedResources);
761 
765  static void StripAndSerializeProjectData(gd::Project &project,
766  gd::SerializerElement &rootElement,
767  bool isInGameEdition,
768  const std::vector<gd::InGameEditorResourceMetadata> &inGameEditorResources);
769 
774  static void
775  AddInGameEditorResources(gd::Project &project,
776  std::set<gd::String> &projectUsedResources,
777  const std::vector<gd::InGameEditorResourceMetadata> &inGameEditorResources);
778 };
779 
780 } // namespace gdjs
Export a project or a layout to a playable HTML5/Javascript based game.
Definition: ExporterHelper.h:470
static gd::String ExportProjectData(gd::AbstractFileSystem &fs, gd::Project &project, gd::String filename, const gd::SerializerElement &runtimeGameOptions, bool isInGameEdition, const std::vector< gd::InGameEditorResourceMetadata > &inGameEditorResources)
Export a project without its events and options to 2 JS variables.
Definition: ExporterHelper.cpp:347
bool CompleteIndexFile(gd::String &indexFileContent, gd::String exportDir, const std::vector< gd::String > &includesFiles, unsigned int nonRuntimeScriptsCacheBurst, gd::String additionalSpec)
Replace the annotations in a index.html file by the specified content.
Definition: ExporterHelper.cpp:1079
gd::String lastError
The last error that occurred.
Definition: ExporterHelper.h:747
bool ExportEffectIncludes(gd::Project &project, std::vector< gd::String > &includesFiles)
Add the project effects include files.
Definition: ExporterHelper.cpp:1269
bool ExportHtml5Files(const gd::Project &project, gd::String exportDir)
Generate any HTML5 specific file.
Definition: ExporterHelper.cpp:948
bool ExportBuildResourcesElectronFiles(const gd::Project &project, gd::String exportDir)
Generate the Build Resources files for Electron (mainly for the icons) for packaging and save it to t...
Definition: ExporterHelper.cpp:1060
bool ExportIncludesAndLibs(const std::vector< gd::String > &includesFiles, gd::String exportDir, bool exportSourceMaps)
Copy all the specified files to the export directory. Relative files are copied from "<GDJS root>/Run...
Definition: ExporterHelper.cpp:1356
gd::String gdjsRoot
The root directory of GDJS, used to copy runtime files.
Definition: ExporterHelper.h:749
bool ExportCordovaFiles(const gd::Project &project, gd::String exportDir, std::set< gd::String > usedExtensions)
Generate the Cordova configuration file and save it to the export directory.
Definition: ExporterHelper.cpp:749
bool ExportProjectForPixiPreview(const PreviewExportOptions &options, std::vector< gd::String > &includesFiles)
Create a preview for the specified options.
Definition: ExporterHelper.cpp:109
static void SerializeRuntimeGameOptions(gd::AbstractFileSystem &fs, const gd::String &gdjsRoot, const PreviewExportOptions &options, std::vector< gd::String > &includesFiles, gd::SerializerElement &runtimeGameOptionsElement)
Serialize the content of the extra configuration to store in gdjs.runtimeGameOptions to JSON.
Definition: ExporterHelper.cpp:370
void AddLibsInclude(bool pixiRenderers, bool pixiInThreeRenderers, bool isInGameEdition, bool includeWebsocketDebuggerClient, bool includeWindowMessageDebuggerClient, bool includeMinimalDebuggerClient, bool includeCaptureManager, bool includeInAppTutorialMessage, gd::String gdevelopLogoStyle, std::vector< gd::String > &includesFiles)
Add libraries files to the list of includes.
Definition: ExporterHelper.cpp:1114
static void SerializeProjectData(gd::AbstractFileSystem &fs, const gd::Project &project, const PreviewExportOptions &options, gd::SerializerElement &projectDataElement, const std::vector< gd::InGameEditorResourceMetadata > &inGameEditorResources)
Serialize a project without its events to JSON.
Definition: ExporterHelper.cpp:527
bool ExportFacebookInstantGamesFiles(const gd::Project &project, gd::String exportDir)
Generate the Facebook Instant Games files for packaging and save it to the export directory.
Definition: ExporterHelper.cpp:927
static void ExportResources(gd::AbstractFileSystem &fs, gd::Project &project, gd::String exportDir)
Copy all the resources of the project to to the export directory, updating the resources filenames.
Definition: ExporterHelper.cpp:1395
gd::String codeOutputDir
Definition: ExporterHelper.h:750
bool ExportIndexFile(const gd::Project &project, gd::String source, gd::String exportDir, const std::vector< gd::String > &includesFiles, const std::vector< gd::SourceFileMetadata > &sourceFiles, unsigned int nonRuntimeScriptsCacheBurst, gd::String additionalSpec="")
Generate the standard index file and save it to the export directory.
Definition: ExporterHelper.cpp:702
void RemoveIncludes(bool pixiRenderers, std::vector< gd::String > &includesFiles)
Remove include files that are Pixi renderers.
Definition: ExporterHelper.cpp:1255
bool ExportScenesEventsCode(const gd::Project &project, gd::String outputDir, std::vector< gd::String > &includesFiles, gd::WholeProjectDiagnosticReport &wholeProjectDiagnosticReport, bool exportForPreview)
Generate the events JS code, and save them to the export directory.
Definition: ExporterHelper.cpp:1281
static gd::String GetExportedIncludeFilename(gd::AbstractFileSystem &fs, const gd::String &gdjsRoot, const gd::String &include, unsigned int nonRuntimeScriptsCacheBurst=0)
Given an include file, returns the name of the file to reference in the exported game.
Definition: ExporterHelper.cpp:1316
const gd::String & GetLastError() const
Return the error that occurred during the last export.
Definition: ExporterHelper.h:480
const gd::String GenerateWebManifest(const gd::Project &project)
Generates a WebManifest, a metadata file that allow to make the exported game a working PWA.
Definition: ExporterHelper.cpp:1439
gd::AbstractFileSystem & fs
The abstract file system to be used for exportation.
Definition: ExporterHelper.h:746
bool ExportElectronFiles(const gd::Project &project, gd::String exportDir, std::set< gd::String > usedExtensions)
Generate the Electron files for packaging and save it to the export directory.
Definition: ExporterHelper.cpp:969
void SetCodeOutputDirectory(gd::String codeOutputDir_)
Change the directory where code files are generated.
Definition: ExporterHelper.h:735
The options used to export a project.
Definition: ExporterHelper.h:425
ExportOptions & SetTarget(const gd::String &target_)
Set the (optional) target platform.
Definition: ExporterHelper.h:454
ExportOptions(gd::Project &project_, const gd::String &exportPath_)
Definition: ExporterHelper.h:430
ExportOptions & SetFallbackAuthor(const gd::String &id, const gd::String &username)
Set the fallback author info (if info not present in project properties).
Definition: ExporterHelper.h:441
The options used to export a project for a preview.
Definition: ExporterHelper.h:35
PreviewExportOptions & SetEventsBasedObjectType(const gd::String &eventsBasedObjectType_)
Set the (optional) events-based object to be instantiated in the scene at the beginning of the previe...
Definition: ExporterHelper.h:153
PreviewExportOptions & SetCrashReportUploadLevel(const gd::String &crashReportUploadLevel_)
Set the level of crash reports to be sent to GDevelop APIs.
Definition: ExporterHelper.h:320
PreviewExportOptions & UseWindowMessageDebuggerClient()
Set that the game should connect to the debugger server using the "Window Message " debugger client.
Definition: ExporterHelper.h:109
PreviewExportOptions & SetProjectTemplateSlug(const gd::String &projectTemplateSlug_)
Set the template slug that was used to create the project.
Definition: ExporterHelper.h:346
PreviewExportOptions & SetSourceGameId(const gd::String &sourceGameId_)
Set the source game id that was used to create the project.
Definition: ExporterHelper.h:355
PreviewExportOptions & SetExternalLayoutName(const gd::String &externalLayoutName_)
Set the (optional) external layout to be instantiated in the scene at the beginning of the previewed ...
Definition: ExporterHelper.h:143
PreviewExportOptions & SetEventsBasedObjectVariantName(const gd::String &eventsBasedObjectVariantName_)
Set the (optional) events-based object variant to be instantiated in the scene at the beginning of th...
Definition: ExporterHelper.h:163
PreviewExportOptions & SetElectronRemoteRequirePath(const gd::String &electronRemoteRequirePath_)
Definition: ExporterHelper.h:287
PreviewExportOptions & SetGDevelopResourceToken(const gd::String &gdevelopResourceToken_)
Definition: ExporterHelper.h:297
PreviewExportOptions & SetIncludeFileHash(const gd::String &includeFile, int hash)
Set the hash associated to an include file. Useful for the preview hot-reload, to know if a file chan...
Definition: ExporterHelper.h:173
PreviewExportOptions & SetGDevelopVersionWithHash(const gd::String &gdevelopVersionWithHash_)
Set the GDevelop version so the game is aware of it.
Definition: ExporterHelper.h:337
PreviewExportOptions & SetIsDevelopmentEnvironment(bool enable)
Set if the export should consider to be in a development environment of GDevelop (the game should use...
Definition: ExporterHelper.h:224
PreviewExportOptions & SetPreviewContext(const gd::String &previewContext_)
Set the context of the preview.
Definition: ExporterHelper.h:329
PreviewExportOptions & UseMinimalDebuggerClient()
Set that the game should have a minimal debugger client.
Definition: ExporterHelper.h:117
PreviewExportOptions & SetFullLoadingScreen(bool enable)
Set if the export should show the full loading screen (false by default, skipping the minimum duratio...
Definition: ExporterHelper.h:215
PreviewExportOptions & SetEditorCameraState3D(const gd::String &cameraMode, double positionX, double positionY, double positionZ, double rotationAngle, double elevationAngle, double distance)
Set the camera state to use in the in-game editor.
Definition: ExporterHelper.h:257
PreviewExportOptions & SetShouldReloadProjectData(bool enable)
Set if the ProjectData must be reloaded.
Definition: ExporterHelper.h:190
PreviewExportOptions & SetShouldReloadLibraries(bool enable)
Set if GDJS libraries must be reloaded.
Definition: ExporterHelper.h:198
PreviewExportOptions & UseWebsocketDebuggerClientWithServerAddress(const gd::String &address, const gd::String &port)
Set the address of the debugger server that the game should reach out to, using the "WebSockets" debu...
Definition: ExporterHelper.h:63
PreviewExportOptions & SetFallbackAuthor(const gd::String &id, const gd::String &username)
Set the fallback author info (if info not present in project properties).
Definition: ExporterHelper.h:85
PreviewExportOptions & SetShouldClearExportFolder(bool enable)
Set if the exported folder should be cleared befor the export.
Definition: ExporterHelper.h:182
PreviewExportOptions & SetLayoutName(const gd::String &layoutName_)
Set the layout to be run first in the previewed game.
Definition: ExporterHelper.h:134
PreviewExportOptions & SetAuthenticatedPlayer(const gd::String &id, const gd::String &username, const gd::String &token)
Set the fallback author info (if info not present in project properties).
Definition: ExporterHelper.h:96
PreviewExportOptions & SetInGameEditorSettingsJson(const gd::String &inGameEditorSettingsJson_)
Set the JSON string representation of the in-game editor settings.
Definition: ExporterHelper.h:240
PreviewExportOptions & SetEditorId(const gd::String &editorId_)
Set the in-game editor identifier.
Definition: ExporterHelper.h:248
PreviewExportOptions & SetShouldGenerateScenesEventsCode(bool enable)
Set if the export should export events code.
Definition: ExporterHelper.h:206
PreviewExportOptions & SetInAppTutorialMessageInPreview(const gd::String &message, const gd::String &position)
Set the message to display to the user in a preview (as part of an in-app tutorial).
Definition: ExporterHelper.h:74
PreviewExportOptions(gd::Project &project_, const gd::String &exportPath_)
Definition: ExporterHelper.h:40
PreviewExportOptions & SetNonRuntimeScriptsCacheBurst(unsigned int value)
If set to a non zero value, the exported script URLs will have an extra search parameter added (with ...
Definition: ExporterHelper.h:276
PreviewExportOptions & SetNativeMobileApp(bool enable)
Set that the preview is launched from a GDevelop native mobile app (iOS or Android).
Definition: ExporterHelper.h:126
PreviewExportOptions & AddScreenshotCapture(int delayTimeInSeconds, const gd::String &signedUrl, const gd::String &publicUrl)
Set the capture options to be used for taking screenshots or videos of the preview.
Definition: ExporterHelper.h:364
PreviewExportOptions & SetIsInGameEdition(bool enable)
Set if the export is made for being edited in the editor.
Definition: ExporterHelper.h:232
PreviewExportOptions & SetAllowAuthenticationUsingIframeForPreview(bool allowAuthenticationUsingIframeForPreview_)
Definition: ExporterHelper.h:310