adamyg / mcwin32

Midnight Commander for Windows
https://sourceforge.net/projects/mcwin32/
196 stars 13 forks source link

Windows 10: running mc.exe under git-bash console do not work. #63

Closed cgilles closed 8 months ago

cgilles commented 10 months ago

MC build 228 installed with setup.exe git-bash 2.42.0.2 64 bits installed with setup.exe

if i run a git-bash console and start mc.exe, process starting but nothing is shown. console still a black hole. Checking in the task manager, mc.exe is well running. I need to kill mc.exe process myself. git-bash console settings is the default one (eg. xterm type)

mc starts well from a cmd console or from the Windows start menu entry.

See the git-bash console export result:

gilles@Win10 MINGW64 ~ $ export declare -x ACLOCAL_PATH="/mingw64/share/aclocal:/usr/share/aclocal" declare -x ALLUSERSPROFILE="C:\ProgramData" declare -x APPDATA="C:\Users\gilles\AppData\Roaming" declare -x COMMONPROGRAMFILES="C:\Program Files\Common Files" declare -x COMPUTERNAME="WIN10" declare -x COMSPEC="C:\Windows\system32\cmd.exe" declare -x CONFIG_SITE="/etc/config.site" declare -x CommonProgramW6432="C:\Program Files\Common Files" declare -x DISPLAY="needs-to-be-defined" declare -x DriverData="C:\Windows\System32\Drivers\DriverData" declare -x EXEPATH="C:\Program Files\Git" declare -x FPS_BROWSER_APP_PROFILE_STRING="Internet Explorer" declare -x FPS_BROWSER_USER_PROFILE_STRING="Default" declare -x HOME="/c/Users/gilles" declare -x HOMEDRIVE="C:" declare -x HOMEPATH="\Users\gilles" declare -x HOSTNAME="Win10" declare -x INFOPATH="/mingw64/local/info:/mingw64/share/info:/usr/local/info:/usr/share/info:/usr/o:/share/info" declare -x LC_CTYPE="en_US.UTF-8" declare -x LOCALAPPDATA="C:\Users\gilles\AppData\Local" declare -x LOGONSERVER="\\WIN10" declare -x MANPATH="/mingw64/local/man:/mingw64/share/man:/usr/local/man:/usr/share/man:/usr/man:/re/man" declare -x MINGW_CHOST="x86_64-w64-mingw32" declare -x MINGW_PACKAGE_PREFIX="mingw-w64-x86_64" declare -x MINGW_PREFIX="/mingw64" declare -x MSYS="disable_pcon" declare -x MSYSTEM="MINGW64" declare -x MSYSTEM_CARCH="x86_64" declare -x MSYSTEM_CHOST="x86_64-w64-mingw32" declare -x MSYSTEM_PREFIX="/mingw64" declare -x NUMBER_OF_PROCESSORS="4" declare -x OLDPWD declare -x ORIGINAL_PATH="/mingw64/bin:/usr/bin:/c/Users/gilles/bin:/c/Windows/system32:/c/Windows/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/cmd/Program Files/CMake/bin:/c/Program Files/TortoiseGit/bin:/c/Users/gilles/AppData/Local/Programs/Pon/Python312/Scripts:/c/Users/gilles/AppData/Local/Programs/Python/Python312:/c/Users/gilles/AppDaLocal/Programs/Python/Launcher:/c/Users/gilles/AppData/Local/Microsoft/WindowsApps:/c/Program Filex86)/Midnight Commander" declare -x ORIGINAL_TEMP="/tmp" declare -x ORIGINAL_TMP="/tmp" declare -x OS="Windows_NT" declare -x OneDrive="C:\Users\gilles\OneDrive" declare -x PATH="/c/Users/gilles/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/b/c/Users/gilles/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WiwsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/cmd:/c/Program Files/CMake/bin:/c/Program Files/TorseGit/bin:/c/Users/gilles/AppData/Local/Programs/Python/Python312/Scripts:/c/Users/gilles/AppData/al/Programs/Python/Python312:/c/Users/gilles/AppData/Local/Programs/Python/Launcher:/c/Users/gilleppData/Local/Microsoft/WindowsApps:/c/Program Files (x86)/Midnight Commander:/usr/bin/vendor_perl:r/bin/core_perl" declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" declare -x PKG_CONFIG_PATH="/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig" declare -x PKG_CONFIG_SYSTEM_INCLUDE_PATH="/mingw64/include" declare -x PKG_CONFIG_SYSTEM_LIBRARY_PATH="/mingw64/lib" declare -x PLINK_PROTOCOL="ssh" declare -x PROCESSOR_ARCHITECTURE="AMD64" declare -x PROCESSOR_IDENTIFIER="Intel64 Family 6 Model 70 Stepping 1, GenuineIntel" declare -x PROCESSOR_LEVEL="6" declare -x PROCESSOR_REVISION="4601" declare -x PROGRAMFILES="C:\Program Files" declare -x PS1="\[\033]0;\$TITLEPREFIX:\$PWD\007\]\n\[\033[32m\]\u@\h \[\033[35m\]\$MTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n\$ " declare -x PSModulePath="C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindPowerShell\v1.0\Modules" declare -x PUBLIC="C:\Users\Public" declare -x PWD="/c/Users/gilles" declare -x ProgramData="C:\ProgramData" declare -x ProgramW6432="C:\Program Files" declare -x SESSIONNAME="Console" declare -x SHELL="/usr/bin/bash" declare -x SHLVL="1" declare -x SSH_AGENT_PID="1582" declare -x SSH_ASKPASS="/mingw64/bin/git-askpass.exe" declare -x SSH_AUTH_SOCK="/tmp/ssh-yKucYVSgcMyi/agent.1581" declare -x SYSTEMDRIVE="C:" declare -x SYSTEMROOT="C:\Windows" declare -x TEMP="/tmp" declare -x TERM="xterm" declare -x TERM_PROGRAM="mintty" declare -x TERM_PROGRAM_VERSION="3.6.4" declare -x TMP="/tmp" declare -x TMPDIR="/tmp" declare -x USER declare -x USERDOMAIN="WIN10" declare -x USERDOMAIN_ROAMINGPROFILE="WIN10" declare -x USERNAME="gilles" declare -x USERPROFILE="C:\Users\gilles" declare -x WINDIR="C:\Windows"

gilles@Win10 MINGW64 ~ $

Thanks in advance

Gilles Caulier

adamyg commented 10 months ago

shall need to review, wondering about the underling console; mcwin32 requires a windows console mintty is a pty based terminal emulatorr; cygwin/mc would be more suitable [correction, see below]. mcwin32 should at least detect and exit if an unsuitable env.

cgilles commented 10 months ago

Where i can found the cygwin/mc version to test ?

best

Gilles Caulier

adamyg commented 10 months ago

Cygwin32/64 derived versions of midnight commander wont run under git-bash either. Suggest use of https://packages.msys2.org/package/mc?repo=msys&variant=x86_64

adamyg commented 10 months ago

mintty detection, based on prelim research, if stdin is a pipe pull object/pipe-name; MSYS2 pty pipe ('msys-XXXX-ptyN-XX') or a cygwin pty pipe ('cygwin-XXXX-ptyN-XX')

cgilles commented 10 months ago

This want means that you can add a support for this kind of console in the future ?

adamyg commented 10 months ago

no only exit if detected; mintty doesn't present the application with a win-console; mcwin32 is dependent on one. an entire alternative pty/tty based display driver would be required; hence suggest use of msys mc