Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-01

How to call windres with parameters that are shortpath with forward slashes

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

Hi,

I have been doing some research on issue 12645:
http://bugs.freepascal.org/view.php?id=12645

From a discussion in the MinGW bugtracker can be concluded that windres does not and will not support spaces in paths for its parameters in the foreseeable future. So the compiler will have to convert file names and directories passed to windres to short path names (quoting them does not work).

Additionally, forward slashes (/) need to be used as directory separator. Can you give me some guidelines how to write a patch for the compiler?

I guess something needs to be changed in
TWinLikeResourceFile.SetupCompilerArguments. Can I test for windres as rcbin and act accordingly? Or do I need to add two tresinfoflags, for exampe res_needs_short_path, res_needs_unix_dir_separator?

Vincent

Reply by email

Vincent Snijders
to Yury Sidorov: From: "Vincent Snijders" Looks good to me. Yury.
Yury Sidorov wrote 13 lines
From: "Vincent Snijders" > Vincent Snijders schreef: >> Hi, >> >> separator. Can you give me some guidelines how to write a patch for >> the compiler? >> > > Please review the patch attached to > http://bugs.freepascal.org/view.php?id=12645 Looks good to me.

While preparing a back port for the fixes_2_2 branch, (a simple merge is not possible, because other changes to the resource handling in 2.3), I noticed windres failed if the output file did not exist yet. I fixed this in r12549.

A patch for the fixes branch is available at
http://svn.freepascal.org/svn/lazarus/trunk/tools/install/patches/windres-2.2.2.patch

I use this patch currently for the win32 lazarus snapshots, that use fpc 2.2.2 or fpc 2.2.3. Please consider using this patch for the fixes_2_2 branch after a couple of days of testing in the Lazarus snapshots.

Vincent

Reply by email

Marco van de Voort
to Vincent Snijders

In our previous episode, Vincent Snijders said:

Show quoted text 13 lines
> While preparing a back port for the fixes_2_2 branch, (a simple merge is not possible, because other changes to the resource handling in 2.3), I noticed windres failed if the output file did not exist yet. I fixed this in r12549. A patch for the fixes branch is available at http://svn.freepascal.org/svn/lazarus/trunk/tools/install/patches/windres-2.2.2.patch I use this patch currently for the win32 lazarus snapshots, that use fpc 2.2.2 or fpc 2.2.3. Please consider using this patch for the fixes_2_2 branch after a couple of days of testing in the Lazarus snapshots.

When considering stuff, I'd recommend r12372 (path absolute, probably fixes a bunch of very old and very confusing bugs with {$unitpath } in src, and maybe r12306 (unzip unit had a string containing a path still at 80 chars).

Both are at least a month in trunk, and to my knowledge no problems showed up. (the second is almost trivial anyway)

Reply by email