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/docs/development/build-emscripten.md at develop · researchware/livecode

Expand file tree

/

build-emscripten.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
67 lines (36 loc) · 2.31 KB
/

build-emscripten.md

Copy path

File metadata and controls

67 lines (36 loc) · 2.31 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Compiling LiveCode to JavaScript for HTML5

LiveCode Community Logo

Copyright © 2015 LiveCode Ltd., Edinburgh, UK

Warning: Emscripten (HTML5) platform support for LiveCode is experimental and not recommended for production use.

Dependencies

You will need a 64-bit Linux machine or VM with at least 4 GB of RAM (8 GB is recommended).

Emscripten SDK

Unsurprisingly, the Emscripten SDK must be installed in order to build an Emscripten engine.

  1. Download the portable Emscripten SDK from https://kripken.github.io/emscripten-site. Put it in /opt/emsdk_portable, for example.

  2. Check which SDKs are available by running:

    /opt/emsdk_portable/emsdk list
    
  3. Install and activate SDK 1.35.23 by running:

    /opt/emsdk_portable/emsdk install sdk-1.35.23-32bit
    /opt/emsdk_portable/emsdk activate sdk-1.35.23-32bit
    

    This will take a really long time and use an insane amount of RAM.

Build environment

Before building for Emscripten, source the Emscripten SDK script that sets up the environment correctly. You need to source it with the . or source command rather than just running it.

source /opt/emsdk_portable/emsdk_env.sh

Configuring LiveCode

To configure LiveCode, run:

make config-emscripten

This will generate make control files in the build-emscripten directory. You can also run config.sh directly.

Compiling LiveCode

To compile LiveCode, run:

make compile-emscripten

This will generate outputs in the emscripten-bin directory.

Running LiveCode

Note: See also the "HTML5 Deployment" guide, available in the in-IDE dictionary.

Use the desktop build of the LiveCode IDE to run the standalone builder and create an "HTML5" standalone.

Once you've created a standalone, you can open the HTML file in a web browser to try out the engine.

Some web browsers (including Google Chrome) have JavaScript security policies that won't allow you to run the engine from a local filesystem. For these browsers, you will need to run a local web server. You can use the following steps to launch a local-only webserver listening on port 8080:

cd /path/to/my/standalone
python -m SimpleHTTPServer 8080

You can then load http://localhost:8080/ in a web browser to view your standalone HTML5 engine.

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.