Changes between Version 7 and Version 8 of AppLibraries


Ignore:
Timestamp:
Dec 8, 2011, 1:10:52 PM (13 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AppLibraries

    v7 v8  
    11= Dynamic library naming issues =
    22
    3 Suppose your application uses a dynamic library, say '''vcomp90.dll'''.
     3Suppose your application uses a dynamic library, say '''example.dll'''.
    44Recall that [BoincFiles BOINC files are immutable].
    5 Hence there is a problem if either
     5If you use the physical name '''example.dll'''
     6there will be a problem if either
    67
    78 * You support multiple platforms (say, Win32 and Win64),
    8    and there are different versions of '''vcomp90.dll''' for each platform.
     9   and there are different versions of '''example.dll''' for each platform.
    910 * You need to update to new versions of the library.
    1011
    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.
    17 
    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]:
     12The easiest solution is:
     13 * Give the libraries physical names that encode the platform and version number,
     14   e.g. '''example_win32_1_17.dll''' and '''example_win64_1_17.dll'''.
     15 * Use '''example.dll''' as the logical name.
     16  To do this, use something like the following in your
     17  [AppVersionNew#Theversiondescriptionfile version description file]:
    2218{{{
    2319...
    2420  <file>
    25     <physical_name>vcomp90_win32_1_17.dll</physical_name>
    26     <logical_name>vcomp90.dll</logical_name>
     21    <physical_name>example_win32_1_17.dll</physical_name>
     22    <logical_name>example.dll</logical_name>
    2723    <copy_file/>
    2824...
     
    3127The '''copy_file''' flag tells the BOINC to copy the library to
    3228the application's runtime directory.
     29
     30== Avoiding name conflicts ==
     31
     32The search order for libraries is:
     33
     34 1. The project directory
     35 1. The slot directory
     36 1. other directories
     37
     38Hence if you use '''example.dll''' as a physical name in one app version,
     39other app versions will use that library even if they
     40use the above scheme.
     41
     42To avoid this problem, use logical names that don't conflict with physical names.