Building gnubg on MS Windows
Here's some instructions that allow you to build the latest version of gnubg on MS Windows. It is mainly aimed at people wanting to develop or test gnubg.
- First download and extract this zip file to c:\gnu, it contains a few files you will need later on.
- You need to download and install MinGW from the mingw website. The current version is MinGW-5.1.4.
- The file is downloaded from sourceforge, click download next to Automated MinGW Installer. Open the downloaded file to start the MinGW installation.
- Click through the installation, on the way select:
- Select "MinGW Make" from the bottom of the component list.
- Set the installation folder to c:\gnu\mingw.
- Wait for it to download and click finish to complete the installation.
- Run c:\gnu\misc\TestMinGW.bat. You should see the message "MinGW installed correctly!".
- You need to download and install the latest GTK files from the Glade for windows website. Click on the latest version of the Development Environment. The current version is gtk-dev-2.12.9-win32-2.exe.
- Open the downloaded file and click through the installation, on the way:
- Deselect "Register Environment Variables" from the choose component screen.
- Set the setup folder to c:\gnu\mingw.
- Run c:\gnu\misc\TestGTK.bat. You should see a window with the message "GTK installed correctly!".
- First you must get the source code, you can either:
- Run c:\gnu\misc\CheckOutCode.bat to get the latest code from CVS.
- Or (if that doesn't work) you can download the latest snapshot at the archive and extract to c:\gnu\Code.
- To build gnubg run c:\gnu\BuildGnubg.bat. gnubg should start once it's finished building.
Other batch files
There are a few other batch files in c:\gnu
- misc\UpdateCode.bat updates the code to the latest version in cvs.
- RunGnubg.bat just runs the last built version of gnubg.
- RebuildGnubg.bat rebuilds all of gnubg, useful if some files get out of date.
- I'm using windows XP with service pack 2, it should work fine with other versions of windows though.
- Everything is installed under c:\gnu. if you want to use a different directory you must setup a "GNU" environment variable.
How to build gnubg with gnubg-cli.exe ? I dont need the GTK stuff... thanks.
You will need some part of the GTK stuff, in particular glib. You may also want other functionality, like PNG image support for export etc. in even the command line, however that is optional. glib is not.
You can download a stand alone version, including pre-compiled binaries here: ftp://ftp.gtk.org/pub/glib/
Another approach could be using cygwin, which last time I checked (~12 month ago) was well able to compile both the gui and the non gui version of gnubg. You need to add a few *-devel packages to cygwin manually, the default install won't do it.
It says " mingw32-make target 'obj/gtktexi.o', needed by 'gnubg.exe'.
After i did all the steps correctly.
What i need to do?
When use mingw compiled version, there is a console-win come with main graphic window. How can I get rid of it? Just like the .exe one I downloaded from your main web page. Though it has some little bug in my machine.
I find that, just add compiler flag -mwindows. I was not good at this, sorry for inconvenience to you.
I've updated this page/the code so it should all work at the moment.
Is there some script to build the 0.15 release version of the source code?
I tried to use this script to build it but it fails.
forgive me for my lack of programming knowledge but i have looked through all the c files and havent been able to find it. i am using gnubg for a robot, and all i need is to be able to send the program my move, and recieve the move gnubg makes. can someone point me to a particular location where i can just read off the move and also where i can input my move? i hope that makes sense.