]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/README.win32
Switch to using the wxWidgets Unicode library.
[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 - For this version of Bacula, you must have msvcr71.dll
36   installed in c:/windows/system32.  The winbacula.nsi.in
37   and pebuilder Makefile.in files have this hard coded in.
38 - We are using Microsoft Visual Studio .NET 2003.
39 - Make sure nmake is on your PATH.
40 - Make sure your COMSPEC is properly setup (see full dump of
41   my cygwin environment below).
42 - The build is done in an rxvt window under the latest version
43   of cygwin.
44 - You need the Platform SDK installed.
45 - You need Visual Studio installed.
46 - You need to load depkgs-win32, then
47     (make the two patches described below to in Nicolas' notes to wx)
48     cd depkgs-win32
49     make
50     (after building zlib and pthreads, it fails in wx)
51     cd wx
52     ./configure
53     make
54     (if it succeeds skip the next item, otherwise do it) 
55 - You may have to build wx with VC++.
56   After starting VC++, use File->Open Workspace then
57   open wx/src/wxWindows.dsw then use
58   Build->Build All or Build->build wxmsw.lib should work too.
59 - cd bacula
60   ./configure --enable-client-only
61   cd src/win32
62   make
63
64 Instructions if you want to build bacula-fd with VSS 
65 (Volume Shadow Copy Service) support:
66
67 - VSS support works for both WinXP machines and Win 2003 machines.
68 - you need to get the VSS SDK: 
69   http://www.microsoft.com/downloads/details.aspx?FamilyID=0B4F56E4-0CCC-4626-826A-ED2C4C95C871&displaylang=en
70 - copy the 'inc' and 'lib' directories from this SDK to 
71   'bacula/src/win32/compat/vss'. Note, generally these files
72   are installed in c:/Program\ Files/Microsoft/VSSSDK71
73 - you should then have 'bacula/src/win32/compat/vss/inc' and 
74   'bacula/src/win32/compat/vss/lib'
75   both with 'Win2003' and 'WinXP' subdirectories
76 - add 'WIN32_VSS' as preprocessor directive
77 - you should get a single bacula-fd.exe that runs on all platforms and has 
78   VSS support for WinXP and 2003 enabled
79 - Follow the instructions given above for building it.
80
81 That should be all there is too it. The winbacula-1.xx.y.exe 
82 should be in the current directory.
83
84
85 See License.txt for the License.
86
87 The native Win32 interface code was written by:
88
89    Christopher S. Hull, February 2004
90
91
92 For more details of building wx, see depkgs-win32/wx/docs/msw/install.txt
93
94 The easiest way to build this is to have a Visual Studio .NET 2003
95 However, you can use the free Microsoft C++ compiler with a bit
96 of additional work.
97
98 Here are additional pointers on building wx-console supplied by Nicolas
99 Boichat:
100
101
102 Tools I used (I think the 3 first one are included in VStudio) :
103 - VC++ toolkit : http://msdn.microsoft.com/visualc/vctoolkit2003/
104 - Windows Platform SDK :
105    http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
106    (Core SDK and Internet Development SDK)
107 - nmake (it got it with .Net Framework SDK)
108 - lib.exe found in the SDK-base/Bin/win64 directory (works fine
109   on a 32 bit Windows).
110
111 Instructions if you want to build wx-console :
112 - wxWidgets 2.4.2 compilation
113   + In include/wx/string.h, replace line 195 by
114       #if defined(__VISUALC__) // && defined(_MT) && !defined(_DLL)
115   + In src/common/string.cpp, replace line 167 by
116       #if defined(__VISUALC__) // && defined(_MT) && !defined(_DLL)
117   + Follow the instructions in docs/msw/install.txt
118      (Visual C++ 6.0 compilation - Using makefiles)
119
120 - Make sure that the environment variables are set as:
121   - PATH includes the directories bin of both the C++ Toolkit and the SDK
122   - INCLUDE includes the directories include of both the C++ Toolkit and the SDK
123   - LIB includes the directories Lib of both the C++ Toolkit and the SDK
124     
125 - Compile bacula depkg-win32 with Visual Studio or try the
126   supplied makefiles as described in the doc. I could not
127   get this to work -- kes.
128
129 - Compile wx-console with nmake -f wx-console.mak in
130   src/win32/wx-console  I could not get this to work
131   kes.
132
133 - Additional information on using the free Micrsosoft C++ see
134   http://sapdb.2scale.net/moin.cgi/MS_20C_2b_2b_20Toolkit
135
136 NOTE! I (Kern) cannot build wxWindows with the Makefile until after
137 I do a ./configure.  I can use VC Studio directly to do so
138 following their instructions. Open VC Studio on the project
139 file depkgs-win32/wx/src/WxWindows.vcproj.  Then build it.
140 Make sure you have selected the Release Unicode version under
141 menu->Build->Configuration Manager.  It will create the file:
142 depkgs-win32/wx/lib/wxmswu.lib. At that point, you have
143 what you need to build wx-console.
144
145 Note, the paths given below have changed now that we switched
146 to Microsoft Visual Studio .NET 2003 (VC++ 7.1).
147
148 Getting all the environment variables setup properly is not always so obvious.
149 Here is what I have when I do a "set" in a rxvt window, in which I build
150 Bacula. Probably what is important are INCLUDE, LIB, PATH, and WXWIN, but note
151 there are a zillion other things set:
152 !::='::\'
153 !C:='C:\cygwin\home\kern'
154 ALLUSERSPROFILE='C:\Documents and Settings\All Users'
155 APPDATA='C:\Documents and Settings\kern\Application Data'
156 BASEMAKE='C:\Program Files\Microsoft SDK\Include\BKOffice.Mak'
157 BASH=/usr/bin/bash
158 BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i686-pc-cygwin")
159 BASH_VERSION='2.05b.0(1)-release'
160 BKOFFICE='C:\Program Files\Microsoft SDK\.'
161 CLIENTNAME=Console
162 COLORFGBG='0;default;15'
163 COLORTERM=rxvt-xpm
164 COLUMNS=70
165 COMMONPROGRAMFILES='C:\Program Files\Common Files'
166 COMPUTERNAME=TIBS
167 COMSPEC='C:\WINDOWS\system32\cmd.exe'
168 CYGWIN=notty
169 DIRSTACK=()
170 DISPLAY=:0
171 EDHELP=/home/kern/bin/ed.hlp
172 EDTRM=/home/kern/bin/ed.trm
173 EUID=1007
174 GROUPS=()
175 HISTFILE=/cygdrive/c/home/kern/.bash_history
176 HISTFILESIZE=500
177 HISTSIZE=500
178 HOME=/cygdrive/c/home/kern
179 HOMEDRIVE=C:
180 HOMEPATH='\Documents and Settings\kern'
181 HOSTNAME=Tibs
182 HOSTTYPE=i686
183 IFS=$' \t\n'
184 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'
185 INETSDK='C:\Program Files\Microsoft SDK\.'
186 LIB='C:\Program Files\Microsoft SDK\Lib\.;C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib'
187 LINES=65
188 LOGONSERVER='\\TIBS'
189 MACHTYPE=i686-pc-cygwin
190 MAILCHECK=60
191 MAKE_MODE=UNIX
192 MOZILLA_HOME=/home/netscape
193 MSDEVDIR='C:\Program Files\Microsoft Visual Studio\Common\MSDev98'
194 MSSDK='C:\Program Files\Microsoft SDK\.'
195 MSTOOLS='C:\Program Files\Microsoft SDK\.'
196 NUMBER_OF_PROCESSORS=1
197 OLDPWD=/home/kern/bacula
198 OPTERR=1
199 OPTIND=1
200 OS=Windows_NT
201 OSTYPE=cygwin
202 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:'
203 PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
204 PIPESTATUS=([0]="0")
205 PPID=3864
206 PROCESSOR_ARCHITECTURE=x86
207 PROCESSOR_IDENTIFIER='x86 Family 15 Model 2 Stepping 7, GenuineIntel'
208 PROCESSOR_LEVEL=15
209 PROCESSOR_REVISION=0207
210 PROGRAMFILES='C:\Program Files'
211 PROMPT='$P$G'
212 PS1='\e[34m\]\w\[\e[0m\]$\040'
213 PS2='> '
214 PS4='+ '
215 PWD=/home/kern
216 SESSIONNAME=Console
217 SHELL=/bin/bash
218 SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
219 SHLVL=1
220 SYSTEMDRIVE=C:
221 SYSTEMROOT='C:\WINDOWS'
222 TEMP=/cygdrive/c/DOCUME~1/kern/LOCALS~1/Temp
223 TERM=xterm
224 TMP=/cygdrive/c/DOCUME~1/kern/LOCALS~1/Temp
225 UID=1007
226 USERDOMAIN=TIBS
227 USERNAME=kern
228 USERPROFILE='C:\Documents and Settings\kern'
229 WINDIR='C:\WINDOWS'
230 WINDOWID=168050736
231 WXWIN='c:\home\kern\bacula\depkgs-win32\wx'
232 _=set