diff --git a/Viewer/Makefile b/Viewer/Makefile index ae2f3a46..52fc76c2 100755 --- a/Viewer/Makefile +++ b/Viewer/Makefile @@ -174,8 +174,8 @@ LESSC := npx lessc # procs to access their paths (as is done below) # 2) set path and launch a child make -- not sure how to # do this... +# ELECTRON := npx electron -# XXX stopped working while sharp started working out of the box... ELECTRON_REBUILD := npx electron-rebuild ASAR := npx asar ELECTRON_VERSION_FALLBACK ?= v1.8.1 @@ -641,6 +641,11 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \ $(NODE_DIR): package.json npm install + # patch requirejs (see: NOTES) + cp -f $(NODE_DIR)/requirejs/bin/r.js{,.bak} + cat $(NODE_DIR)/requirejs/bin/r.js.bak \ + | sed 's/^\(#!\/\)/\/\/\1/' \ + > $(NODE_DIR)/requirejs/bin/r.js # NOTE: this may break on some systems due to a dependency issue... # $(ELECTRON_REBUILD) @touch "$@" diff --git a/Viewer/doc/HACKS b/Viewer/doc/HACKS index 6a17a6e1..a40d6232 100644 --- a/Viewer/doc/HACKS +++ b/Viewer/doc/HACKS @@ -3,15 +3,16 @@ Hacks and fixes =============== 20220126: -- node_modules/requirejs/bin/r,js: +- node_modules/requirejs/bin/r,js Under Electron v14+ requirejs breaks with a SyntaxError on the first char of r.js ('#!/...') -- a hackish way to fix this is to comment it out, not yet sure why is this happening... + STUB: patched by: + make node_modules -- cfg/requirejs.js: +- cfg/requirejs.js (FIXED) .baseUrl calculation under U*IX systems needs a '/' prefixed... -Both issues are currently tweaked manually...