Bladeren bron

Small improvement to symbian build tool

git-svn-id: trunk@9326 -
sekelsenmat 17 jaren geleden
bovenliggende
commit
b1f8d613f8
4 gewijzigde bestanden met toevoegingen van 28 en 7 verwijderingen
  1. 19 4
      utils/mksymbian/compiler.pas
  2. 4 1
      utils/mksymbian/constants.pas
  3. 1 1
      utils/mksymbian/mksymbian.lpi
  4. 4 1
      utils/mksymbian/projectparser.pas

+ 19 - 4
utils/mksymbian/compiler.pas

@@ -173,9 +173,23 @@ begin
   { Compiling the source files }
 
   WriteLn('');
-  WriteLn('Compiling the source files');
+  WriteLn('Compiling file ' + vProject.MainSource);
   WriteLn('');
 
+  AProcess.CommandLine := vProject.CompilerPath + ' -a -s -Fu' + vProject.RTLUnitsDir +
+    ' -Tsymbian ' + vProject.MainSource;
+  WriteLn(AProcess.CommandLine);
+  AProcess.Execute;
+
+  WriteLn('');
+  WriteLn('Assembling file '+ vProject.MainSourceAsm);
+  WriteLn('');
+
+  AProcess.CommandLine := vProject.AssemblerPath + ' ' +
+   vProject.MainSourceAsm + ' -o ' + vProject.MainSourceObj;
+  WriteLn(AProcess.CommandLine);
+  AProcess.Execute;
+
   { Linking and library creation }
   
   WriteLn('');
@@ -299,15 +313,16 @@ begin
   WriteLn('');
 
   AProcess.CommandLine := vProject.CompilerPath + ' -a -s -Fu' + vProject.RTLUnitsDir +
-    ' -Tsymbian QPasHello.pas';
+    ' -Tsymbian ' + vProject.MainSource;
   WriteLn(AProcess.CommandLine);
   AProcess.Execute;
 
   WriteLn('');
-  WriteLn('Assembling file QPasHello.s');
+  WriteLn('Assembling file '+ vProject.MainSourceAsm);
   WriteLn('');
 
-  AProcess.CommandLine := vProject.AssemblerPath + ' QPasHello.s -o QPasHello.o';
+  AProcess.CommandLine := vProject.AssemblerPath + ' ' +
+   vProject.MainSourceAsm + ' -o ' + vProject.MainSourceObj;
   WriteLn(AProcess.CommandLine);
   AProcess.Execute;
 

+ 4 - 1
utils/mksymbian/constants.pas

@@ -75,9 +75,12 @@ const
   UID_SOURCE_FILENAME = 'QUID.cpp';
   UID_OBJECT_FILENAME = 'QUID.o';
   
+  STR_ASSEMBLER_EXT = '.S';
+  STR_OBJECT_EXT = '.o';
+
   STR_RESOURCE_TMP_EXT = '.pprsc';
   STR_RESOURCE_EXT = '.rsc';
-  
+
 { Strings from the project file }
 const
   { Sections }

+ 1 - 1
utils/mksymbian/mksymbian.lpi

@@ -2,7 +2,7 @@
 <CONFIG>
   <ProjectOptions>
     <PathDelim Value="\"/>
-    <Version Value="5"/>
+    <Version Value="6"/>
     <General>
       <Flags>
         <MainUnitHasUsesSectionForAllUnits Value="False"/>

+ 4 - 1
utils/mksymbian/projectparser.pas

@@ -47,7 +47,8 @@ type
     { UIDs section }
     UID2, UID3: string;
     { Files section }
-    MainSource, MainSourceNoExt, MainResource, RegResource: string;
+    MainSource, MainSourceNoExt, MainSourceAsm, MainSourceObj,
+     MainResource, RegResource: string;
     { Objects section }
     ObjectFiles: TStringList;
   public
@@ -109,6 +110,8 @@ begin
 
     MainSource := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_MainSource, 'default.pas');
     MainSourceNoExt := ExtractFileExt(MainSource);
+    MainSourceAsm := ChangeFileExt(MainSource, STR_ASSEMBLER_EXT);
+    MainSourceObj := ChangeFileExt(MainSource, STR_OBJECT_EXT);
     MainResource := IniFile.ReadString(STR_PRJ_Files, STR_PRJ_MainResource, 'default.rss');
     RegResource :=  IniFile.ReadString(STR_PRJ_Files, STR_PRJ_RegResource, 'default_reg.rss');