Skip to content

Commit 6c7037d

Browse files
Fix window name not set when exporting a desktop game (#8252)
1 parent 8ca0684 commit 6c7037d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

GDJS/GDJS/IDE/ExporterHelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ bool ExporterHelper::ExportElectronFiles(const gd::Project &project,
10361036
.FindAndReplace(
10371037
"600 /*GDJS_WINDOW_HEIGHT*/",
10381038
gd::String::From<int>(project.GetGameResolutionHeight()))
1039-
.FindAndReplace("\"GDJS_GAME_NAME\"", jsonName);
1039+
.FindAndReplace("'GDJS_GAME_NAME'", jsonName);
10401040

10411041
if (!fs.WriteToFile(exportDir + "/main.js", str)) {
10421042
lastError = "Unable to write Electron main.js file.";

GDJS/Runtime/Electron/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ let mainWindow = null;
1414

1515
function createWindow() {
1616
// Create the browser window.
17+
// Values below are replaced by ExporterHelper.cpp during export.
18+
// If you change their format, update the FindAndReplace calls there too.
1719
mainWindow = new BrowserWindow({
1820
width: 800 /*GDJS_WINDOW_WIDTH*/,
1921
height: 600 /*GDJS_WINDOW_HEIGHT*/,

0 commit comments

Comments
 (0)