journey to remote debugging

isolation_bkp/dynres
Dominik Madarász 2022-09-11 23:28:41 +00:00 committed by GitHub
parent 1411fad9eb
commit f06e9d7dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 2 deletions

View File

@ -8,16 +8,17 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
SET(CMAKE_USE_RELATIVE_PATHS OFF)
if(MSVC) if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif() endif()
if (EMSCRIPTEN) if (EMSCRIPTEN)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s INITIAL_MEMORY=268435456 -s FORCE_FILESYSTEM=1 --preload-file ${CMAKE_SOURCE_DIR}/art@art/ --shell-file ${CMAKE_SOURCE_DIR}/web/eco2d.html") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fdebug-prefix-map=${CMAKE_SOURCE_DIR}=$ENV{ECO2D_SERVER_URL}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g -s USE_GLFW=3 --profiling -s ASSERTIONS=1 -s WASM=1 -s INITIAL_MEMORY=268435456 -s FORCE_FILESYSTEM=1 --preload-file ${CMAKE_SOURCE_DIR}/art@art/ --shell-file ${CMAKE_SOURCE_DIR}/web/eco2d.html")
set(CMAKE_EXECUTABLE_SUFFIX ".html") # This line is used to set your executable to build with the emscripten html template so that you can directly open it. set(CMAKE_EXECUTABLE_SUFFIX ".html") # This line is used to set your executable to build with the emscripten html template so that you can directly open it.
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF) set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
set(CMAKE_CXX_)
endif () endif ()
include_directories(code/common code/vendors code/vendors/flecs) include_directories(code/common code/vendors code/vendors/flecs)

17
host_web.sh 100755
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Run as "source web_host.sh" to set up environment variables
# Prompt for URL
read -p "Enter URL: " URL
# Expose URL to environment
export ECO2D_SERVER_URL=${URL/https:\/\//}build_web
echo ${ECO2D_SERVER_URL}
# Symlink sources
if [ ! -d "build_web/${ECO2D_SERVER_URL}" ]; then
mkdir -p "build_web/${ECO2D_SERVER_URL}"
pushd build_web
ln -s "/workspaces/eco2d/code" "${ECO2D_SERVER_URL/build_web/}/code"
popd
fi