File: WINDOWS

package info (click to toggle)
gnugo 3.8-9
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 17,412 kB
  • ctags: 4,302
  • sloc: ansic: 56,445; perl: 3,771; lisp: 2,804; sh: 722; makefile: 706; python: 682; awk: 113; sed: 22
file content (183 lines) | stat: -rw-r--r-- 5,422 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
               Building GNU Go on Windows Platforms

==========================


             BUILDING WITH OLDER VISUAL STUDIO

The distribution directories contain some .dsp and .dsw files with
GNU Go. These have been brought up to date in the sense that they
should work if you have the older VC++ with Visual Studio 6
but the distributed .dsp and .dsw files will only be of use with 
older version of Visual Studio.

In most cases (unless you are building in Cygwin) the preferred way 
to build GNU Go on Windows platforms is to use CMake. CMake
understands about many versions of Visual C/Visual Studio, and will
generate project/solution files for the tools installed on your
system. So even if you have Visual Studio 6 you may use CMake
and dispense with the distributed .dsp and .dsw files.

==========================

         BUILDING WITH VISUAL STUDIO PROJECT FILES

Before you compile the GNU Go source, you need to run CMake first, to 
generate the build files you'll give to Visual Studio.

From the cmd.exe command prompt, CD into the GNU Go source directory. 
To confirm you're in the right place, you should see the file 
'CMakeLists.txt' in the top-level directory of the GNU Go code (as well 
as others in lower subdirectories).

Direct CMake to generate the new Visual Studio build files by typing:

    cmake CMakeLists.txt

Compile the code by invoking the newly-created Solution file:

    vcbuild GNUGo.sln

This will take a few moments, as CMake generates 4 debug/retail targets:

    debug
    release
    minsizerel
    relwithdebinfo

For each of these targets, Visual Studio is generating a version of 
gnugo.exe:

    interface\debug\gnugo.exe
    interface\release\gnugo.exe
    interface\minsizerel\gnugo.exe
    interface\relwithdebinfo\gnugo.exe

Additionally, there is an 'Install' target available, that will copy the 
the gnugo.exe into the %ProgramFiles% directory. To do this, type:

    vcbuild INSTALL.vcproj

This should result in copying GNU/Go into:

    "%ProgramFiles%\GNUGo\bin\gnugo.exe" --options

In addition to command line use, CMake also has a GUI version. Users of 
the Visual Studio GUI might prefer to use that.

==========================

              BUILDING WITH NMAKE MAKEFILES

GNU Go will also build using NMake makefiles. Optionally, instead of 
Visual Studio project/solution files, you may direct CMake to generate 
NMake makefiles. To generate the makefiles:

    cmake -G "NMake Makefiles" CMakeLists.txt

The default rule for the makefile is 'all'. Use the 'help' rule to show 
a list of available targets.

    nmake -f Makefile help

To compile GNU Go:

    nmake -f Makefile all

On some systems, GNU GO may fail to build when using NMake makefiles. It 
only fails the first time run, run NMake again with the 'clean all' 
targets, and it will compile the second and subsequent times.

    nmake -f Makefile clean all

Which will successfully generate a gnugo.exe.

    interface\gnugo.exe --options

==========================

                 BUILDING WITH MINGW MAKEFILES:

GNU Go can be built on Windows systems using MinGW.

This development environment uses: the GCC compiler (gcc.exe, not 
cl.exe), the Microsoft C runtime libraries (MSCRT, not GLibC), the GNU 
Make build tool (mingw32-make.exe, not NMake), all from the Windows 
shell (cmd.exe, not sh/bash).

For CMake to work, in addition to the base MinGW installation, the C++ 
compiler (g++.exe) and GNU Make (mingw32-make.exe) need to be installed. 
This was tested using GCC v3, not the experimental v4. To debug, use 
GDB, as the GCC-generated symbols won't work with NTSD/Windbg/Visual Studio.

To create the makfiles, run CMake with the MinGW generator option:

    cmake -G "MinGW Makefiles" CMakeLists.txt

To build GNU Go, from a cmd.exe shell, run GNU Make (against the 
newly-created 'Makefile' and it's default 'all' target):

    mingw32-make
    ..\interface\gnugo.exe --options

==========================

               BUILDING WITH MSYS MAKEFILES (MinGW)

GNU Go can be built on Windows systems using MSYS.

This development environment uses: the GCC compiler (gcc.exe, not 
cl.exe), the Microsoft C runtime libraries (MSCRT, not GLibC), the GNU 
Make build tool (make, not NMake), all from the GNU Bash (sh.exe, not 
cmd.exe).

To create the makfiles, run CMake with the MSYS generator option:

    cmake -G "MSYS Makefiles" CMakeLists.txt

Start MSYS's Bash shell, either clicking on a shortcut on from the 
command line:

    cd /d c:\msys\1.0
    msys.bat

To build GNU Go, from a Bash shell, run GNU Make (against the 
newly-created 'Makefile' and it's default 'all' target):

    make
    ../interface/gnugo.exe --options

To debug, use GDB, as the GCC-generated symbols won't work with 
NTSD/Windbg/Visual Studio.

==========================

                      BUILDING ON CYGWIN

With Cygwin, you should be able to 

  tar zxvf gnugo-3.8.tar.gz
  cd gnugo-3.8
  env CC='gcc -mno-cygwin' ./configure
  make

==========================

Testing on Windows:

Regress.cmd is a simplified cmd.exe-centric port of the main gnugo Unix 
shell script regress.sh. It can be used to help verify that the 
generated binary might be operational. Read the script's comment header 
for more information. For access to the full GNU Go tests, use Unix, not 
Windows.

To test:

    cd regression
    regress.cmd ..\interface\gnugo.exe

==========================