diff --git a/js-dos/README.md b/js-dos/README.md index a62521eb0..4aeeaa802 100644 --- a/js-dos/README.md +++ b/js-dos/README.md @@ -3,4 +3,14 @@ js-dos The aim of the project is to provide nice web-API for em-dosbox. -uztool - is a tool for extraction zip archives \ No newline at end of file +uztool - is a tool for extraction zip archives + +# How to build + +``` +cd js-dos +mkdir build +cd build +./emcmake cmake ../api +make -j4 +``` \ No newline at end of file diff --git a/js-dos/api/CMakeLists.txt b/js-dos/api/CMakeLists.txt index 74c057954..d0c82c0b6 100644 --- a/js-dos/api/CMakeLists.txt +++ b/js-dos/api/CMakeLists.txt @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 2.8) project(js-dos) set(CMAKE_BUILD_TYPE Release) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-implicit-function-declaration") +set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG -Wno-implicit-function-declaration") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") set(ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../..") if(EMSCRIPTEN) diff --git a/src/dosbox.cpp b/src/dosbox.cpp index 9972cc3f0..4025c1b4f 100644 --- a/src/dosbox.cpp +++ b/src/dosbox.cpp @@ -358,8 +358,9 @@ void DOSBOX_RunMachine(void){ * Anything taking a long time will probably run indefinitely, * making DOSBox appear to hang. */ - if (GetTicks() - ticksStart > 1000) { + if (GetTicks() - ticksStart > 10000) { LOG_MSG("Emulation aborted due to nested emulation timeout."); + printf("Ticks passed %d\n", GetTicks() - ticksStart); em_exit(1); break; }