GeezerVison is showing github.com — The Script in `env_for_icons.bat` No Longer Calls for `env.bat` · Issue #1927 · winpython/winpython
The Script in env_for_icons.bat No Longer Calls for env.bat #1927DescriptionIn previous versions all scripts would run env.bat.
Now env_for_icons.bat does not call it, hence all configuration in env.bat is not applied. ActivityRoyiAvital commented on Dec 29, 2025 This basically broke all portability of the WinPython system. RoyiAvital commented on Dec 29, 2025 I think the whole architecture of the project should be streamlined into a single winpythonenv.bat file and launchers.
What prevents that?
Better yet, do it using PowerShell. stonebig commented on Dec 30, 2025
This basically broke all portability of the WinPython system.
Why do you say it "basically" broke something ? Example ?
The change you see was done a release ago, as trying to reduce DOS lines to zero.
Reasoning was that:
- Powershell is not allowed by default on users, and there are two versions of it
- python is a scripting langage, so why not using python rather than powershell.
Rechecking, the only change I see is a missing "set PYTHONIOENCODING=utf-8", that is maybe a mistake. RoyiAvital commented on Dec 30, 2025 If you want to reduce the surface of batch files, why 2 files which sets different environments?
The portability is broken as env.bat defines set HOME=%WINPYDIRBASE%\settings.
Which means, the programs which use the user home, writes settings there.
So if the folder moves, settings move with it.
Since env_for_icons.bat does not define it, the computer default %HOME% is used.
I suggest to have a single file to set the environment.
By the way, not all applications respect %HOME%.
I for one adds (I create the folders as well):
set ALLUSERSPROFILE=%WINPYDIRBASE%\settings\ProgramData
set APPDATA=%WINPYDIRBASE%\settings\AppData
set HOMEPATH=%WINPYDIRBASE%\settings
set LOCALAPPDATA=%WINPYDIRBASE%\settings\AppData\Local
set ProgramData=%WINPYDIRBASE%\settings\ProgramData
set Public=%WINPYDIRBASE%\settings\Public
This gives me full portability. stonebig commented on Jan 1, 2026 ok, so:
- the segment [env.bat] of winpython.ini is now played by winpythonini.py:
- it's supposed to replace the env.bat call
- it includes PYTHONIOENCODING=utf-8
- now the powershell launcher
- calls also winpythonini.py to get a resulting set of "set variable1=value1&&set variable2=value2..."
- and makes them a global set of variables, so it's still available on the command line
Winpythonini.py gets its dataset from the:
- env.ini file in the same directory as itself
- and from python.exe..\settings\winpython.ini (created per winpythonini.py itself if not found)
RoyiAvital commented on Jan 1, 2026 Have you also dropped env_for_icons.bat?
I don't see the point in having 2 files to set a single configuration. stonebig commented on Jan 1, 2026 env.bat may go away at some point RoyiAvital commented on Jan 2, 2026 I think currently env_for_icons.bat should be gone. There is not point in both.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|