]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/README.win32
Fix dev.c return codes
[bacula/bacula] / bacula / src / win32 / README.win32
1
2 This directory <bacula-src>/src/win32 contains the build
3 environment for building the native Win32 Bacula File daemon,
4 the native Win32 bconsole program and the wx-console GUI console
5 program.
6
7 The directory structure is:
8
9   bacula/src/win32      Makefiles and scripts
10     baculafd            Visual Studio Files
11       Release           Release objects, and bacula-fd.exe
12        Debug            Debug object, and bacula-fd.exe produced
13                            by VC++
14     console             Build of console program and bconsole.conf
15       Release           Release objects  and bconsole.exe
16       Debug             Debug objects 
17     wx-console          Buld of wx-console program and wx-console-conf
18       Release           Release objects and wx-console.exe
19       Debug             Debug objects.
20     filed               Links to core filed code
21     findlib             Links to core findlib code
22     lib                 Links to core lib code
23
24   depkgs-win32
25     pthreads            The POSIX pthreads library (third party)
26     zlib                The zlib library (third party)
27     wx                  The wxWidgets library (third party)
28
29 depkgs-win32 is released in a separate .tar.gz file that contains the
30 source for the above mentioned libraries needed to build the
31 Win32 Bacula.  It can be found in the Source Forge Bacula project
32 release section.
33
34 To build it:
35 - Make sure nmake is on your PATH.
36 - Make sure your COMSPEC is properly setup (see full dump of
37   my cygwin environment below).
38 - The build is done in an rxvt window under the latest version
39   of cygwin.
40 - You need the Platform SDK installed.
41 - You need Visual Studio installed.
42 - You need to load depkgs-win32, then
43     cd depkgs-win32
44     make
45     (after building zlib and pthreads, it fails in wx)
46     cd wx
47     ./configure
48     make
49     (if it succeeds skip the next item, otherwise do it) 
50 - You may have to build wx with VC++.
51   After starting VC++, use File->Open Workspace then
52   open wx/src/wxWindows.dsw then use
53   Build->Build All or Build->build wxmsw.lib should work too.
54 - cd bacula
55   ./configure --enable-client-only
56   cd src/win32
57   make
58
59 That should be all there is too it. The winbacula-1.xx.y.exe should be
60 in the current directory.
61
62
63 See License.txt for the License.
64
65 The native Win32 interface code was written by:
66
67    Christopher S. Hull, February 2004
68
69
70 For more details of building wx, see depkgs-win32/wx/docs/msw/install.txt
71
72 The easiest way to build this is to have a Visual Studio C++ 6.0. 
73 However, you can use the free Microsoft C++ compiler with a bit
74 of additional work.
75
76 Here are additional pointers on building wx-console supplied by Nicolas Boichat:
77
78
79 Tools I used (I think the 3 first one are included in VStudio) :
80 - VC++ toolkit : http://msdn.microsoft.com/visualc/vctoolkit2003/
81 - Windows Platform SDK :
82    http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
83    (Core SDK and Internet Development SDK)
84 - nmake (it got it with .Net Framework SDK)
85 - lib.exe found in the SDK-base/Bin/win64 directory (works fine
86   on a 32 bit Windows).
87
88 Instructions if you want to build wx-console :
89 - wxWidgets 2.4.2 compilation
90   + In include/wx/string.h, replace line 195 by
91       #if defined(__VISUALC__) // && defined(_MT) && !defined(_DLL)
92   + In src/common/string.cpp, replace line 167 by
93       #if defined(__VISUALC__) // && defined(_MT) && !defined(_DLL)
94   + Follow the instructions in docs/msw/install.txt
95      (Visual C++ 6.0 compilation - Using makefiles)
96
97 - Make sure that the environment variables are set as:
98   - PATH includes the directories bin of both the C++ Toolkit and the SDK
99   - INCLUDE includes the directories include of both the C++ Toolkit and the SDK
100   - LIB includes the directories Lib of both the C++ Toolkit and the SDK
101     
102 - Compile bacula depkg-win32 with Visual Studio or try the
103   supplied makefiles as described in the doc.
104
105 - Compile wx-console with nmake -f wx-console.mak in
106   src/win32/wx-console
107
108 - Additional information on using the free Micrsosoft C++ see
109   http://sapdb.2scale.net/moin.cgi/MS_20C_2b_2b_20Toolkit
110
111 NOTE! I (Kern) cannot build wxWindows with the Makefile -- I had to use                
112 VC Studio directly to do so following their instructions.
113
114 Getting all the environment variables setup properly is not always so obvious.
115 Here is what I have when I do a "set" in a rxvt window, in which I build
116 Bacula. Probably what is important are INCLUDE, LIB, PATH, and WXWIN, but note
117 there are a zillion other things set:
118 !::='::\'
119 !C:='C:\cygwin\home\kern'
120 ALLUSERSPROFILE='C:\Documents and Settings\All Users'
121 APPDATA='C:\Documents and Settings\kern\Application Data'
122 BASEMAKE='C:\Program Files\Microsoft SDK\Include\BKOffice.Mak'
123 BASH=/usr/bin/bash
124 BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i686-pc-cygwin")
125 BASH_VERSION='2.05b.0(1)-release'
126 BKOFFICE='C:\Program Files\Microsoft SDK\.'
127 CLIENTNAME=Console
128 COLORFGBG='0;default;15'
129 COLORTERM=rxvt-xpm
130 COLUMNS=70
131 COMMONPROGRAMFILES='C:\Program Files\Common Files'
132 COMPUTERNAME=TIBS
133 COMSPEC='C:\WINDOWS\system32\cmd.exe'
134 CYGWIN=notty
135 DIRSTACK=()
136 DISPLAY=:0
137 EDHELP=/home/kern/bin/ed.hlp
138 EDTRM=/home/kern/bin/ed.trm
139 EUID=1007
140 GROUPS=()
141 HISTFILE=/cygdrive/c/home/kern/.bash_history
142 HISTFILESIZE=500
143 HISTSIZE=500
144 HOME=/cygdrive/c/home/kern
145 HOMEDRIVE=C:
146 HOMEPATH='\Documents and Settings\kern'
147 HOSTNAME=Tibs
148 HOSTTYPE=i686
149 IFS=$' \t\n'
150 INCLUDE='C:\Program Files\Microsoft SDK\Include\.;C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include'
151 INETSDK='C:\Program Files\Microsoft SDK\.'
152 LIB='C:\Program Files\Microsoft SDK\Lib\.;C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib'
153 LINES=65
154 LOGONSERVER='\\TIBS'
155 MACHTYPE=i686-pc-cygwin
156 MAILCHECK=60
157 MAKE_MODE=UNIX
158 MOZILLA_HOME=/home/netscape
159 MSDEVDIR='C:\Program Files\Microsoft Visual Studio\Common\MSDev98'
160 MSSDK='C:\Program Files\Microsoft SDK\.'
161 MSTOOLS='C:\Program Files\Microsoft SDK\.'
162 NUMBER_OF_PROCESSORS=1
163 OLDPWD=/home/kern/bacula
164 OPTERR=1
165 OPTIND=1
166 OS=Windows_NT
167 OSTYPE=cygwin
168 PATH='/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/Bin:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98:/cygdrive/c/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin:/cygdrive/c/Program Files/Microsoft Visual Studio/Common/Tools/WinNT:/cygdrive/c/Program Files/Microsoft Visual Studio/Common/Tools:c:/cygwin/bin:/usr/bin:/home/kern/bin:/sbin:/usr/sbin:'
169 PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
170 PIPESTATUS=([0]="0")
171 PPID=3864
172 PROCESSOR_ARCHITECTURE=x86
173 PROCESSOR_IDENTIFIER='x86 Family 15 Model 2 Stepping 7, GenuineIntel'
174 PROCESSOR_LEVEL=15
175 PROCESSOR_REVISION=0207
176 PROGRAMFILES='C:\Program Files'
177 PROMPT='$P$G'
178 PS1='\e[34m\]\w\[\e[0m\]$\040'
179 PS2='> '
180 PS4='+ '
181 PWD=/home/kern
182 SESSIONNAME=Console
183 SHELL=/bin/bash
184 SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
185 SHLVL=1
186 SYSTEMDRIVE=C:
187 SYSTEMROOT='C:\WINDOWS'
188 TEMP=/cygdrive/c/DOCUME~1/kern/LOCALS~1/Temp
189 TERM=xterm
190 TMP=/cygdrive/c/DOCUME~1/kern/LOCALS~1/Temp
191 UID=1007
192 USERDOMAIN=TIBS
193 USERNAME=kern
194 USERPROFILE='C:\Documents and Settings\kern'
195 WINDIR='C:\WINDOWS'
196 WINDOWID=168050736
197 WXWIN='c:\home\kern\bacula\depkgs-win32\wx'
198 _=set