Skip to content

Commit

Permalink
core/html: remove Lua interpreter main and my main
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarry committed Apr 9, 2024
1 parent 770ee9b commit 15882ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ message("Building with LUA_SRC_DIR ${LUA_SRC_DIR}")
#)

aux_source_directory(${LUA_SRC_DIR} LUA_CORE_SRC_LIST)
# This is a duplicate of all the other C files in the repo.
# Including this would cause duplicate function linker errors.
list(FILTER LUA_CORE_SRC_LIST EXCLUDE REGEX "\/onelua.c$")
# This is the standalone interpreter, which defines a main function that
# I do not want to include.
list(FILTER LUA_CORE_SRC_LIST EXCLUDE REGEX "\/lua.c$")

# not currently using lua_user_cfg.h, loading my library manually in C instead
#include_directories(${SRC_DIR}/main)
Expand Down
2 changes: 2 additions & 0 deletions src/emscripten/emscripten_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,11 @@ void *init_game_api(const char *game_str, int game_str_len) {
return handle;
}

#if 0
// If you don't provide a main function, then it looks like the Lua main takes over
// and starts prompting for text via stdin, which causes a big popup in a browser.
// Though I don't actually know CMake allows for multiple main definitions like this.
int main(void) {
print_ver_info();
}
#endif

0 comments on commit 15882ba

Please sign in to comment.