diff --git a/.gitignore b/.gitignore index c2d9041dcbfeb..84b94e507feb6 100644 --- a/.gitignore +++ b/.gitignore @@ -30,8 +30,53 @@ coverage.xml # Test output /out/ -# All the ps1 files are generated by bootstrap... +# Windows ps1 launchers (created by ./tools/maint/create_entry_points.py) *.ps1 # ...except the templates. !/tools/run_python.ps1 !/tools/run_python_compiler.ps1 + +# Shell scripts (created by ./tools/maint/create_entry_points.py) +em-config +emar +embuilder +emcmake +emconfigure +emdump +emdwp +emmake +emnm +emprofile +emranlib +emrun +emscan-deps +emscons +emsize +emstrip +emsymbolizer +tools/file_packager +tools/webidl_binder +test/runner + +# Windows .bat files (created by ./tools/maint/create_entry_points.py) +em-config.bat +emar.bat +embuilder.bat +emcmake.bat +emconfigure.bat +emdump.bat +emdwp.bat +emmake.bat +emnm.bat +emprofile.bat +emranlib.bat +emrun.bat +emscan-deps.bat +emscons.bat +emsize.bat +emstrip.bat +emsymbolizer.bat +tools/file_packager.bat +tools/webidl_binder.bat +test/runner.bat + diff --git a/bootstrap.bat b/bootstrap.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/bootstrap.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/em-config b/em-config deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/em-config +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/em-config.bat b/em-config.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/em-config.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emar b/emar deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emar +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emar.bat b/emar.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emar.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/embuilder b/embuilder deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/embuilder +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/embuilder.bat b/embuilder.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/embuilder.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emcmake b/emcmake deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emcmake +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emcmake.bat b/emcmake.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emcmake.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emconfigure b/emconfigure deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emconfigure +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emconfigure.bat b/emconfigure.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emconfigure.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emdump b/emdump deleted file mode 100755 index 82f0e77a5c669..0000000000000 --- a/emdump +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$(dirname $0)/tools/emdump.py" "$@" diff --git a/emdump.bat b/emdump.bat deleted file mode 100644 index 0f19bc7842dc2..0000000000000 --- a/emdump.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (tools\emdump.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to tools\emdump.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%tools\emdump.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%tools\emdump.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%tools\emdump.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%tools\emdump.py" %* diff --git a/emdwp b/emdwp deleted file mode 100755 index 2f93cfaded2e4..0000000000000 --- a/emdwp +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$(dirname $0)/tools/emdwp.py" "$@" diff --git a/emdwp.bat b/emdwp.bat deleted file mode 100644 index 5e4d8658ab9ae..0000000000000 --- a/emdwp.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (tools\emdwp.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to tools\emdwp.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%tools\emdwp.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%tools\emdwp.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%tools\emdwp.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%tools\emdwp.py" %* diff --git a/emmake b/emmake deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emmake +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emmake.bat b/emmake.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emmake.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emnm b/emnm deleted file mode 100755 index 19fba1368d2b4..0000000000000 --- a/emnm +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$(dirname $0)/tools/emnm.py" "$@" diff --git a/emnm.bat b/emnm.bat deleted file mode 100644 index 80c49452b38f9..0000000000000 --- a/emnm.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (tools\emnm.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to tools\emnm.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%tools\emnm.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%tools\emnm.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%tools\emnm.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%tools\emnm.py" %* diff --git a/emprofile b/emprofile deleted file mode 100755 index 7a35f7a83c39d..0000000000000 --- a/emprofile +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$(dirname $0)/tools/emprofile.py" "$@" diff --git a/emprofile.bat b/emprofile.bat deleted file mode 100644 index 5f5be5c32710c..0000000000000 --- a/emprofile.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (tools\emprofile.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to tools\emprofile.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%tools\emprofile.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%tools\emprofile.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%tools\emprofile.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%tools\emprofile.py" %* diff --git a/emranlib b/emranlib deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emranlib +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emranlib.bat b/emranlib.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emranlib.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emrun b/emrun deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emrun +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emrun.bat b/emrun.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emrun.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emscan-deps b/emscan-deps deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emscan-deps +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emscan-deps.bat b/emscan-deps.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emscan-deps.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emscons b/emscons deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emscons +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emscons.bat b/emscons.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emscons.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emsize b/emsize deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emsize +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emsize.bat b/emsize.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emsize.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emstrip b/emstrip deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emstrip +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emstrip.bat b/emstrip.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emstrip.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/emsymbolizer b/emsymbolizer deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/emsymbolizer +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/emsymbolizer.bat b/emsymbolizer.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/emsymbolizer.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/test/runner b/test/runner deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/test/runner +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/test/runner.bat b/test/runner.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/test/runner.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/tools/file_packager b/tools/file_packager deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/tools/file_packager +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/tools/file_packager.bat b/tools/file_packager.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/tools/file_packager.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* diff --git a/tools/maint/create_entry_points.py b/tools/maint/create_entry_points.py index 7d9d0b0da16ca..7294f9fbfa589 100755 --- a/tools/maint/create_entry_points.py +++ b/tools/maint/create_entry_points.py @@ -62,7 +62,11 @@ } -def main(): +def main(all_platforms): + is_windows = sys.platform.startswith('win') + do_unix = all_platforms or not is_windows + do_windows = all_platforms or is_windows + def generate_entry_points(cmd, path): sh_file = path + '.sh' bat_file = path + '.bat' @@ -83,20 +87,22 @@ def generate_entry_points(cmd, path): bat_data = bat_data.replace('%~n0', entry_remap[entry_point].replace('/', '\\')) ps1_data = ps1_data.replace(r"$MyInvocation.MyCommand.Path -replace '\.ps1$', '.py'", fr'"$PSScriptRoot/{entry_remap[entry_point]}.py"') - out_sh_file = os.path.join(__rootdir__, entry_point) - with open(out_sh_file, 'w') as f: - f.write(sh_data) - os.chmod(out_sh_file, stat.S_IMODE(os.stat(out_sh_file).st_mode) | stat.S_IXUSR) + if do_unix: + out_sh_file = os.path.join(__rootdir__, entry_point) + with open(out_sh_file, 'w') as f: + f.write(sh_data) + os.chmod(out_sh_file, stat.S_IMODE(os.stat(out_sh_file).st_mode) | stat.S_IXUSR) - with open(os.path.join(__rootdir__, entry_point + '.bat'), 'w') as f: - f.write(bat_data) + if do_windows: + with open(os.path.join(__rootdir__, entry_point + '.bat'), 'w') as f: + f.write(bat_data) - with open(os.path.join(__rootdir__, entry_point + '.ps1'), 'w') as f: - f.write(ps1_data) + with open(os.path.join(__rootdir__, entry_point + '.ps1'), 'w') as f: + f.write(ps1_data) generate_entry_points(entry_points, os.path.join(__scriptdir__, 'run_python')) generate_entry_points(compiler_entry_points, os.path.join(__scriptdir__, 'run_python_compiler')) if __name__ == '__main__': - sys.exit(main()) + sys.exit(main('--all' in sys.argv)) diff --git a/tools/webidl_binder b/tools/webidl_binder deleted file mode 100755 index eef0f00c6730f..0000000000000 --- a/tools/webidl_binder +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright 2020 The Emscripten Authors. All rights reserved. -# Emscripten is available under two separate licenses, the MIT license and the -# University of Illinois/NCSA Open Source License. Both these licenses can be -# found in the LICENSE file. -# -# Entry point for running python scripts on UNIX systems. -# -# Automatically generated by `create_entry_points.py`; DO NOT EDIT. -# -# To make modifications to this file, edit `tools/run_python.sh` and then run -# `tools/maint/create_entry_points.py` - -# $PYTHON -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -# of cpython used in cross compilation via setup.py. -unset _PYTHON_SYSCONFIGDATA_NAME - -if [ -z "$PYTHON" ]; then - PYTHON=$EMSDK_PYTHON -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python3 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - PYTHON=$(command -v python 2> /dev/null) -fi - -if [ -z "$PYTHON" ]; then - echo 'unable to find python in $PATH' - exit 1 -fi - -exec "$PYTHON" -E "$0.py" "$@" diff --git a/tools/webidl_binder.bat b/tools/webidl_binder.bat deleted file mode 100644 index 83edd646f7918..0000000000000 --- a/tools/webidl_binder.bat +++ /dev/null @@ -1,86 +0,0 @@ -:: Entry point for running python scripts on windows systems. -:: -:: Automatically generated by `create_entry_points.py`; DO NOT EDIT. -:: -:: To make modifications to this file, edit `tools/run_python.bat` and then run -:: `tools/maint/create_entry_points.py` - -:: N.b. In Windows .bat scripts, the ':' character cannot appear inside any if () blocks, -:: or there will be a parsing error. - -:: All env. vars specified in this file are to be local only to this script. -@setlocal -:: -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal -:: of cpython used in cross compilation via setup.py. -@set _PYTHON_SYSCONFIGDATA_NAME= -@set EM_PY=%EMSDK_PYTHON% -@if "%EM_PY%"=="" ( - set EM_PY=python -) - -:: Work around Windows bug https://github.com/microsoft/terminal/issues/15212 : If this -:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and -:: %~dp0 expansions will not work. -:: So first try if %~dp0 might work, and if not, manually look up this script from PATH. -@if exist "%~f0" ( - set MYDIR=%~dp0 - goto FOUND_MYDIR -) -@for %%I in (%~n0.bat) do ( - @if exist %%~$PATH:I ( - set MYDIR=%%~dp$PATH:I - ) else ( - echo Fatal Error! Due to a Windows bug, we are unable to locate the path to %~n0.bat. - echo To help this issue, try removing unnecessary quotes in the invocation of emcc, - echo or add Emscripten directory to PATH. - echo See github.com/microsoft/terminal/issues/15212 and - echo github.com/emscripten-core/emscripten/issues/19207 for more details. - ) -) -:FOUND_MYDIR - -:: Python Windows bug https://bugs.python.org/issue34780: If this script was invoked via a -:: shared stdin handle from the parent process, and that parent process stdin handle is in -:: a certain state, running python.exe might hang here. To work around this, if -:: EM_WORKAROUND_PYTHON_BUG_34780 is defined, invoke python with '< NUL' stdin to avoid -:: sharing the parent's stdin handle to it, avoiding the hang. - -:: On Windows 7, the compiler batch scripts are observed to exit with a non-zero errorlevel, -:: even when the python executable above did succeed and quit with errorlevel 0 above. -:: On Windows 8 and newer, this issue has not been observed. It is possible that this -:: issue is related to the above python bug, but this has not been conclusively confirmed, -:: so using a separate env. var EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG to enable the known -:: workaround this issue, which is to explicitly quit the calling process with the previous -:: errorlevel from the above command. - -:: Also must use goto to jump to the command dispatch, since we cannot invoke emcc from -:: inside a if() block, because if a cmdline param would contain a char '(' or ')', that -:: would throw off the parsing of the cmdline arg. -@if "%EM_WORKAROUND_PYTHON_BUG_34780%"=="" ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto NORMAL - ) else ( - goto NORMAL_EXIT - ) -) else ( - @if "%EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG%"=="" ( - goto MUTE_STDIN - ) else ( - goto MUTE_STDIN_EXIT - ) -) - -:NORMAL_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* -@exit %ERRORLEVEL% - -:MUTE_STDIN -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit /b %ERRORLEVEL% - -:MUTE_STDIN_EXIT -@"%EM_PY%" -E "%MYDIR%%~n0.py" %* < NUL -@exit %ERRORLEVEL% - -:NORMAL -@"%EM_PY%" -E "%MYDIR%%~n0.py" %*