How to compile a new build of "GNU Backgammon for Windows"

Updated 031023
(link to Daily Snapshots)

 

1. Install Gnubg for Win32 2. Get an archive utility 3. Download MinGW
4. Download packages 5. Install packages 6. Fetch the source
7. Copy DLLs 8. Download Makefile, ... 9. Compile/link a new build

Goto Main GNU Bg Page

All info about GNU Backgammon can be found at www.gnubg.org

1. Download and install Gnubg for Win32

If you do not have GNU Backgammon for Windows installed on your Win32 computer already, download and install the Installation archive (12 MB) of Øystein O Johansen.

You will build a replacement gnubg.exe that sits on top of it.

2. Get yourself an archive utility program

For instance: 7-zip
http://www.7-zip.org/

Remark:
When  you opt for another utility, be aware some of them alter the end-of-line characters from *nix to Windows.

(back to top)

3. Download MinGW (SourceForge) 030704

Download: MinGW-2.0.0-3.exe
(from URL: http://sourceforge.net/project/showfiles.php?group_id=2435 )

MinGW 2 bundles:

4. Download the library packages

a. 1) SourceForge 1   03 07 04

(from URL: http://sourceforge.net/project/showfiles.php?group_id=23617 )
Remark: these packages are included in packages.zip (see d.)
I renamed zlib-1.dll of zlib-1.1.4.1-bin.zip to zlib.dll (needed by libpng)

a. 2) SourceForge 2    03 07 04

(from URL: http://sourceforge.net/project/showfiles.php?group_id=25167 )
Remark: included in packages.zip (see d.)
I adapted the directory structure to suit building gnubg.

b. GIMP   03 07 04

(from URL: http://www.gimp.org/~tml/gimp/win32/downloads.html )
Remark: included in packages.zip (see d.)

d. packages.zip, containing all above packages  03 07 04

All above packages are zipped into one file.
Download packages.zip:  http://www.gnubg.org/win32/packages.zip (6.4 MB)
(contains all packages mentioned above)

e. 3D / Panel version.

 EXTRA 
To build 031004, you need to download
gtkglarea and
FTGL

f. Remark

If you want to download the packages one by one, go here.
The source files of the packages are available too (GNU General Public License).

(back to top)

5. Install the packages from 2. and 3.

(back to top)

6. Fetch the GNU Backgammon sources

Get a snapshot or  use CVS
Remark: If you don't know what CVS is, just take the latest snapshot :-)
Remark: To keep things easy, put the GNU Backgammon sources on the same drive as MingW

Download the daily snapshot

ftp://alpha.gnu.org/gnu/gnubg/snapshots/
(It's a good idea to bookmark this page)

At this time there are no snapshots at alpha.gnu.org.
Meanwhile, use this link (TY Achim Müller)

Extract the snapshot to [dir]\gnubg (c)

OR

Use the CVS repository

Look for "Anonymous CVS access" at
http://www.gnu.org/software/gnubg/gnubg.html

You will need a CVS utility for Windows
Look at:
    http://www.tortoisecvs.org/
or
    http://www.wincvs.org/

'Check out' the GNU Backgammon CVS repository to [dir]\gnubg (c)
(or somewhere else, and copy the complete gnubg folder to [dir])

(back to top)

7. Used DLLs

No need to copy anymore. The installation archive of Øystein uses the same :-)

Where do I find the DLLs? [installed dir of GNU Backgammon] (e)

back to top)

8. Download Makefile(s), config(s), batfile(s)

MakeConfig.exe is a self-extracting file (version 031004)
Save as... and run it from your PC
or Open it

It contains:

When you run it, it proposes C:\gnubg as directory for these files
Change C:\gnubg to [dir]\gnubg (c) if you opted for another directory for the source files of GNU Backgammon

The builds will look for a localized version. German, Italian and Japanese are available now. If you are interested: get the Language Package

(back to top)

9. Compiling a new build

a. Get the GNU Backgammon sources

Download a snapshot (031004)or 'check out' the CVS repository (See 4.)

b. Run gnubg3D.bat and/or gnubgOld.bat

Example for gnubg3D.bat

Open My Computer and go to [dir]\gnubg (c)

Double click on gnubg3D.bat (or gnubg3D, if known file extensions are hidden)
If you get an error message, you may need to change gnubg3D.bat (d)

gnubg.exe will be built (in [dir]\gnubg)

c. Move the new build to your GNU Backgammon folder

Copy the freshly build gnubg.exe (or gnubg-old.exe) to the folder of your installed GNU Backgammon for Windows (e)
Please take a backup of your 'old' exe!

(back to top)

10. Notes

a. [drive]:
    You can simply replace [drive] with C if you like. This way you'll get C:\mingw and you don't need to adapt gnubg3D.bat or gnubgOld.bat
    But you are free to opt for another drive(letter). Just be sure it is available and you have write access to it ;-)

b. Keep the directory structure
    The files in packages.zip have a relative path (\bin or \lib or ...)
    All \bin files must go into [drive]:\mingw\bin and so on.
    After extracting the packages, check if \mingw\include has \gtk and \freetype2. That way you know your extraction utility did its job

c. [dir]
    [dir] can be any (sub)directory on any drive.
    You can (again) keep it easy, and choose C:. Thus [dir] would be C:
        and the full path to gnubg would be: C:\gnubg
    But D:\Test\Win32Builds\gnubg will work too. D:\Test\Win32Builds replaces [dir] in this case.
    REMARK: don't use spaces or special characters in your directory name!!

d. gnubg3D.bat / gnubgOld.bat
    If you didn't installed MinGW to C:\mingw, you will have to adapt the file BAT files.
    The procedure itself tells you how-to.

e. Directory of the installed GNU Backgammon for Windows
    On Win9x systems, the default directory is C:\Program Files\gnubg,
    It is the directory where you installed the Installation Archive (Setup.exe) from http://home.online.no/~oeysteij/

(back to top)

Any comments?

mailto:nardy.pillards@skynet.be