forked from pjasicek/OpenClaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request pjasicek#145 from RicoRodriges/emscripten
WebAssembly (Emscripten) port
- Loading branch information
Showing
16 changed files
with
344 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<head></head> | ||
<body> | ||
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas> | ||
|
||
|
||
<script type='text/javascript'> | ||
var Module = { | ||
preRun: [], | ||
postRun: [], | ||
canvas: (function () { | ||
var canvas = document.getElementById('canvas'); | ||
|
||
// As a default initial behavior, pop up an alert when webgl context is lost. To make your | ||
// application robust, you may want to override this behavior before shipping! | ||
// See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2 | ||
canvas.addEventListener("webglcontextlost", function (e) { | ||
alert('WebGL context lost. You will need to reload the page.'); | ||
e.preventDefault(); | ||
}, false); | ||
|
||
return canvas; | ||
})(), | ||
}; | ||
</script> | ||
<script> | ||
!function (e, t) { | ||
console.info("Loading client..."); | ||
var o = t.createElement("script"); | ||
o.async = !0; | ||
o.type = "text/javascript"; | ||
o.src = "openclaw.js"; | ||
o.onerror = function (t) { | ||
console.error("Script Error"); | ||
console.error(t); | ||
}; | ||
var r = t.getElementsByTagName("script")[0]; | ||
r.parentNode.insertBefore(o, r) | ||
}(window, document); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
cmake_minimum_required(VERSION 3.2) | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Build_Release") | ||
|
||
project(MidiProc) | ||
|
||
add_executable(MidiProc WIN32 "") | ||
target_sources(MidiProc | ||
PRIVATE | ||
main.cpp | ||
midiproc_s.c) | ||
|
||
target_include_directories(MidiProc PRIVATE ../ThirdParty/) | ||
target_link_directories(MidiProc PRIVATE ../Build_Release) | ||
target_link_directories(MidiProc PRIVATE ../ThirdParty/SDL2/lib/x86) | ||
|
||
target_link_libraries(MidiProc | ||
PRIVATE | ||
SDL2 | ||
SDL2_mixer | ||
rpcrt4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.