Changes between Version 35 and Version 36 of CompileClient


Ignore:
Timestamp:
Apr 3, 2009, 2:20:13 AM (16 years ago)
Author:
Ageless
Comment:

Added Visual Studio 2008 build procedure plus library builds.

Legend:

Unmodified
Added
Removed
Modified
  • CompileClient

    v35 v36  
    5252== Windows ==
    5353
    54 Use Microsoft Visual Studio 2005. Or download and install [http://msdn2.microsoft.com/en-us/express/aa975050.aspx Visual C++ 2005 Express Edition] (part of Visual Studio 8 Express). After it downloaded and "installed", go to your local \Visual Studio 8\Microsoft Visual C++ 2005 Express Edition - ENU\ directory and click setup.exe, which will install VC++ 2005 Express Edition in earnest.
     54=== Building the client with Visual Studio 2005 and Visual Studio 2005 Express Edition. ===
     55
     56You can download and install [http://msdn2.microsoft.com/en-us/express/aa975050.aspx Visual C++ 2005 Express Edition] (part of Visual Studio 8 Express). After it downloaded and "installed", go to your local \Visual Studio 8\Microsoft Visual C++ 2005 Express Edition - ENU\ directory and click setup.exe, which will install VC++ 2005 Express Edition in earnest.
    5557
    5658Do not forget to update to [http://www.microsoft.com/downloads/details.aspx?familyid=bb4a75ab-e2d4-4c96-b39d-37baf6b5b1dc&displaylang=en Visual Studio 2005 Service Pack 1]
     
    8486 * Then go File->Open Solution-><BOINCSRCDIR/>\win_build\boinc.sln and press Open.
    8587 * 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.
    86  * For the latest versions of Visual C++ (e.g. Visual C++ 2008 Express Edition) it may be necessary to include preprocessor macros to direct the compiler to build for the correct Windows version (this was apparently introduced for Windows Vista).  E.g. in Project -> <project_name> Properties, I needed to add these entries to Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions:  _WIN32_WINNT=0x0501 and NTDDI_VERSION=0x05010200 -- see sdkddkver.h in the SDK include directory for macro values.
    8788 * Additional linker dependencies for Visual C++ Express
    8889   * boinc_dll
     
    9798 * Go to the Build menu, Build Solution.
    9899
    99 All files will be built to <BOINCSRCDIR/>\win_build\Build\Win32\Release (or Build/x64/Release for 64 bit versions).
     100All files will be built to <BOINCSRCDIR/>\win_build\Build\Win32\Release (or Build\x64\Release for 64 bit versions).
    100101Versions compiled with Visual C++ 2005 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
    101102
     103
     104=== Building the client with Visual Studio 2008 and Visual Studio 2008 Express Edition. ===
     105
     106You can download and install [http://www.microsoft.com/express/download/default.aspx C++ 2008 Express Edition] (part of Visual Studio 9 Express). Update it to [http://www.microsoft.com/downloads/details.aspx?FamilyId=F3FBB04E-92C2-4701-B4BA-92E26E408569&displaylang=en Service Pack 1]. 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.
     107
     108To be backward compatible with VS 2005 versions and be able to build BOINC for older than Windows XP versions, you will need to download and install the [http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB Windows Platform Server 2003 R2 Platform SDK]. Next update it with the [http://www.microsoft.com/express/download/default.aspx MSDN Express Library] for the Express Edition, or 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).
     109
     110Next 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]. When done, update that to [http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en Service Pack 1] (Watch out, it uses the same file name as the original one!)
     111
     112All the service packs for Visual Studio Express Edition ''cannot'' be downloaded through Windows Update.
     113
     114 * [SourceCode Download the current BOINC source code].
     115 * Download [http://www.wxwidgets.org/ wxWidgets].
     116 * Install the wxWidgets source according to instructions on the web site.
     117
     118   || Build Target  || Build Platform || wxWidget Version || Environment Variable ||
     119   || Release       || Win32          || 2.8.x            || WXWIN                ||
     120   || Release       || x64            || 2.8.x            || WXWINX64             ||
     121   || Debug         || Win32          || 2.8.x            || WXWIN                ||
     122   || Debug         || x64            || 2.8.x            || WXWINX64             ||
     123   || !ReleaseSigned || Win32          || 2.6.x            || WXWINPROD            ||
     124   || !ReleaseSigned || x64            || 2.6.x            || WXWINPRODX64         ||
     125
     126 * 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' (or wherever you installed it). Then restart Visual Studio.
     127
     128{{{
     129Example Environment Variables:
     130WXWIN=C:\Src\SDKs\wx28
     131WXWINPROD=C:\Src\SDKs\wx26
     132WXWINPRODX64=C:\Src\SDKs\wx26x64
     133WXWINX64=C:\Src\SDKs\wx28x64
     134}}}
     135
     136 * Build wxWidgets. See [wxWidgets:Compiling_WxWidgets Compiling wxWidgets] for details. You'll need to compile both the Debug and Release targets.
     137 * When done, go File->Close Solution.
     138 * Then go File->Open Solution-><BOINCSRCDIR/>\win_build\boinc.sln and press Open.
     139 * 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.
     140 * For Visual C++ 2008 Express Edition it is necessary to include preprocessor macros to direct the compiler to build for the correct Windows version (this was apparently introduced for Windows Vista).  E.g. in Project -> <project_name> Properties, I needed to add these entries to Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions:  _WIN32_WINNT=0x0501 and NTDDI_VERSION=0x05010200 -- see sdkddkver.h in the SDK include directory for macro values.
     141 * Additional linker dependencies for Visual C++ Express
     142   * boinc_dll
     143    * advapi32.lib
     144    * user32.lib
     145   * boinc
     146    * advapi32.lib
     147    * gdi32.lib
     148    * user32.lib
     149   * boincmgr
     150    * oleaut32.lib
     151 * Go to the Build menu, Build Solution.
     152
     153All files will be built to <BOINCSRCDIR/>\win_build\Build\Win32\Release (or Build\x64\Release for 64 bit versions).
     154Versions 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
     155
    102156You can easily ignore all of the warnings that you get when building. Most of them are for the eyes of the developers.
    103157
     158=== Building library files for use with BOINC built on VS 2008 ===
     159
     160Next we're building the library files so they work with your compiled client.
     161For this, we need to download the source code for [http://www.openssl.org/source/openssl-0.9.8k.tar.gz OpenSSL], [http://www.zlib.net/zlib-1.2.3.tar.gz Zlib] and [http://curl.haxx.se/download/curl-7.19.4.tar.gz libCurl] (direct links to latest stable versions. If a link doesn't work, go to its homepage and choose a mirror).
     162
     163Unzip the files to easy to reach directories. In the next examples I'll use c:\openssl\, c:\zlib\ and c:\curl\ 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.
     164
     165
     166'''Zlib'''
     167
     168In Visual C++ go File->Open->Project/Solution, navigate to c:\zlib\projects\visualc6\ and choose zlib.dsw
     169If it asks to save to the sln file or to convert the present files, answer yes to everything.
     170
     171In the class view list choose zlib, then click Build->Project configuration.
     172Set Active solution configuration to DLL Release.
     173Make sure at least zlib is selected.
     174Make sure the Platform is set to Win32.
     175Click Close.
     176
     177Click Project->Properties.
     178Make sure that the Configuration shows DLL Release or (Active)DLL Release.
     179Click OK
     180
     181Click Build->Clean solution.
     182
     183Next click Build->Batch build.
     184Click 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.
     185click Build.
     186
     187When done click File->Close solution.
     188File->Exit to exit the program.
     189
     190The output files will be in the c:\zlib\projects\visualc6\Win32_DLL_Release\ directory, you will need the zlib1.dll file.
     191
     192
     193'''!LibCurl'''
     194
     195In Visual C++ go File->Open->Project/Solution, navigate to c:\curl\ and choose vc6curl.dsw
     196If it asks to convert the present files, answer yes to everything.
     197
     198In the class view list choose libcurl, then click Build->Project configuration.
     199Set Active solution configuration to using libcurl DLL Release.
     200Make sure libcurl is selected in the Build column.
     201click close.
     202
     203Click Project->Properties.
     204Make sure that the Configuration shows Release or (Active)Release.
     205Make sure the Platform is set to Win32.
     206Click Apply, click OK
     207
     208Click Build->Clean solution.
     209
     210Next click Build->Batch build.
     211Click the Projects column header so all libcurl options are at the top.
     212Select only the libcurl with DLL Release|Win32 in the Build column. Check that the rest of the Build options are not selected.
     213Click Build.
     214
     215When done click File->Close solution.
     216File->Exit to exit the program.
     217
     218The output files will be in the c:\curl\lib\DLL-Release\ directory, you will need the libcurl.dll file.
     219
     220
     221'''OpenSSL'''
     222
     223Lots 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.
     224
     225You will need to get Perl to build OpenSSL. Any Perl will do, but if not sure, then use [http://www.strawberryperl.com Strawberry Perl]. It's about 15Mb in download and not that much bigger when installed on disk. It'll install by default to your C:\ drive (C:\strawberry)
     226
     227You now need the Visual C++ command prompt, so start up Visual C++ 2008 (Express Edition).
     228Go Tools->Visual Studio 2008 Command Prompt.
     229If the line before the blinking cursor shows another drive than c:, we'll have to go to c: first:
     230 * Type '''c:''' in the command line window and press '''Enter'''.
     231 * Type '''cd\openssl''' and press '''Enter'''.
     232 * 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.)
     233 * Type '''ms\do_masm''' and press '''Enter'''.
     234 * Type '''nmake -f ms\ntdll.mak''' and press '''Enter'''.
     235
     236The output files will be in the c:\openssl\out32dll\ directory, you will need the libeay32.dll and ssleay32.dll files.
     237
     238
    104239TODO: instructions for creating an installer with Installshield X.
    105240