You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Fixed running the export templates with newer emscripten versions.
This commit is contained in:
3
misc/dist/html/fixed-size.html
vendored
3
misc/dist/html/fixed-size.html
vendored
@@ -229,6 +229,7 @@ $GODOT_HEAD_INCLUDE
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
|
const EXECUTABLE_NAME = '$GODOT_BASENAME';
|
||||||
const MAIN_PACK = '$GODOT_BASENAME.pck';
|
const MAIN_PACK = '$GODOT_BASENAME.pck';
|
||||||
const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED;
|
const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED;
|
||||||
const INDETERMINATE_STATUS_STEP_MS = 100;
|
const INDETERMINATE_STATUS_STEP_MS = 100;
|
||||||
@@ -380,7 +381,7 @@ $GODOT_HEAD_INCLUDE
|
|||||||
} else {
|
} else {
|
||||||
setStatusMode('indeterminate');
|
setStatusMode('indeterminate');
|
||||||
engine.setCanvas(canvas);
|
engine.setCanvas(canvas);
|
||||||
engine.startGame(MAIN_PACK).then(() => {
|
engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => {
|
||||||
setStatusMode('hidden');
|
setStatusMode('hidden');
|
||||||
initializing = false;
|
initializing = false;
|
||||||
}, displayFailureNotice);
|
}, displayFailureNotice);
|
||||||
|
|||||||
3
misc/dist/html/full-size.html
vendored
3
misc/dist/html/full-size.html
vendored
@@ -142,6 +142,7 @@ $GODOT_HEAD_INCLUDE
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
|
const EXECUTABLE_NAME = '$GODOT_BASENAME';
|
||||||
const MAIN_PACK = '$GODOT_BASENAME.pck';
|
const MAIN_PACK = '$GODOT_BASENAME.pck';
|
||||||
const INDETERMINATE_STATUS_STEP_MS = 100;
|
const INDETERMINATE_STATUS_STEP_MS = 100;
|
||||||
|
|
||||||
@@ -254,7 +255,7 @@ $GODOT_HEAD_INCLUDE
|
|||||||
} else {
|
} else {
|
||||||
setStatusMode('indeterminate');
|
setStatusMode('indeterminate');
|
||||||
engine.setCanvas(canvas);
|
engine.setCanvas(canvas);
|
||||||
engine.startGame(MAIN_PACK).then(() => {
|
engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => {
|
||||||
setStatusMode('hidden');
|
setStatusMode('hidden');
|
||||||
initializing = false;
|
initializing = false;
|
||||||
}, displayFailureNotice);
|
}, displayFailureNotice);
|
||||||
|
|||||||
@@ -94,6 +94,7 @@
|
|||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
rtenvProps.onRuntimeInitialized = resolve;
|
rtenvProps.onRuntimeInitialized = resolve;
|
||||||
rtenvProps.onAbort = reject;
|
rtenvProps.onAbort = reject;
|
||||||
|
rtenvProps.thisProgram = executableName;
|
||||||
rtenvProps.engine.rtenv = Engine.RuntimeEnvironment(rtenvProps, LIBS);
|
rtenvProps.engine.rtenv = Engine.RuntimeEnvironment(rtenvProps, LIBS);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -130,13 +131,11 @@
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.startGame = function(mainPack) {
|
this.startGame = function(execName, mainPack) {
|
||||||
|
|
||||||
|
executableName = execName;
|
||||||
|
var mainArgs = [ '--main-pack', mainPack ];
|
||||||
|
|
||||||
executableName = getBaseName(mainPack);
|
|
||||||
var mainArgs = [];
|
|
||||||
if (!getPathLeaf(mainPack).endsWith('.pck')) {
|
|
||||||
mainArgs = ['--main-pack', getPathLeaf(mainPack)];
|
|
||||||
}
|
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
// Load from directory,
|
// Load from directory,
|
||||||
this.init(getBasePath(mainPack)),
|
this.init(getBasePath(mainPack)),
|
||||||
@@ -187,8 +186,6 @@
|
|||||||
this.rtenv.locale = this.rtenv.locale.split('.')[0];
|
this.rtenv.locale = this.rtenv.locale.split('.')[0];
|
||||||
this.rtenv.resizeCanvasOnStart = resizeCanvasOnStart;
|
this.rtenv.resizeCanvasOnStart = resizeCanvasOnStart;
|
||||||
|
|
||||||
this.rtenv.thisProgram = executableName || getBaseName(basePath);
|
|
||||||
|
|
||||||
preloadedFiles.forEach(function(file) {
|
preloadedFiles.forEach(function(file) {
|
||||||
var dir = LIBS.PATH.dirname(file.path);
|
var dir = LIBS.PATH.dirname(file.path);
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user