Web build.

This commit is contained in:
jussi
2022-02-22 02:49:15 +02:00
parent 612ede6da4
commit 8800de59fa
6 changed files with 120 additions and 49 deletions

View File

@@ -213,12 +213,16 @@ bool luaCallMain() {
char path[ STRING_LEN ] = { '\0' };
/* If web, set path to resources folder. */
#ifdef EMSCRIPTEN
sprintf( path, "resources/main.lua" );
#else
sprintf( path, "%smain.lua", state->exePath );
/* Alternatively look for main. Could be precompiled binary file. */
if ( !FileExists( path ) ) {
sprintf( path, "%smain", state->exePath );
}
#endif
luaL_dofile( L, path );