From 1e81a944e3be75eca8a774f50ce2bc2beaea10b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 10 Feb 2020 16:26:57 +0100 Subject: [PATCH] [build] Web: enable to build target simulator.official.zip and epsilon.official.js --- build/targets.simulator.web.mak | 5 +++-- build/toolchain.emscripten.mak | 2 +- ion/src/simulator/web/Makefile | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build/targets.simulator.web.mak b/build/targets.simulator.web.mak index 65abe11f7..f5b1158e0 100644 --- a/build/targets.simulator.web.mak +++ b/build/targets.simulator.web.mak @@ -1,13 +1,14 @@ -$(BUILD_DIR)/epsilon.js: EMSCRIPTEN_INIT_FILE = 1 +$(BUILD_DIR)/epsilon%packed.js: EMSCRIPTEN_INIT_FILE = 0 $(BUILD_DIR)/test.headless.js: EMSCRIPTEN_MODULARIZE = 0 $(BUILD_DIR)/epsilon.packed.js: $(call object_for,$(epsilon_src)) +$(BUILD_DIR)/epsilon.official.packed.js: $(call object_for,$(epsilon_official_src)) .PHONY: workshop_python_emulator workshop_python_emulator: $(MAKE) PLATFORM=simulator TARGET=web clean_for_apps_selection - $(MAKE) PLATFORM=simulator TARGET=web EPSILON_APPS=code + $(MAKE) PLATFORM=simulator TARGET=web EPSILON_APPS=code epsilon.official.js $(MAKE) PLATFORM=simulator TARGET=web clean_for_apps_selection .PHONY: clean_for_apps_selection diff --git a/build/toolchain.emscripten.mak b/build/toolchain.emscripten.mak index a773fd190..10f39df5c 100644 --- a/build/toolchain.emscripten.mak +++ b/build/toolchain.emscripten.mak @@ -129,7 +129,7 @@ EMFLAGS += -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0 # Configure LDFLAGS EMSCRIPTEN_MODULARIZE ?= 1 LDFLAGS += -s MODULARIZE=$(EMSCRIPTEN_MODULARIZE) -s 'EXPORT_NAME="Epsilon"' -EMSCRIPTEN_INIT_FILE ?= 0 +EMSCRIPTEN_INIT_FILE ?= 1 LDFLAGS += --memory-init-file $(EMSCRIPTEN_INIT_FILE) SFLAGS += $(EMFLAGS) diff --git a/ion/src/simulator/web/Makefile b/ion/src/simulator/web/Makefile index ada734ed7..08177b0ac 100644 --- a/ion/src/simulator/web/Makefile +++ b/ion/src/simulator/web/Makefile @@ -26,10 +26,10 @@ endif DEFAULT = $(BUILD_DIR)/simulator.zip -$(BUILD_DIR)/simulator.zip: $(BUILD_DIR)/epsilon.packed.js +$(BUILD_DIR)/simulator%zip: $(BUILD_DIR)/epsilon%packed.js @rm -rf $(basename $@) @mkdir -p $(basename $@) - @cp $^ $(basename $@)/epsilon.js + @cp $^ $(basename $@)/epsilon.official.packed.js @cp ion/src/simulator/assets/background.jpg $(basename $@)/ @cp ion/src/simulator/web/simulator.html $(basename $@)/ $(call rule_label,ZIP)