myspaghetti / macos-virtualbox

Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox on x86 CPUs for Windows, Linux, and macOS
GNU General Public License v2.0
13.5k stars 1.12k forks source link

Script does not work on MSYS2 (workaround included) #496

Closed zhaowenlan1779 closed 3 years ago

zhaowenlan1779 commented 3 years ago

When run on MSYS2, the script hangs after the check dependencies step, on this line: https://github.com/myspaghetti/macos-virtualbox/blob/ab2f94ba48fb9b1d9ee11c6de325da46dcde332b/macos-guest-virtualbox.sh#L262

Apparently MSYS2 was being overly clever by replacing the /c with C: or something, and therefore this line opens an interactive cmd prompt that will not end by itself.

I fixed this by changing the /d /s /c on this line and the next few lines to //d //s //c. The script worked great afterwards.

It would be nice if it's possible to detect MSYS2 environment and add a special case here. For example, cygcheck -V outputs cygcheck (msys) ...

myspaghetti commented 3 years ago

Thank you for the enhancement.

Similar enhancements and pull request have been submitted before. My reason for declining is that MSYS2 is designed to be a development environment and not a full Unix environment, even though at the moment it's nearly the same as Cygwin (but it might remove features in the future).

Certainly it's not too difficult to detect MSYS2 and issue an error or warning, but I don't want to support something that's not intended to be a full Unix environment, and even Cygwin support will be deprecated when WSL2 nested virtualization is released to the Windows 10 Release (with a capital R) builds.

zhaowenlan1779 commented 3 years ago

Sorry for the duplicate, and yeah, I can understand that. Still, I think it would be helpful to at least write something in the README so that MSYS users can benefit too, without adding much to the maintenance burden.

myspaghetti commented 3 years ago

You know what, I'll apply the change and secretly support MSYS2 while not actually supporting it.

myspaghetti commented 3 years ago

Workaround in version 0.99.0.1. Not tested on MSYS2 but the previous pull request said it works.

zhaowenlan1779 commented 3 years ago

Nice, thank you :p

Jack @.***> 于2021年7月14日周三 下午5:19写道:

Workaround in version 0.99.0.1 https://github.com/myspaghetti/macos-virtualbox/commit/9b360e729bbe922bacd474772c230da1e0335c47. Not tested on MSYS2 but the previous pull request said it works.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/myspaghetti/macos-virtualbox/issues/496#issuecomment-879736440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFCSDOFGVOR2I4RDJZRPB3LTXVJDBANCNFSM5AI7NUQA .