Browse Source

* made maybequoted_for_script() public
* added script_fpcres identifier
* always quote file names for fpcres using double quotes, as it doesn't
support single quotes (mantis #26866)

git-svn-id: trunk@28881 -

Jonas Maebe 10 years ago
parent
commit
00ea5e1636
3 changed files with 4 additions and 2 deletions
  1. 1 0
      compiler/cfileutl.pas
  2. 1 1
      compiler/comprsrc.pas
  3. 2 1
      compiler/systems.inc

+ 1 - 0
compiler/cfileutl.pas

@@ -124,6 +124,7 @@ interface
     function  GetShortName(const n:TCmdStr):TCmdStr;
     function  GetShortName(const n:TCmdStr):TCmdStr;
     function maybequoted(const s:string):string;
     function maybequoted(const s:string):string;
     function maybequoted(const s:ansistring):ansistring;
     function maybequoted(const s:ansistring):ansistring;
+    function maybequoted_for_script(const s:ansistring; quote_script: tscripttype):ansistring;
 
 
     procedure InitFileUtils;
     procedure InitFileUtils;
     procedure DoneFileUtils;
     procedure DoneFileUtils;

+ 1 - 1
compiler/comprsrc.pas

@@ -377,7 +377,7 @@ procedure TWinLikeResourceFile.Collect(const fn: ansistring);
 begin
 begin
   if fResScript=nil then
   if fResScript=nil then
     fResScript:=TScript.Create(fScriptName);
     fResScript:=TScript.Create(fScriptName);
-  fResScript.Add(MaybeQuoted(fn));
+  fResScript.Add(maybequoted_for_script(fn,script_fpcres));
   inc(fCollectCount);
   inc(fCollectCount);
 end;
 end;
 
 

+ 2 - 1
compiler/systems.inc

@@ -273,7 +273,8 @@
 
 
        tscripttype = (script_none
        tscripttype = (script_none
             ,script_dos,script_unix,script_amiga,
             ,script_dos,script_unix,script_amiga,
-            script_mpw
+            script_mpw,
+            script_fpcres
        );
        );
 
 
        tabi = (abi_default
        tabi = (abi_default