Changeset 54 for trunk/Lucide/SOURCE


Ignore:
Timestamp:
Jun 14, 2006, 4:23:50 PM (15 years ago)
Author:
Eugene Romanenko
Message:

fixed SYS3180 when plugins resides not in current dir. (closes #20, #29)

Location:
trunk/Lucide/SOURCE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/gui/docViewer.cpp

    r51 r54  
    605605    cyClient = SHORT2FROMMP( mp2 );
    606606
    607     double relativeScrollPos = (double)sVscrollPos / (double)sVscrollMax;
     607    double relativeScrollPos = ( sVscrollMax == 0 ) ? 0 :
     608                                    (double)sVscrollPos / (double)sVscrollMax;
    608609
    609610    adjustSize();
  • trunk/Lucide/SOURCE/gui/makefile

    r50 r54  
    11.autodepend
    22
    3 TEST=0
    4 VERSION=Beta 1.1
     3TEST=1
     4VERSION=Beta 1.2
    55
    66!if $(TEST)==1
  • trunk/Lucide/SOURCE/gui/pluginman.cpp

    r35 r54  
    2222 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
    2323 * in which case the provisions of the LGPL are applicable instead of those
    24  * above. If you wish to allow use of your version of this file only under the 
     24 * above. If you wish to allow use of your version of this file only under the
    2525 * terms of the LGPL, and not to allow others to use your version of this file
    2626 * under the terms of the CDDL, indicate your decision by deleting the
    2727 * provisions above and replace them with the notice and other provisions
    2828 * required by the LGPL. If you do not delete the provisions above, a recipient
    29  * may use your version of this file under the terms of any one of the CDDL 
     29 * may use your version of this file under the terms of any one of the CDDL
    3030 * or the LGPL.
    3131 *
     
    4848    // Find exe path
    4949    char buffer[ _MAX_PATH ];
     50    char path[ _MAX_PATH ];
    5051    char drive[ _MAX_DRIVE ];
    5152    char dir[ _MAX_DIR ];
    5253    _splitpath( __argv[0], drive, dir, NULL, NULL );
    53     _makepath( buffer, drive, dir, NULL, NULL );
    54     strcat( buffer, "\\LU*.DLL" );
     54    _makepath( path, drive, dir, NULL, NULL );
     55    strcpy( buffer, path );
     56    strcat( buffer, "LU*.DLL" );
    5557
    5658    // enum plugins, except for LUDOC.DLL, which is 'null' plugin
     
    6062    {
    6163        if ( stricmp( ffblk.name, "LUDOC.DLL" ) != 0 ) {
    62             loadPlugin( ffblk.name );
     64            loadPlugin( path, ffblk.name );
    6365        }
    6466        done = _dos_findnext( &ffblk );
     
    7981}
    8082
    81 void PluginManager::loadPlugin( const char *dllname )
     83void PluginManager::loadPlugin( const char *path, const char *dllname )
    8284{
    8385    // Function pointer variables
     
    8587    char * APIENTRY (*pGetSupportedExtensions)();
    8688    char * APIENTRY (*pGetDescription)();
     89
     90    std::string fulldllname = path;
     91    fulldllname += dllname;
    8792
    8893    // cut DLL name at last point
     
    95100    do
    96101    {
    97         if ( DosLoadModule( NULL, 0, dllname, &h ) != 0 )
     102        if ( DosLoadModule( NULL, 0, fulldllname.c_str(), &h ) != 0 )
    98103            break;
    99104        if ( DosQueryProcAddr( h, 0, "createObject", (PFN *)&pCreateObject ) != 0 )
     
    124129LuDocument *PluginManager::createDocumentForExt( const char *ext, bool checkOnly )
    125130{
    126         if ( ext == NULL ) {
    127                 return NULL;
    128         }
     131    if ( ext == NULL ) {
     132        return NULL;
     133    }
    129134
    130135    LuDocument * APIENTRY (*pCreateObject)();
  • trunk/Lucide/SOURCE/gui/pluginman.h

    r35 r54  
    5656    private:
    5757        PluginInfoList *plugins;
    58         void loadPlugin( const char *dllname );
     58        void loadPlugin( const char *path, const char *dllname );
    5959    public:
    6060        PluginManager();
  • trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.cpp

    r50 r54  
    7373extern "C" char * _System getSupportedExtensions()
    7474{
    75     return "DJVU";
     75    return "DJVU;DJV";
    7676}
    7777
Note: See TracChangeset for help on using the changeset viewer.