Browse Source

AMIGA/MorphOS/AROS: corrected pathes in FP-IDE

git-svn-id: trunk@28620 -
marcus 11 years ago
parent
commit
ee31b188f6
8 changed files with 31 additions and 20 deletions
  1. 3 3
      ide/fpide.pas
  2. 4 0
      ide/fptemplt.pas
  3. 4 0
      ide/fputils.pas
  4. 1 1
      ide/fpvars.pas
  5. 4 14
      ide/whelp.pas
  6. 9 1
      ide/wutils.pas
  7. 1 1
      rtl/objpas/sysutils/fina.inc
  8. 5 0
      utils/fpcm/fpmake.pp

+ 3 - 3
ide/fpide.pas

@@ -1554,7 +1554,7 @@ begin
       Writeln('Running "'+ProgramPath+' '+Params+'"');
      { DO NOT use COMSPEC for exe files as the
       ExitCode is lost in those cases PM }
-{$ifdef AROS}
+{$ifdef HASAMIGA}
   DosExecute(ProgramPath, Params);
 {$else}
 {$ifndef Unix}
@@ -1583,7 +1583,7 @@ begin
           InFile,OutFile,ErrFile);
      end;
 {$endif Unix}
-{$endif AROS}
+{$endif HASAMIGA}
 
 {$ifdef Unix}
     if (DebuggeeTTY='') and (OutFile='') and (ExecType<>exDosShell) then
@@ -1732,7 +1732,7 @@ procedure TIDEApp.DosShell;
 var
   s : string;
 begin
-{$ifdef AROS}
+{$ifdef HASAMIGA}
   s := 'C:NewShell';
 {$else}
 {$ifdef Unix}

+ 4 - 0
ide/fptemplt.pas

@@ -255,7 +255,11 @@ procedure InitTemplates;
       PT : PTemplate;
       i : sw_integer;
   begin
+    {$ifdef HASAMIGA}
+    if (copy(Dir,length(Dir),1)<>DirSep) and (copy(Dir,length(Dir),1)<>DriveSeparator) then Dir:=Dir+DirSep;
+    {$else}
     if copy(Dir,length(Dir),1)<>DirSep then Dir:=Dir+DirSep;
+    {$endif}
     FindFirst(Dir+'*'+TemplateExt,AnyFile,SR);
     while (DosError=0) do
     begin

+ 4 - 0
ide/fputils.pas

@@ -105,7 +105,11 @@ function SmartPath(Path: string): string;
 var S: string;
 begin
   GetDir(0,S);
+{$ifdef HASAMIGA}
+  if (copy(S,length(S),1)<>DirSep) and (copy(S,length(S),1)<>DriveSeparator) then S:=S+DirSep;
+{$else}
   if copy(S,length(S),1)<>DirSep then S:=S+DirSep;
+{$endif}
 {$ifdef FSCaseInsensitive}
   if (LowerCaseStr(copy(Path,1,length(S)))=LowerCaseStr(S)) {and (Pos('\',copy(Path,length(S)+1,High(S)))=0)} then
 {$else}

+ 1 - 1
ide/fpvars.pas

@@ -90,7 +90,7 @@ const ClipboardWindow  : PClipboardWindow = nil;
       ShowStatusOnError: boolean = true;
       StartupDir       : string = '.'+DirSep;
       IDEDir           : string = '.'+DirSep;
-{$if defined(WINDOWS) or defined(Unix)}
+{$if defined(WINDOWS) or defined(Unix) or defined(Aros)}
       SystemIDEDir     : string = '';
 {$endif defined(WINDOWS) or defined(Unix)}
       INIFileName      : string = ININame;

+ 4 - 14
ide/whelp.pas

@@ -192,7 +192,7 @@ uses
 {$ifdef netware_clib}
   nwserv,
 {$endif}
-{$ifdef aros}
+{$ifdef HASAMIGA}
   dos,
 {$endif}
   Strings,
@@ -205,7 +205,7 @@ type
     procedure FreeItem(Item: Pointer); virtual;
   end;
 
-{$ifdef AROS}
+{$ifdef HASAMIGA}
 var
   StartupTicks: Int64;
 {$endif}
@@ -314,17 +314,7 @@ begin
   GetDosTicks := Nwserv.GetCurrentTicks;
 end;
 {$endif}
-{$ifdef amiga}
-begin
-  GetDosTicks := -1;
-end;
-{$endif}
-{$ifdef morphos}
-begin
-  GetDosTicks := -1;
-end;
-{$endif}
-{$ifdef AROS}
+{$ifdef HASAMIGA}
 begin
   GetDosTicks := ((dos.GetMsCount div 55) - StartupTicks) and $7FFFFFFF;
 end;
@@ -1005,7 +995,7 @@ begin
   Dispose(HelpFiles, Done);
 end;
 
-{$ifdef AROS}
+{$ifdef HASAMIGA}
 INITIALIZATION
   StartupTicks := dos.GetMsCount div 55;
 {$endif}

+ 9 - 1
ide/wutils.pas

@@ -514,7 +514,11 @@ function DirOf(const S: string): string;
 var D: DirStr; E: ExtStr; N: NameStr;
 begin
   FSplit(S,D,N,E);
-  if (D<>'') and (D[Length(D)]<>DirSep) then
+  if (D<>'') and (D[Length(D)]<>DirSep)
+  {$ifdef HASAMIGA}
+    and (D[Length(D)]<>DriveSeparator)
+  {$endif}
+  then
    DirOf:=D+DirSep
   else
    DirOf:=D;
@@ -1220,7 +1224,11 @@ function GetCurDir: string;
 var S: string;
 begin
   GetDir(0,S);
+{$ifdef HASAMIGA}
+  if (copy(S,length(S),1)<>DirSep) and (copy(S,length(S),1)<>DriveSeparator) then S:=S+DirSep;
+{$else}
   if copy(S,length(S),1)<>DirSep then S:=S+DirSep;
+{$endif}
   GetCurDir:=S;
 end;
 

+ 1 - 1
rtl/objpas/sysutils/fina.inc

@@ -74,7 +74,7 @@ begin
   l:=Length(FileName);
   if (l<2) then
     exit;
-{$IF DEFINED(AMIGA) OR DEFINED(MORPHOS)}
+{$IFDEF HASAMIGA}
   i:=Pos(DriveSeparator,FileName);
   if (i > 0) then Result:=Copy(FileName,1,i); 
 {$ELSE}

+ 5 - 0
utils/fpcm/fpmake.pp

@@ -3,6 +3,11 @@
  {$DEFINE NO_THREADING}
 {$ENDIF}
 
+{$IFDEF AROS}
+ {$DEFINE NO_UNIT_PROCESS}
+ {$DEFINE NO_THREADING}
+{$ENDIF}
+
 {$IFDEF OS2}
  {$DEFINE NO_UNIT_PROCESS}
 {$ENDIF OS2}