Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
kinboy wong
vlc.js
Commits
dd2182ff
Commit
dd2182ff
authored
Nov 05, 2019
by
Mehdi Sabwat
Browse files
add emsdk support
parent
f2210275
Changes
3
Hide whitespace changes
Inline
Side-by-side
compile.sh
View file @
dd2182ff
...
...
@@ -18,37 +18,13 @@ checkfail()
# Download the portable SDK and uncompress it
if
[
!
-d
emsdk
-portable
]
;
then
diagnostic
"
E
ms
cripten
not found. Fetching it"
wget
http
s
://
s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
tar
xzf emsdk-portable.tar.gz
checkfail
"
E
ms
cripten
: fetch failed"
if
[
!
-d
emsdk
]
;
then
diagnostic
"
e
ms
dk
not found. Fetching it"
git clone
http://
github.com/emscripten-core/emsdk.git emsdk
cd
emsdk
&&
./emsdk update-tags
&&
./emsdk
install
tot-upstream
&&
./emsdk activate tot-upstream
checkfail
"
e
ms
dk
: fetch failed"
fi
# Compile clang and emscripten
if
[
!
-e
emsdk-portable/emscripten/incoming/emcc
]
;
then
diagnostic
"Emscripten not built. Building it. It will take a LOT of time."
cd
emsdk-portable
# Fetch the latest registry of available tools.
./emsdk update
# Fetch the latest tags
./emsdk update-tags
# Download and install the latest SDK tools.
./emsdk
install
--build
=
Release emscripten-incoming-64bit
# Make the "latest" SDK active
./emsdk activate
--build
=
Release emscripten-incoming-64bit
checkfail
"Emscripten build failed"
# Download and install the corresponding node version
./emsdk
install
--build
=
Release node-4.1.1-64bit
./emsdk activate
--build
=
Release node-4.1.1-64bit
checkfail
"Node build failed"
# Download and install the corresponding clang version
./emsdk
install
--build
=
Release clang-incoming-64bit
./emsdk activate
--build
=
Release clang-incoming-64bit
checkfail
"Clang build failed"
cd
..
fi
# Go go go vlc
if
[
!
-d
"vlc"
]
;
then
...
...
@@ -81,30 +57,15 @@ checkfail "buildsystem tools: make"
cd
../../..
diagnostic
"Setting the environment"
# Export the correct path to get everything working
#export PATH=$PWD/emsdk_portable:$PWD/emsdk_portable/clang/fastcomp/build_incoming_64/bin:$PWD/emsdk_portable/node/4*64bit/bin:$PWD/emsdk_portable/emscripten/incoming:$PATH
cd
emsdk-portable
&&
.
./emsdk_env.sh
&&
cd
..
source
emsdk/emsdk_env.sh
export
PKG_CONFIG_PATH
=
$EMSDK
/emscripten/incoming/system/lib/pkgconfig
export
PKG_CONFIG_LIBDIR
=
$PWD
/vlc/contrib/asmjs_unknowm_emscripten/lib/pkgconfig
export
PKG_CONFIG_PATH_CUSTOM
=
$PKG_CONFIG_LIBDIR
export
CC
=
emcc
export
LD
=
emcc
export
LDSHARED
=
emcc
export
NM
=
llvm_nm
export
CXX
=
em++
export
AR
=
emar
export
RANLIB
=
emranlib
# Check that clang is working
clang
--version
diagnostic
"Patching"
# patching emscripten
cd
emsdk-portable/emscripten/incoming
if
[
-d
../../../patch_emscripten
]
&&
[
"
$(
ls
-A
../../../patch_emscripten
)
"
]
;
then
git am
-3
../../../patch_emscripten/
*
fi
cd
../../..
cd
vlc
...
...
create_main.sh
View file @
dd2182ff
...
...
@@ -16,7 +16,7 @@ checkfail()
fi
}
.
emsdk-portable
/emsdk_env.sh
source
emsdk
/emsdk_env.sh
if
[
!
-d
vlc
]
;
then
diagnostic
"vlc must exists. Execute compile.sh"
...
...
generate_modules_list.sh
View file @
dd2182ff
...
...
@@ -21,7 +21,7 @@ get_symbol()
echo
"
$1
"
|
grep
vlc_entry_
$2
|
cut
-d
" "
-f
3
}
.
emsdk-portable
/emsdk_env.sh
source
emsdk
/emsdk_env.sh
if
[
!
-d
vlc
]
;
then
diagnostic
"vlc must exists. Execute compile.sh"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment