Sign in Join

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

Mailing lists / lazarus / 2010-07

Resources on Windows

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Alexander Klenin

Please somebody look at http://bugs.freepascal.org/view.php?id=17054 I have verified that the patch applies and demos are still compilable after it (they compiled for me before the patch because I had the .rc files).

However, my question is -- is this yet another incompatible change made without any warning? Or did I miss it?

Alexander S. Klenin

Reply by email

Paul Ishenin
to Alexander Klenin
Alexander Klenin wrote
However, my question is -- is this yet another incompatible change made without any warning? Or did I miss it?

I wrote about this change here:
http://lazarus-dev.blogspot.com/2010/02/work-on-0930-changes-in-resource.html

The problem is that previosly we added to the project unit the next string (if resources were used):

{$IFDEF WINDOWS}{$R projectname.rc}{$ENDIF}
Now we add the next string instead:
{$R *.res}

We can add the code to IDE to replace old resource directive with the new one but what to do if developer added it by intention?

Best regards,
Paul Ishenin.

Reply by email

Alexander Klenin
to Paul Ishenin
Paul Ishenin wrote 7 lines
29.07.2010 8:08, Alexander Klenin wrote: > > However, my question is -- is this yet another incompatible change > made without any warning? Or did I miss it? I wrote about this change here: http://lazarus-dev.blogspot.com/2010/02/work-on-0930-changes-in-resource.html

Hm, I admit that it is even written in bold red text. Still, I missed that. I remember that .lrs removal was rather well executed -- you have even specifically asked me to convert TAChart.
But this issue was much more "sneaky".

Show quoted text 7 lines
The problem is that previosly we added to the project unit the next string (if resources were used): {$IFDEF WINDOWS}{$R projectname.rc}{$ENDIF} Now we add the next string instead: {$R *.res}

Hm, so should I take the patch from the bug report as is (it just deletes $IFDEF line), or should I add $R line instead? I have just verified that all projects compile fine without $R -- is it really needed?

We can add the code to IDE to replace old resource directive with the new one but what to do if developer added it by intention?

IDE is already capable of messing up developer's changes to .lpr file, so I do not think adding one more case will make it any worse. Of course, the optimal plan would be to add specific diagnostics for this error, and let developer fix it himself.

Alexander S. Klenin

Reply by email

Paul Ishenin
to Alexander Klenin
Alexander Klenin wrote
Hm, so should I take the patch from the bug report as is (it just deletes $IFDEF line), or should I add $R line instead? I have just verified that all projects compile fine without $R -- is it really needed?

Just open the project in the IDE, go to project options and press OK. This action create you a res file and add a new $R directive. Then remove the old $R directive and save the project.

Remove the old rc and manifest files if they are present and add a new res file instead. Then commit.

Best regards,
Paul Ishenin.

Reply by email

Alexander Klenin
to Paul Ishenin
Paul Ishenin wrote 10 lines
29.07.2010 17:35, Alexander Klenin wrote: > Hm, so should I take the patch from the bug report as is > (it just deletes $IFDEF line), or should I add $R line instead? > I have just verified that all projects compile fine without $R -- > is it really needed? Just open the project in the IDE, go to project options and press OK. This action create you a res file and add a new $R directive. Then remove the old $R directive and save the project.

No, Project Options -> OK did not change .lpr file in any way. .res file did not appear either.

Remove the old rc and manifest files if they are present and add a new res file instead. Then commit.

You mean .res should be undef version control?
Even though it is generated automatically?

Alexander S. Klenin

Reply by email

Paul Ishenin
to Alexander Klenin
Alexander Klenin wrote
No, Project Options -> OK did not change .lpr file in any way. .res file did not appear either.

This means that you have no resources: no manifest, no icon, no version information.

Show quoted text 5 lines
> Remove the old rc and manifest files if they are present and add a new res > file instead. Then commit. You mean .res should be undef version control? Even though it is generated automatically?

It is generated automatically only by IDE, not by the compiler.

Best regards,
Paul Ishenin.

Reply by email