mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Merge branch 'M4xi1m3-omega-master' into omega-master
This commit is contained in:
22
README.md
22
README.md
@@ -47,6 +47,28 @@ make USERNAME="{Your name, max 15 characters}" -j4
|
||||
make epsilon_flash
|
||||
```
|
||||
|
||||
* Building the **web simulator** (works under linux):
|
||||
|
||||
First, install emsdk :
|
||||
```
|
||||
git clone https://github.com/emscripten-core/emsdk.git
|
||||
cd emsdk
|
||||
./emsdk install latest-fastcomp
|
||||
./emsdk activate latest-fastcomp
|
||||
source emsdk_env.sh
|
||||
```
|
||||
|
||||
Then, compile Omega :
|
||||
```
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
make clean
|
||||
make PLATFORM=simulator TARGET=web USERNAME="{Your name, max 15 characters}" -j4
|
||||
```
|
||||
|
||||
The simulator is now in `output/release/simulator/web/simulator.zip`
|
||||
|
||||
|
||||
Important: Don't forget the `--recursive` tag, because Omega relies on submodules.
|
||||
Also, you can change the number of processes that run in parallel during the build by changing the value of the `-j` flag.
|
||||
<!-- ## Contribute -->
|
||||
|
||||
@@ -8,6 +8,8 @@ SAFE_HEAP_STORE \
|
||||
_IonEventsEmscriptenKeyDown \
|
||||
_IonEventsEmscriptenKeyUp \
|
||||
_IonEventsEmscriptenPushEvent \
|
||||
_IonSimulatorCallbackDidScanKeyboard \
|
||||
__Z8ion_mainiPKPKc \
|
||||
__Z8ion_mainiPPc \
|
||||
__ZN10Invocation7performEPv \
|
||||
__ZN11MicroPython20ExecutionEnvironment7runCodeEPKc \
|
||||
@@ -108,8 +110,11 @@ EMFLAGS += --profiling-funcs
|
||||
EMFLAGS += -s ASSERTIONS=1
|
||||
EMFLAGS += -s SAFE_HEAP=1
|
||||
EMFLAGS += -s STACK_OVERFLOW_CHECK=1
|
||||
EMFLAGS += -s DEMANGLE_SUPPORT=1
|
||||
endif
|
||||
|
||||
# EMFLAGS += -s ERROR_ON_UNDEFINED_SYMBOLS=0
|
||||
|
||||
# Configure EMFLAGS
|
||||
EMFLAGS += -s WASM=0
|
||||
|
||||
@@ -120,4 +125,4 @@ EMSCRIPTEN_INIT_FILE ?= 0
|
||||
LDFLAGS += --memory-init-file $(EMSCRIPTEN_INIT_FILE)
|
||||
|
||||
SFLAGS += $(EMFLAGS)
|
||||
LDFLAGS += $(EMFLAGS) -Oz -s EXPORTED_FUNCTIONS='["_main", "_IonSimulatorKeyboardKeyDown", "_IonSimulatorKeyboardKeyUp", "_IonSimulatorEventsPushEvent", "_IonSoftwareVersion", "_IonPatchLevel"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["UTF8ToString"]'
|
||||
LDFLAGS += $(EMFLAGS) -Oz -s EXPORTED_FUNCTIONS='["_main", "_IonSimulatorKeyboardKeyDown", "_IonSimulatorKeyboardKeyUp", "_IonSimulatorEventsPushEvent", "_IonSoftwareVersion", "_IonPatchLevel"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["UTF8ToString", "Pointer_stringify"]'
|
||||
|
||||
@@ -122,9 +122,12 @@ void init() {
|
||||
|
||||
Display::init(sRenderer);
|
||||
|
||||
// No need to load background in web simulator.
|
||||
#ifndef __EMSCRIPTEN__
|
||||
if (!argument_screen_only) {
|
||||
sBackgroundTexture = IonSimulatorLoadImage(sRenderer, "background.jpg");
|
||||
}
|
||||
#endif
|
||||
|
||||
relayout();
|
||||
}
|
||||
|
||||
@@ -298,6 +298,6 @@ window.addEventListener("keydown", function(e) {
|
||||
}
|
||||
}, false);
|
||||
</script>
|
||||
<script async src="https://www.numworks.com/simulator/update.js"></script>
|
||||
<!--<script async src="https://www.numworks.com/simulator/update.js"></script>-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user