Compiled resource file search path

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiled resource file search path

denisgolovan
Hi

Could anybody give a hint on which fpc option to use to force compiler search .res files in some directory?
I've added -vt switch and it shows that the only file name being searched is in the same directory of referring unit.

It looks like search paths for res files are not implemented at all.
Am I correct? If yes, could it be fixed?  

 --
Regards,
Denis Golovan
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiled resource file search path

leledumbo
Administrator
You can use full/relative path for resources: {$R /path/to/resource/file} or {$R ../relative/resource/file}
Reply | Threaded
Open this post in threaded view
|

Re: Compiled resource file search path

Reinier Olislagers
On 11/01/2014 06:13, leledumbo wrote:
> You can use full/relative path for resources: {$R /path/to/resource/file} or
> {$R ../relative/resource/file}
>

Note however the bug for gorc (used in Win64) .rc files if the .rc file
is not in the project directory:
http://bugs.freepascal.org/view.php?id=24483


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiled resource file search path

denisgolovan
In reply to this post by denisgolovan
Hi

Fortunately I don't use Windows when doing development for Windows :)
Cross-compiling under Linux is way better.

BR,
Denis
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiled resource file search path

denisgolovan
In reply to this post by denisgolovan
> You can use full/relative path for resources: {$R /path/to/resource/file} or
> {$R ../relative/resource/file}

Yes. I can.
The problem is that my .res files are not always in the same directory.
My build scripts use separate dirs for every arch-os-debug combination.

Now the question to the compiler developers - will you accept my patch if I make .res to be searched in unit output directory (-FU)?

 --
Regards,
Denis Golovan
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiled resource file search path

Paul Ishenin
11.01.2014 18:27, denisgolovan wrote:
> Now the question to the compiler developers - will you accept my patch
> if I make .res to be searched in unit output directory (-FU)?

Add a separate -F{Some character} switch for resource search.

Best regards,
Paul Ishenin
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal