Done.  
http://sourceforge.net/tracker/index.php?func=detail&aid=1934684&group_id=105970&atid=642717

From: Justin Rockwood
Sent: Friday, April 04, 2008 10:38 AM
To: Robert O'Brien; Jason Ginchereau; 'wix-users@lists.sourceforge.net'
Subject: RE: [WiX-users] is there a way to access wixproj macro values from 
within wix sources

Sounds like a nice thing to have. Would you mind logging a feature request 
including the text of your message (you explained it very well)? You can do it 
here:
http://sourceforge.net/tracker/?group_id=105970&atid=642717

Thanks,
Justin

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert O'Brien
Sent: Friday, April 04, 2008 8:55 AM
To: Jason Ginchereau; 'wix-users@lists.sourceforge.net'
Subject: Re: [WiX-users] is there a way to access wixproj macro values from 
within wix sources

Having access to the Wix project project-related variables would be very 
helpful.    The way we setup our sources is that we have every .csproj use the 
following project settings, and hopefully now .wixproj given msbuild support in 
the 3.0 work.

<Project ToolsVersion="3.5" DefaultTargets="Build" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
  <Import Condition="'$(OpeningProjectSettings)' == ''" 
Project="..\BuildSupportFiles\anyCpu\OpeningProjectSettings.targets" />
  .
  .
  .
  <Import Condition="'$(ClosingProjectSettings)' == ''" 
Project="..\BuildSupportFiles\anyCpu\ClosingProjectSettings.targets" />
</Project>

The thing we do in OpeningProjectSettings is Set the $(OutputPath) property 
setting for all projects so that dll, exe, msi, other output all gets placed in 
same folder it will get placed in when we setup tfs automated execution of per 
checkin and daily build msbuild .proj files.    The great thing about tfs 
automated execution of per checkin and daily build msbuild .proj files is that 
it automatically sets OutDir to the <build setup enlistment 
root>/Binaries/$(Configuration).     This makes authoring wix30 msi sources 
nice because if we could access wix project related variables we could then set 
the Source attribute for all File entries to use Source="$(var.OurDir)" and not 
have to worry about baking source tree build output hierarchy knowledge into 
our wix sources.   For the cases where the wix project itself has source files 
that need to be referenced, e.g. ReadMe.txt and Other stuff not coming for 
other solution build output, I'd want to be able to use 
Source="$(var.ProjectDir)..." references.

From: Jason Ginchereau
Sent: Friday, April 04, 2008 8:31 AM
To: Robert O'Brien; 'wix-users@lists.sourceforge.net'
Subject: RE: [WiX-users] is there a way to access wixproj macro values from 
within wix sources

The project-related variables are only generated for project references. You 
don't get project variables for the WiX project itself. (Hmm... would that be a 
nice feature to have?) So you need to add a reference from your WiX project to 
another application project to get variables for that project. And as the 
documentation says, you need to include the project name in the variable, for 
example: $(var.MyAppProject.TargetPath)

If you examine at the Output window of VS when you build, you can see all the 
available project/solution variables where they are passed on the command-line 
to candle.exe.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert O'Brien
Sent: Friday, April 04, 2008 8:13 AM
To: 'wix-users@lists.sourceforge.net'
Subject: Re: [WiX-users] is there a way to access wixproj macro values from 
within wix sources

I removed the <DefineSolutionProperties>false</DefineSolutionProperties> 
<PropertyGroup> setting from my wixproj file which I had added earlier to 
address the following warning
  "(default target) (1) ->(AddSolutionDefineConstants target) ->  C:\Program 
Files (x86)\MSBuild\Microsoft\WiX\v3.0\Wix.targets : warning : Solution 
properties are only available during
    IDE builds or when building the solution file from the command line. To 
turn off this warning set 
<DefineSolutionProperties>false</DefineSolutionProperties> in your .wixproj 
file."
that was getting generated when I built from the command line using
  "msbuild myservicedeliverable.wixproj"

After making that change I can now leverage $(var.Solution*) macros, e.g. 
Source="$(var.SolutionDir)..." but get still get the compiler error mentioned 
earlier if I try and use wix project macros such as $(var.ProjectDir), 
$(var.OutputPath), $(var.OutDir) and $(var.TargetPath).   So are these ones 
basically n/a but if I reference a non-wix project like a csproj generated dll 
then I should expect that 
$(var.<ReferencedProjectName>.<StandardIssueProjectMacro>) variable references 
will work?

From: Robert O'Brien
Sent: Friday, April 04, 2008 7:41 AM
To: 'wix-users@lists.sourceforge.net'
Subject: RE: is there a way to access wixproj macro values from within wix 
sources

Tried using $(var.ProjectDir) in a File Source attribute field and got a 
"Undefined preprocessor variable '$(var.ProjectDir)'." compiler error.

Tried using the "List of Supported Project References" documented 
$(var.SolutionDir) variable which the documentation suggests is supported and 
got the same compiler error, i.e. "Undefined preprocessor variable 
'$(var.SolutionDir)'." for the following line
<File Id="InstalledUninstallShortcut.txt" Name="InstalledUninstallShortcut.txt" 
DiskId="1" Source="$(var.SolutionDir)Setup\Resources\InstalledComponent.txt" 
KeyPath="yes" />

Have I misinterpreted the "List of Supported Project References" documentation?

From: Robert O'Brien
Sent: Friday, April 04, 2008 6:29 AM
To: 'wix-users@lists.sourceforge.net'
Subject: RE: is there a way to access wixproj macro values from within wix 
sources

. . . according to help doc section entitled "List of Supported Project 
References" it would suggests that using $(var.<SolutionOrProjectMacroName>) 
works for a set of $(Solution*) macro values.

Should one expect using this method to reference in wix soures other standard 
issue project macros not specifically mentioned in that help document to work 
as well, e.g. $(var.Configuration), $(var.OutputPath), $(var.OutDir) and 
$(var.TargetPath)?

From: Robert O'Brien
Sent: Friday, April 04, 2008 5:14 AM
To: 'wix-users@lists.sourceforge.net'
Subject: is there a way to access wixproj macro values from within wix sources

is there a way to access .wixproj macro values from within wix sources?   For 
example in csproj and wixproj settings, such as pre and post build events, one 
can make use of useful project related macro values such as $(Configuration), 
$(SolutionDir), $(ProjectDir), $(OutputPath), $(OutDir), $(TargetDir), 
$(TargetPath).

Is there a way to access these project related macro values at compile time 
within my wix source files?
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to