Sign in Join

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

Mailing lists / fpc-devel / 2009-05

path for *.res file

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Dariusz Mazur

Hi

How to tell compiler where are *.res files.
I've try -Fu, -Fi, -Fo directives in fpc.cfg but always path of main source is used.

Darek

Reply by email

Jonas Maebe
to Dariusz Mazur
Dariusz Mazur wrote
How to tell compiler where are *.res files.

You can't. As you noticed, they are always searched relative to the directory of the main source file (unless the resource file is specified using an absolute path)

Jonas

Reply by email

Vincent Snijders
to Jonas Maebe
Jonas Maebe wrote 8 lines
On 22 May 2009, at 23:00, Dariusz Mazur wrote: > How to tell compiler where are *.res files. You can't. As you noticed, they are always searched relative to the directory of the main source file (unless the resource file is specified using an absolute path)

And that means, it is really impossible to include a *.rc file in a unit and distrubute the *.res file as compiled resource with your compiled unit.

Can't the searching be extended to the unit directory. It would make the file C:\fpc\2.2.4\units\i386-win32\fcl-base\fclel.res really useful, now have to copy it to my program dir to be able to use deamonapp unit.

Vincent

Reply by email

Jonas Maebe
to Vincent Snijders
Vincent Snijders wrote
Can't the searching be extended to the unit directory. It would make the file C:\fpc\2.2.4\units\i386-win32\fcl-base\fclel.res really useful, now have to copy it to my program dir to be able to use deamonapp unit.

WDDD? (What Does Delphi Do) If Delphi also somehow has support for resource search paths (via the unit search path or otherwise), it doesn't make sense to implement a different solution. (since in that case someone will probably file a bug report at some point asking for also supporting it in a Delphi-compatible way).

Jonas

Reply by email

Dariusz Mazur
to Jonas Maebe

Jonas Maebe pisze:

Show quoted text 14 lines
On 23 May 2009, at 11:05, Vincent Snijders wrote: > Can't the searching be extended to the unit directory. It would make > the file C:\fpc\2.2.4\units\i386-win32\fcl-base\fclel.res really > useful, now have to copy it to my program dir to be able to use > deamonapp unit. WDDD? (What Does Delphi Do) If Delphi also somehow has support for resource search paths (via the unit search path or otherwise), it doesn't make sense to implement a different solution. (since in that case someone will probably file a bug report at some point asking for also supporting it in a Delphi-compatible way).

I have all *.res files in one separate directory in Delphi (via search path). Now I try to use *.res in Linux.
Everything goes fine, FPC can handle ordinary *.res, although *.rc has to be compiled by brcc32

Darek

Reply by email

Yury Sidorov
to Vincent Snijders: And that means, it is really impossible to include a *.rc file in a unit and distrubute…

From: "Vincent Snijders"

Show quoted text 13 lines
Jonas Maebe schreef: > > On 22 May 2009, at 23:00, Dariusz Mazur wrote: > >> How to tell compiler where are *.res files. > > You can't. As you noticed, they are always searched relative to the > directory of the main source file (unless the resource file is > specified using an absolute path) And that means, it is really impossible to include a *.rc file in a unit and distrubute the *.res file as compiled resource with your compiled unit.

.rc files are searched relative to the current unit path. .res files are placed into units output folder specified by -FU switch. After that you can distribute compiled units with compiled .res files without sources.

Yury.

Reply by email

Yury Sidorov
to Dariusz Mazur: Jonas Maebe pisze: I have all *.res files in one separate directory in Delphi (via search…

From: "Dariusz Mazur"

Show quoted text 19 lines
Jonas Maebe pisze: > > On 23 May 2009, at 11:05, Vincent Snijders wrote: > >> Can't the searching be extended to the unit directory. It would >> make the file C:\fpc\2.2.4\units\i386-win32\fcl-base\fclel.res >> really useful, now have to copy it to my program dir to be able >> to use deamonapp unit. > > WDDD? (What Does Delphi Do) If Delphi also somehow has support for > resource search paths (via the unit search path or otherwise), it > doesn't make sense to implement a different solution. (since in > that case someone will probably file a bug report at some point > asking for also supporting it in a Delphi-compatible way). > I have all *.res files in one separate directory in Delphi (via search path). Now I try to use *.res in Linux. Everything goes fine, FPC can handle ordinary *.res, although *.rc has to be compiled by brcc32

You can get/build crossbinutils for i386-win32. Then rename i386-win32-windres to windres. After that fpc will compile .rc files for you using that windres.

Yury.

Reply by email