Skip to content

Commit 733a2c6

Browse files
authored
Buildsystem update (#14)
* Removed target_link_options Keeping these link_options active results in aborting build processes. * Helper file for debian builds * Helper file for windows builds * Emscripten setup file for debian * Emscripten build file for debian * Update for windows builds Uses the latest emsdk now * Updated emsdk version * Updated emsdk version * Fixed Collada path * start_server for deb * Removed sSTACK_SIZE option * win test file * deb test file
1 parent 8aab6ad commit 733a2c6

10 files changed

+72
-29
lines changed

CMakeLists.txt

100644100755
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,12 @@ if (${EMSCRIPTEN})
6161
target_compile_options (AssimpJS PUBLIC -fexceptions)
6262

6363
target_link_options (AssimpJS PUBLIC -sMODULARIZE=1)
64-
target_link_options (AssimpJS PUBLIC -sEXPORT_NAME='assimpjs')
65-
target_link_options (AssimpJS PUBLIC -sSTACK_SIZE=10MB)
64+
target_link_options (AssimpJS PUBLIC -sEXPORT_NAME=assimpjs)
6665
target_link_options (AssimpJS PUBLIC -sALLOW_MEMORY_GROWTH=1 --no-heap-copy)
6766
target_link_options (AssimpJS PUBLIC -sNO_DISABLE_EXCEPTION_CATCHING)
6867

6968
# to check for memory errors
70-
# target_link_options (AssimpJS PUBLIC -sASSERTIONS=1 -sSAFE_HEAP=1 -sWARN_UNALIGNED=1)
69+
#target_link_options (AssimpJS PUBLIC -sASSERTIONS=1 -sSAFE_HEAP=1 -sWARN_UNALIGNED=1)
7170

7271
target_link_options (AssimpJS PUBLIC --bind)
7372
else ()

commands_deb.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--- Commands for debian systems ---
2+
3+
# First command --- setup emscripten
4+
./tools/setup_emscripten_deb.sh
5+
6+
# Second command --- build the project
7+
./tools/build_wasm_deb.sh

commands_win.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--- Commands for windows systems ---
2+
3+
# First command --- setup emscripten
4+
./tools/setup_emscripten_win.bat
5+
6+
# Second command --- build the project
7+
./tools/build_wasm_win.bat

execute_tests.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm test

execute_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm test

start_server.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm start

test/test.js

100644100755
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -161,21 +161,21 @@ it ('COB', function () {
161161
});
162162

163163
it ('COLLADA', function () {
164-
assert (IsSuccess (['COLLADA/duck.dae']));
165-
assert (IsSuccess (['COLLADA/duck.zae']));
166-
assert (IsSuccess (['COLLADA/COLLADA.dae']));
167-
assert (IsSuccess (['COLLADA/COLLADA_triangulate.dae']));
168-
assert (IsSuccess (['COLLADA/ConcavePolygon.dae']));
169-
assert (IsSuccess (['COLLADA/cube_tristrips.dae']));
170-
assert (IsSuccess (['COLLADA/cube_emptyTags.dae']));
171-
assert (IsSuccess (['COLLADA/cube_triangulate.dae']));
172-
assert (IsSuccess (['COLLADA/earthCylindrical.DAE']));
173-
assert (IsSuccess (['COLLADA/human.zae']));
174-
assert (IsSuccess (['COLLADA/lights.dae']));
175-
assert (IsSuccess (['COLLADA/sphere.dae']));
176-
assert (IsSuccess (['COLLADA/sphere_triangulate.dae']));
177-
assert (IsSuccess (['COLLADA/teapot_instancenodes.DAE']));
178-
assert (IsSuccess (['COLLADA/teapots.DAE']));
164+
assert (IsSuccess (['Collada/duck.dae']));
165+
assert (IsSuccess (['Collada/duck.zae']));
166+
assert (IsSuccess (['Collada/COLLADA.dae']));
167+
assert (IsSuccess (['Collada/COLLADA_triangulate.dae']));
168+
assert (IsSuccess (['Collada/ConcavePolygon.dae']));
169+
assert (IsSuccess (['Collada/cube_tristrips.dae']));
170+
assert (IsSuccess (['Collada/cube_emptyTags.dae']));
171+
assert (IsSuccess (['Collada/cube_triangulate.dae']));
172+
assert (IsSuccess (['Collada/earthCylindrical.DAE']));
173+
assert (IsSuccess (['Collada/human.zae']));
174+
assert (IsSuccess (['Collada/lights.dae']));
175+
assert (IsSuccess (['Collada/sphere.dae']));
176+
assert (IsSuccess (['Collada/sphere_triangulate.dae']));
177+
assert (IsSuccess (['Collada/teapot_instancenodes.DAE']));
178+
assert (IsSuccess (['Collada/teapots.DAE']));
179179
});
180180

181181
it ('CSM', function () {

tools/build_wasm_deb.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# activate the path for the terminal session
2+
eval source ./emsdk_env.sh
3+
#cd "emsdk"
4+
eval emcmake cmake -B ./build_wasm -DEMSCRIPTEN=1 -DCMAKE_BUILD_TYPE=Release
5+
#cd "./build_wasm"
6+
eval emmake make -C build_wasm -j 12
7+
# message for user
8+
echo "Build Succeeded."

tools/setup_emscripten_deb.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# check if emsdk path is there
2+
if [ ! -d "emsdk" ]; then
3+
# clone if path is missing
4+
eval git clone --recursive https://github.com/emscripten-core/emsdk.git
5+
# enter emsdk path
6+
cd "emsdk"
7+
# install the version 3.1.56
8+
eval ./emsdk install 3.1.56
9+
# activate the version 3.1.56
10+
eval ./emsdk activate 3.1.56
11+
# activate the path for the terminal session
12+
eval source ./emsdk_env.sh
13+
else
14+
echo "Emscripten already set up!"
15+
# enter emsdk path
16+
cd "emsdk"
17+
# activate the path for the terminal session
18+
eval source ./emsdk_env.sh
19+
fi

tools/setup_emscripten_win.bat

100644100755
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
pushd %~dp0\..
2-
3-
call git clone https://github.com/emscripten-core/emsdk.git
4-
call cd emsdk
5-
call emsdk install 3.1.35
6-
call emsdk activate 3.1.35
7-
call emsdk install mingw-7.1.0-64bit
8-
call emsdk activate mingw-7.1.0-64bit
9-
call cd ..
10-
11-
popd
1+
pushd %~dp0\..
2+
3+
call git clone https://github.com/emscripten-core/emsdk.git
4+
call cd emsdk
5+
call emsdk install 3.1.56
6+
call emsdk activate 3.1.56
7+
call emsdk install mingw-7.1.0-64bit
8+
call emsdk activate mingw-7.1.0-64bit
9+
call cd ..
10+
11+
popd

0 commit comments

Comments
 (0)