Opened 18 years ago

Closed 18 years ago

#78 closed defect (fixed)

Need DosSetExtLIBPATH in lucide.exe

Reported by: Chuck McKinnis <mckinnis@…> Owned by: Eugene Romanenko
Priority: major Milestone: Beta 4
Component: Lucide Core Version: 1.0 Beta 3
Keywords: Cc:

Description

The lucide.exe should really have a sequence to provide access to its own DLLs without the necessity of making an entry in CONFIG.SYS or using something like the RUN!.EXE.

DosQueryExtLIBPATH (to get the current value and save it)

DosSetExtLIBPATH (to put the Lucide directory at the beginning of the extended libpath)

DosSetExtLIBPATH (to restore what was saved)

I am not a C programmer, so I can't really put in the code.

Change History (10)

comment:1 by ktk, 18 years ago

Milestone: Beta 4

Assigned to Beta 4 Milestone

comment:2 by Eugene Romanenko, 18 years ago

DosSetExtLIBPATH can't helps as ludoc.dll linked statically. I unsure if even possible dinamically load SOM dll.

comment:3 by Eugene Romanenko, 18 years ago

However... WPS loads SOM dlls dynamically, so I guess it's possible. Needs some research.

comment:4 by Eugene Romanenko, 18 years ago

I not found a way how to dynamically link class library without dirty hacks.
If anyone know about how to resolve <classname>ClassData names at runtime, please tell me.

Well, ask from other side. Why you need it? Anything can be done without LIBPATH. If you have created WPS program object for Lucide - it will run without any LIBPATH (of course, "." (dot) in LIBPATH needed). WPS associations works also, as associations just run WPS program object.

If you wish use Lucide as viewer in FileCommander - it also possible without add anything to LIBPATH. In "Edit Associations" put string like this:

*.{pdf,djvu}: c: & cd C:\Programs\Lucide & start /f /n lucide !f

This line assumes Lucide installed in 'C:\Programs\Lucide' directory.

comment:5 by Chuck McKinnis <mckinnis@…>, 18 years ago

Not all applications have the same capabilities as File Commander.

In some cases you can only give the full path to the executable. This does not guarantee that the DLLs residing in that path will be accessable.

As regards your classpath question. Are you referring to registered WPS classes?

comment:6 by Eugene Romanenko, 18 years ago

As regards your classpath question. Are you referring to registered WPS classes?

No, I doesn't register anything.

comment:7 by Heiko, 18 years ago

@Chuck: How about using RUN!.

Try with lucide!.exe. This works fine here from SeaMonkey. I know, it would be more comfortable to include the mechanism in Lucide but this increases the complexity quite a bit because this would require dynamic linking of ALL DLLs, just as eros2 already pointed out.

@eros2: I don't think there is a compiler independent way to dynamically link C++ DLLs without providing C wrappers. Every C++ compiler uses its own name mangling. But if you look into the code that sc generates, these are the C wrappers for the SOM runtime. Maybe you can make use of them as well.

comment:8 by Chuck McKinnis <mckinnis@…>, 18 years ago

I started using RUN! as soon as I ran into the problem using Lucide as a helper for Firefox. The license for RUN! is quite broad. Maybe a copy should be packaged with Lucide as LUCIDE!.EXE?

comment:9 by Eugene Romanenko, 18 years ago

I created small lcd.exe, which set beginlibpath and executes Lucide.exe, hope it will be helpful (changeset [130]).

comment:10 by Eugene Romanenko, 18 years ago

Resolution: fixed
Status: newclosed

(In [138]) Better solution for #78, move GUI to DLL, executor sets BeginLibPath and loads GUI DLL (closes #78)

Note: See TracTickets for help on using tickets.