Archive: Uninstaller, plugin crash


Uninstaller, plugin crash
Hi,

I have an NSIS Installer/Uninstaller. The uninstaller calls functionality available in a plugin. This plugin is compiled using visual studio 2010 so requires the runtime library msvcr100.dll and msvcp100.dll. And the application is installed in an XP machine, which does not have these libraries.

When the uninstaller is called, the uninstaller is first copied into a temp directory and from there it executes. At that time it misses the run time library in "the current working directory" and causes problem in loading the plugin dll. What is the right work around for this?

Should I copy the runtime libraries to the temp folder where uninstaller is copied? if this is the case how can I get the path to uninstaller temp folder?

Or should I install the runtime libraryin the "system" folder? Does NSIS have some shortcut for this?

Thanks a lot,
Lloyd


You don't necessarily need to have a dependency on those DLL's if you "Ignore default libraries" and then do not include a manifest in your DLL. Anyway, extract the dependencies to $PLUGINSDIR before calling the plug-in.

Stu


Do you code this plugin yourself? You should avoid dependencies to any kind of runtimes. Installers should always need only itself.


Thanks, How can I avoid dependency on runtime?

If I set "NODEFAULTLIB" option, the linker gives me linking errors.

Or should I use the runtime library as "Multi threaded" than "Multi threaded dll" ?

Thanks a lot,
Lloyd


http://forums.winamp.com/showpost.ph...4&postcount=60

If you get other linker errors then you are using CRT library functions and you need to find alternatives/write your own.

For example, you can replace strcmp with lstrcmp (and the variants) and any printf's with wsprintf. Also NSIS exports helper functions such as myatoi() for plug-ins. Look in one of the plug-in API header files.

Stu