Confused by Code

A Brief History of the Windows Installer for cURL

About two years ago I started a new job at a search engine optimization company. My boss specializes in technical SEO, and one of his first requests was that I get familiar with cURL.

In college I studied English and creative writing. I had never seen a line of code, and I had certainly never compiled a program. So when I visited the cURL website and saw that the only official downloads were packages of source code, I began to panic. I scrolled down the list of "pre-compiled binaries" (or "programs" as non-programmers might say), but had no idea which to choose.

So, of course, I chose the one with the most features. I unzipped it and found curl.exe, some dlls, and a few generic 'files'. I tried to open the file called README, assuming it wanted to be read, but Windows did not know which program to open it with. Neither did I, and not wanting to destroy my computer, I hit cancel. I assumed I wasn't qualified for my job.

Over the next several months I taught myself some basic scripting, and learned about all the small things that programmers take for granted, like system paths, the difference between Unix and Windows line-endings, how to use a command line, and so on. I discovered that hacking is loads of fun, and can be extremely useful. cURL is now part of my daily routine.

I recently visited the cURL website to see if any updates were available, and I realized that I wasn't too impressed with the pre-built packages for Windows. While the builds themselves worked perfectly well, they weren't particularly user-friendly. Most did not include a correctly named SSL certificate bundle, and none included the full documentation. And of course, the Unix-style text files appeared to be one long line of text when viewed with Notepad, rendering them unreadable.

I did a few Google searches to see if anyone had put together a Windows installer, but was surprised to find that nobody had. And so, despite not knowing what I was doing, I decided to make my own.

I had a few specific goals.

  1. A full-featured, fully functional 64-bit build of cURL and libcurl - SSL, SSH, the whole thing.
  2. A correctly named SSL cert-bundle so people could start curling immediately, and the download scripts for serious users to stay up to date. And of course, instructions on how to use them.
  3. All the documentation, readable on Windows' default text editor.
  4. A windows installer for easy setup, especially for beginners.

I compiled cURL from the official source distribution with Visual Studio 2012 Express [Update 02/11/14: As of version 7.35.0, I'm using Visual Studio 2013 Express]. I used OpenSSL for SSL capability, libssh2 for SSH, and zlib for compression. I then converted all of the line endings of the text files, and arranged all of the HTML manuals in a folder. Finally, I learned how to use Wix to build an MSI installer.

It seems to work. However, there are a few things I want to improve. For example, due to my limited understanding of Wix, you can't install both 32- and 64-bit versions on the same machine. I built the installers this way because by default they add cURL to the user's path, and they both use the same installation folder names. Eventually I'll rename the folders, and I'll have the installer check the path. (I know some people don't like installers that alter the path by default - however, I think a command-line tool is only useful if it's in the path.)

While I'm sure this package won't break your computer, I can't guarantee it will work perfectly - I just don't have the experience to make such a claim. Before releasing them, I always test the installers on Windows 7 64-bit, Windows 7 32-bit, and a Windows XP virtual machine, and I've heard reports from users that it works on Windows 8, Windows Server 2008, and Windows Server 2012, but I can't test those myself. And so, disclaimer: use this software at your own risk.

I read the licenses of all the libraries I used, and I think I did everything properly, but if not, contact me and I'll make the necessary changes. Also, let me know about any problems with the build or installation process, and I'll try to fix them as soon as I can. E-mail me at webmaster@confusedbycode.com.

cURL is an incredible tool. The people who created it and give it away for free are doing a great service to the computing world. I hope this distribution makes it more accessible and useful for Windows users.