From 7a9b47b1c3ba95d95d4d2bb58b9248ae603f7479 Mon Sep 17 00:00:00 2001 From: Aleksander Guryanov Date: Mon, 22 Jul 2019 17:45:59 +0700 Subject: [PATCH] publish: 6.22.29 --- CMakeLists.txt | 6 ++++-- README.md | 2 +- dist/docs/api/js-dos-ts/js-dos-build.md | 10 +++++----- .../src/debug/debug.cpp | 2 +- .../src/dos/dos_programs.cpp | 4 ++-- .../src/dosbox.cpp | 6 +++--- .../src/gui/sdlmain.cpp | 2 +- js-dos-ts/js-dos-build.ts | 10 +++++----- package.json | 2 +- 9 files changed, 23 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e09b1ec0..03cf5994 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,12 +19,14 @@ if(${EMSCRIPTEN}) -s MODULARIZE=1 \ -s EXPORT_NAME='WDOSBOX' \ -s FORCE_FILESYSTEM=1 \ - -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 -s EMTERPRETIFY_WHITELIST=@${CMAKE_CURRENT_LIST_DIR}/js-dos-cpp/emterpretify.txt \ + -s ASYNCIFY \ -s EXTRA_EXPORTED_RUNTIME_METHODS=\"['getMemory', 'addRunDependency', 'removeRunDependency','FS', 'FS_createPath', 'FS_createPreloadedFile', \ 'FS_createDataFile', 'lengthBytesUTF8', 'stringToUTF8', 'UTF16ToString']\" \ -s NO_EXIT_RUNTIME=1 \ -s ERROR_ON_UNDEFINED_SYMBOLS=0") add_definitions(-DEMSCRIPTEN) +# -s ASYNCIFY_IGNORE_INDIRECT \ +# -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 -s EMTERPRETIFY_WHITELIST=@${CMAKE_CURRENT_LIST_DIR}/js-dos-cpp/emterpretify.txt \ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type -Wno-deprecated") add_definitions(-DDEBUG -DEMSCRIPTEN_KEEPALIVE=) @@ -181,7 +183,7 @@ if(${EMSCRIPTEN}) add_library(bin-obj OBJECT ${SOURCES} ${SOURCES_CXX11} ${SOURCES_3RDPARTY}) add_executable(wdosbox $) set_target_properties(wdosbox PROPERTIES SUFFIX .js) - set_target_properties(wdosbox PROPERTIES LINK_FLAGS "-s WASM=1 -s BINARYEN_TRAP_MODE=\"clamp\"") + set_target_properties(wdosbox PROPERTIES LINK_FLAGS "-s WASM=1") else() add_executable(bin ${SOURCES} ${SOURCES_CXX11} ${SOURCES_3RDPARTY}) target_link_libraries(bin diff --git a/README.md b/README.md index 17435582..5471c008 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://travis-ci.org/caiiiycuk/js-dos.svg?branch=6.22)](https://travis-ci.org/caiiiycuk/js-dos) -6.22 is a javascript library that allows you to run DOS programs in browser. js-dos provides nice and easy to use javascript api over dosbox. +6.22 is a javascript library that allows you to run DOS programs in browser. js-dos provides nice and easy to use javascript api over dosbox. Try our demo app. You can found previous version here [v3](https://js-dos.com/index_v3.html) diff --git a/dist/docs/api/js-dos-ts/js-dos-build.md b/dist/docs/api/js-dos-ts/js-dos-build.md index efebec70..80d4c513 100644 --- a/dist/docs/api/js-dos-ts/js-dos-build.md +++ b/dist/docs/api/js-dos-ts/js-dos-build.md @@ -20,11 +20,11 @@ gulpfile.js --> generateBuildInfo ``` export const Build = { - version: "6.22.28 (29e99da42ae1666b417f86c674ce28a7)", - jsVersion: "1a7c80b3a7dc6ac0448751d82d6d7ecb9627ec0a", - jsSize: 459510, - wasmVersion: "1f96ea3830ba77713d40289fe510fc6a", - wasmSize: 2125427, + version: "6.22.29 (e54c8c8bec01ad1a072f1b0f430cc492)", + jsVersion: "0465870325e768eb26cc06b00d920fc94314efc7", + jsSize: 197174, + wasmVersion: "c22105169b59875d7b46cd156a6e7c17", + wasmSize: 2851969, }; diff --git a/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/debug/debug.cpp b/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/debug/debug.cpp index 60819636..59a2eaef 100644 --- a/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/debug/debug.cpp +++ b/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/debug/debug.cpp @@ -1825,7 +1825,7 @@ Bitu DEBUG_Loop(void) { PIC_runIRQs(); #if defined(JSDOS) #if defined(EMTERPRETER_SYNC) - emscripten_sleep_with_yield(1); + emscripten_sleep(1); #endif #else SDL_Delay(1); diff --git a/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/dos/dos_programs.cpp b/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/dos/dos_programs.cpp index f8648eae..843e0477 100644 --- a/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/dos/dos_programs.cpp +++ b/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/dos/dos_programs.cpp @@ -1548,7 +1548,7 @@ class WGET : public Program { /* Emscripten won't allow a sync fetch: * https://kripken.github.io/emscripten-site/docs/api_reference/fetch.html#synchronous-fetches * The program instead waits for these to be called, looping and calling - * emscripten_sleep_with_yield(). + * emscripten_sleep(). */ bool WGET::fetchsuccess = false, WGET::fetchdone = false; void WGET::downloadSucceeded(emscripten_fetch_t *fetch) { @@ -1598,7 +1598,7 @@ void WGET::Run(void) { attr.onerror = downloadFailed; fetchdone = false; emscripten_fetch_t *fetch = emscripten_fetch(&attr, url.c_str()); - while (!fetchdone) emscripten_sleep_with_yield(10); + while (!fetchdone) emscripten_sleep(10); if (fetchsuccess) { Bit16u fhandle; if (!DOS_CreateFile(outname.c_str(),OPEN_WRITE,&fhandle)) { diff --git a/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/dosbox.cpp b/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/dosbox.cpp index 2c7e02e7..98f745c0 100644 --- a/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/dosbox.cpp +++ b/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/dosbox.cpp @@ -154,7 +154,7 @@ bool doHeapOperation() { #if defined(EMTERPRETER_SYNC) && defined(EMSCRIPTEN) bool isNormalState = EM_ASM_INT(( - return EmterpreterAsync.state === 0 ? 1 : 0; + return Asyncify.state === 0 ? 1 : 0; )) == 1; if (!isNormalState) { @@ -204,7 +204,7 @@ static Bitu Normal_Loop(void) { if (SDL_TICKS_PASSED(ticksEntry, last_sleep + 10)) { if (nosleep_lock == 0) { last_sleep = ticksEntry; - emscripten_sleep_with_yield(1); + emscripten_sleep(1); ticksEntry = GetTicks(); } else if (SDL_TICKS_PASSED(ticksEntry, last_sleep + 2000) && !SDL_TICKS_PASSED(ticksEntry, last_loop + 200)) { @@ -409,7 +409,7 @@ static Bitu Normal_Loop(void) { #elif defined(EMTERPRETER_SYNC) if (nosleep_lock == 0) { last_sleep = ticksNew; - emscripten_sleep_with_yield(1); + emscripten_sleep(1); } #endif ticksDone -= GetTicks() - ticksNew; diff --git a/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/gui/sdlmain.cpp b/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/gui/sdlmain.cpp index 1278f805..06b5d700 100644 --- a/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/gui/sdlmain.cpp +++ b/dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/gui/sdlmain.cpp @@ -2089,7 +2089,7 @@ static void GUI_StartUp(Section * sec) { } if (exit_splash) break; #if defined(JSDOS) && defined(EMTERPRETER_SYNC) - emscripten_sleep_with_yield(1); + emscripten_sleep(1); #endif if (ct<1) { diff --git a/js-dos-ts/js-dos-build.ts b/js-dos-ts/js-dos-build.ts index 5795de66..1e97f6b8 100644 --- a/js-dos-ts/js-dos-build.ts +++ b/js-dos-ts/js-dos-build.ts @@ -3,9 +3,9 @@ // gulpfile.js --> generateBuildInfo export const Build = { - version: "6.22.28 (29e99da42ae1666b417f86c674ce28a7)", - jsVersion: "1a7c80b3a7dc6ac0448751d82d6d7ecb9627ec0a", - jsSize: 459510, - wasmVersion: "1f96ea3830ba77713d40289fe510fc6a", - wasmSize: 2125427, + version: "6.22.29 (e54c8c8bec01ad1a072f1b0f430cc492)", + jsVersion: "0465870325e768eb26cc06b00d920fc94314efc7", + jsSize: 197174, + wasmVersion: "c22105169b59875d7b46cd156a6e7c17", + wasmSize: 2851969, }; diff --git a/package.json b/package.json index 78c059ba..73064bf2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "js-dos", - "version": "6.22.28", + "version": "6.22.29", "description": "Easiest API to run dos programs in browser", "main": "dist/js-dos.js", "types": "dist/typescript/js-dos.ts",