Forum > General

Adding custom .rc-file

(1/3) > >>

Jungle:
I try adding custom rc file to my project by specifying

--- 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 'd:\data.rc' 'd:\data.res'}
When I compile, I get a message ''Compiling resource d:\data.rc" which stays forever and nothing happens. What could be the reason? Is there more verbose log?

Lazarus 2.2.2, Win 11

KodeZwerg:

--- Quote from: Jungle on February 04, 2023, 04:59:20 pm ---I try adding custom rc file to my project by specifying

--- 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 'd:\data.rc' 'd:\data.res'}
When I compile, I get a message ''Compiling resource d:\data.rc" which stays forever and nothing happens. What could be the reason? Is there more verbose log?

Lazarus 2.2.2, Win 11

--- End quote ---
Syntax should .rc or .res, but not both.

KodeZwerg:
Like described on a wiki page (sorry, i did not found on official docu)

--- Quote ---{$R filename.rc} to compile a resource script and include the resulting resource file or
{$R filename.res} directive to include a compiled resource file
--- End quote ---

TRon:
Since this is posted in a Lazarus related sub-forum: unless you have special needs to compile the resource manually you can simply add the resource to your project. There is functionality in place that let's you access the resource.

Jungle:

--- Quote from: KodeZwerg on February 04, 2023, 05:08:10 pm ---Syntax should .rc or .res, but not both.
--- End quote ---

{$R 'd:\data.rc'} Doesn't work too. The same behaviour

Navigation

[0] Message Index

[#] Next page

Go to full version