GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — livecode/engine/emscripten-javascriptify.sh at develop · livecodestephen/livecode

Expand file tree

/

emscripten-javascriptify.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
52 lines (43 loc) · 1.1 KB
/

emscripten-javascriptify.sh

Copy path

File metadata and controls

executable file
·
52 lines (43 loc) · 1.1 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# This script runs the command that javascript-ifies the bitcode files produced
# by the Emscripten compiler.
set -e
# Parameters:
# input: bitcode file to javascriptify
# output: the output HTML file
# exports: JSON file containing list of exported functions
# whitelist: JSON file containing list of emterpreted functions
# other args: additional javascript libraries to include
#
input=$1
output=$2
html_template=$3
whitelist=$4
preamble=$5
shift 5
for lib in $@ ; do
libs+=\ --js-library\ "${lib}"
done
EMCC=${EMCC:-emcc}
BUILDTYPE=${BUILDTYPE:-Debug}
# Optimisation flags for the Emscripten bitcode-to-javascript step:
#
# -Os Optimise for a balance of size and speed
#
if [ "${BUILDTYPE}" = "Release" ] ; then
optimisation_flags="-Os -g0"
else
optimisation_flags="-O2 -g3"
fi
${EMCC} ${optimisation_flags} ${CFLAGS} \
"${input}" \
-o "${output}" \
--shell-file "${html_template}" \
-s EMTERPRETIFY_WHITELIST=@"${whitelist}" \
-s ASSERTIONS=1 \
-s EMTERPRETIFY=1 \
-s EMTERPRETIFY_ASYNC=1 \
-s ALLOW_MEMORY_GROWTH=1 \
-s TOTAL_MEMORY=67108864 \
--pre-js "${preamble}" \
${libs}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.