Bug 323259 (MONO80571) - [PATCH] resgen support for /usesourcepath (2.0)
Summary: [PATCH] resgen support for /usesourcepath (2.0)
Status: RESOLVED FIXED
Alias: MONO80571
Product: Mono: Tools
Classification: Mono
Component: tools (show other bugs)
Version: 1.1
Hardware: Other Linux
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Gert Driesen
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-21 20:53 UTC by Gert Driesen
Modified: 2007-09-15 21:24 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Fix (8.54 KB, patch)
2007-02-04 19:49 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:23:43 UTC


---- Reported by gert.driesen@pandora.be 2007-01-21 13:53:49 MST ----

Mono's resgen2 does not support the /usesourcepath option. This option is 
used in combination with ResXFileRef entries in a .ResX file to indicate 
the relative paths to external resources should be resolved relative to 
the directory of the input file.

For this to work, both resgen and System.Windows.Forms.ResXResourceReader 
must be changed. I'll submit a patch for this shortly.



---- Additional Comments From gert.driesen@pandora.be 2007-01-21 15:08:15 MST ----

I'm working on this one. It involves changes to ResXFileRef, 
ResXResourceReader and resgen itself.



---- Additional Comments From gert.driesen@pandora.be 2007-02-04 12:49:47 MST ----

Created an attachment (id=171317)
Fix




---- Additional Comments From frederik.carlier@ugent.be 2007-02-05 15:48:45 MST ----

I tested this fix, it works for me.



---- Additional Comments From frederik.carlier@ugent.be 2007-02-06 07:20:24 MST ----

Gert,

I think there is a problem with this patch. In line 234 you call 
  parts [0] = Path.Combine (BasePath, parts [0]);
however, this doesn't deal with relative paths correctly (if escaped
to the parent directory)
You should add an extra line, like this:
  parts [0] = Path.GetFullPath (parts [0]);
But, this is currently broken on Mono. See https://bugzilla.novell.com/show_bug.cgi?id=MONO80737 for more on that.



---- Additional Comments From frederik.carlier@ugent.be 2007-02-06 10:30:06 MST ----

Never mind that, MONO_IOMAP=all takes care of that. 



---- Additional Comments From gert.driesen@pandora.be 2007-02-16 16:43:44 MST ----

Fixed in svn (revision 73041).

Imported an attachment (id=171317)