From d8bb302b0f8a8b1fcc3072907828bb926e6a2404 Mon Sep 17 00:00:00 2001 From: olle Date: Tue, 6 Apr 2004 22:44:16 +0000 Subject: [PATCH] + Status checks in scripts + Scripts support apptype tool + Added some ScriptFixFileName --- compiler/script.pas | 16 +++++++++++++--- compiler/systems/t_macos.pas | 32 ++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/compiler/script.pas b/compiler/script.pas index d5c619a632..976da8dbf4 100644 --- a/compiler/script.pas +++ b/compiler/script.pas @@ -412,6 +412,7 @@ begin if FileName<>'' then Add('Echo Assembling '+ScriptFixFileName(FileName)); Add(maybequoted(command)+' '+Options); + Add('Exit If "{Status}" != 0'); end; @@ -420,10 +421,14 @@ begin if FileName<>'' then Add('Echo Linking '+ScriptFixFileName(FileName)); Add(maybequoted(command)+' '+Options); + Add('Exit If "{Status}" != 0'); {Add resources} - if true then {If SIOW} - Add('Rez -append "{RIncludes}"SIOW.r -o '+ ScriptFixFileName(FileName)); + if apptype <> app_tool then {If SIOW} + begin + Add('Rez -append "{RIncludes}"SIOW.r -o '+ ScriptFixFileName(FileName)); + Add('Exit If "{Status}" != 0'); + end; end; @@ -498,7 +503,12 @@ end; end. { $Log$ - Revision 1.27 2004-02-24 00:53:48 olle + Revision 1.28 2004-04-06 22:44:16 olle + + Status checks in scripts + + Scripts support apptype tool + + Added some ScriptFixFileName + + Revision 1.27 2004/02/24 00:53:48 olle * increased maxsize of link.res file name * fixed a 255-limit in TScript.WriteToDisk diff --git a/compiler/systems/t_macos.pas b/compiler/systems/t_macos.pas index d1900cbc4c..9b8209a72a 100644 --- a/compiler/systems/t_macos.pas +++ b/compiler/systems/t_macos.pas @@ -152,9 +152,9 @@ begin { Call linker } SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr); - Replace(cmdstr,'$EXE',current_module.exefilename^); + Replace(cmdstr,'$EXE',ScriptFixFileName(current_module.exefilename^)); Replace(cmdstr,'$OPT',Info.ExtraOptions); - Replace(cmdstr,'$RES',outputexedir+Info.ResName); + Replace(cmdstr,'$RES',ScriptFixFileName(outputexedir+Info.ResName)); Replace(cmdstr,'$STATIC',StaticStr); Replace(cmdstr,'$STRIP',StripStr); Replace(cmdstr,'$DYNLINK',DynLinkStr); @@ -166,7 +166,7 @@ begin Add('PPCLink '#182); { Add MPW standard libraries} - if true then // if not MPWTool + if apptype <> app_tool then begin Add('"{PPCLibraries}PPCSIOW.o" '#182); Add('"{PPCLibraries}PPCToolLibs.o" '#182); @@ -185,17 +185,24 @@ begin if s<>'' then Add(s+' '#182); end; - + {Add last lines of the link command} - if true then //If SIOW, to avoid some warnings. + if apptype = app_tool then + Add('-t "MPST" -c "MPS " '#182); + + if apptype <> app_tool then //If SIOW, to avoid some warnings. Add('-ignoredups __start -ignoredups .__start -ignoredups main -ignoredups .main '#182); - Add('-tocdataref off -sym on -dead on -o '+ current_module.exefilename^); + Add('-tocdataref off -sym on -dead on -o '+ ScriptFixFileName(current_module.exefilename^)); + + Add('Exit If "{Status}" != 0'); {Add mac resources} - if true then //If SIOW - Add('Rez -append "{RIncludes}"SIOW.r -o ' + current_module.exefilename^); - + if apptype <> app_tool then //If SIOW + begin + Add('Rez -append "{RIncludes}"SIOW.r -o ' + ScriptFixFileName(current_module.exefilename^)); + Add('Exit If "{Status}" != 0'); + end; success:= true; end; @@ -221,7 +228,12 @@ initialization end. { $Log$ - Revision 1.7 2004-02-19 20:40:20 olle + Revision 1.8 2004-04-06 22:44:22 olle + + Status checks in scripts + + Scripts support apptype tool + + Added some ScriptFixFileName + + Revision 1.7 2004/02/19 20:40:20 olle + Support for Link on target especially for MacOS + TLinkerMPW + TAsmScriptMPW