annotate Applications/Samples/WebAssembly/NOTES.txt @ 1688:c14dd6e11ddd

merge
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 25 Nov 2020 17:03:08 +0100
parents 65eccce95882
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1492
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 Building WebAssembly samples using Docker
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 =========================================
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 The script "./docker-build.sh" can be used to quickly build the
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 WebAssembly samples on any GNU/Linux distribution equipped with
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 Docker. This avoids newcomers to install Emscripten and learn the
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 CMake options. Just type:
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 $ ./docker-build.sh Release
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 After successful build, the binaries will be installed in the
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 following folder (i.e. in the folder "wasm-binaries" at the root of
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 the source distribution):
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 $ ls -l ../../wasm-binaries
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 NB: The source code of the Docker build environment can be found at
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 the following location:
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 https://github.com/jodogne/OrthancDocker/tree/master/wasm-builder
4b5ec9ea268e Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
1544
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
23
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
24 Native compilation (without Docker)
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
25 ===================================
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
26
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
27 Install Emscripten:
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
28 https://emscripten.org/docs/getting_started/downloads.html
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
29
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
30 Then, if the installation path is "~/Downloads/emsdk/":
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
31
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
32 # source ~/Downloads/emsdk/emsdk_env.sh
8ddf77198ed7 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
33 # cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DALLOW_DOWNLOADS=ON -G Ninja
1548
65eccce95882 unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1544
diff changeset
34 # ninja install
65eccce95882 unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1544
diff changeset
35
65eccce95882 unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1544
diff changeset
36 => The binaries will be put in "../../../wasm-binaries/"