Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-12 Thread dB .
This isn't quite as magical as it sounds. I think your problem is that you 
think that you're REbuilding the extension, while it does some kind of 
incremental build. I've seen this happen a lot, but was never able to track the 
root cause. 

PS: you have a lot more source code in http://msiext.codeplex.com. We welcome 
contributors.

dB. @ dblock.org 
Moscow|Geneva|Seattle|New York



-Original Message-
From: Nick Ramirez [mailto:nickra...@hotmail.com] 
Sent: Thursday, July 08, 2010 5:45 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Compiler extension - how to include a custom action?


Oookay. So, now it's one of those situations where it didn't work and
magically...it does! What did I do? I messed around with flags for lit.exe,
removed them, changed things back to what they were orginally...rebuilt
everything and it worked. So, same code, different result. I'm not sure. I
think I'll try everything from scratch with a new solution and see what
happens. Thanks for the help!
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-extension-how-to-include-a-custom-action-tp5271086p5272081.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-12 Thread Rob Mensching
There is also http://wixcontrib.codeplex.com that has a couple small
extensions. Contributions are welcome there as well.

On Mon, Jul 12, 2010 at 3:33 AM, dB. dbl...@dblock.org wrote:

 This isn't quite as magical as it sounds. I think your problem is that you
 think that you're REbuilding the extension, while it does some kind of
 incremental build. I've seen this happen a lot, but was never able to track
 the root cause.

 PS: you have a lot more source code in http://msiext.codeplex.com. We
 welcome contributors.

 dB. @ dblock.org
 Moscow|Geneva|Seattle|New York



 -Original Message-
 From: Nick Ramirez [mailto:nickra...@hotmail.com]
 Sent: Thursday, July 08, 2010 5:45 PM
 To: wix-users@lists.sourceforge.net
 Subject: Re: [WiX-users] Compiler extension - how to include a custom
 action?


 Oookay. So, now it's one of those situations where it didn't work and
 magically...it does! What did I do? I messed around with flags for lit.exe,
 removed them, changed things back to what they were orginally...rebuilt
 everything and it worked. So, same code, different result. I'm not sure. I
 think I'll try everything from scratch with a new solution and see what
 happens. Thanks for the help!
 --
 View this message in context:
 http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-extension-how-to-include-a-custom-action-tp5271086p5272081.html
 Sent from the wix-users mailing list archive at Nabble.com.


 --
 This SF.net email is sponsored by Sprint
 What will you do first with EVO, the first 4G phone?
 Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
 ___
 WiX-users mailing list
 WiX-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wix-users


 --
 This SF.net email is sponsored by Sprint
 What will you do first with EVO, the first 4G phone?
 Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
 ___
 WiX-users mailing list
 WiX-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wix-users




-- 
virtually, Rob Mensching - http://RobMensching.com LLC
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-12 Thread Nick Ramirez

Thanks Rob. I'd love to contribute. Where do you need more eyes? 

As for the compiler extension, I'm back to where I was. I haven't been able
to get Candle to recognize the embedded wixlib in my compiler extension.
Experimenting with several ideas, I've added the Link element to my build
script, thinking that might be it, but it didn't solve the problem. I have
this in my extension's csproj file now:

ItemGroup
   EmbeddedResource Include=..\Output\CustomExtensionLibrary.wixlib
  LinkLibrary\CustomExtensionLibrary.wixlib/Link
   /EmbeddedResource
/ItemGroup

If I use Reflector on my built assembly, I see that the wixlib, xsd and xml
file are embedded. I used the -bf flag on the wixlib so that it binds the
data into it. It's so strange. When I use my extension, the custom table is
added to the MSI, but nothing from the wixlib (CustomAction table, Binary
table).

I wonder if there's something I'm missing in the csproj file for the
extension? I see that the examples use WixBuild.Common.targets. Do I need
to import this too and add extra MSBuild elements? 

I'm still not quite sure how to debug Candle. Does anyone have experience
doing it?

I'm using WiX 3.0 in Visual Studio 2008. Thanks for the help everyone.
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-extension-how-to-include-a-custom-action-tp5271086p5285053.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-12 Thread Nick Ramirez

I've got an update. I've gotten my wixlib to show up in my MSI! The trick,
for me, was to add a Property to the Fragment in the wixlib I was embedding
and then use a PropertyRef to pull it in in my installer project. Pulling
that in pulled in all the other stuff (including custom actions) from the
wixlib (since it was all in the same fragment). 

Is this normal? GetLibrary doesn't do it alone? You have to use a reference
element too?
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-extension-how-to-include-a-custom-action-tp5271086p5285151.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-12 Thread Blair
When you add rows to your table, do you make a reference to one of the items
in your wixlib? That is usually needed to cause the appropriate fragments to
be included when your schema is translated into table entries.

The usual way is in your C# code use the CreateWixSimpleReferenceRow()
method on the Core property of your CompilerExtension's base object. Most of
us use the name of our CustomAction.

-Original Message-
From: Nick Ramirez [mailto:nickra...@hotmail.com] 
Sent: Monday, July 12, 2010 2:47 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Compiler extension - how to include a custom
action?


Thanks Rob. I'd love to contribute. Where do you need more eyes? 

As for the compiler extension, I'm back to where I was. I haven't been able
to get Candle to recognize the embedded wixlib in my compiler extension.
Experimenting with several ideas, I've added the Link element to my build
script, thinking that might be it, but it didn't solve the problem. I have
this in my extension's csproj file now:

ItemGroup
   EmbeddedResource Include=..\Output\CustomExtensionLibrary.wixlib
  LinkLibrary\CustomExtensionLibrary.wixlib/Link
   /EmbeddedResource
/ItemGroup

If I use Reflector on my built assembly, I see that the wixlib, xsd and xml
file are embedded. I used the -bf flag on the wixlib so that it binds the
data into it. It's so strange. When I use my extension, the custom table is
added to the MSI, but nothing from the wixlib (CustomAction table, Binary
table).

I wonder if there's something I'm missing in the csproj file for the
extension? I see that the examples use WixBuild.Common.targets. Do I need
to import this too and add extra MSBuild elements? 

I'm still not quite sure how to debug Candle. Does anyone have experience
doing it?

I'm using WiX 3.0 in Visual Studio 2008. Thanks for the help everyone.
-- 
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-exten
sion-how-to-include-a-custom-action-tp5271086p5285053.html
Sent from the wix-users mailing list archive at Nabble.com.


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-12 Thread Blair
GetLibrary simply adds the library to the other compiled wix code that light
uses to link. There has to be some reference from somewhere for light to not
throw out the fragment as unreferenced. That is the reason most compiler
extensions use CreateWixSimpleReferenceRow to create references to
appropriate things in the embedded library's Fragments.

-Original Message-
From: Nick Ramirez [mailto:nickra...@hotmail.com] 
Sent: Monday, July 12, 2010 3:21 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Compiler extension - how to include a custom
action?


I've got an update. I've gotten my wixlib to show up in my MSI! The trick,
for me, was to add a Property to the Fragment in the wixlib I was embedding
and then use a PropertyRef to pull it in in my installer project. Pulling
that in pulled in all the other stuff (including custom actions) from the
wixlib (since it was all in the same fragment). 

Is this normal? GetLibrary doesn't do it alone? You have to use a reference
element too?
-- 
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-exten
sion-how-to-include-a-custom-action-tp5271086p5285151.html
Sent from the wix-users mailing list archive at Nabble.com.


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-12 Thread Nick Ramirez

Ah, fantastic. That sounds like a much more elegant solution that using a
PropertyRef. Thanks Blair. So, it looks like this method is referencing a
table and row that would be created with the wixlib. Like this from the Util
extension.

core.CreateWixSimpleReferenceRow(sourceLineNumbers, CustomAction,
WixSchedInternetShortcuts);

I'll try that out. Thanks for the tip!
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-extension-how-to-include-a-custom-action-tp5271086p5285857.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-10 Thread Bob Arnson
On 7/8/2010 5:00 PM, Nick Ramirez wrote:
 At the risk of sounding completely clueless, how does one debug an extension
 project? It seems that the GetLibrary function's parameters are populated by
 Candle. Do I debug Candle somehow?

Sure. Set a breakpoint in your extension's methods and run Candle under 
a debugger. Or use ILDasm or Reflector to verify things like resource names.

-- 
sig://boB
http://joyofsetup.com/


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-08 Thread Nick Ramirez

Oops. Sorry. I posted the wrong part of the code. Here's the part that I use
to register the .wixlib:


public override Library GetLibrary(TableDefinitionCollection
tableDefinitions)
{
   if (this.library == null)
   {
  this.library = LoadLibraryHelper(
 Assembly.GetExecutingAssembly(), 
 SuperWixExtension.SuperWixExtensionLibrary.wixlib, 
 tableDefinitions);
   }

   return this.library;
}

Thank,
Nick
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-extension-how-to-include-a-custom-action-tp5271086p5271098.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-08 Thread Neil Sleightholm
No an answer but have you seen this: http://wixcontrib.codeplex.com/, it
taught me quite a lot about writing an extension.

Neil

-Original Message-
From: Nick Ramirez [mailto:nickra...@hotmail.com] 
Sent: 08 July 2010 18:13
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Compiler extension - how to include a custom
action?


Oops. Sorry. I posted the wrong part of the code. Here's the part that I
use
to register the .wixlib:


public override Library GetLibrary(TableDefinitionCollection
tableDefinitions)
{
   if (this.library == null)
   {
  this.library = LoadLibraryHelper(
 Assembly.GetExecutingAssembly(), 
 SuperWixExtension.SuperWixExtensionLibrary.wixlib, 
 tableDefinitions);
   }

   return this.library;
}

Thank,
Nick
-- 
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-e
xtension-how-to-include-a-custom-action-tp5271086p5271098.html
Sent from the wix-users mailing list archive at Nabble.com.


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-08 Thread Blair
Did you run the extension in the debugger and verify that it was really
returning an object (and not null)?

-Original Message-
From: Nick Ramirez [mailto:nickra...@hotmail.com] 
Sent: Thursday, July 08, 2010 10:13 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Compiler extension - how to include a custom
action?


Oops. Sorry. I posted the wrong part of the code. Here's the part that I use
to register the .wixlib:


public override Library GetLibrary(TableDefinitionCollection
tableDefinitions)
{
   if (this.library == null)
   {
  this.library = LoadLibraryHelper(
 Assembly.GetExecutingAssembly(), 
 SuperWixExtension.SuperWixExtensionLibrary.wixlib, 
 tableDefinitions);
   }

   return this.library;
}

Thank,
Nick
-- 
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-exten
sion-how-to-include-a-custom-action-tp5271086p5271098.html
Sent from the wix-users mailing list archive at Nabble.com.


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-08 Thread Nick Ramirez

Thanks Blair and Neil for the help. I looked at the extension you gave a link
to, Neil, but I'm not able to see anything that they have that I don't. I'm
sure there's a piece to the puzzle I'm missing.

At the risk of sounding completely clueless, how does one debug an extension
project? It seems that the GetLibrary function's parameters are populated by
Candle. Do I debug Candle somehow? And then how do I get it to use my
extension outside of an installer project?

Thanks!
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-extension-how-to-include-a-custom-action-tp5271086p5271955.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-08 Thread Neil Sleightholm
Where is your wixlib located? Is it in the root of your project? 

I my extension the wixlib is in a Data folder, so the full path is
MyNamespace.Data.Filename.wixlib.

From your I would expect your namespace to be SuperWixExtension and
the filename SuperWixExtensionLibrary.wixlib located in the root of
your project.

Hope this helps.

Neil

-Original Message-
From: Nick Ramirez [mailto:nickra...@hotmail.com] 
Sent: 08 July 2010 18:13
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Compiler extension - how to include a custom
action?


Oops. Sorry. I posted the wrong part of the code. Here's the part that I
use
to register the .wixlib:


public override Library GetLibrary(TableDefinitionCollection
tableDefinitions)
{
   if (this.library == null)
   {
  this.library = LoadLibraryHelper(
 Assembly.GetExecutingAssembly(), 
 SuperWixExtension.SuperWixExtensionLibrary.wixlib, 
 tableDefinitions);
   }

   return this.library;
}

Thank,
Nick
-- 
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-e
xtension-how-to-include-a-custom-action-tp5271086p5271098.html
Sent from the wix-users mailing list archive at Nabble.com.


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Compiler extension - how to include a custom action?

2010-07-08 Thread Nick Ramirez

Oookay. So, now it's one of those situations where it didn't work and
magically...it does! What did I do? I messed around with flags for lit.exe,
removed them, changed things back to what they were orginally...rebuilt
everything and it worked. So, same code, different result. I'm not sure. I
think I'll try everything from scratch with a new solution and see what
happens. Thanks for the help!
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Compiler-extension-how-to-include-a-custom-action-tp5271086p5272081.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users