Re: [WiX-users] Easy WiX way for a custom action to call multiple utility DLLs?

2007-10-26 Thread Karim MacDonald


Rob Mensching-5 wrote:
> 
> I'm admittedly hardcore about this but IMHO custom actions should be 
> native code DLLs that have as few dependencies as physically possible 
> (certainly should have no dependency on WTL).  Statically linking the 
> CRT then use as few DLLs from the system provides the highest 
> probability that the code will work in the most number of environments.
> 
Agreed, although I think that Aris was just giving his WTL app as an example
of static linking seeming not to work properly, as opposed to actually using
WTL within a CA (off the top my head, I can't think when you'd want to do
this). It's OT but wrt your WTL prob Aris, might you have missed some other
dependency? (Depends.exe v. handy here).

Aris Green-2 wrote:
> 
> Try embedding the other DLL as a custom resource using the .rc file.
> Extract the DLL first thing when the CA is called.  Use delayload linker
> option or
> LoadLibrary to call the function in the extracted DLL.  I've done this
> before.
> 
Not what I was looking for, but thanks for the tip Aris: I hadn't considered
this approach.

-- 
View this message in context: 
http://www.nabble.com/Easy-WiX-way-for-a-custom-action-to-call-multiple-utility-DLLs--tf4683485.html#a13425076
Sent from the wix-users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Easy WiX way for a custom action to call multiple utility DLLs?

2007-10-25 Thread Rob Mensching
I'm admittedly hardcore about this but IMHO custom actions should be 
native code DLLs that have as few dependencies as physically possible 
(certainly should have no dependency on WTL).  Statically linking the 
CRT then use as few DLLs from the system provides the highest 
probability that the code will work in the most number of environments.

Personally, development time takes a back seat to correctness and 
robustness.  Yes, I realize that other people face different time 
pressures.  I just view custom actions as an extension to the Windows 
Installer and thus need to be extremely robust with the minimal 
prerequisites.

Aris Green wrote:
> In regards to Rob Mensching's comment,
> >
> >Statically link.  That's what all the WiX CustomActions do and while it
> >makes the DLLs a bit bigger it totally minimizes the number of
> >dependencies (especially nasty ones like the Win32 SxS CRT junk).
>  
> Static linking definitely seems like the right thing to do.  This is 
> what I have done with VC 2003 and earlier for previous installs.  
> However I have noticed that some programs, such as a WTL 8.0 Win EXE 
> (I avoid MFC) I wrote, did not work on a lot of XP Pro SP2 machines 
> when I statically linked it.  The dialogs would not load their 
> resource templates and were completely blank.  However, when I linked 
> the CRT as a DLL, it worked;  I don't know why.
>  
> Also, if the CLR is used in a CA, i.e. a managed function exported as 
> an unmanaged functions as opposed to the installutil type components, 
> I believe that you can't use static linking to the CRT and that the 
> CRT has to be linked in as a DLL.  Mayber CA's using managed code is 
> not such a good idea.  I know some people are against managed code in 
> CA's, but if you know that .NET 2.0 is on the box, they can save a lot 
> of time.
>  

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Easy WiX way for a custom action to call multiple utility DLLs?

2007-10-25 Thread Aris Green
In regards to Rob Mensching's comment,
>
>Statically link.  That's what all the WiX CustomActions do and while it
>makes the DLLs a bit bigger it totally minimizes the number of
>dependencies (especially nasty ones like the Win32 SxS CRT junk).

Static linking definitely seems like the right thing to do.  This is what I
have done with VC 2003 and earlier for previous installs.  However I have
noticed that some programs, such as a WTL 8.0 Win EXE (I avoid MFC) I wrote,
did not work on a lot of XP Pro SP2 machines when I statically linked it.
The dialogs would not load their resource templates and were completely
blank.  However, when I linked the CRT as a DLL, it worked;  I don't know
why.

Also, if the CLR is used in a CA, i.e. a managed function exported as an
unmanaged functions as opposed to the installutil type components, I believe
that you can't use static linking to the CRT and that the CRT has to be
linked in as a DLL.  Mayber CA's using managed code is not such a good
idea.  I know some people are against managed code in CA's, but if you know
that .NET 2.0 is on the box, they can save a lot of time.
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Easy WiX way for a custom action to call multiple utility DLLs?

2007-10-25 Thread Rob Mensching
Aris Green wrote:
>
>
> A question, how do VC 2005 CA's requiring the C++ CRT Dll work on 
> Vista?  Any
> CRT using C++/CLI require a DLL link to the CRT.
>

Statically link.  That's what all the WiX CustomActions do and while it 
makes the DLLs a bit bigger it totally minimizes the number of 
dependencies (especially nasty ones like the Win32 SxS CRT junk).

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Easy WiX way for a custom action to call multiple utility DLLs?

2007-10-25 Thread Aris Green
Try embedding the other DLL as a custom resource using the .rc file.
Extract
the DLL first thing when the CA is called.  Use delayload linker option or
LoadLibrary to call the function in the extracted DLL.  I've done this
before.

A question, how do VC 2005 CA's requiring the C++ CRT Dll work on Vista?
Any
CRT using C++/CLI require a DLL link to the CRT.

 Karim MacDonald <[EMAIL PROTECTED]> wrote:
>
> If my CA in MyCA.dll needs to call a fn in MyUtils.dll then I'm currently
> expecting to have to write a separate pair of CAs that pull MyUtils.dllout
> of the Binary table and then delete it at end-of-setup.
> InstallShield provides just such a handy pair of Custom Actions
> (ISSETUPFILESEXTRACT & co.), and I was wondering if there's any WiX
> equivalent?
>
> tia,
> Karim
> --
> View this message in context:
http://www.nabble.com/Easy-WiX-way-for-a-custom-
action-to-call-multiple-utility-DLLs--tf4683485.html#a13382997
> Sent from the wix-users mailing list archive at Nabble.com.
>
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Easy WiX way for a custom action to call multiple utility DLLs?

2007-10-24 Thread Karim MacDonald

If my CA in MyCA.dll needs to call a fn in MyUtils.dll then I'm currently
expecting to have to write a separate pair of CAs that pull MyUtils.dll out
of the Binary table and then delete it at end-of-setup.
InstallShield provides just such a handy pair of Custom Actions
(ISSETUPFILESEXTRACT & co.), and I was wondering if there's any WiX
equivalent?

tia,
Karim
-- 
View this message in context: 
http://www.nabble.com/Easy-WiX-way-for-a-custom-action-to-call-multiple-utility-DLLs--tf4683485.html#a13382997
Sent from the wix-users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users