Skip to content

Commit

Permalink
Honor EMSDK_PYTHON in bat and sh launcher scripts (#11611)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 authored Jul 10, 2020
1 parent a037f62 commit e0702c9
Show file tree
Hide file tree
Showing 26 changed files with 208 additions and 52 deletions.
4 changes: 4 additions & 0 deletions em++
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions em++.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions em-config
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions em-config.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions emar
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions emar.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions embuilder
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions embuilder.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions emcc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions emcc.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions emcmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions emcmake.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions emconfigure
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions emconfigure.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions emmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions emmake.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions emranlib
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions emranlib.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions emrun
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions emrun.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions emscons
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions emscons.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions emsize
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down
16 changes: 12 additions & 4 deletions emsize.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
16 changes: 12 additions & 4 deletions tools/run_python.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@echo off
REM Entry point for running python scripts on windows systems.
REM To modify this file, edit `tools/run_python.bat` and then run
REM `tools/create_entry_points.py`
:: Entry point for running python scripts on windows systems.
:: To modify this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

python "%~dp0\%~n0.py" %*
@IF "%PYTHON%"=="" (
@SET PYTHON=%EMSDK_PYTHON%
)

@IF "%PYTHON%"=="" (
@SET PYTHON=python
)

%PYTHON% "%~dp0\%~n0.py" %*
4 changes: 4 additions & 0 deletions tools/run_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# To modify this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi
Expand Down

0 comments on commit e0702c9

Please sign in to comment.