Thursday, January 19, 2012

No apt-get or yum for Cygwin?

This is a shocker. Even MinGW has a CLI installer! You have to run setup.exe from Windows to download and install new packages. There is a project on google code, cyg-apt (or apt-cyg [1] and probably others, because one is never enough), that you can download and build, but another shocker, neither of these are included in the Cygwin Packages!

I am a newbie to Cygwin and to Linux in general so perhaps my shock is misplaced, so please disabuse me. But I'm wondering if Cygwin (and perhaps MinGW [2]) are still relevant with Ubuntu for Linux in a Windows environment and for MS Visual Studio Express for C++ development for free.

Update 2012-07-17

Well, I am still a n00b, but I feel like I have enough experience to disabuse myself. There are some really nice features in Cygwin, that you just can't get with MSYS. For example, you can't install Python in MSYS, without building it from source, although that probably wouldn't be necessary since there is a Windows version of Python. But Cygwin has tons of ports, e.g. Python, GTK, even mingw32 and it's sibling mingw-w64. Some of these also have Windows binaries, pre-compiled and packaged into installers already, but others, like dbus, can be tricky to build for Windows. Both MinGW/MSYS and Cygwin seem to be alive and thriving, but using a VM, especially on newer laptops with harware virtualization, free VM players, and the wide selection of light Linux distros, it does seem like you could get some of the same capability going that route. However, if you use a Linux VM, and your purpose is to do Windows development (in C/C++) then you will have to cross-compile, either with mingw32 or mingw-w64, both available for Linux. And that is the crux, if you want to develop in C/C++ for Windows, then you can either pony up for Visual Studio, get an express version or try MinGW, Cygwin, or one of it's buddies. For deployment, you may need to use freeware like NullSoft, InnoSetup or Wix. And in general, there may be some Linux ports that you'll need to develop your application, in which case you will absolutely need either MSYS or Cygwin, so maybe there is a place for these platform mediators after all. FYI: I haven't tried The Linux in Windows trick  yet, but after reading a bit, VM seemed superior. 

[1] apt-cyg is actually quite good. It is really just a wrapper for setup.exe which you can run from the command line, see "Does setup.exe except command-line arguments?" in setting up Cygwin faq's.

[2] Total n00b misconception! MinGW is a just a set of free GNU development tools, ported to windows. It is not like Cygwin, a *nix-like environment. That would be MSYS. You just need to read their website.

No comments:

Post a Comment

Fork me on GitHub