Changeset 44cc5fc in tol


Ignore:
Timestamp:
Oct 15, 2015, 8:54:49 AM (11 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
d0e76cc
Parents:
db5c687
Message:

refs #1866, nuevas funciones para definir las carga dinámica de dll que deben estar cargadas antes de cargar la dll principal de un paquete:

  // miembro del paquete
  Set _.preload = TolPackage::TolPlatform::DefinePreload( ? );

  // a ejecutar en StartAction
  TolPackage::TolPlatform::PreloadLibraries( _.preload );

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@6938 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/TolPackage/TolPlatform.tol

    rdb5c687 r44cc5fc  
    8686    })
    8787  };
     88 
     89  /*
     90    This function must be invoked while building the package, similar to this:
     91   
     92    Set _.preload = TolPackage::TolPlatform::DefinePreload( ? );
     93  */
     94  ////////////////////////////////////////////////////////////////////////////
     95  Set DefinePreload( Real void )
     96  //////////////////////////////////////////////////////////////////////////// 
     97  {
     98    Text preloadFile = GetAbsolutePath("./") + ObtainDllFolder( ? ) + "/preload.tol";
     99    Set If( FileExist( preloadFile ), Include( preloadFile ), Copy( Empty ) )
     100  };
     101
     102    /*
     103    This function must be invoked from the StartAction, similar to this:
     104   
     105    TolPackage::TolPlatform::PreloadLibraries( _.preload );
     106  */
     107  ////////////////////////////////////////////////////////////////////////////
     108  Real PreloadLibraries( Set preload )
     109  //////////////////////////////////////////////////////////////////////////// 
     110  {
     111    Text dir = GetAbsolutePath("./") + ObtainDllFolder( ? );
     112    Real Group( "And", EvalSet( preload, Real( Text name )
     113      {
     114        Real LoadDynLib( dir + "/" + name )
     115      } ), 1 )
     116  };
    88117
    89118  ////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.