Jelajahi Sumber

Use GetRemoteString function in TransferRemote

git-svn-id: trunk@28924 -
pierre 10 tahun lalu
induk
melakukan
8e5835a3bd
1 mengubah file dengan 9 tambahan dan 29 penghapusan
  1. 9 29
      ide/fpmdebug.inc

+ 9 - 29
ide/fpmdebug.inc

@@ -14,46 +14,26 @@
  **********************************************************************}
  **********************************************************************}
 
 
 {$ifdef SUPPORT_REMOTE}
 {$ifdef SUPPORT_REMOTE}
-function GetRemoteString : string;
-var
-  St : string;
-begin
-  St:=RemoteSendCommand;
-  If RemoteConfig<>'' then
-    ReplaceStrI(St,'$CONFIG','-F '+RemoteConfig)
-  else
-    ReplaceStrI(St,'$CONFIG','');
-  If RemoteIdent<>'' then
-    ReplaceStrI(St,'$IDENT','-i '+RemoteIdent)
-  else
-    ReplaceStrI(St,'$IDENT','');
-  ReplaceStrI(St,'$LOCALFILE',GDBFileName(ExeFile));
-  ReplaceStrI(St,'$REMOTEDIR',RemoteDir);
-  ReplaceStrI(St,'$REMOTEMACHINE',RemoteMachine);
-  GetRemoteString:=st;
-end;
-
 procedure TIDEApp.TransferRemote;
 procedure TIDEApp.TransferRemote;
 var
 var
-  S,SendCommand : string;
+  DoSendCommand : string;
   Executed : boolean;
   Executed : boolean;
 begin
 begin
-  SendCommand:=GetRemoteString;
-  if SendCommand<>'' then
+  DoSendCommand:=TransformRemoteString(RemoteSendCommand);
+  if DoSendCommand<>'' then
     begin
     begin
-      s:='scp'+exeext;
-      if LocateExeFile(s) then
-        Executed:=DoExecute(s,SendCommand,'','','',exNormal)
-      else
-        Executed:=DoExecute('scp',SendCommand,'','','',exNormal);
+      Executed:=DoExecute(DoSendCommand,'','','send___.out','send___.err',exNormal);
       if Executed then
       if Executed then
         begin
         begin
          if (DosError<>0) or (DosExitCode<>0) then
          if (DosError<>0) or (DosExitCode<>0) then
-          ErrorBox(#3'Execution of'#13#3+s+' '+SendCommand+#13#3+
+          ErrorBox(#3'Execution of'#13#3+DoSendCommand+#13#3+
             'returned ('+inttostr(DosError)+','+inttostr(DosExitCode)+')',nil);
             'returned ('+inttostr(DosError)+','+inttostr(DosExitCode)+')',nil);
+         ProcessMessageFile('send___.out');
+         ProcessMessageFile('send___.err');
+         UpdateToolMessages;
         end
         end
       else
       else
-        ErrorBox(#3'Unable to execute'#13#3+s+' '+SendCommand,nil);
+        ErrorBox(#3'Unable to execute'#13#3+DoSendCommand,nil);
 
 
     end
     end
   else
   else