From ba081ab36f8e4c76d2abb8687fb946b8fd389f56 Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 21 Apr 2008 11:13:13 +0000 Subject: [PATCH] * Improved finding of resource compiler during cross-compilation. git-svn-id: trunk@10745 - --- compiler/comprsrc.pas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compiler/comprsrc.pas b/compiler/comprsrc.pas index 4838881f6c..8eacf96ada 100644 --- a/compiler/comprsrc.pas +++ b/compiler/comprsrc.pas @@ -165,12 +165,18 @@ begin if utilsdirectory<>'' then resfound:=FindFile(utilsprefix+bin+source_info.exeext,utilsdirectory,false,resbin); if not resfound then - resfound:=FindExe(utilsprefix+bin,false,resbin); + begin + resfound:=FindExe(utilsprefix+bin,false,resbin); + if not resfound and (utilsprefix<>'') and ( (output=roRES) or (Pos('$ARCH', target_res.rescmd)<>0) ) then + { Search for resource compiler without utilsprefix, if RC->RES compiler is called } + { or RES->OBJ compiler supports different architectures. } + resfound:=FindExe(bin,false,resbin); + end; { get also the path to be searched for the windres.h } respath:=ExtractFilePath(resbin); if (not resfound) and not(cs_link_nolink in current_settings.globalswitches) then begin - Message1(exec_e_res_not_found, bin); + Message1(exec_e_res_not_found, utilsprefix+bin+source_info.exeext); current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink]; Result:=false; end;