I tried this:
$ ln -sf ../../mingw64 foo
and it took a lot of time to be executed... Then I discovered that 'foo' is not a simlink but a copy of '../../mingw64', which is about 1.7 GiB! Worse...
$ du -s ../../mingw64
1,7G ../../mingw64
while
$ du -s foo
1,8G foo
I don't understand why 'ln' on MSYS2 behaves in this way.. On GNU/Linux, OSX and also Cygwin (from which MSYS2 is a fork), simlinks are text files.. This behavior seems confusing and dangerous.
I tried also to start msys2_shell.bat uncommenting out
rem set MSYS=winsymlinks:nativestrict
Anyway, trying to create Windows native simlinks fails...
So, the question is: How to create simlinks in MSYS2?
MSYS do not use symlinks because native windows applications don’t understand Cygwin symlinks.
But you can enable native windows symlinks by editing msys2_shell.bat and uncommenting:
rem set MSYS=winsymlinks:nativestrict
In this case you need always run msys2_shell.bat as Administrator.
Regards,
Alexey.
Last edit: Alexx83 2014-04-29
Sorry if I re-open this..
OK, Windows applications do not understand symlinks, but nevertheless, the user can find them useful to setup its home/work directories...
For example, suppose one has its configuration files for bash in $HOME/save-bash.cfg and in $HOME
Another example. My (MSYS2) program read a cards file foo.cards to simulate a gravitational system. I could have different cards files for different configurations
and I can switch them with a symlink,
or
etc..
Ciao,
Angelo.
You can use Windows native symlinks. To enable it uncomment line with:
MSYS=winsymlinks:nativestrictin MSYS2 start bat file. And run MSYS2 with admin privileges.
But that is the solution I don't prefer!!!
I don't want symlinks to be used with windows applications but for MSYS2 itself! This lack limits the usage of MSYS2...
Sorry but this is impossible to have symlinks because it break to use Win32 applications.
But as I wrote, I DO NOT want use symlinks with Windows (32,64...) application!!!!!!!! I DO NOT want use them under MINGW64 or MINGW32 but only under MSYS shell!!
For example this works:
being /e/ an usb key NTFS formatted, and
works just fine (notice that close_encounters.cards is a symlink). Here there are no win32 applications broken..
If they break the usage of "..Win32 applications", why then MSYS2 has a few of them?
I understand that you want to use symlinks with MSYS apps but how to separate it? For example,
lsis MSYS application but we use it to work with MINGW apps too.Obviously symlinks work with all non-windows applications like ls... For this reason they can be used also in MINGW if we DO NOT use the for/in/with windows applications... :-)
Any way, it seems there is not intention to add them... :-(
we can close this discussion again.. but you are very limiting MSYS2...
Ciao,
Angelo.