080114 / XP Install for Unix People

previous | next

Finally got XP installed, and I'm swapping cables for dual boot. So in the future I'll be posting speed differences between the Linux and Windows versions of Atom when profiling on the same exact machine.

MinWG Install the Easy Way!

For those who keep their Windows machines quarantined from the Internet (for good reason these days), the automated MinWG Installer will not work as it grabs the source packages from the Internet. Turns out manually installing from the packages is even easier!

1. On your trusty MacOSX or Unix machine, goto the MinGW SourceForge download page.

2. MINGW: Download all the latest non-source files for: GCC Version 4, GNU Binutils, GNU Make, GNU Source-Level Debugger, MinGW API for MS-Windows, MinGW Runtime, and MinGW Utilities. Decompress all these files into a mingw directory.

cd downloads ... goto where you downloaded the files
mkdir mingw ... make new path
cd mingw ... goto path
tar xjf ../gdb-6.7.50.20071127-mingw.tar.bz2 ... untar bzip2 files, do this for all tar.bz2 files
tar xzf ../mingw-runtime-3.14.tar.gz ... untar, will need to do this for all the other tar.gz files as well
gunzip ../libgcc_sjlj_1.dll.gz ... make sure to uncompress everything

3. MSYS: Download all the latest non-source files for: MSYS Base System, and MSYS Supplementary Tools. Decompress all these files into a msys directory.

cd downloads ... goto where you downloaded the files
mkdir msys ... make new path
cd msys ... goto path
tar xjf ../bash-3.1-MSYS-1.0.11-1.tar.bz2 ... untar bzip2 files, do this for all tar.bz2 files

4. Transfer the mingw and msys directories to your insecure Windows machine C: drive. I prefer to use a Flash card to do this.

5. On Windows use your favorite text editor (I use JEdit or NEdit, both excellent text and source editors) to save the following in C:\msys\etc\fstab (BTW, the lower case c and correct / are important.

#/etc/fstab
c:/mingw /mingw

6. That is it. Now run c:\msys\msys.bat to get a terminal window, and you are all set with an easy Unix like development environment. Note, do to the way they did their GCC 4.0 naming, gcc and g++ are run using gcc-sjlj and g++-sjlj, which is a little odd, but you can always manually go in and rename things if you want to...

Helpful Tip for Mac/Linux Users Installing XP

Vendors such as Intel often forget (or ignore) that perhaps people without Windows might need access their drivers for a first time install (...press F6 when installing XP...), and only package their drivers in a EXE file.

In some cases this EXE file is just simply a self extracting ZIP, so running unzip in a terminal can be used on MacOSX/Unix/BSD oses to extract the files from the EXE. The unzip program will note that the file isn't a ZIP file, but will go ahead and search for a ZIP file header embedded in the file anyway, and extract the contents if found.

Also in the case of providing an XP install floppy for disk drivers, often the EXE file is not a self extracting ZIP file, but actually a program which writes a floppy disk image. If you are lucky, the floppy disk image will be contained in the EXE file as an embedded ZIP file, which can be extracted using unzip. Then using dd, this extracted image can be written to a floppy. Here is an example of writing the image on MacOSX to a USB floppy drive. First insert a floppy into the drive, then do the following in a terminal window.

su ... become the super user
diskutil ... used to locate the USB floppy device (which is /dev/disk3 on my Mac)
umount /dev/disk3 ... manual unmount required before dd
dd if=/path/to/floppy/image of=/dev/disk3 ... and done