Forum > General
Adding custom .rc-file
KodeZwerg:
When I remember correct .rc must be inside project folder, so in source add it without 'path'.
But do like TRon told, use the IDE.
Menu Project -> Project Options -> Resources -> +ADD
Jungle:
--- Quote from: KodeZwerg on February 04, 2023, 05:54:33 pm ---But do like TRon told, use the IDE.
Menu Project -> Project Options -> Resources -> +ADD
--- End quote ---
And what if I want to share some resource file between different projects? So a file could be in a fixed location, and there wouldn't be a need to synchronize changes or make links.
KodeZwerg:
Compile it to .res outside of Lazarus and add inside of Lazarus
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$R 'c:\Your\Shared\Resources.res'}
//edit:
Take care that you NOT include in that shared resource something like "MainIcon" (!)
It really must be unique (!)
Jungle:
--- Quote from: KodeZwerg on February 04, 2023, 06:59:28 pm ---Compile it to .res outside of Lazarus and add inside of Lazarus
--- End quote ---
It means that I (or someone else) will have to remember to add pre-compile actions to a project or build *.res after each resource change.
Btw,
1. Why is path respected for *.res, but not for *.rc ?
2. Why is there no error, no timeout, just endless "Compiling" process ?
KodeZwerg:
Idk what kind of resources you/your team need to share, in belonging of linking something into an executable file, what you said is true.
After a change of the .rc file, you need to compile it, after that you need to compile all affected projects.
The better strategy for such is to use .dll, that you can compile within Lazarus and just need to tell your executable project from where to load it, so every app is automagical up-to-date.
Does it make sense to you?
Navigation
[0] Message Index
[#] Next page
[*] Previous page