diff options
author | marcus <marcus@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2014-09-08 16:47:38 +0000 |
---|---|---|
committer | marcus <marcus@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2014-09-08 16:47:38 +0000 |
commit | b234f6cc0ed96ee618d9c32d47e3cee5118de88b (patch) | |
tree | 3457e430fcf3f5ff64120db5268ceb095dc289a5 | |
parent | b91bc22fc738b25f04ac0fdf476d787e7c9fdc6b (diff) | |
download | fpc-b234f6cc0ed96ee618d9c32d47e3cee5118de88b.tar.gz |
AMIGA/MorphOS/AROS: corrected pathes in FP-IDE
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@28620 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | ide/fpide.pas | 6 | ||||
-rw-r--r-- | ide/fptemplt.pas | 4 | ||||
-rw-r--r-- | ide/fputils.pas | 4 | ||||
-rw-r--r-- | ide/fpvars.pas | 2 | ||||
-rw-r--r-- | ide/whelp.pas | 18 | ||||
-rw-r--r-- | ide/wutils.pas | 10 | ||||
-rw-r--r-- | rtl/objpas/sysutils/fina.inc | 2 | ||||
-rw-r--r-- | utils/fpcm/fpmake.pp | 5 |
8 files changed, 31 insertions, 20 deletions
diff --git a/ide/fpide.pas b/ide/fpide.pas index 906dde487f..de4d3eb418 100644 --- a/ide/fpide.pas +++ b/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} diff --git a/ide/fptemplt.pas b/ide/fptemplt.pas index c40678e938..d22933be12 100644 --- a/ide/fptemplt.pas +++ b/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 diff --git a/ide/fputils.pas b/ide/fputils.pas index 6adfdc40ca..4026211284 100644 --- a/ide/fputils.pas +++ b/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} diff --git a/ide/fpvars.pas b/ide/fpvars.pas index a5a1d0850e..d5d44de97e 100644 --- a/ide/fpvars.pas +++ b/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; diff --git a/ide/whelp.pas b/ide/whelp.pas index 15841dc6f5..02630d8a51 100644 --- a/ide/whelp.pas +++ b/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} diff --git a/ide/wutils.pas b/ide/wutils.pas index 0890163254..e7242bc385 100644 --- a/ide/wutils.pas +++ b/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; diff --git a/rtl/objpas/sysutils/fina.inc b/rtl/objpas/sysutils/fina.inc index f8f14335e9..af42a3786d 100644 --- a/rtl/objpas/sysutils/fina.inc +++ b/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} diff --git a/utils/fpcm/fpmake.pp b/utils/fpcm/fpmake.pp index 1413e076cc..738130bd68 100644 --- a/utils/fpcm/fpmake.pp +++ b/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} |