[ wix-Bugs-1313258 ] FileSearch returns app.exe with path when Id not specified

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ wix-Bugs-1313258 ] FileSearch returns app.exe with path when Id not specified

SourceForge.net
Bugs item #1313258, was opened at 2005-10-04 15:47
Message generated for change (Comment added) made by twoyroldsayswhy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1313258&group_id=105970

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: candle
Group: v2.0
>Status: Closed
Resolution: None
Priority: 5
Submitted By: TwoYrOldSaysWhy (twoyroldsayswhy)
Assigned to: Derek (derekc)
Summary: FileSearch returns app.exe with path when Id not specified

Initial Comment:
The following would appear to follow the documentation
rules on FileSearch as it relates to not using the Id
in the FileSearch to return the parent directory rather
than the full path to the file.

      <Property Id='INSTALLDIR'>
        <DirectorySearch Id='INSTALLDIR' Depth='999'>
          <FileSearch Name='app.exe' />
        </DirectorySearch>
      </Property>

However ... with or without the Id specified in the
FileSearch the "app.exe" is returned in INSTALLDIR.

----------------------------------------------------------------------

>Comment By: TwoYrOldSaysWhy (twoyroldsayswhy)
Date: 2005-10-11 07:25

Message:
Logged In: YES
user_id=1353902

I have tested the first solution given in the following and
have proven it to work in my scenario when the Depth
attribute of 999 is added to the DirectorySearch elements.

Here is the email from Derek:

This is the only way I could find to author this (note that
WiX does not
allow you to author anything less because anytime a
FileSearch element is
under a property, it always creates an AppSearch row -
that's why I had to
move it out to another fake property).

    <Property Id="MYFOLDER">
      <DirectorySearch Id="AppFile">
          <DirectorySearch Id="AppFolder" />
      </DirectorySearch>
    </Property>

    <Property Id="FAKE">
      <FileSearch Id="AppFile" Name="MyApp.exe"/>
    </Property>

Please note, I thought of the following but then you don't
get a DrLocator
entry unless the FileSearch element is modified to create
DrLocator entries
when a DirectorySearch is nested underneath (or it's
possible to freely
specify a DirectorySearch element with no parent!):
<Property Id="MYFOLDER">
  <FileSearch Id="AppFile" Name="MyApp.exe">
    <DirectorySearch Id="AppFolder" />
  </FileSearch>
</Property>

If this gives you an acceptable result, please close the bug
with the first
above solution.  Unfortunately, I don't think this issue can
be addressed
without the fake property without seriously overhauling the
way AppSearch
works.  If we did that, we'd probably just make you directly
enter in the
tables you want since that appears to be the only way to
cover 100% of the
scenarios with AppSearch's haphazard table relationships.

Derek

----------------------------------------------------------------------

Comment By: TwoYrOldSaysWhy (twoyroldsayswhy)
Date: 2005-10-04 16:20

Message:
Logged In: YES
user_id=1353902

The post as a bug was initiated after reading the wix user
list where the following was posted but nobody ever followed
up by posting a bug (at least that I saw):

From: Rob Mensching <robmen@us...>
RE: How to get file"s parent folder?  
2005-07-10 21:18

 There is likely just a bug in here somewhere.  The
AppSearch stuff is really
 complicated in certain and I don"t think we have it all
worked out yet.
 Feel free to open a bug and someone (maybe you? <smile/>)
will look into it
 and see what is going wrong.

.
.
.
.


----------------------------------------------------------------------

Comment By: Derek (derekc)
Date: 2005-10-04 16:04

Message:
Logged In: YES
user_id=518766

I think this is the correct behavior.

Please try to post issues to the wix-users mailing list
before opening a bug as many issues turn out to be due to
unclear documenation (doc bugs), rather than a problem with
the actual tools.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1313258&group_id=105970


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
WiX-devs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-devs