Cmder: How to use pacman as cmder's msys2 package manager?

Created on 29 Mar 2018  路  5Comments  路  Source: cmderdev/cmder

cmder-full comes with its own internal git, and msys2 tools like curl and ssh. I need gccso I installed msys2 externally.
Now, I have two directories in my C drive: C:/cmder and C:/msys64
However, msys2's console has pacman which is a nice package manager if I want to install something.

1- How can I force cmder use my own external msys2 files so I can use pacman? I already need gccso I must have the external msys2 install.
2- If I want to keep the internal msys2, how can I use pacmanto extend and update its tools?
3- If I want to only use my external msys2, would there be any remaining reasons for me to have the full version of cmder? In that case I can have cmder-light and just use pacmanto install gitand vimalongside ssh, gccand curl, right?

Sorry for these n00b questions and thanks

Question

Most helpful comment

I recently required the need of other *nix tools on Windows and found that MSYS2 would be the most painless way to go about getting them. The quickest way I have gotten everything to set up is doing the following:

Visit the official MSYS2 website: http://www.msys2.org/
Download the relevant executable to install MSYS2: msys2-x86_64-20161025.exe is the one of question, at the time I am writing this.
Download cmder-full, and extract it to a directory, we can call it cmder\.
Run the MSYS2 executable, and set the install path to <location-to>\cmder\vendor\msys64\
Click Setup tasks... (Win+Alt+T).
Create a predefined task named {bash::msys2}.
Task parameters: /icon ... (set whatever icon you want).
In the larger box now type: cmd /c "%ConEmuDir%\..\msys64\usr\bin\bash.exe" --login -i

You should now be able to create a new-console that is {bash:msys2}. This console should now contain bash that has pacman.

You may want to modify cmder\vendor\init.bat specifically around the line that says: :: Prepare for git-for-windows to set PATH.

Do not forget to copy in your .ssh and the like into <location-to>\cmder\vendor\msys64\home\<username>

Note, there are more permanent methods which involve installing MSYS2 into the host but this method works for putting cmder on a removable disk.

All 5 comments

Start msys trough cmder

@SuperSandro2000 How can I do that? There is a mintty shell but it's lacking bash aesthetics and it does not recognize pacman

Search for the msys.exe and run it. Don't know if it works but it could.

I recently required the need of other *nix tools on Windows and found that MSYS2 would be the most painless way to go about getting them. The quickest way I have gotten everything to set up is doing the following:

Visit the official MSYS2 website: http://www.msys2.org/
Download the relevant executable to install MSYS2: msys2-x86_64-20161025.exe is the one of question, at the time I am writing this.
Download cmder-full, and extract it to a directory, we can call it cmder\.
Run the MSYS2 executable, and set the install path to <location-to>\cmder\vendor\msys64\
Click Setup tasks... (Win+Alt+T).
Create a predefined task named {bash::msys2}.
Task parameters: /icon ... (set whatever icon you want).
In the larger box now type: cmd /c "%ConEmuDir%\..\msys64\usr\bin\bash.exe" --login -i

You should now be able to create a new-console that is {bash:msys2}. This console should now contain bash that has pacman.

You may want to modify cmder\vendor\init.bat specifically around the line that says: :: Prepare for git-for-windows to set PATH.

Do not forget to copy in your .ssh and the like into <location-to>\cmder\vendor\msys64\home\<username>

Note, there are more permanent methods which involve installing MSYS2 into the host but this method works for putting cmder on a removable disk.

@S-NA Based on your guides, I just selected "Add/Refresh Default Tasks" and somehow cmder detected many shells on my system (MSYS2-64, putty, ...). Now I just use ctrl+T and msys2 and I can use PACMAN there.
So I assume using this solution, packages are saved to the default MSYS2 dir.
But your solution seems better since it is portable AND used pacman as package manager. Wouldn't installing unix utilities and particularly GCC require installing on host? I can just install msys2 and pacman packages inside cmder and most utilities just run off that path?
Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jordanrobinson picture jordanrobinson  路  3Comments

bmeverett picture bmeverett  路  3Comments

isnullxbh picture isnullxbh  路  3Comments

luisrudge picture luisrudge  路  3Comments

zsedcbm picture zsedcbm  路  3Comments