-
Notifications
You must be signed in to change notification settings - Fork 0
/
giftools-build-for-web-single-file-with-local-emsdk.sh
69 lines (59 loc) · 2.12 KB
/
giftools-build-for-web-single-file-with-local-emsdk.sh
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
#
# Configure emcc, make it visible.
#
#
source dependencies/emsdk/emsdk_env.sh
#
#
# Ship.
#
#
cmake -Bbuild_emscripten_web_amalgamated_ffmpeg -H. \
-DCMAKE_TOOLCHAIN_FILE=$(pwd)/dependencies/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
-DGIFTOOLS_BUILD_EMSCRIPTEN=TRUE \
-DGIFTOOLS_BUILD_WEB_EMSCRIPTEN=TRUE \
-DGIFTOOLS_BUILD_SMALLEST_EMSCRIPTEN=TRUE \
-DGIFTOOLS_BUILD_SINGLE_FILE_EMSCRIPTEN=TRUE \
-DGIFTOOLS_BUILD_FFMPEG=TRUE
emmake make -C build_emscripten_web_amalgamated_ffmpeg
mkdir -p bin/web_amalgamated_ffmpeg
cp build_emscripten_web_amalgamated_ffmpeg/GifTools.js bin/web_amalgamated_ffmpeg/GifTools.js
cp build_emscripten_web_amalgamated_ffmpeg/GifTools.wasm.map bin/web_amalgamated_ffmpeg/GifTools.wasm.map
#
#
# Build without FFmpeg.
#
#
# cmake -Bbuild_emscripten_web_amalgamated -H. \
# -DCMAKE_TOOLCHAIN_FILE=$(pwd)/dependencies/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
# -DGIFTOOLS_BUILD_EMSCRIPTEN=TRUE \
# -DGIFTOOLS_BUILD_WEB_EMSCRIPTEN=TRUE \
# -DGIFTOOLS_BUILD_SMALLEST_EMSCRIPTEN=TRUE \
# -DGIFTOOLS_BUILD_SINGLE_FILE_EMSCRIPTEN=TRUE
# emmake make -C build_emscripten_web_amalgamated
# mkdir -p bin/web_amalgamated
# cp build_emscripten_web_amalgamated/GifTools.js bin/web_amalgamated/GifTools.js
#
#
# Build for debugging.
#
#
# cmake -Bbuild_emscripten_web_amalgamated_ffmpegd -H. \
# -DCMAKE_TOOLCHAIN_FILE=$(pwd)/dependencies/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
# -DGIFTOOLS_BUILD_EMSCRIPTEN=TRUE \
# -DGIFTOOLS_BUILD_WEB_EMSCRIPTEN=TRUE \
# -DGIFTOOLS_BUILD_SINGLE_FILE_EMSCRIPTEN=TRUE \
# -DGIFTOOLS_BUILD_FFMPEG=TRUE
# emmake make -C build_emscripten_web_amalgamated_ffmpegd
# mkdir -p bin/web_amalgamated_ffmpegd
# cp build_emscripten_web_amalgamated_ffmpegd/GifTools.js bin/web_amalgamated_ffmpegd/GifTools.js
# cp build_emscripten_web_amalgamated_ffmpegd/GifTools.wasm.map bin/web_amalgamated_ffmpegd/GifTools.wasm.map
# # emcc:WARNING: Wasm source map won't be usable in a browser without --source-map-base
#
#
# Run tests implicitly.
#
#
# npm run build
# npm run test