mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-09 21:49:18 +02:00
+ add option -FF to force the use of fpcres as RC compiler
Note: if we merge this to 3.2.x then we can switch to this by default once 3.2.2 is released git-svn-id: trunk@46398 -
This commit is contained in:
parent
f1b9989bdd
commit
b88d12c7b9
@ -78,13 +78,14 @@ procedure CollectResourceFiles;
|
||||
Var
|
||||
ResCompiler : String;
|
||||
RCCompiler : String;
|
||||
RCForceFPCRes : Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SysUtils,
|
||||
cutils,cfileutl,cclasses,
|
||||
Globtype,Globals,Verbose,Fmodule, comphook,cpuinfo;
|
||||
Globtype,Globals,Verbose,Fmodule, comphook,cpuinfo,rescmn;
|
||||
|
||||
{****************************************************************************
|
||||
TRESOURCEFILE
|
||||
@ -126,7 +127,10 @@ var
|
||||
begin
|
||||
if output=roRES then
|
||||
begin
|
||||
s:=target_res.rccmd;
|
||||
if RCForceFPCRes then
|
||||
s:=FPCResRCArgs
|
||||
else
|
||||
s:=target_res.rccmd;
|
||||
Replace(s,'$RES',maybequoted(OutName));
|
||||
Replace(s,'$RC',maybequoted(fname));
|
||||
ObjUsed:=False;
|
||||
@ -162,7 +166,10 @@ var
|
||||
begin
|
||||
Result:=true;
|
||||
if output=roRES then
|
||||
Bin:=SelectBin(RCCompiler,target_res.rcbin)
|
||||
if RCForceFPCRes then
|
||||
Bin:=SelectBin(RCCompiler,FPCResUtil)
|
||||
else
|
||||
Bin:=SelectBin(RCCompiler,target_res.rcbin)
|
||||
else
|
||||
Bin:=SelectBin(ResCompiler,target_res.resbin);
|
||||
if bin='' then
|
||||
@ -265,8 +272,11 @@ begin
|
||||
srcfilepath:=ExtractFilePath(current_module.mainsource);
|
||||
if output=roRES then
|
||||
begin
|
||||
s:=target_res.rccmd;
|
||||
if target_res.rcbin = 'windres' then
|
||||
if RCForceFPCRes then
|
||||
s:=FPCResRCArgs
|
||||
else
|
||||
s:=target_res.rccmd;
|
||||
if (target_res.rcbin = 'windres') and not RCForceFPCRes then
|
||||
Replace(s,'$RC',WindresFileName(fname))
|
||||
else
|
||||
Replace(s,'$RC',maybequoted(fname));
|
||||
@ -317,7 +327,7 @@ begin
|
||||
if respath='' then
|
||||
respath:='.';
|
||||
Replace(s,'$INC',maybequoted(respath));
|
||||
if (output=roRes) and (target_res.rcbin='windres') then
|
||||
if (output=roRes) and (target_res.rcbin='windres') and not RCForceFPCRes then
|
||||
begin
|
||||
{ try to find a preprocessor }
|
||||
preprocessorbin := respath+'cpp'+source_info.exeext;
|
||||
|
@ -1700,6 +1700,8 @@ begin
|
||||
frameworksearchpath.AddPath(More,true)
|
||||
else
|
||||
IllegalPara(opt);
|
||||
'F' :
|
||||
RCForceFPCRes:=true;
|
||||
'i' :
|
||||
begin
|
||||
if ispara then
|
||||
|
@ -65,6 +65,9 @@ uses
|
||||
resflags : [res_external_file];
|
||||
);
|
||||
|
||||
FPCResRCArgs = '--include $INC -of res -D FPC -o $RES $RC';
|
||||
FPCResUtil = 'fpcres';
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user