Browse Source

* Update version numbers.
* Fix source splitting (multi-line strings in macros).
* Add support for Mlink-format relocs (Ephyx).
* Allow Windows XP theming (Ephyx).
* Switch DFM files to the text format (Ephyx).


git-svn-id: file:///var/svn/tigccpp/trunk/tigcc/ide@179 9552661e-59e3-4036-b4f2-dbe53926924f

kevinkofler 19 years ago
parent
commit
c5e8192261

BIN
AboutUnit.dfm


BIN
CodeCompletion/CompletionForm.dfm


BIN
CodeCompletion/Editor/uBatch.dfm


BIN
CodeCompletion/Editor/uEditor.dfm


BIN
CodeCompletion/PrefFrame.dfm


BIN
CodeCompletion/TmpltForm.dfm


BIN
ColorsUnit.dfm


BIN
CustomStyleUnit.dfm


BIN
FunctionsWinUnit.dfm


+ 6 - 2
IDE.cfg

@@ -31,6 +31,10 @@
 -M
 -$M16384,1048576
 -K$00400000
--LE"c:\delphi\delphi6\Projects\Bpl"
--LN"c:\delphi\delphi6\Projects\Bpl"
+-LE"d:\borland\delphi7\Projects\Bpl"
+-LN"d:\borland\delphi7\Projects\Bpl"
+-U"..\general;..\components"
+-O"..\general;..\components"
+-I"..\general;..\components"
+-R"..\general;..\components"
 -DCanSplit;CodingExt

+ 61 - 18
IDE.dof

@@ -1,6 +1,5 @@
 [FileVersion]
-Version=6.0
-
+Version=7.0
 [Compiler]
 A=8
 B=0
@@ -31,7 +30,55 @@ Z=1
 ShowHints=1
 ShowWarnings=1
 UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=1
+UnsafeCode=1
+UnsafeCast=1
 [Linker]
 MapFile=0
 OutputObjs=0
@@ -42,25 +89,26 @@ MinStackSize=16384
 MaxStackSize=1048576
 ImageBase=4194304
 ExeDescription=
-
 [Directories]
 OutputDir=
 UnitOutputDir=
 PackageDLLOutputDir=
 PackageDCPOutputDir=
-SearchPath=
+SearchPath=..\general;..\components
 Packages=VCL40;VCLX40
 Conditionals=CanSplit;CodingExt
 DebugSourceDirs=
 UsePackages=0
-
 [Parameters]
 RunParams=
 HostApplication=
 Launcher=
 UseLauncher=0
 DebugCWD=
-
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
 [Version Info]
 IncludeVerInfo=1
 AutoIncBuild=0
@@ -75,30 +123,25 @@ Private=0
 DLL=0
 Locale=1033
 CodePage=1252
-
 [Version Info Keys]
 CompanyName=TIGCC Team
 FileDescription=TIGCC IDE
-FileVersion=2.9.1.0
+FileVersion=2.9.3.0
 InternalName=IDE
 LegalCopyright=Copyright (c) Sebastian Reichelt, 2000-2005
 LegalTrademarks=
 OriginalFilename=IDE.exe
 ProductName=TIGCC
-ProductVersion=0.96 Beta 2
+ProductVersion=0.96 Beta 3
 Comments=This program is freely distributable under the terms of the GNU General Public License.  It is kept open-source, but please email me at Sebastian@tigcc.ticalc.org if you found a bug or have a patch.
-
-[Excluded Packages]
-c:\delphi\delphi6\Bin\dcl31w60.bpl=Delphi 1.0 Compatibility Components
-c:\delphi\delphi6\Bin\dclsmp60.bpl=Borland Sample Components
-c:\delphi\delphi6\Bin\dclshlctrls60.bpl=Shell Control Property and Component Editors
-c:\delphi\delphi6\Bin\dclocx60.bpl=Borland Sample Imported ActiveX Controls
-
 [HistoryLists\hlConditionals]
 Count=2
 Item0=CanSplit;CodingExt
 Item1=CanSplit
-
 [HistoryLists\hlUnitAliases]
 Count=1
 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[HistoryLists\hlSearchPath]
+Count=2
+Item0=..\general;..\components
+Item1=..\general

BIN
IDE.res


BIN
MainUnit.dfm


+ 38 - 10
MainUnit.pas

@@ -9,6 +9,11 @@ uses
 	Printers, SourceEditUnit, HTMLHelpUnit, MemoComponentUnit, ScktComp;
 
 type
+  TPanel = class(ExtCtrls.TPanel)
+  protected
+    procedure Paint; override;
+  end;
+
 	TMainForm = class(TForm)
 		ProjectTree: TTreeView;
 		LittleIcons: TImageList;
@@ -50,13 +55,7 @@ type
 		Delete2: TMenuItem;
 		Splitter2: TSplitter;
 		ErrWinPanel: TPanel;
-		ErrorPanel: TPanel;
-		CloseErrorsButton: TSpeedButton;
 		ErrorList: TListView;
-		Label1: TLabel;
-		Label2: TLabel;
-		ErrorsLabel: TLabel;
-		WarningsLabel: TLabel;
 		Save2: TMenuItem;
 		SaveAs2: TMenuItem;
 		N8: TMenuItem;
@@ -252,6 +251,12 @@ type
 		GNUAssemblyHeaderFile2: TMenuItem;
 		A68kAssemblyHeaderFile1: TMenuItem;
     A68kAssemblyHeaderFile2: TMenuItem;
+    ErrorPanel: TPanel;
+    CloseErrorsButton: TSpeedButton;
+    Label1: TLabel;
+    Label2: TLabel;
+    ErrorsLabel: TLabel;
+    WarningsLabel: TLabel;
 		procedure FormCreate(Sender: TObject);
 		procedure FormDestroy(Sender: TObject);
 		procedure AppException(Sender: TObject; E: Exception);
@@ -483,7 +488,8 @@ function LinkLibGetOutputFile(var DestFile: TLinkLibDestFile; FileSize, DestCalc
 
 implementation
 
-{$R *.DFM}
+{$R *.DFM}   
+{$R WindowsXP.res}
 
 uses
 	CalcUnit, ParsingUnit, ProcessUnit,
@@ -493,7 +499,8 @@ uses
 	ProgramOutputUnit, VTIStartUnit,
 	LinkUnit,
 	UtilsDos, UtilsWin, HandleWaitThreadUnit, FileReadToBufferThreadUnit,
-	ShellAPI, ShlObj, IniFiles, Registry, WinSpool, ClipBrd{$IFDEF CODINGEXT}, CompletionForm{$ENDIF};
+	ShellAPI, ShlObj, IniFiles, Registry, WinSpool, ClipBrd{$IFDEF CODINGEXT}, CompletionForm{$ENDIF},
+  ProgramOptionsUnit;
 
 const
 	RegKey = '\Software\SeReSoft\TI-GCC IDE';
@@ -596,6 +603,16 @@ begin
 	Result := True;
 end;
 
+{ Fix for TPanel & XP Theme }
+
+procedure TPanel.Paint;
+begin
+  Canvas.Pen.Style := psClear;
+  Canvas.Brush.Color := Color;
+  Canvas.FillRect(GetClientRect);
+  inherited;
+end;
+
 { TRecentFileMenuItem }
 
 destructor TRecentFileMenuItem.Destroy;
@@ -987,6 +1004,8 @@ begin
 		Result := rfKernel
 	else if S = 'Compressed' then
 		Result := rfCompressed
+	else if S = 'MLink' then
+		Result := rfMLink
 	else if S = 'F-Line' then
 		Result := rfFLine
 	else
@@ -1245,6 +1264,7 @@ begin
 		rfAMS:         Result := 'AMS';
 		rfKernel:      Result := 'Kernel';
 		rfCompressed:  Result := 'Compressed';
+    rfMLink:       Result := 'MLink';
 		rfFLine:       Result := 'F-Line';
 		else           Result := 'Unknown';
 	end;
@@ -2683,12 +2703,16 @@ begin
 						RelocFormat := rfKernel
 					else if RelocCompressedRadioButton.Checked then
 						RelocFormat := rfCompressed
+					else if RelocMlinkRadioButton.Checked then
+						RelocFormat := rfMlink
 					else
 						RelocFormat := rfAMS;
 					if ROMCallKernelRadioButton.Checked then
 						ROMCallFormat := rfKernel
 					else if ROMCallCompressedRadioButton.Checked then
 						ROMCallFormat := rfCompressed
+					else if ROMCallMlinkRadioButton.Checked then
+						ROMCallFormat := rfMlink
 					else if ROMCallFLineRadioButton.Checked then
 						ROMCallFormat := rfFLine
 					else
@@ -2696,13 +2720,17 @@ begin
 					if BSSKernelRadioButton.Checked then
 						BSSRefFormat := rfKernel
 					else if BSSCompressedRadioButton.Checked then
-						BSSRefFormat := rfCompressed
+						BSSRefFormat := rfCompressed   
+					else if BSSMlinkRadioButton.Checked then
+						BSSRefFormat := rfMlink
 					else
 						BSSRefFormat := rfNone;
 					if DataVarKernelRadioButton.Checked then
 						DataRefFormat := rfKernel
 					else if DataVarCompressedRadioButton.Checked then
-						DataRefFormat := rfCompressed
+						DataRefFormat := rfCompressed  
+					else if DataVarMlinkRadioButton.Checked then
+						DataRefFormat := rfMlink
 					else
 						DataRefFormat := rfNone;
 					UseFLineJumps      := RelocFLineJumpsCheckBox.Checked;

+ 6 - 2
MasterUnit.pas

@@ -42,7 +42,7 @@ type
 	TTransferTarget = (ttNone, ttVTI, ttCalc);
 	TCurVTIType = (cvNone, cvTI89, cvTI92Plus, cvTI92);
 	TKernelFormat = (kfUnknown, kfNone, kfStandard, kfCompressedTables);
-	TRelocFormat = (rfUnknown, rfNone, rfDirect, rfAMS, rfKernel, rfCompressed, rfFLine);
+	TRelocFormat = (rfUnknown, rfNone, rfDirect, rfAMS, rfKernel, rfCompressed, rfMlink, rfFLine);
 
 	TPredefinedLibOptions = class(TObject)
 		CalcDests: TCalcDests;
@@ -227,11 +227,13 @@ begin
 		case RelocFormat of
 			rfKernel:      AddSwitch ('KERNEL_FORMAT_RELOCS');
 			rfCompressed:  AddSwitch ('COMPRESSED_FORMAT_RELOCS');
+      rfMLink:       AddSwitch ('MLINK_FORMAT_RELOCS');
 			rfFLine:       AddSwitch ('USE_FLINE_JUMPS');
 		end;
 		case ROMCallFormat of
 			rfKernel:      AddSwitch ('KERNEL_FORMAT_ROM_CALLS');
-			rfCompressed:  AddSwitch ('COMPRESSED_FORMAT_ROM_CALLS');
+			rfCompressed:  AddSwitch ('COMPRESSED_FORMAT_ROM_CALLS');  
+			rfMlink:       AddSwitch ('MLINK_FORMAT_ROM_CALLS');
 			rfFLine: begin
 				AddSwitch ('USE_FLINE_ROM_CALLS');
 				Result := Result + ' -fno-function-cse';
@@ -241,11 +243,13 @@ begin
 			rfNone:        AddSwitch ('MERGE_BSS');
 			rfKernel:      AddSwitch ('KERNEL_FORMAT_BSS');
 			rfCompressed:  AddSwitch ('COMPRESSED_FORMAT_BSS');
+      rfMlink:       AddSwitch ('MLINK_FORMAT_BSS');
 		end;
 	end;
 	case DataRefFormat of
 		rfKernel:      AddSwitch ('KERNEL_FORMAT_DATA_VAR');
 		rfCompressed:  AddSwitch ('COMPRESSED_FORMAT_DATA_VAR');
+    rfMlink:       AddSwitch ('MLINK_FORMAT_DATA_VAR');
 	end;
 	if UseFLineJumps then begin
 		AddSwitch ('USE_FLINE_JUMPS');

BIN
NewFolderUnit.dfm


BIN
NewsUnit.dfm


BIN
OpenFileStatusUnit.dfm


BIN
PreferencesUnit.dfm


+ 2 - 2
ProcessUnit.pas

@@ -155,7 +155,7 @@ var
 	HomeDirPC: PChar;
 begin
 	if Running then
-		raise EFOpenError.Create ('Another process is still running')
+		raise EFOpenError.CreateFmt ('Another process is still running', [])
 	else begin
 		StdOut.Clear;
 		StdErr.Clear;
@@ -179,7 +179,7 @@ begin
 		if CreateProcess (nil, PChar (CommandLine), nil, nil, True, PriorityClass, nil, HomeDirPC, StartupInfo, FProcessInfo) then begin
 			FWaitThread := THandleWaitThread.Create (ProcessInfo.hProcess);
 		end else
-			raise EFOpenError.Create ('Could not start process');
+			raise EFOpenError.CreateFmt ('Could not start process', []);
 	end;
 end;
 

BIN
ProgramOptionsUnit.dfm


+ 4 - 0
ProgramOptionsUnit.pas

@@ -63,6 +63,10 @@ type
 		UnofficialOSSupportCheckBox: TCheckBox;
 		RelocFLineJumps4ByteCheckBox: TCheckBox;
     ROMCallOptimizedCheckBox: TCheckBox;
+    RelocMlinkRadioButton: TRadioButton;
+    ROMCallMlinkRadioButton: TRadioButton;
+    BSSMlinkRadioButton: TRadioButton;
+    DataVarMlinkRadioButton: TRadioButton;
 		procedure FormShow(Sender: TObject);
 		procedure ShellRadioButtonClick(Sender: TObject);
 		procedure MinAMSCheckBoxClick(Sender: TObject);

BIN
ProgramOutputUnit.dfm


BIN
ProjectOptionsUnit.dfm


+ 4 - 0
ProjectOptionsUnit.pas

@@ -228,21 +228,25 @@ begin
 					rfAMS:         RelocAMSRadioButton.Checked          := True;
 					rfKernel:      RelocKernelRadioButton.Checked       := True;
 					rfCompressed:  RelocCompressedRadioButton.Checked   := True;
+          rfMlink:       RelocMlinkRadioButton.Checked        := True;
 				end;
 				case ROMCallFormat of
 					rfDirect:      ROMCallDirectRadioButton.Checked     := True;
 					rfKernel:      ROMCallKernelRadioButton.Checked     := True;
 					rfCompressed:  ROMCallCompressedRadioButton.Checked := True;
+          rfMlink:       ROMCallMlinkRadioButton.Checked      := True;
 					rfFLine:       ROMCallFLineRadioButton.Checked      := True;
 				end;
 				case BSSRefFormat of
 					rfNone:        BSSMergeRadioButton.Checked          := True;
 					rfKernel:      BSSKernelRadioButton.Checked         := True;
 					rfCompressed:  BSSCompressedRadioButton.Checked     := True;
+          rfMlink:       BSSMlinkRadioButton.Checked          := True;
 				end;
 				case DataRefFormat of
 					rfKernel:      DataVarKernelRadioButton.Checked     := True;
 					rfCompressed:  DataVarCompressedRadioButton.Checked := True;
+          rfMlink:       DataVarMlinkRadioButton.Checked      := True;
 				end;
 				RelocFLineJumpsCheckBox.Checked      := UseFLineJumps;
 				RelocFLineJumps4ByteCheckBox.Checked := Use4ByteFLineJumps;

BIN
SendProgressUnit.dfm


+ 27 - 7
SourceFileUnit.pas

@@ -1478,7 +1478,7 @@ end;
 
 procedure TSourceTextSourceFile.SplitAndWriteToFile(const FN: string);
 type
-	TCharMode = (cmNone, cmNormalText, cmNumber, cmMultiSymbol, cmString, cmChar, cmComment, cmUnchangableLine, cmExtUnchangableLine, cmTrigraph);
+	TCharMode = (cmNone, cmNormalText, cmNumber, cmMultiSymbol, cmString, cmChar, cmComment, cmUnchangeableLine, cmExtUnchangeableLine, cmExtUnchangeableLineString, cmTrigraph);
 var
 	S: string;
 {$IFDEF CanSplit}
@@ -1580,22 +1580,38 @@ begin
 									if (C = '/') and (S [CurPos - 1] = '*') then
 										CurMode := cmNone;
 								end;
-								cmUnchangableLine:
+								cmUnchangeableLine:
 									if C = #13 then
 										CurMode := cmNone;
-								cmExtUnchangableLine:
+								cmExtUnchangeableLine:
 									if (C = #13) and (S [CurPos - 1] <> '\') then
-										CurMode := cmNone;
+										CurMode := cmNone
+									else if C = '"' then
+										CurMode := cmExtUnchangeableLineString;
+								cmExtUnchangeableLineString:
+									if (C = '"') then begin
+										B := True;
+										I := CurPos - 1;
+										while (I >= 1) and ((S [I] = '\') or (Copy (S, I - 2, 3) = '??/')) do begin
+											B := not B;
+											if S [I] = '\' then
+												Dec (I)
+											else
+												Dec (I, 3);
+										end;
+										if B then
+											CurMode := cmExtUnchangeableLine;
+									end;
 								cmTrigraph:
 									if (C <> '?') and ((CurPos + 1 > Length (S)) or (S [CurPos + 1] <> '?')) then
 										CurMode := cmNone;
 								else begin
 									if Copy (S, CurPos, 2) = '//' then
-										SetMultiCharMode (cmUnchangableLine)
+										SetMultiCharMode (cmUnchangeableLine)
 									else if Copy (S, CurPos, 2) = '/*' then
 										SetMultiCharMode (cmComment)
 									else if Copy (S, CurPos, 2) = '??=' then
-										SetMultiCharMode (cmExtUnchangableLine)
+										SetMultiCharMode (cmExtUnchangeableLine)
 									else if (Copy (S, CurPos, 2) = '??') and (Length (S) >= CurPos + 2) and (S [CurPos + 2] in ['(', ')', '/', '''', '<', '>', '!', '-']) then
 										SetMultiCharMode (cmTrigraph)
 									else
@@ -1616,7 +1632,10 @@ begin
 											'''':
 												SetMultiCharMode (cmChar);
 											'#':
-												SetMultiCharMode (cmExtUnchangableLine);
+												if AtLineStart then
+													SetMultiCharMode (cmExtUnchangeableLine)
+												else
+													SetMultiCharMode (cmMultiSymbol);
 											'.':
 												if CurMode <> cmNumber then begin
 													if (Length (S) >= CurPos + 1) and (S [CurPos + 1] in ['0'..'9']) then begin
@@ -2653,3 +2672,4 @@ begin
 end;
 
 end.
+

BIN
SourceFileWinUnit.dfm


BIN
StartupScreenUnit.dfm


BIN
StartupUnit.dfm


BIN
StyleSelectionUnit.dfm


BIN
SyntaxProgressUnit.dfm


BIN
ToolPropertiesUnit.dfm


BIN
ToolsUnit.dfm


BIN
VTIStartUnit.dfm


+ 2 - 2
VersionUnit.pas

@@ -4,8 +4,8 @@ unit VersionUnit;
 interface
 
 const
-	TIGCCShortVersion = '0.96b2';
-	TIGCCLongVersion = '0.96 Beta 2';
+	TIGCCShortVersion = '0.96b3';
+	TIGCCLongVersion = '0.96 Beta 3';
 
 implementation
 

BIN
WindowsXP.res


BIN
WordListUnit.dfm