Changes between Version 62 and Version 63 of CompileClient


Ignore:
Timestamp:
Dec 8, 2009, 3:17:15 PM (15 years ago)
Author:
WojciechC
Comment:

updates about VS 2008

Legend:

Unmodified
Added
Removed
Modified
  • CompileClient

    v62 v63  
    117117
    118118=== Building the client with Visual Studio 2008 and Visual Studio 2008 Express Edition. ===
     119Building project using Visual Studio 2008 has become much simpler since it was first posted. I am posting some updates (2009-12-01) noting original requirements at the end of section.
    119120
    120121Software Prerequisites:
     122Visual Studio 2008 with at least C++ package included. For example C++ 2008 Express Edition, Developer Edition or Team Suite (contains all available packages).
    121123 * Download and install [http://www.microsoft.com/express/download/default.aspx C++ 2008 Express Edition] (part of Visual Studio 9 Express).
    122124 * Update it to [http://www.microsoft.com/downloads/details.aspx?FamilyId=F3FBB04E-92C2-4701-B4BA-92E26E408569&displaylang=en Service Pack 1].
    123125 * When using the full version of Visual Studio 2008, use [http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E this link] to update to Service Pack 1.
    124126
    125  * Download and install the [http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB Windows Platform Server 2003 R2 Platform SDK].
    126  * Update it with the [http://www.microsoft.com/express/download/default.aspx MSDN Express Library] for the Express Edition.
    127  * Use the [http://www.microsoft.com/downloads/details.aspx?FamilyID=7bbe5eda-5062-4ebb-83c7-d3c5ff92a373&DisplayLang=en MSDN Library for Visual Studio 2008 SP1] for the full version (DVD ISO file).
     127 * Download and install the [http://www.microsoft.com/downloads/details.aspx?familyid=C17BA869-9671-4330-A63E-1FD44E0E2505 Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1]
    128128
    129129 * Download and install [http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en the Microsoft Visual C++ 2008 Redistributable Package].
     
    131131 * Update Visual Studio 2008 SP1 with the security update available from Windows Update.
    132132
    133 
    134  * [SourceCode Download the current BOINC source code]  (126MB)
     133Preparing project source code:
     134I would advise you to create single, short named directory at the root of windows drive, for example "C:/Boinc".
     135Inside of this directory you will download and create two directories with source codes coming from two separate projects: "Boinc" and "boinc_depends_win_vs2005". Here is how you get them:
     136
     137 * [SourceCode Download the current BOINC source code] [http://boinc.berkeley.edu/svn/trunk/boinc Boinc] (126MB)
    135138 * Don't forget to download the [http://boinc.berkeley.edu/trac/browser/trunk/boinc_depends_win_vs2005 Additional Dependencies] (approx. 1GB)
    136139  * Yes, even for building with VS2008, you will need the Additional Dependency download, as the source code points to it.
     140
    137141 * In Windows, Start->(Settings)->Control Panel->System, select Advanced; click Environment Variables. Under 'User variables' click New. Create a variable named 'wxwin' with value 'c:\wx' as in the example below.
    138142
     
    150154The above are examples. If you saved the boinc_depends_win_vs2005 directory elsewhere, adjust the path.
    151155
    152 
     156 * Go File->Open Solution-><BOINCSRCDIR/>\win_build\boinc.sln and click Open.
     157 * Set up Visual Studio to use the correct platform. From the drop-down menu choose either Win32 (for 32 bit platforms) or x64 (for 64 bit platforms) and choose to make it a Release/Debug version.
     158
     159Correct small error in the project "boincsvcctrl". Go to properties of the project (Right click, properties), Configuration Properties/Manifest Tool/Input and output - clean the "Additional Manifest Files" field.
     160This will remove the conflict, that would otherwise give compilation error: Error 96 manifest authoring error.
     161
     162 * Go to the Build menu, Build Solution.
     163
     164All files will be built to <BOINCSRCDIR/>\win_build\Build\Win32\Release (or Build\x64\Release for 64 bit versions).
     165Versions compiled with Visual C++ 2008 Express use the optimizing compiler. Benchmarks are the same as on versions released by Berkeley. The above steps will always build a development version, if you want to change this, edit <BOINCSCRDIR/>\version.h
     166
     167You can easily ignore all of the warnings that you get when building. Most of them are for the eyes of the developers.
     168
     169To run the resulting projects, you will need the copy of the MSVCR80.dll, msvcp80.dll and msvcm80.dll. You can find them in Microsoft SDK products installed on your PC
     170
     171=== Building library files for use with BOINC built on VS 2008 ===
     172
     173Next we're building the library files so they work with your compiled client.
     174Download the source code for [[br]]
     175* [http://www.openssl.org/source/openssl-0.9.8k.tar.gz OpenSSL];[[br]]
     176* [http://www.zlib.net/zlib-1.2.3.tar.gz Zlib];[[br]]
     177* [http://curl.haxx.se/download/curl-7.19.4.tar.gz libCurl];[[br]]
     178* [http://www.sqlite.org/sqlite-amalgamation-3_6_14_2.zip Sqlite3][[br]]
     179
     180'''WARNING:''' Do not use the OpenSSL, zlib1, libCurl and sqlite3 versions from the additional_dependency_VS2005 download, these are prepped for VS2005 only and will not work in BOINC compiled with VS2008! You will need to build these files by hand for VS2008 compatibility.
     181
     182Unzip the files to easy to reach directories. In the next examples I'll use c:\openssl\, c:\zlib\, c:\curl\ and c:\sqlite3 as the directories of choice. Especially for the OpenSSL directory, make sure you have '''no''' spaces anywhere in the path, use hyphens or underscores if need be or else the command line build will break. For the write up I am assuming to use the 32bit option only. If you want to use the 64bit option, make sure you substitute Win32 with Win64 wherever mentioned.
     183
     184
     185==== zlib ====
     186
     187In Visual C++ go File->Open->Project/Solution, navigate to c:\zlib\projects\visualc6\ and choose zlib.dsw
     188If it asks to save to the sln file or to convert the present files, answer yes to everything.
     189
     190In the class view list choose zlib, then click Build->Project configuration.
     191Set Active solution configuration to DLL Release.
     192Make sure at least zlib is selected.
     193Make sure the Platform is set to Win32.
     194Click Close.
     195
     196Click Project->Properties.
     197Make sure that the Configuration shows DLL Release or (Active)DLL Release.
     198Click OK
     199
     200Click Build->Clean solution.
     201
     202Next click Build->Batch build.
     203Click the Project column so all zlib options are at the top, select only the DLL Release|Win32 option in the Build column. Check that the rest of the Build options are not selected.
     204click Build.
     205
     206When done click File->Close solution.
     207File->Exit to exit the program.
     208
     209The output files will be in the c:\zlib\projects\visualc6\Win32_DLL_Release\ directory, you will need the zlib1.dll file. It should be copied to your BOINC binary directory.
     210
     211==== Curl ====
     212
     213In Visual C++ go File->Open->Project/Solution, navigate to c:\curl\ and choose vc6curl.dsw
     214If it asks to convert the present files, answer yes to everything.
     215
     216In the class view list choose libcurl, then click Build->Project configuration.
     217Set Active solution configuration to using libcurl DLL Release.
     218Make sure libcurl is selected in the Build column.
     219click close.
     220
     221Click Project->Properties.
     222Make sure that the Configuration shows Release or (Active)Release.
     223Make sure the Platform is set to Win32.
     224Click Apply, click OK
     225
     226Click Build->Clean solution.
     227
     228Next click Build->Batch build.
     229Click the Projects column header so all libcurl options are at the top.
     230Select only the libcurl with DLL Release|Win32 in the Build column. Check that the rest of the Build options are not selected.
     231Click Build.
     232
     233When done click File->Close solution.
     234File->Exit to exit the program.
     235
     236The output files will be in the c:\curl\lib\DLL-Release\ directory, you will need the libcurl.dll file. It should be copied to your BOINC binary directory.
     237
     238
     239==== OpenSSL ====
     240
     241Lots of command line prompt work here. First off, read c:\openssl\INSTALL.W32 (for Windows 32bit) or \INSTALL.W64 (for Windows 64bit). It'll be explained in there as well how to do this, but in a more rudimentary form.
     242
     243You will need to get Perl to build OpenSSL. Any Perl will do, but if not sure, then use [http://www.activestate.com/activeperl/ ActivePerl]. It'll install by default to your C:\ drive (C:\Perl)
     244
     245You now need the Visual C++ command prompt, so start up Visual C++ 2008 (Express Edition).
     246Go Tools->Visual Studio 2008 Command Prompt.
     247
     248If the line before the blinking cursor shows another drive than c:, we'll have to go to c: first:
     249 * Type '''c:''' in the command line window and press '''Enter'''.
     250
     251Else continue from here.
     252 * Type '''cd\openssl''' and press '''Enter'''.
     253 * Type '''perl Configure VC-WIN32 --prefix=c:/openssl/''' and press '''Enter'''. (make sure to use the forward slashes '/', not the backslashes '\' in this path, as the next script is using Unix paths, not Windows paths.)
     254 * Type '''ms\do_masm''' and press '''Enter'''.
     255 * Type '''nmake -f ms\ntdll.mak''' and press '''Enter'''.
     256
     257Although the perl Configure script and the do_masm batchfile will work from a normal command line window, the nmake script will not! Hence why you best run all from the VC++ command line window.
     258
     259The output files will be in the c:\openssl\out32dll\ directory, you will need the libeay32.dll and ssleay32.dll files. These should be copied to your BOINC binary directory.
     260
     261==== Sqlite3 ====
     262
     263Open the c:\sqlite3\sqlite3.zip file that you downloaded, but do not unzip the contents yet. (Preferably use an external program such as 7zip, Winzip or WinRAR)
     264
     265Start Visual Studio 2008. [[br]]
     266* File->New->Project [[br]]
     267* Choose CLR plus Class Library. [[br]]
     268* For Name fill in '''sqlite3''' [[br]]
     269* For Location point to a new directory called sqlite3. Do '''not''' use the original directory. [[br]]
     270* Uncheck "Create directory for solution". [[br]]
     271* Click OK.[[br]]
     272
     273This will create the solution files (sqlite3.sln, sqlite3.suo, and sqlite3.ncb) and project files (sqlite3.vcproj, etc).[[br]]
     274Now go to back the opened zip file for sqlite3 and extract the files in it to the new sqlite3 directory that was made by VS2008, the one containing the solution files. Click Yes to overwrite files.
     275
     276Visual Studio will tell you that the source code files have changed and should it reload them? Click Yes to all.
     277In the Resource Files project there is a file called ''sqlite3.cpp'', right click on it and choose Remove. Click Remove again on the warning screen.
     278
     279* From the menu bar, make sure your Solution Configuration Shows Release and the platform you are building for (32bit or 64bit)[[br]]
     280* Now click Build->Build Solution. [[br]]
     281
     282That's it. The sqlite3.dll file can be found in your \sqlite3\Release\ directory. It should be copied to your BOINC binary directory. 
     283
     284
     285TODO: - instructions for creating an installer with Installshield X.[[br]]
     286
     287OLD:
     288Before, the following steps must have been performed. As of 2009-12-01 they are not needed anymore
     289
     290Packages used in past:
     291[http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB Windows Platform Server 2003 R2 Platform SDK].
     292
     293MSDN:
     294 * Update it with the [http://www.microsoft.com/express/download/default.aspx MSDN Express Library] for the Express Edition.
     295 * Use the [http://www.microsoft.com/downloads/details.aspx?FamilyID=7bbe5eda-5062-4ebb-83c7-d3c5ff92a373&DisplayLang=en MSDN Library for Visual Studio 2008 SP1] for the full version (DVD ISO file).
     296
     297This step will be performed automatically, so just verify:
    153298 * Start Visual Studio 2008 -> Visual C++ 2008 (Express Edition)
    154299 * First we set up VS 2008 to use the Platform SDK:
    155300  * Tools->Options.
    156301  * Open Projects and Solutions->VC++ Directories.
    157   * Make sure your Platform is correctly set (Win32 for instance).
     302  * Make sure your Platform is correctly set (Win32 for X86 code generation, Win64 for X64 code generation).
    158303  * Now from the drop down menu in the top right corner, select Include files and point it to the Win Platform Server 2k3 R2 Platform SDK\Include directory.
    159304  * Also point it to use ..\Program Files\Microsoft SDKs\Windows\V6.0a\Include
     
    161306  * And point this to use ..\Program Files\Microsoft SDKs\Windows\V6.0a\Lib as well.
    162307  * OK out of there.
    163  * Go File->Open Solution-><BOINCSRCDIR/>\win_build\boinc.sln and click Open.
    164   * Set up Visual Studio to use the correct platform. From the drop-down menu choose either Win32 (for 32 bit platforms) or x64 (for 64 bit platforms) and choose to make it a Release/Debug version.
     308
    165309  * Additional linker dependencies for Visual C++ Express (right click the project name, properties, Librarian, Input, double click the ... box on Additional Dependencies and add those missing).
    166310   * boinc_dll
     
    176320    * ole32.lib
    177321    * oleaut32.lib
    178  * Go to the Build menu, Build Solution.
    179 
    180 All files will be built to <BOINCSRCDIR/>\win_build\Build\Win32\Release (or Build\x64\Release for 64 bit versions).
    181 Versions compiled with Visual C++ 2008 Express use the optimizing compiler. Benchmarks are the same as on versions released by Berkeley. The above steps will always build a development version, if you want to change this, edit <BOINCSCRDIR/>\version.h
    182 
    183 You can easily ignore all of the warnings that you get when building. Most of them are for the eyes of the developers.
    184 
    185 === Building library files for use with BOINC built on VS 2008 ===
    186 
    187 Next we're building the library files so they work with your compiled client.
    188 Download the source code for [[br]]
    189 * [http://www.openssl.org/source/openssl-0.9.8k.tar.gz OpenSSL];[[br]]
    190 * [http://www.zlib.net/zlib-1.2.3.tar.gz Zlib];[[br]]
    191 * [http://curl.haxx.se/download/curl-7.19.4.tar.gz libCurl];[[br]]
    192 * [http://www.sqlite.org/sqlite-amalgamation-3_6_14_2.zip Sqlite3][[br]]
    193 
    194 '''WARNING:''' Do not use the OpenSSL, zlib1, libCurl and sqlite3 versions from the additional_dependency_VS2005 download, these are prepped for VS2005 only and will not work in BOINC compiled with VS2008! You will need to build these files by hand for VS2008 compatibility.
    195 
    196 Unzip the files to easy to reach directories. In the next examples I'll use c:\openssl\, c:\zlib\, c:\curl\ and c:\sqlite3 as the directories of choice. Especially for the OpenSSL directory, make sure you have '''no''' spaces anywhere in the path, use hyphens or underscores if need be or else the command line build will break. For the write up I am assuming to use the 32bit option only. If you want to use the 64bit option, make sure you substitute Win32 with Win64 wherever mentioned.
    197 
    198 
    199 ==== zlib ====
    200 
    201 In Visual C++ go File->Open->Project/Solution, navigate to c:\zlib\projects\visualc6\ and choose zlib.dsw
    202 If it asks to save to the sln file or to convert the present files, answer yes to everything.
    203 
    204 In the class view list choose zlib, then click Build->Project configuration.
    205 Set Active solution configuration to DLL Release.
    206 Make sure at least zlib is selected.
    207 Make sure the Platform is set to Win32.
    208 Click Close.
    209 
    210 Click Project->Properties.
    211 Make sure that the Configuration shows DLL Release or (Active)DLL Release.
    212 Click OK
    213 
    214 Click Build->Clean solution.
    215 
    216 Next click Build->Batch build.
    217 Click the Project column so all zlib options are at the top, select only the DLL Release|Win32 option in the Build column. Check that the rest of the Build options are not selected.
    218 click Build.
    219 
    220 When done click File->Close solution.
    221 File->Exit to exit the program.
    222 
    223 The output files will be in the c:\zlib\projects\visualc6\Win32_DLL_Release\ directory, you will need the zlib1.dll file. It should be copied to your BOINC binary directory.
    224 
    225 ==== Curl ====
    226 
    227 In Visual C++ go File->Open->Project/Solution, navigate to c:\curl\ and choose vc6curl.dsw
    228 If it asks to convert the present files, answer yes to everything.
    229 
    230 In the class view list choose libcurl, then click Build->Project configuration.
    231 Set Active solution configuration to using libcurl DLL Release.
    232 Make sure libcurl is selected in the Build column.
    233 click close.
    234 
    235 Click Project->Properties.
    236 Make sure that the Configuration shows Release or (Active)Release.
    237 Make sure the Platform is set to Win32.
    238 Click Apply, click OK
    239 
    240 Click Build->Clean solution.
    241 
    242 Next click Build->Batch build.
    243 Click the Projects column header so all libcurl options are at the top.
    244 Select only the libcurl with DLL Release|Win32 in the Build column. Check that the rest of the Build options are not selected.
    245 Click Build.
    246 
    247 When done click File->Close solution.
    248 File->Exit to exit the program.
    249 
    250 The output files will be in the c:\curl\lib\DLL-Release\ directory, you will need the libcurl.dll file. It should be copied to your BOINC binary directory.
    251 
    252 
    253 ==== OpenSSL ====
    254 
    255 Lots of command line prompt work here. First off, read c:\openssl\INSTALL.W32 (for Windows 32bit) or \INSTALL.W64 (for Windows 64bit). It'll be explained in there as well how to do this, but in a more rudimentary form.
    256 
    257 You will need to get Perl to build OpenSSL. Any Perl will do, but if not sure, then use [http://www.activestate.com/activeperl/ ActivePerl]. It'll install by default to your C:\ drive (C:\Perl)
    258 
    259 You now need the Visual C++ command prompt, so start up Visual C++ 2008 (Express Edition).
    260 Go Tools->Visual Studio 2008 Command Prompt.
    261 
    262 If the line before the blinking cursor shows another drive than c:, we'll have to go to c: first:
    263  * Type '''c:''' in the command line window and press '''Enter'''.
    264 
    265 Else continue from here.
    266  * Type '''cd\openssl''' and press '''Enter'''.
    267  * Type '''perl Configure VC-WIN32 --prefix=c:/openssl/''' and press '''Enter'''. (make sure to use the forward slashes '/', not the backslashes '\' in this path, as the next script is using Unix paths, not Windows paths.)
    268  * Type '''ms\do_masm''' and press '''Enter'''.
    269  * Type '''nmake -f ms\ntdll.mak''' and press '''Enter'''.
    270 
    271 Although the perl Configure script and the do_masm batchfile will work from a normal command line window, the nmake script will not! Hence why you best run all from the VC++ command line window.
    272 
    273 The output files will be in the c:\openssl\out32dll\ directory, you will need the libeay32.dll and ssleay32.dll files. These should be copied to your BOINC binary directory.
    274 
    275 ==== Sqlite3 ====
    276 
    277 Open the c:\sqlite3\sqlite3.zip file that you downloaded, but do not unzip the contents yet. (Preferably use an external program such as 7zip, Winzip or WinRAR)
    278 
    279 Start Visual Studio 2008. [[br]]
    280 * File->New->Project [[br]]
    281 * Choose CLR plus Class Library. [[br]]
    282 * For Name fill in '''sqlite3''' [[br]]
    283 * For Location point to a new directory called sqlite3. Do '''not''' use the original directory. [[br]]
    284 * Uncheck "Create directory for solution". [[br]]
    285 * Click OK.[[br]]
    286 
    287 This will create the solution files (sqlite3.sln, sqlite3.suo, and sqlite3.ncb) and project files (sqlite3.vcproj, etc).[[br]]
    288 Now go to back the opened zip file for sqlite3 and extract the files in it to the new sqlite3 directory that was made by VS2008, the one containing the solution files. Click Yes to overwrite files.
    289 
    290 Visual Studio will tell you that the source code files have changed and should it reload them? Click Yes to all.
    291 In the Resource Files project there is a file called ''sqlite3.cpp'', right click on it and choose Remove. Click Remove again on the warning screen.
    292 
    293 * From the menu bar, make sure your Solution Configuration Shows Release and the platform you are building for (32bit or 64bit)[[br]]
    294 * Now click Build->Build Solution. [[br]]
    295 
    296 That's it. The sqlite3.dll file can be found in your \sqlite3\Release\ directory. It should be copied to your BOINC binary directory. 
    297 
    298 
    299 TODO: - instructions for creating an installer with Installshield X.[[br]]
    300322
    301323