Compiling Wget for Windows Using MinGW and MSYS

September 8, 2008

Relevant Links

GNU Wget page

MinGW SourceForge page

UNIX / Linux Tutorial for Beginners

Down the Port

Download the Current Release of the Wget port, version 1.9.1 as of this post, from the link below:

http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=233332

Create the directory C:\MSYS\1.0\src and save the downloaded file to that path.

Note: If your MSYS is not installed on the standard path of C:\MSYS then you’ll have to adjust the paths to match your installation.

Preparation

Start MSYS and then change to the /usr/src directory:

cd /usr/src

Extract the port, then change to the wget-1.9.1/mingwport directory:

tar xvjf wget-1.9.1-mingwPORT.tar.bz2
cd wget-1.9.1/mingwport

Copy the wget.exe file to the /tmp directory:

cp -p wget.exe /tmp/

Note: The port is a shell script that will download, configure, and make the Wget source automatically, after we answer a few prompts.

Compiling Wget

Execute the port script:

./mingwPORT.sh

We will accept the default response to every prompt. Press the enter key in response to the prompt to accept the default.

After pressing enter at the CFLAGS prompt the interactive stage ends and the script goes into fully automated operation.

Note: You may need to unblock wget if the Windows Firewall asks, although I didn’t.

Note: During the build process a great deal of text is output to the MSYS console, which you may need to refer back to if any errors occur.

Last Steps

Now install the Info pages for Wget:

install-info wget.info dir

You’re done.

About these ads

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: