Skip to content

Commit 281dfac

Browse files
committed
Add emscripten installation instruction
1 parent 487abc6 commit 281dfac

File tree

7 files changed

+97
-6
lines changed

7 files changed

+97
-6
lines changed

1.10.SampleWeb/README.md

Lines changed: 75 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,21 @@ Table of contents
44
* [Overview](#overview)
55
* [Video](#video)
66
* [Steps](#steps)
7+
* [1.10.1. Find Emscripten site](#step-find-emscripten)
8+
* [1.10.2. Download Emscripten portable SDK archive](#step-dl-emscripten)
9+
* [1.10.3. Extract Emscripten portable SDK](#step-extract-emscripten)
10+
* [1.10.4. Install Emscripten portable SDK](#step-install-emscripten)
11+
12+
13+
* [1.10.3. Create build directory](#step-build-dir)
14+
15+
16+
* [1.5.3. Configure the build](#step-cfg)
17+
* [1.5.4. Build application](#step-build)
18+
* [1.5.5. Run application](#step-run)
19+
20+
721

8-
* [1.9.1. Create build directory](#step-build-dir)
922
* [1.9.2. Launch CMake](#step-open-cmake)
1023
* [1.9.3. Specify build and source directories](#step-dirs)
1124
* [1.9.4. Configure osgNativeLib and OSG](#step-cfg)
@@ -35,6 +48,7 @@ under Linux for Web. The application displays provided model with simple GLSL sh
3548

3649
**Note**: this tutorial requires
3750
* OpenSceneGraph model (see [1.1. Create a cube](../1.1.CreateCube))
51+
* CMake and git installations (see [1.2. Install OpenSceneGraph under Linux](../1.2.InstallUnderLinux))
3852
* OpenSceneGraph sources (see [1.2. Install OpenSceneGraph under Linux](../1.2.InstallUnderLinux))
3953
* sample OpenSceneGraph application sources (see [1.5. Build and run sample OpenSceneGraph application under Linux](../1.5.SampleUnderLinux))
4054

@@ -46,7 +60,7 @@ Video
4660
[YouTube](todo) | [Download](readme/video.mp4)
4761

4862
Video depicts running and building sample OpenSceneGraph application
49-
for Web under Xubuntu 16.04.
63+
under Xubuntu 16.04 with Emscripten 1.37.9 for Web.
5064

5165
<a name="steps"/>
5266

@@ -56,12 +70,67 @@ Steps
5670
**Note**: steps below use frames from the video as screenshots.
5771
Watch the video to see all details.
5872

59-
<a name="step-build-dir"/>
73+
<a name="step-find-emscripten"/>
74+
75+
1.10.1. Find Emscripten site
76+
----------------------------
77+
78+
![Screenshot](readme/f?.png)
79+
80+
Find main Emscripten site.
81+
82+
We need Emscripten portable SDK, because Xubuntu 16.04
83+
ships an outdated version.
84+
85+
<a name="step-dl-emscripten"/>
86+
87+
1.10.2. Download Emscripten portable SDK archive
88+
------------------------------------------------
89+
90+
![Screenshot](readme/f?.png)
91+
92+
Download the latest
93+
[Emscripten portable SDK archive](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html).
94+
95+
<a name="step-extract-emscripten"/>
96+
97+
1.10.3. Extract Emscripten portable SDK
98+
---------------------------------------
99+
100+
![Screenshot](readme/f?.png)
101+
102+
Unpack Emscripten portable SDK to your home directory.
103+
104+
<a name="step-install-emscripten"/>
105+
106+
1.10.4. Install Emscripten portable SDK
107+
---------------------------------------
108+
109+
![Screenshot](readme/f?.png)
110+
111+
Install Emscripten portable SDK by running the following commands:
112+
113+
`cd ~/emsdk-portable`
114+
115+
`./emsdk update`
116+
117+
`./emsdk install latest`
118+
119+
`./emsdk activate latest`
120+
121+
`source ./emsdk_env.sh`
122+
123+
**Note**: the above commands come from the
124+
[official Emscripten installation instructions](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html).
125+
126+
127+
128+
129+
130+
131+
60132

61-
1.9.1. Create build directory
62-
-----------------------------
63133

64-
![Screenshot](readme/f021.png)
65134

66135
Create build directory for iOS simulator build of osgNativeLib,
67136
a native C++ library to be used in Objective-C.

1.10.SampleWeb/tutorial/bg.png

137 KB
Loading
2.41 MB
Binary file not shown.
827 KB
Binary file not shown.
6.12 MB
Binary file not shown.

1.10.SampleWeb/tutorial/script

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
background bg.png
2+
text 5 1.10. Run sample OSG application in Web
3+
#video 1:4 sample_web-01.mp4
4+
#text 5 1.10.1. Find Emscripten site
5+
#video 5:11 sample_web-01.mp4
6+
#video 15:31 sample_web-01.mp4
7+
#text 5 1.10.2. Download Emscripten portable SDK archive
8+
#video 30:55 sample_web-01.mp4
9+
#text 5 1.10.3. Extract Emscripten portable SDK
10+
#video 57:68 sample_web-01.mp4
11+
#video 95:111 sample_web-01.mp4
12+
text 5 1.10.4. Install Emscripten portable SDK
13+
video 1:21 sample_web-02.mp4
14+
video 25:35 sample_web-02.mp4
15+
video 2:15 sample_web-03.mp4
16+
video 20:27 sample_web-03.mp4
17+
video 45:51 sample_web-03.mp4
18+
video 53:64 sample_web-03.mp4
19+
video 67:79 sample_web-03.mp4
20+
text 5 1.10. That's it for running sample OSG application in Web

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ Tutorials
131131

132132
Build and run sample OpenSceneGraph application under iOS.
133133

134+
<a name="tutorials-sample-web"/>
135+
134136
### [1.10. Build and run sample OpenSceneGraph application in Web](1.10.SampleWeb)
135137

136138
![Screenshot](readme/1.10.sample_web.png)

0 commit comments

Comments
 (0)