FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

control Panel removed, icon will launch wppm help instead by stonebig · Pull Request #1298 · winpython/winpython · GitHub

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

Filter by extension

Filter by extension .py  (3) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
110 changes: 15 additions & 95 deletions make.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -717,12 +717,13 @@ def _create_launchers(self):
command="$SYSDIR\cmd.exe",
args=r"/k cmd.bat",
)
self.create_launcher(
"WinPython Powershell Prompt.exe",
"powershell.ico",
command="$SYSDIR\cmd.exe",
args=r"/k cmd_ps.bat",
)
# removed to reduce number of icons
#self.create_launcher(
# "WinPython Powershell Prompt.exe",
# "powershell.ico",
# command="$SYSDIR\cmd.exe",
# args=r"/k cmd_ps.bat",
#)

self.create_launcher(
"WinPython Terminal.exe",
Expand All @@ -738,13 +739,6 @@ def _create_launchers(self):
args=r"/k winpython.bat",
)

#self.create_launcher(
# "IDLEX.exe",
# "python.ico",
# command="wscript.exe",
# args=r"Noshell.vbs winidlex.bat",
#)

self.create_launcher(
"IDLE (Python GUI).exe",
"python.ico",
Expand All @@ -769,8 +763,10 @@ def _create_launchers(self):
self.create_launcher(
"WinPython Control Panel.exe",
"winpython.ico",
command="wscript.exe",
args=r"Noshell.vbs wpcp.bat",
# command="wscript.exe",
# args=r"Noshell.vbs wpcp.bat",
command="$SYSDIR\cmd.exe",
args=r"/k wpcp.bat",
)

# Multi-Qt launchers
Expand Down Expand Up @@ -819,13 +815,6 @@ def _create_launchers(self):
args=r"/k winjupyter_lab.bat",
)

#self.create_launcher(
# "Pyzo.exe",
# "pyzologo.ico",
# command="wscript.exe",
# args=r"Noshell.vbs winpyzo.bat",
#)

# VSCode launcher
self.create_launcher(
"VS Code.exe",
Expand Down Expand Up @@ -1512,44 +1501,6 @@ def _create_batch_scripts(self):
do_changes=changes,
)

self.create_batch_script(
"idlex.bat",
r"""@echo off
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" %*
) else (
"%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\idlelib\idle.pyw" %*
)
""",
do_changes=changes,
)

self.create_batch_script(
"idle.bat",
r"""@echo off
call "%~dp0env_for_icons.bat" %*
"%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\idlelib\idle.pyw" %*

""",
do_changes=changes,
)
self.create_batch_script(
"winidlex.bat",
r"""@echo off

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" %*
) else (
echo "%WINPYDIR%\scripts\idlex.pyw" for IDLEX not found !"
)
""",
do_changes=changes,
)
self.create_batch_script(
"winidle.bat",
r"""@echo off
Expand All @@ -1560,18 +1511,6 @@ def _create_batch_scripts(self):
do_changes=changes,
)

self.create_batch_script(
"spyder.bat",
r"""@echo off
call "%~dp0env_for_icons.bat" %*
rem cd/D "%WINPYWORKDIR%"
if exist "%WINPYDIR%\scripts\spyder3.exe" (
"%WINPYDIR%\scripts\spyder3.exe" %* -w "%WINPYWORKDIR1%"
) else (
"%WINPYDIR%\scripts\spyder.exe" %* -w "%WINPYWORKDIR1%"
)
""",
)
self.create_batch_script(
"winspyder.bat",
r"""@echo off
Expand All @@ -1598,15 +1537,6 @@ def _create_batch_scripts(self):
""",
)

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

self.create_batch_script(
"winipython_notebook.bat",
r"""@echo off
Expand Down Expand Up @@ -1634,15 +1564,6 @@ def _create_batch_scripts(self):
""",
)

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

self.create_batch_script(
"winqtconsole.bat",
r"""@echo off
Expand Down Expand Up @@ -1786,15 +1707,14 @@ def _create_batch_scripts(self):
"wpcp.bat",
r"""@echo off
call "%~dp0env_for_icons.bat" %*
cd/D "%WINPYWORKDIR1%"
"%WINPYDIR%\python.exe" -m winpython.controlpanel %*
rem cd/D "%WINPYWORKDIR1%"
rem "%WINPYDIR%\python.exe" -m winpython.controlpanel %*
if not "%WINPYWORKDIR%"=="%WINPYWORKDIR1%" cd/d %WINPYWORKDIR1%
cmd.exe /k "echo wppm & echo & wppm"
""",
do_changes=changes,
)

# self.create_python_batch('wpcp.bat', '-m winpython.controlpanel',
# workdir=r'"%WINPYDIR%\Scripts"')

self.create_batch_script(
"upgrade_pip.bat",
r"""@echo off
Expand Down
2 changes: 1 addition & 1 deletion winpython/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
OTHER DEALINGS IN THE SOFTWARE.
"""

__version__ = '7.2.20240224'
__version__ = '7.3.20240303'
__license__ = __doc__
__project_url__ = 'http://winpython.github.io/'
41 changes: 12 additions & 29 deletions winpython/wppm.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -730,29 +730,14 @@ def main(test=False):
bold = "\033[1m"
unbold = "\033[0m"
registerWinPythonHelp = f"""Register distribution
({bold}experimental{unbold})
This will associate file extensions, icons and
Windows explorer's context menu entries ('Edit with IDLE', ...)
with selected Python distribution in Windows registry.

Shortcuts for all WinPython launchers will be installed
in {unbold}WinPython{unbold} Start menu group (replacing existing
shortcuts).

{bold}Note{unbold}: these actions are similar to those performed
when installing old Pythons with the official installer before 'py'
.
Associate file extensions, icons and context menu entries with this WinPython.
Create a menu group {unbold}WinPython{unbold} for this WinPython launchers.
"""

unregisterWinPythonHelp = f"""Unregister distribution
({bold}experimental{unbold})
This will remove file extensions associations, icons and
Windows explorer's context menu entries ('Edit with IDLE', ...)
with selected Python distribution in Windows registry.

Shortcuts for all WinPython launchers will be removed
from {bold}WinPython{unbold} Start menu group."
."""
De-Associate file extensions, icons and context menu entries from this WinPython.
Remove menu group {unbold}WinPython{unbold} .
"""

parser = ArgumentParser(
description="WinPython Package Manager: view, install, "
Expand All @@ -770,7 +755,6 @@ def main(test=False):
)
parser.add_argument(
"-t",
"--target",
dest="target",
default=sys.prefix,
help="path to target Python distribution " f'(default: "{sys.prefix}")',
Expand All @@ -782,7 +766,7 @@ def main(test=False):
action="store_const",
const=True,
default=False,
help="install package (this is the default action)",
help="install a given package wheel (otherwise use pip)",
)
parser.add_argument(
"-u",
Expand All @@ -800,7 +784,7 @@ def main(test=False):
action="store_const",
const=True,
default=False,
help="show reverse dependancies of the package",
help="show reverse dependancies of the given package[option]. {unbold}wppm -r pytest[test]{unbold}",
)
parser.add_argument(
"-p",
Expand All @@ -809,15 +793,14 @@ def main(test=False):
action="store_const",
const=True,
default=False,
help="show dependancies of the package",
help="show dependancies of the given package[option]. {unbold}wppm -p pandas[test]{unbold}",
)
parser.add_argument(
"-l",
"--levels_of_depth",
dest="levels_of_depth",
dest="levels",
type=int,
default=2,
help="show l levels_of_depth",
help="show l levels of depth of hierarchy from given package",
)
parser.add_argument(
"-ls",
Expand All @@ -826,7 +809,7 @@ def main(test=False):
action="store_const",
const=True,
default=False,
help="list packages matching the given regular expression",
help="list packages matching the given expression. {unbold}wppm -ls{unbold}",
)
parser.add_argument(
"-lsa",
Expand All @@ -835,7 +818,7 @@ def main(test=False):
action="store_const",
const=True,
default=False,
help="list all detail of packages matching the given regular expression (pip inspect)",
help="list details of packages matching the given regular expression (pip inspect)",
)
parser.add_argument(
"-v",
Expand Down

Back | FazBrowse Home | New Git URL