| 10 | | For example, suppose you support both Win32 and Win64, |
| 11 | | and you use a DLL "vcomp90.dll" that has 32- and 64-bit versions. |
| 12 | | If you install the 32-bit app first, |
| 13 | | it will end up trying to link the 64-bit library, and will crash. |
| | 11 | One solution is to give the libraries names that encode the |
| | 12 | platform and version number, |
| | 13 | e.g. '''vcomp90_win32_1_17.dll''' and '''vcomp90_win64_1_17.dll'''. |
| | 14 | However, this may be infeasible |
| | 15 | because the name '''vcomp90.dll''' is embedded in your Makefiles and |
| | 16 | would be difficult to change. |
| 15 | | One solution is to give the libraries different names, |
| 16 | | e.g. '''vcomp90_32.dll''' and '''vcomp90_64.dll'''. |
| 17 | | However, this requires changing your application (or build system) |
| 18 | | to look for the DLL under that different name. |
| | 18 | A second solution, which doesn't require changing Makefiles, |
| | 19 | is to give the libraries different physical names but the same logical name. |
| | 20 | To do this, use something like the following in your |
| | 21 | [AppVersionNew#Theversiondescriptionfile version description file]: |
| | 22 | {{{ |
| | 23 | ... |
| | 24 | <file> |
| | 25 | <physical_name>vcomp90_win32_1_17.dll</physical_name> |
| | 26 | <logical_name>vcomp90.dll</logical_name> |
| | 27 | <copy_file/> |
| | 28 | ... |
| | 29 | }}} |
| 20 | | A second solution, which doesn't require changing Makefiles or VS project files, |
| 21 | | is to give the libraries different physical names but the same logical name. |
| 22 | | Do this as follows: |
| 23 | | |
| 24 | | * In the 32-bit app, call the file '''vcomp90.dll=vcomp90_v1.0_32bit.dll'''. This will be copied as "vcomp90_v1.0_32bit.dll" to the download directory, and used as "vcomp90.dll" on the client. |
| 25 | | |
| 26 | | * Then, add another file called '''vcomp90.dll=vcomp90_v1.0_32bit.dll.file_ref_info''' containing just: |
| 27 | | {{{ |
| 28 | | <copy_file/> |
| 29 | | }}} |
| 30 | | copy_file will ensure the file is '''copied to''' '''vcomp90.dll''', instead of linked, |
| 31 | | since Windows obviously won't understand BOINC soft links when trying to find |
| 32 | | the DLL. |
| 33 | | |
| 34 | | It's a good idea to add a version number to the physical name, |
| 35 | | in case you ever need to modify the file. |
| 36 | | This also means that even if you don't use multiple platforms, |
| 37 | | it's still useful to use this technique, |
| 38 | | using just a version number and no platform name. |
| | 31 | The '''copy_file''' flag tells the BOINC to copy the library to |
| | 32 | the application's runtime directory. |