From b1f8d613f8a60ba9d6fa39dc0675629cad08f06e Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Sat, 24 Nov 2007 21:26:52 +0000 Subject: [PATCH] Small improvement to symbian build tool git-svn-id: trunk@9326 - --- utils/mksymbian/compiler.pas | 23 +++++++++++++++++++---- utils/mksymbian/constants.pas | 5 ++++- utils/mksymbian/mksymbian.lpi | 2 +- utils/mksymbian/projectparser.pas | 5 ++++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/utils/mksymbian/compiler.pas b/utils/mksymbian/compiler.pas index 6548bd71f6..f095e12b27 100644 --- a/utils/mksymbian/compiler.pas +++ b/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; diff --git a/utils/mksymbian/constants.pas b/utils/mksymbian/constants.pas index 4e837a0d16..3a8c393702 100644 --- a/utils/mksymbian/constants.pas +++ b/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 } diff --git a/utils/mksymbian/mksymbian.lpi b/utils/mksymbian/mksymbian.lpi index ad5486e0de..f300f43247 100644 --- a/utils/mksymbian/mksymbian.lpi +++ b/utils/mksymbian/mksymbian.lpi @@ -2,7 +2,7 @@ - + diff --git a/utils/mksymbian/projectparser.pas b/utils/mksymbian/projectparser.pas index b55f1261b7..0b44ac8647 100644 --- a/utils/mksymbian/projectparser.pas +++ b/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');