Bläddra i källkod

* fix resource embedding on arm-wince

git-svn-id: trunk@6576 -
florian 18 år sedan
förälder
incheckning
6588b2cb57
2 ändrade filer med 33 tillägg och 13 borttagningar
  1. 13 13
      compiler/ogcoff.pas
  2. 20 0
      compiler/systems/t_win.pas

+ 13 - 13
compiler/ogcoff.pas

@@ -271,6 +271,19 @@ interface
     type
       Treaddllproc = procedure(const dllname,funcname:string) of object;
 
+    const
+{$ifdef i386}
+       COFF_MAGIC       = $14c;
+       COFF_OPT_MAGIC   = $10b;
+{$endif i386}
+{$ifdef arm}
+       COFF_MAGIC       = $1c0;
+       COFF_OPT_MAGIC   = $10b;
+{$endif arm}
+{$ifdef x86_64}
+       COFF_MAGIC       = $8664;
+       COFF_OPT_MAGIC   = $20b;
+{$endif x86_64}
     function ReadDLLImports(const dllname:string;readdllproc:Treaddllproc):boolean;
 
 implementation
@@ -287,19 +300,6 @@ implementation
        ;
 
     const
-{$ifdef i386}
-       COFF_MAGIC       = $14c;
-       COFF_OPT_MAGIC   = $10b;
-{$endif i386}
-{$ifdef arm}
-       COFF_MAGIC       = $1c0;
-       COFF_OPT_MAGIC   = $10b;
-{$endif arm}
-{$ifdef x86_64}
-       COFF_MAGIC       = $8664;
-       COFF_OPT_MAGIC   = $20b;
-{$endif x86_64}
-
        COFF_FLAG_NORELOCS = $0001;
        COFF_FLAG_EXE      = $0002;
        COFF_FLAG_NOLINES  = $0004;

+ 20 - 0
compiler/systems/t_win.pas

@@ -92,6 +92,7 @@ interface
 
 
       TWinResourceFile = class(TResourceFile)
+        procedure PostProcessResourcefile(const s : ansistring);override;
       end;
 
 
@@ -1710,6 +1711,25 @@ implementation
       end;
 
 
+{****************************************************************************
+                            TWinResourceFile
+****************************************************************************}
+
+procedure TWinResourceFile.PostProcessResourcefile(const s : ansistring);
+var
+  f : file;
+  w : word;
+begin
+{$ifdef arm}
+  assign(f,s);
+  reset(f,1);
+  w:=COFF_MAGIC;
+  blockwrite(f,w,2);
+  close(f);
+{$endif arm}
+end;
+
+
 {*****************************************************************************
                                      Initialize
 *****************************************************************************}