Opened 13 years ago

Closed 13 years ago

#78 closed defect (fixed)

Need DosSetExtLIBPATH in lucide.exe

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


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 Changed 13 years ago by ktk

  • Milestone set to Beta 4

Assigned to Beta 4 Milestone

comment:2 Changed 13 years ago by eros2

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

comment:3 Changed 13 years ago by eros2

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

comment:4 Changed 13 years ago by eros2

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 Changed 13 years ago by Chuck McKinnis <mckinnis@…>

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 Changed 13 years ago by eros2

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

No, I doesn't register anything.

comment:7 Changed 13 years ago by Heiko

@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 Changed 13 years ago by Chuck McKinnis <mckinnis@…>

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 Changed 13 years ago by eros2

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

comment:10 Changed 13 years ago by eros2

  • Resolution set to fixed
  • Status changed from new to closed

(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.