Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 52 additions & 45 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,13 @@ def _create_batch_scripts_initial(self):
r"""@echo off
call "%~dp0env.bat"
set WINPYWORKDIR=%~dp0..\Notebooks

set WINPYWORKDIR1=%~dp1
if "%WINPYWORKDIR1%"=="" (
if not "%CD%\"=="%~dp0" set WINPYWORKDIR1=%CD%
)
if "%WINPYWORKDIR1%"=="" set WINPYWORKDIR1=%WINPYWORKDIR%

FOR /F "delims=" %%i IN ('cscript /nologo "%~dp0WinpythonIni.vbs"') DO set winpythontoexec=%%i
%winpythontoexec%set winpythontoexec=

Expand Down Expand Up @@ -1549,14 +1556,14 @@ def _create_batch_scripts(self):
self.create_batch_script(
'cmd.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
call "%~dp0env_for_icons.bat" %*
cmd.exe /k""",
)

self.create_batch_script(
'python.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
call "%~dp0env_for_icons.bat" %*
rem backward compatibility for python command-line users
"%WINPYDIR%\python.exe" %*
""",
Expand All @@ -1565,8 +1572,8 @@ def _create_batch_scripts(self):
self.create_batch_script(
'winpython.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
rem backward compatibility for non-ptpython users
if exist "%WINPYDIR%\scripts\ptpython.exe" (
"%WINPYDIR%\scripts\ptpython.exe" %*
Expand All @@ -1579,7 +1586,7 @@ def _create_batch_scripts(self):
self.create_batch_script(
'idlex.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
call "%~dp0env_for_icons.bat" %*
rem backward compatibility for non-IDLEX users
if exist "%WINPYDIR%\scripts\idlex.pyw" (
"%WINPYDIR%\python.exe" "%WINPYDIR%\scripts\idlex.pyw" %*
Expand All @@ -1592,16 +1599,17 @@ def _create_batch_scripts(self):
self.create_batch_script(
'idle.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
call "%~dp0env_for_icons.bat" %*
"%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\idlelib\idle.pyw" %*

""",
)
self.create_batch_script(
'winidlex.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"

call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
rem backward compatibility for non-IDLEX users
if exist "%WINPYDIR%\scripts\idlex.pyw" (
"%WINPYDIR%\python.exe" "%WINPYDIR%\scripts\idlex.pyw" %*
Expand All @@ -1613,42 +1621,41 @@ def _create_batch_scripts(self):
self.create_batch_script(
'winidle.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
"%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\idlelib\idle.pyw" %*
""",
)

self.create_batch_script(
'spyder.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
rem cd/D "%WINPYWORKDIR%"
if exist "%WINPYDIR%\scripts\spyder3.exe" (
"%WINPYDIR%\scripts\spyder3.exe" %*
"%WINPYDIR%\scripts\spyder3.exe" %* -w "%WINPYWORKDIR1%"
) else (
"%WINPYDIR%\scripts\spyder.exe" %*
)
"%WINPYDIR%\scripts\spyder.exe" %* -w "%WINPYWORKDIR1%"
)
""",
)
self.create_batch_script(
'winspyder.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
rem cd/D "%WINPYWORKDIR%"
if exist "%WINPYDIR%\scripts\spyder3.exe" (
"%WINPYDIR%\scripts\spyder3.exe" %*
"%WINPYDIR%\scripts\spyder3.exe" %* -w "%WINPYWORKDIR1%"
) else (
"%WINPYDIR%\scripts\spyder.exe" %*
)
"%WINPYDIR%\scripts\spyder.exe" %* -w "%WINPYWORKDIR1%"
""",
)

self.create_batch_script(
'spyder_reset.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
if exist "%WINPYDIR%\scripts\spyder3.exe" (
"%WINPYDIR%\scripts\spyder3.exe" --reset %*
) else (
Expand All @@ -1660,53 +1667,53 @@ def _create_batch_scripts(self):
self.create_batch_script(
'ipython_notebook.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
"%WINPYDIR%\scripts\jupyter-notebook.exe" %*
""",
)

self.create_batch_script(
'winipython_notebook.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
"%WINPYDIR%\scripts\jupyter-notebook.exe" %*
""",
)

self.create_batch_script(
'winjupyter_lab.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
"%WINPYDIR%\scripts\jupyter-lab.exe" %*
""",
)

self.create_batch_script(
'qtconsole.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
"%WINPYDIR%\scripts\jupyter-qtconsole.exe" %*
""",
)

self.create_batch_script(
'winqtconsole.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
"%WINPYDIR%\scripts\jupyter-qtconsole.exe" %*
""",
)

self.create_batch_script(
'qtdemo.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
if exist "%WINPYDIR%\Lib\site-packages\PyQt5\examples\qtdemo\qtdemo.py" (
"%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\site-packages\PyQt5\examples\qtdemo\qtdemo.py"
)
Expand All @@ -1719,8 +1726,8 @@ def _create_batch_scripts(self):
self.create_batch_script(
'qtdesigner.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
if "%QT_API%"=="" ( set QT_API=pyqt5 )
if "%QT_API%"=="pyqt5" (
if exist "%WINPYDIR%\Scripts\designer.exe" (
Expand All @@ -1743,8 +1750,8 @@ def _create_batch_scripts(self):
self.create_batch_script(
'qtassistant.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
if "%QT_API%"=="" ( set QT_API=pyqt5 )
if "%QT_API%"=="pyqt5" (
if exist "%WINPYDIR%\Scripts\assistant.exe" (
Expand All @@ -1767,8 +1774,8 @@ def _create_batch_scripts(self):
self.create_batch_script(
'qtlinguist.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
if "%QT_API%"=="" ( set QT_API=pyqt5 )
if "%QT_API%"=="pyqt5" (
if exist "%WINPYDIR%\Scripts\linguist.exe" (
Expand Down Expand Up @@ -1805,8 +1812,8 @@ def _create_batch_scripts(self):
self.create_batch_script(
'wpcp.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
"%WINPYDIR%\python.exe" -m winpython.controlpanel %*
""",
)
Expand All @@ -1829,7 +1836,7 @@ def _create_batch_scripts(self):
self.create_batch_script(
'winpyzo.bat',
r"""@echo off
call "%~dp0env_for_icons.bat"
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYDIR%"
"%WINPYDIR%\scripts\pyzo.exe" %*
""",
Expand All @@ -1853,8 +1860,8 @@ def _create_batch_scripts(self):
'winvscode.bat',
r"""@echo off
rem launcher for VScode
call "%~dp0env_for_icons.bat"
rem cd/D "%WINPYWORKDIR%"
call "%~dp0env_for_icons.bat" %*
rem cd/D "%WINPYWORKDIR1%"
if exist "%WINPYDIR%\..\t\vscode\code.exe" (
"%WINPYDIR%\..\t\vscode\code.exe" %*
) else (
Expand Down
2 changes: 1 addition & 1 deletion winpython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
OTHER DEALINGS IN THE SOFTWARE.
"""

__version__ = '3.3.20210131'
__version__ = '3.4.20210213'
__license__ = __doc__
__project_url__ = 'http://winpython.github.io/'