installing libs on Windows

Andreas Pakulat apaku at gmx.de
Sat Jul 21 14:20:56 BST 2007


On 21.07.07 12:40:53, Simon Hausmann wrote:
> On Saturday 21 July 2007 04:55:15 Alexander Neundorf wrote:
> > on Windows there is no RPATH, so the only way for executables to find their
> > dlls (e.g. kdecore.dll) is that either
> > A) the dlls are in the same directory as the executable, or
> > B) the directory where the dlls are is in the PATH.
> >
> > In KDE4 we currently do:
> > INSTALL(TARGETS kdecore DESTINATION ${LIB_INSTALL_DIR})
> > This means we rely on option B).
> >
> > We could do the following:
> > INSTALL(TARGETS kdecore
> >                              LIBRARY DESTINATION ${LIB_INSTALL_DIR}
> >                              RUNTIME DESTINATION ${BIN_INSTALL_DIR}
> >                              ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
> >
> > This will install the .so and .dylib files to LIB_INSTALL_DIR ("LIBRARY"),
> > the .dll files and executables to BIN_INSTALL_DIR ("RUNTIME") and the .lib
> > and .a files also to LIB_INSTALL_DIR ("ARCHIVE").
> >
> > It is then also possible to install libs and executables with one command:
> > INSTALL(TARGETS kdecore  kde4-config
> >                              LIBRARY DESTINATION ${LIB_INSTALL_DIR}
> >                              RUNTIME DESTINATION ${BIN_INSTALL_DIR}
> >                              ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
> >
> > The Windows developers would prefer this, the executables will be able to
> > run without changing the PATH. How will the executables actually be
> > installed ? Via an installer which can also adjust the PATH maybe ?
> >
> > Anyway, this would mean that this full syntax has to be used for every
> > installed library, otherwise it won't work on Windows.
> > As it is now, it's a bit harder for the Windows guys but safes the average
> > Linux KDE hacker from thinking about Windows and he can just do
> > INSTALL(TARGETS mylib DESTINATION lib)
> > (of course LIB_INSTALL_DIR is better but in most cases it's just the same
> > result) and it will still work on Windows (if the system is already able to
> > run any KDE app).
> >
> > So, are their objections against using the full INSTALL() syntax everywhere
> > ?
> 
> Sounds complicated to me. Why not just install the dlls always into 
> ${BIN_INSTALL_DIR} by setting ${LIB_INSTALL_DIR} to the bin dir on Windows? 
> (unless otherwise specified)

That doesn't work, then static libs and the import libs are also
installed into the bin dir, which is wrong. Those have to stay in lib
dir.

> As far as I can see this is the standard on Windows anyway, and I don't see 
> what _problem_ we would really solve by introducing a more complex syntax.

No its not. Its often the case that you have the dll's in bin and lib
dir, but not the .lib and .a files.

Andreas

-- 
You may be gone tomorrow, but that doesn't mean that you weren't here today.




More information about the kde-core-devel mailing list