From 1763c8f93e80943db7958f7157029a48cc3c35ff Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Wed, 13 Jul 2016 10:44:56 +0100
Subject: [PATCH 001/714] Added support for compiling with Delphi 10.1 Berlin
compiler.
---
Src/Compilers.UBDS.pas | 28 +++++++++++++++++-----------
Src/Compilers.UGlobals.pas | 5 +++--
Src/DBIO.UIniDataReader.pas | 5 +++--
Src/FirstRun.UConfigFile.pas | 3 ++-
Src/FrCodeGenPrefs.pas | 3 ++-
Src/UXMLDocConsts.pas | 4 ++--
6 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/Src/Compilers.UBDS.pas b/Src/Compilers.UBDS.pas
index b26c7882e..7011b61b6 100644
--- a/Src/Compilers.UBDS.pas
+++ b/Src/Compilers.UBDS.pas
@@ -3,7 +3,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2006-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2006-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -145,6 +145,8 @@ function TBDSCompiler.GetIDString: string;
Result := 'DXE8';
ciD10S:
Result := 'D10S';
+ ciD101B:
+ Result := 'D101B';
else
raise EBug.Create(ClassName + '.GetIDString: Invalid ID');
end;
@@ -152,16 +154,17 @@ function TBDSCompiler.GetIDString: string;
function TBDSCompiler.GetName: string;
resourcestring
- sCompilerName = 'Delphi %d'; // template for name of compiler
- sDelphiXE = 'Delphi XE'; // name of Delphi XE compiler
- sDelphiXE2 = 'Delphi XE2'; // name of Delphi XE2 compiler
- sDelphiXE3 = 'Delphi XE3'; // name of Delphi XE3 compiler
- sDelphiXE4 = 'Delphi XE4'; // name of Delphi XE4 compiler
- sDelphiXE5 = 'Delphi XE5'; // name of Delphi XE5 compiler
- sDelphiXE6 = 'Delphi XE6'; // name of Delphi XE6 compiler
- sDelphiXE7 = 'Delphi XE7'; // name of Delphi XE7 compiler
- sDelphiXE8 = 'Delphi XE8'; // name of Delphi XE8 compiler
- sDelphi10S = 'Delphi 10 Seattle'; // name of Delphi 10 compiler
+ sCompilerName = 'Delphi %d'; // template for name of compiler
+ sDelphiXE = 'Delphi XE'; // name of Delphi XE compiler
+ sDelphiXE2 = 'Delphi XE2'; // name of Delphi XE2 compiler
+ sDelphiXE3 = 'Delphi XE3'; // name of Delphi XE3 compiler
+ sDelphiXE4 = 'Delphi XE4'; // name of Delphi XE4 compiler
+ sDelphiXE5 = 'Delphi XE5'; // name of Delphi XE5 compiler
+ sDelphiXE6 = 'Delphi XE6'; // name of Delphi XE6 compiler
+ sDelphiXE7 = 'Delphi XE7'; // name of Delphi XE7 compiler
+ sDelphiXE8 = 'Delphi XE8'; // name of Delphi XE8 compiler
+ sDelphi10S = 'Delphi 10 Seattle'; // name of Delphi 10 compiler
+ sDelphi101B = 'Delphi 10.1 Berlin'; // name of Delphi 10.1 compiler
begin
case GetID of
ciDXE:
@@ -182,6 +185,8 @@ function TBDSCompiler.GetName: string;
Result := sDelphiXE8;
ciD10S:
Result := sDelphi10S;
+ ciD101B:
+ Result := sDelphi101B;
else
Result := Format(sCompilerName, [ProductVersion]);
end;
@@ -211,6 +216,7 @@ function TBDSCompiler.InstallationRegKey: string;
ciDXE7 : Result := '\Software\Embarcadero\BDS\15.0';
ciDXE8 : Result := '\Software\Embarcadero\BDS\16.0';
ciD10S : Result := '\Software\Embarcadero\BDS\17.0';
+ ciD101B : Result := '\Software\Embarcadero\BDS\18.0';
else raise EBug.Create(ClassName + '.InstallationRegKey: Invalid ID');
end;
end;
diff --git a/Src/Compilers.UGlobals.pas b/Src/Compilers.UGlobals.pas
index f21abf1be..c28053548 100644
--- a/Src/Compilers.UGlobals.pas
+++ b/Src/Compilers.UGlobals.pas
@@ -3,7 +3,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2005-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -42,6 +42,7 @@ interface
ciDXE7, // Delphi XE7
ciDXE8, // Delphi XE8
ciD10S, // Delphi 10 Seattle
+ ciD101B, // Delphi 10.1 Berlin
ciFPC // Free Pascal
);
@@ -54,7 +55,7 @@ interface
/// compilers.
cBDSCompilers = [
ciD2005w32, ciD2006w32, ciD2007, ciD2009w32, ciD2010, ciDXE, ciDXE2,
- ciDXE3, ciDXE4, ciDXE5, ciDXE6, ciDXE7, ciDXE8, ciD10S
+ ciDXE3, ciDXE4, ciDXE5, ciDXE6, ciDXE7, ciDXE8, ciD10S, ciD101B
];
const
diff --git a/Src/DBIO.UIniDataReader.pas b/Src/DBIO.UIniDataReader.pas
index bb61b2b39..bf6689ce7 100644
--- a/Src/DBIO.UIniDataReader.pas
+++ b/Src/DBIO.UIniDataReader.pas
@@ -3,7 +3,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2005-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -237,7 +237,8 @@ implementation
'Delphi2', 'Delphi3', 'Delphi4', 'Delphi5', 'Delphi6', 'Delphi7',
'Delphi2005Win32', 'Delphi2006Win32', 'Delphi2007', 'Delphi2009Win32',
'Delphi2010', 'DelphiXE', 'DelphiXE2', 'DelphiXE3', 'DelphiXE4',
- 'DelphiXE5', 'DelphiXE6', 'DelphiXE7', 'DelphiXE8', 'Delphi10S', 'FPC'
+ 'DelphiXE5', 'DelphiXE6', 'DelphiXE7', 'DelphiXE8', 'Delphi10S',
+ 'Delphi101B', 'FPC'
);
{ TIniDataReader }
diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas
index 20e20b308..3e5f347c1 100644
--- a/Src/FirstRun.UConfigFile.pas
+++ b/Src/FirstRun.UConfigFile.pas
@@ -3,7 +3,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2007-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2007-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -483,6 +483,7 @@ procedure TUserConfigFileUpdater.UpdateNamespaces;
UpdateForCompiler('DXE7');
UpdateForCompiler('DXE8');
UpdateForCompiler('D10S');
+ UpdateForCompiler('D101B');
end;
{ TCommonConfigFileUpdater }
diff --git a/Src/FrCodeGenPrefs.pas b/Src/FrCodeGenPrefs.pas
index 7f07a64e8..0205bd006 100644
--- a/Src/FrCodeGenPrefs.pas
+++ b/Src/FrCodeGenPrefs.pas
@@ -3,7 +3,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2010-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2010-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -681,6 +681,7 @@ procedure TCodeGenPrefsFrame.PopulatePreDefCompilerMenu;
AddMenuItem('Delphi XE7', 28.0);
AddMenuItem('Delphi XE8', 29.0);
AddMenuItem('Delphi 10 Seattle', 30.0);
+ AddMenuItem('Delphi 10.1 Berlin', 31.0);
end;
procedure TCodeGenPrefsFrame.PreDefCompilerMenuClick(Sender: TObject);
diff --git a/Src/UXMLDocConsts.pas b/Src/UXMLDocConsts.pas
index 8fc039a68..f8b96a050 100644
--- a/Src/UXMLDocConsts.pas
+++ b/Src/UXMLDocConsts.pas
@@ -3,7 +3,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2008-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2008-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -74,7 +74,7 @@ interface
'd2', 'd3', 'd4', 'd5', 'd6', 'd7',
'd2005', 'd2006', 'd2007', 'd2009', 'd2010',
'dXE', 'dXE2', 'dXE3', 'dDX4' {error, but in use},
- 'dXE5', 'dXE6', 'dXE7', 'dXE8', 'd10s',
+ 'dXE5', 'dXE6', 'dXE7', 'dXE8', 'd10s', 'd101b',
'fpc'
);
From f33cc7e92e8905a4dc4f5f525c825f1d03683bed Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Wed, 13 Jul 2016 10:46:04 +0100
Subject: [PATCH 002/714] Widened compiler list box to accommodate width of
Delphi 10.1 Berlin compiler name.
---
Src/FmCompilersDlg.dfm | 67 +++++++++++++++++++++++++++---------------
Src/FmCompilersDlg.pas | 2 +-
2 files changed, 45 insertions(+), 24 deletions(-)
diff --git a/Src/FmCompilersDlg.dfm b/Src/FmCompilersDlg.dfm
index 80eb26dbb..81e5534d8 100644
--- a/Src/FmCompilersDlg.dfm
+++ b/Src/FmCompilersDlg.dfm
@@ -3,16 +3,16 @@ inherited CompilersDlg: TCompilersDlg
ClientHeight = 381
ClientWidth = 524
ExplicitWidth = 530
- ExplicitHeight = 409
+ ExplicitHeight = 410
PixelsPerInch = 96
TextHeight = 13
inherited pnlBody: TPanel
- Width = 497
- ExplicitWidth = 497
+ Width = 505
+ ExplicitWidth = 505
object pbBanner: TPaintBox
- Left = 128
+ Left = 135
Top = 0
- Width = 369
+ Width = 370
Height = 23
Color = clActiveCaption
Font.Charset = DEFAULT_CHARSET
@@ -26,7 +26,7 @@ inherited CompilersDlg: TCompilersDlg
object lbCompilers: TListBox
Left = 0
Top = 0
- Width = 121
+ Width = 129
Height = 292
Style = lbOwnerDrawFixed
Ctl3D = True
@@ -36,7 +36,7 @@ inherited CompilersDlg: TCompilersDlg
TabOrder = 0
end
object pcCompiler: TPageControl
- Left = 127
+ Left = 135
Top = 29
Width = 370
Height = 263
@@ -45,8 +45,6 @@ inherited CompilersDlg: TCompilersDlg
OnMouseDown = pcCompilerMouseDown
object tsCompiler: TTabSheet
Caption = 'Compiler'
- ExplicitWidth = 313
- ExplicitHeight = 199
inline frmCompiler: TCompilersDlgCompilerFrame
Left = 0
Top = 0
@@ -54,14 +52,11 @@ inherited CompilersDlg: TCompilersDlg
Height = 235
Align = alClient
TabOrder = 0
- ExplicitHeight = 199
end
end
object tsSwitches: TTabSheet
Caption = 'Switches'
ImageIndex = 2
- ExplicitWidth = 313
- ExplicitHeight = 199
inline frmSwitches: TCompilersDlgSwitchesFrame
Left = 0
Top = 0
@@ -69,14 +64,23 @@ inherited CompilersDlg: TCompilersDlg
Height = 235
Align = alClient
TabOrder = 0
- ExplicitHeight = 199
+ inherited btnDefSwitches: TButton
+ ExplicitLeft = 293
+ end
+ inherited btnAdd: TButton
+ ExplicitLeft = 222
+ end
+ inherited btnReplace: TButton
+ ExplicitLeft = 293
+ end
+ inherited btnDelete: TButton
+ ExplicitLeft = 222
+ end
end
end
object tsNamespaces: TTabSheet
Caption = 'Namespaces'
ImageIndex = 4
- ExplicitWidth = 313
- ExplicitHeight = 199
inline frmNamespaces: TCompilersDlgNamespacesFrame
Left = 0
Top = 0
@@ -84,15 +88,23 @@ inherited CompilersDlg: TCompilersDlg
Height = 235
Align = alClient
TabOrder = 0
- ExplicitWidth = 313
- ExplicitHeight = 199
+ inherited btnDefSwitches: TButton
+ ExplicitLeft = 293
+ end
+ inherited btnAdd: TButton
+ ExplicitLeft = 222
+ end
+ inherited btnReplace: TButton
+ ExplicitLeft = 293
+ end
+ inherited btnDelete: TButton
+ ExplicitLeft = 222
+ end
end
end
object tsSearchDirs: TTabSheet
Caption = 'Search Paths'
ImageIndex = 3
- ExplicitWidth = 313
- ExplicitHeight = 199
inline frmSearchDirs: TCompilersDlgSearchDirsFrame
Left = 0
Top = 0
@@ -100,14 +112,21 @@ inherited CompilersDlg: TCompilersDlg
Height = 235
Align = alClient
TabOrder = 0
- ExplicitHeight = 199
+ inherited edPath: TEdit
+ ExplicitWidth = 322
+ end
+ inherited btnBrowse: TButton
+ ExplicitLeft = 331
+ end
end
end
object tsLog: TTabSheet
Caption = 'Output Log'
ImageIndex = 1
- ExplicitWidth = 313
- ExplicitHeight = 199
+ ExplicitLeft = 0
+ ExplicitTop = 0
+ ExplicitWidth = 0
+ ExplicitHeight = 0
inline frmLog: TCompilersDlgLogFrame
Left = 0
Top = 0
@@ -115,7 +134,9 @@ inherited CompilersDlg: TCompilersDlg
Height = 235
Align = alClient
TabOrder = 0
- ExplicitHeight = 199
+ inherited vleLogPrefixes: TValueListEditor
+ ExplicitWidth = 354
+ end
end
end
end
diff --git a/Src/FmCompilersDlg.pas b/Src/FmCompilersDlg.pas
index 244420263..a984ff6e6 100644
--- a/Src/FmCompilersDlg.pas
+++ b/Src/FmCompilersDlg.pas
@@ -3,7 +3,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
From 8d5821afaccd24c7f41b69a664d4d90631e9f498 Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Wed, 13 Jul 2016 10:46:29 +0100
Subject: [PATCH 003/714] Updated help topics re support for Delphi 10.1 Berlin
---
Src/Help/HTML/about_compiler_checks.htm | 4 ++--
Src/Help/HTML/dlg_configcompilers.htm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Src/Help/HTML/about_compiler_checks.htm b/Src/Help/HTML/about_compiler_checks.htm
index 29844b5e9..8592a6966 100644
--- a/Src/Help/HTML/about_compiler_checks.htm
+++ b/Src/Help/HTML/about_compiler_checks.htm
@@ -4,7 +4,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2005-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -37,7 +37,7 @@
The supported compilers are the Win32 Delphi compilers from Delphi 2 to
- Delphi 10 Seattle and Free Pascal.
+ Delphi 10.1 Berlin and Free Pascal.
Configuring CodeSnip
diff --git a/Src/Help/HTML/dlg_configcompilers.htm b/Src/Help/HTML/dlg_configcompilers.htm
index 4244fbafa..1bf6b60eb 100644
--- a/Src/Help/HTML/dlg_configcompilers.htm
+++ b/Src/Help/HTML/dlg_configcompilers.htm
@@ -281,7 +281,7 @@
CodeSnip can automatically detect the presence of Win 32 Delphi
- compilers from Delphi 2 to Delphi 10 Seattle. Click the Detect Delphi
+ compilers from Delphi 2 to Delphi 10.1 Berlin. Click the Detect Delphi
Compilers button to do this. Any supported installed version of
Delphi will be recorded. This can save considerable time and avoid
errors.
From 6d4d86bc5a62d576ed759ebd0d411bfc14ebfdc3 Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Wed, 13 Jul 2016 10:47:37 +0100
Subject: [PATCH 004/714] Updated file format documentation with changes re
support for Delphi 10.1 Berlin
---
Docs/Design/FileFormats/config.html | 11 ++++++++++-
Docs/Design/FileFormats/export.html | 5 ++++-
Docs/Design/FileFormats/main-db.html | 6 +++++-
Docs/Design/FileFormats/user-db.html | 5 ++++-
4 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html
index 8d3a9f12a..fe3d248ae 100644
--- a/Docs/Design/FileFormats/config.html
+++ b/Docs/Design/FileFormats/config.html
@@ -5,7 +5,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -294,6 +294,9 @@
D10S – Delphi 10 Seattle
+
+ D101B – Delphi 10.1 Berlin
+
FPC – Free Pascal
@@ -594,6 +597,12 @@
Indicates whether Delphi 10 Seattle was included in search.
+
+ D101B (Boolean)
+
+
+ Indicates whether Delphi 10.1 Berlin was included in search.
+
FPC (Boolean)
diff --git a/Docs/Design/FileFormats/export.html b/Docs/Design/FileFormats/export.html
index 0559b76a1..142439124 100644
--- a/Docs/Design/FileFormats/export.html
+++ b/Docs/Design/FileFormats/export.html
@@ -5,7 +5,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -518,6 +518,9 @@
d10s – Delphi 10 Seattle compiler
+
+ d101b – Delphi 10.1 Berlin compiler
+
fpc – Free Pascal compiler
diff --git a/Docs/Design/FileFormats/main-db.html b/Docs/Design/FileFormats/main-db.html
index 426c55b28..09b38fcfa 100644
--- a/Docs/Design/FileFormats/main-db.html
+++ b/Docs/Design/FileFormats/main-db.html
@@ -5,7 +5,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -157,6 +157,7 @@
DelphiXE7=<Y|N|Q|W>
DelphiXE8=<Y|N|Q|W>
Delphi10S=<Y|N|Q|W>
+Delphi101B=<Y|N|Q|W>
FPC=<Y|N|Q|W>
Extra=<extra-info-REML>
StandardFormat=<0|1>
@@ -347,6 +348,9 @@
Delphi10S – Delphi 10 Seattle compiler
+
+ Delphi101B – Delphi 10.1 Berlin compiler
+
FPC – Free Pascal compiler
diff --git a/Docs/Design/FileFormats/user-db.html b/Docs/Design/FileFormats/user-db.html
index d4b7cc103..b479002a8 100644
--- a/Docs/Design/FileFormats/user-db.html
+++ b/Docs/Design/FileFormats/user-db.html
@@ -5,7 +5,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
+ * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
@@ -568,6 +568,9 @@
d10s – Delphi 10 Seattle compiler
+
+ d101b – Delphi 10.1 Berlin compiler
+
fpc – Free Pascal compiler
From 4e25458b7d8f0917e84d056d50cf06dc096f63ba Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Wed, 13 Jul 2016 10:47:58 +0100
Subject: [PATCH 005/714] Updated read-me file re support for Delphi 10.1
Berlin
---
Docs/ReadMe.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt
index 5d2e7948c..82c2b9ca1 100644
--- a/Docs/ReadMe.txt
+++ b/Docs/ReadMe.txt
@@ -14,7 +14,7 @@ online DelphiDabbler Code Snippets database as well as maintain a database of
user-defined snippets.
It displays details of each snippet in the database and can test-compile them
-with each installed Win32 version of Delphi from Delphi 2 to Delphi 10 Seattle
+with each installed Win32 version of Delphi from Delphi 2 to Delphi 10.1 Berlin
along with Free Pascal.
Compilable Pascal units can be created that contain selected snippets.
@@ -225,7 +225,7 @@ dialogue" in the help file index).
Each user can configure compilers differently.
-Delphi XE2 to XE8 and Delphi 10 Seattle may need to be configured to search for
+Delphi XE2 to XE8 and Delphi 10.1 Berlin may need to be configured to search for
required units in the correct namespaces. This is explained in the Add/Edit
Snippet Dialogue Box help topic and in the FAQ at
http://delphidabbler.com/url/codesnip-and-xe2.
From 6593580f4d3ccd05a3cbe7c7fd37221f70030b6c Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Wed, 13 Jul 2016 10:56:03 +0100
Subject: [PATCH 006/714] Bumped version number to 4.15.0 build 255
---
Src/VCodeSnip.vi | 4 ++--
Src/VCodeSnipPortable.vi | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Src/VCodeSnip.vi b/Src/VCodeSnip.vi
index 2b231a4ef..47f5fc0c7 100644
--- a/Src/VCodeSnip.vi
+++ b/Src/VCodeSnip.vi
@@ -11,8 +11,8 @@
[Fixed File Info]
-File Version #=4, 14, 0, 254
-Product Version #=4, 14, 0, 0
+File Version #=4, 15, 0, 255
+Product Version #=4, 15, 0, 0
File OS=4
File Type=1
File Sub-Type=0
diff --git a/Src/VCodeSnipPortable.vi b/Src/VCodeSnipPortable.vi
index 5f085b3e7..f4065eaf4 100644
--- a/Src/VCodeSnipPortable.vi
+++ b/Src/VCodeSnipPortable.vi
@@ -11,8 +11,8 @@
[Fixed File Info]
-File Version #=4, 14, 0, 254
-Product Version #=4, 14, 0, 0
+File Version #=4, 15, 0, 255
+Product Version #=4, 15, 0, 0
File OS=4
File Type=1
File Sub-Type=0
From 4772539e5b56873a3053f2d6eb22f3ea513cf8cc Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Wed, 13 Jul 2016 10:59:21 +0100
Subject: [PATCH 007/714] Updated change log re CodeSnip v4.15.0.
---
Docs/ChangeLogs/ChangeLog-v4.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Docs/ChangeLogs/ChangeLog-v4.txt b/Docs/ChangeLogs/ChangeLog-v4.txt
index 58bf04a27..5d2e1010f 100644
--- a/Docs/ChangeLogs/ChangeLog-v4.txt
+++ b/Docs/ChangeLogs/ChangeLog-v4.txt
@@ -11,6 +11,12 @@
; Change Log for CodeSnip Release 4
; ------------------------------------------------------------------------------
+Release v4.15.0 of 13 July 2016
++ Added support for test compilation with, and detection of, Delphi 10.1 Berlin compiler.
++ Tweaked size of compiler list in Configure Compilers dialogue box to accommodate length of Delphi 10.1 Berline compiler name!
++ Updated documentation re changes.
++ Updated help file re changes.
+
Release v4.14.0 of 19 March 2016
+ Changes to About Box's "Paths" tab:
- Added new buttons to display the contents of the system and per-user config files.
From da3e4328e2d9178237dd672e7086a09330d05c4c Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Thu, 22 Sep 2016 03:36:18 +0100
Subject: [PATCH 008/714] Updated DelphiDabbler System Information Unit to
latest 5.3.0 version.
This adds support for Windows 10 Anniversary Update (version 1607) and tech previews of Windows 2016 Server.
---
Src/3rdParty/PJSysInfo.pas | 110 +++++++++++++++++++++++++++----------
1 file changed, 82 insertions(+), 28 deletions(-)
diff --git a/Src/3rdParty/PJSysInfo.pas b/Src/3rdParty/PJSysInfo.pas
index 478bb94b5..65f74044b 100644
--- a/Src/3rdParty/PJSysInfo.pas
+++ b/Src/3rdParty/PJSysInfo.pas
@@ -3,10 +3,10 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2001-2015, Peter Johnson (@delphidabbler).
+ * Copyright (C) 2001-2016, Peter Johnson (@delphidabbler).
*
- * $Rev: 2002 $
- * $Date: 2015-11-30 14:45:35 +0000 (Mon, 30 Nov 2015) $
+ * $Rev: 2015 $
+ * $Date: 2016-09-12 00:47:45 +0100 (Mon, 12 Sep 2016) $
*
* This unit contains various static classes, constants, type definitions and
* global variables for use in providing information about the host computer and
@@ -443,8 +443,7 @@ interface
osWin8Point1, // Windows 8.1
osWinSvr2012R2, // Windows Server 2012 R2
osWin10, // Windows 10
- // TODO: Update following comment to correct name once released
- osWin10Svr // Windows 10 Server Technical Preview
+ osWin10Svr // Windows 2016 Server
);
type
@@ -582,7 +581,7 @@ TPJOSInfo = class(TObject)
///
/// Windows has added significant OS updates that bump the build
/// number but do not declare themselves as service packs: e.g. the Windows
- /// 10 TH2 update.
+ /// 10 TH2 update, aka Version 1511.
/// This method is used to report such updates in addition to
/// updates that declare themselves as service packs, while the ServicePack
/// method only reports declared 'official' service packs.
@@ -1498,10 +1497,16 @@ procedure InitPlatformIdEx;
WinVistaBaseBuild = 6000;
Win7BaseBuild = 7600;
// for Win 8 onwards we just use the build numbers as is
- Win8Build = 9200;
- Win8Point1Build = 9600;
- Win10TH1Build = 10240;
- Win10TH2Build = 10586;
+ Win8Build = 9200; // Only build number used for Win 8 / Svr 2012
+ Win8Point1Build = 9600; // Only build number used for Win 8.1 / Svr 2012 R2
+ Win10TH1Build = 10240; // Initial Windows 10 release (not Server 2016)
+ Win10TH2Build = 10586; // Windows 10 TH2 (shared with Win 2016 TP4 - below)
+ Win10RS1Build = 14393; // Windows 10 RS1
+ Win2016TP1Build = 9841; // Windows 2016 Server Technical Preview 1
+ Win2016TP2Build = 10074; // Windows 2016 Server Technical Preview 2
+ Win2016TP3Build = 10514; // Windows 2016 Server Technical Preview 3
+ Win2016TP4Build = 10586; // Windows 2016 Server Technical Preview 4
+ Win2016TP5Build = 14300; // Windows 2016 Server Technical Preview 5
begin
// Load version query functions used externally to this routine
VerSetConditionMask := LoadKernelFunc('VerSetConditionMask');
@@ -1530,6 +1535,15 @@ procedure InitPlatformIdEx;
InternalMajorVersion, InternalMinorVersion,
Win32ServicePackMajor, Win32ServicePackMinor
);
+ // Test possible product types to see which one we have
+ if IsWindowsProductType(VER_NT_WORKSTATION) then
+ Win32ProductType := VER_NT_WORKSTATION
+ else if IsWindowsProductType(VER_NT_DOMAIN_CONTROLLER) then
+ Win32ProductType := VER_NT_DOMAIN_CONTROLLER
+ else if IsWindowsProductType(VER_NT_SERVER) then
+ Win32ProductType := VER_NT_SERVER
+ else
+ Win32ProductType := 0;
// NOTE: It's going to be very slow to test for all possible build numbers,
// so I've just narrowed the search down using the information at
// http://en.wikipedia.org/wiki/Windows_NT
@@ -1551,7 +1565,14 @@ procedure InitPlatformIdEx;
// Windows 8.1 (no known SPs)
if Win32ServicePackMajor = 0 then
InternalBuildNumber := Win8Point1Build;
-
+ 4:
+ if (Win32ProductType = VER_NT_DOMAIN_CONTROLLER)
+ or (Win32ProductType = VER_NT_SERVER) then
+ begin
+ // Windows 2016 Server tech preview 1
+ InternalBuildNumber := Win2016TP1Build;
+ InternalExtraUpdateInfo := 'Technical Preview 6';
+ end;
end;
if Win32ServicePackMajor > 0 then
// ** Tried to read this info from registry, but for some weird
@@ -1567,9 +1588,9 @@ procedure InitPlatformIdEx;
begin
case InternalMinorVersion of
0:
+ if (Win32ProductType <> VER_NT_DOMAIN_CONTROLLER)
+ and (Win32ProductType <> VER_NT_SERVER) then
begin
- // TODO: Revist when server version released to check if same build
- // number(s)
// Windows 10 TH1 branch release
if IsBuildNumber(Win10TH1Build) then
InternalBuildNumber := Win10TH1Build
@@ -1577,8 +1598,42 @@ procedure InitPlatformIdEx;
else if IsBuildNumber(Win10TH2Build) then
begin
InternalBuildNumber := Win10TH2Build;
- InternalExtraUpdateInfo := 'TH2: November Update';
+ InternalExtraUpdateInfo := 'Version 1511';
+ end
+ else if IsBuildNumber(Win10RS1Build) then
+ begin
+ InternalBuildNumber := Win10RS1Build;
+ InternalExtraUpdateInfo := 'Version 1607';
end;
+ end
+ else
+ begin
+ { TODO: Revisit when Windows 2016 Server is released to add its
+ build number }
+ // Check for Technical previews. We don't check for TP1 here because
+ // that reported version 6.4, not version 10!
+ // Source of these build numbers:
+ // https://en.wikipedia.org/wiki/Windows_Server_2016#Version_history
+ if IsBuildNumber(Win2016TP2Build) then
+ begin
+ InternalBuildNumber := Win2016TP2Build;
+ InternalExtraUpdateInfo := 'Technical Preview 2';
+ end
+ else if IsBuildNumber(Win2016TP3Build) then
+ begin
+ InternalBuildNumber := Win2016TP3Build;
+ InternalExtraUpdateInfo := 'Technical Preview 3';
+ end
+ else if IsBuildNumber(Win2016TP4Build) then
+ begin
+ InternalBuildNumber := Win2016TP4Build;
+ InternalExtraUpdateInfo := 'Technical Preview 4';
+ end
+ else if IsBuildNumber(Win2016TP5Build) then
+ begin
+ InternalBuildNumber := Win2016TP5Build;
+ InternalExtraUpdateInfo := 'Technical Preview 5';
+ end
end;
end;
end;
@@ -1591,17 +1646,10 @@ procedure InitPlatformIdEx;
// 10586 !
// So we must now consider a build number of 0 as indicating an unknown
// build number.
+ // But note that some users report that their registry is returning
+ // correct value. I really hate Windows!!!
// ** Seems like more registry spoofing (see above).
- // Test possible product types to see which one we have
- if IsWindowsProductType(VER_NT_WORKSTATION) then
- Win32ProductType := VER_NT_WORKSTATION
- else if IsWindowsProductType(VER_NT_DOMAIN_CONTROLLER) then
- Win32ProductType := VER_NT_DOMAIN_CONTROLLER
- else if IsWindowsProductType(VER_NT_SERVER) then
- Win32ProductType := VER_NT_SERVER
- else
- Win32ProductType := 0;
end
else
begin
@@ -1702,14 +1750,14 @@ class function TPJOSInfo.Description: string;
// For NT3/4 append version number after product
AppendToResult(Format('%d.%d', [MajorVersion, MinorVersion]));
AppendToResult(Edition);
- AppendToResult(ServicePack); // does nothing if no service pack
+ AppendToResult(ServicePackEx); // does nothing if no service pack etc
AppendToResult(Format('(Build %d)', [BuildNumber]));
end
else
begin
// Windows 2000 and later: don't include version number
AppendToResult(Edition);
- AppendToResult(ServicePack); // does nothing if no service pack
+ AppendToResult(ServicePackEx); // does nothing if no service pack
AppendToResult(Format('(Build %d)', [BuildNumber]));
end;
end;
@@ -2242,6 +2290,13 @@ class function TPJOSInfo.Product: TPJOSProduct;
Result := osWin8Point1
else
Result := osWinSvr2012R2;
+ 4:
+ // Version 6.4 was used for Windows 2016 server tech preview 1.
+ // This version *may* only be detected by Windows if the
+ // application is "manifested" for the correct Windows version.
+ // See http://bit.ly/MJSO8Q.
+ if IsServer then
+ Result := osWin10Svr;
else
// Higher minor version: must be an unknown later OS
Result := osWinLater
@@ -2305,8 +2360,7 @@ class function TPJOSInfo.ProductName: string;
osWin8Point1: Result := 'Windows 8.1';
osWinSvr2012R2: Result := 'Windows Server 2012 R2';
osWin10: Result := 'Windows 10';
- // TODO: Update osWin10Svr description once OS is released and named
- osWin10Svr: Result := 'Windows Server Technical Preview';
+ osWin10Svr: Result := 'Windows Server 2016';
else
raise EPJSysInfo.Create(sUnknownProduct);
end;
@@ -2337,7 +2391,7 @@ class function TPJOSInfo.RegisteredOwner: string;
class function TPJOSInfo.ServicePack: string;
begin
- // Assume to service pack
+ // Assume no service pack
Result := '';
case Platform of
ospWin9x:
From d6d05871a8cab54eea6d32e2be102ff2ff24eeb2 Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Thu, 22 Sep 2016 03:46:12 +0100
Subject: [PATCH 009/714] Updated file and product version numbers to 4.15.1
build 256
---
Src/VCodeSnip.vi | 4 ++--
Src/VCodeSnipPortable.vi | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Src/VCodeSnip.vi b/Src/VCodeSnip.vi
index 47f5fc0c7..15a2e6a54 100644
--- a/Src/VCodeSnip.vi
+++ b/Src/VCodeSnip.vi
@@ -11,8 +11,8 @@
[Fixed File Info]
-File Version #=4, 15, 0, 255
-Product Version #=4, 15, 0, 0
+File Version #=4, 15, 1, 256
+Product Version #=4, 15, 1, 0
File OS=4
File Type=1
File Sub-Type=0
diff --git a/Src/VCodeSnipPortable.vi b/Src/VCodeSnipPortable.vi
index f4065eaf4..041a452d0 100644
--- a/Src/VCodeSnipPortable.vi
+++ b/Src/VCodeSnipPortable.vi
@@ -11,8 +11,8 @@
[Fixed File Info]
-File Version #=4, 15, 0, 255
-Product Version #=4, 15, 0, 0
+File Version #=4, 15, 1, 256
+Product Version #=4, 15, 1, 0
File OS=4
File Type=1
File Sub-Type=0
From 10fae713bc10090f16868f858b0e95ae727cc7a8 Mon Sep 17 00:00:00 2001
From: DelphiDabbler
Date: Thu, 22 Sep 2016 03:52:18 +0100
Subject: [PATCH 010/714] Updated change log re CodeSnip v4.15.1.
---
Docs/ChangeLogs/ChangeLog-v4.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Docs/ChangeLogs/ChangeLog-v4.txt b/Docs/ChangeLogs/ChangeLog-v4.txt
index 5d2e1010f..b4079b83d 100644
--- a/Docs/ChangeLogs/ChangeLog-v4.txt
+++ b/Docs/ChangeLogs/ChangeLog-v4.txt
@@ -11,6 +11,9 @@
; Change Log for CodeSnip Release 4
; ------------------------------------------------------------------------------
+Release v4.15.1 of 22 September 2016
++ Updated OS detection code to detect Windows 10 Version 1607 (Anniversary update) and all technical previews of Windows 2016 Server to date.
+
Release v4.15.0 of 13 July 2016
+ Added support for test compilation with, and detection of, Delphi 10.1 Berlin compiler.
+ Tweaked size of compiler list in Configure Compilers dialogue box to accommodate length of Delphi 10.1 Berline compiler name!
From 7183822fbc6261a2cad41925220a081b85ec47d7 Mon Sep 17 00:00:00 2001
From: Peter Johnson
Date: Fri, 19 Oct 2018 01:01:34 +0100
Subject: [PATCH 011/714] Update README.md
Removed reference to deleted Google+ page
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index 5639ca79f..0ca3b9976 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,6 @@ There's quite a lot of support available for CodeSnip:
* An [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppUsing).
* A [discussion group](https://sourceforge.net/p/codesnip/discussion) on SourceForge (albeit barely used!).
* An [RSS news feed](http://delphidabbler.com/feeds/site-news-feed?id=codesnip). This can also be accessed via the program.
-* A [Google+ page](https://plus.google.com/u/0/b/108251259814638768561/108251259814638768561/posts).
* A [Blog](http://codesnip-app.blogspot.co.uk/).
* A [privacy statement](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/Privacy.txt)* that provides information about any personal information stored by the program and what info is transmitted over the net.
From a03768ee00f4d8ccc6d1fc0163f8209e793a3f00 Mon Sep 17 00:00:00 2001
From: Peter Johnson
Date: Sat, 18 Jan 2020 11:38:47 +0000
Subject: [PATCH 012/714] Update README.md
Modified re planned closure of delphidabbler.com and end of support / development.
---
README.md | 65 +++++++++++++++++++++++++++----------------------------
1 file changed, 32 insertions(+), 33 deletions(-)
diff --git a/README.md b/README.md
index 0ca3b9976..57baf832f 100644
--- a/README.md
+++ b/README.md
@@ -4,47 +4,46 @@ A code bank designed with Pascal in mind.
* [Overview](#overview)
* [Installation](#installation)
-* [Bugs & Feature Requests](#bugs--feature-requests)
* [Support](#support)
* [Source Code](#source-code)
* [Change Log](#change-log)
-* [CodeSnip 5 Development](#codesnip-5-development)
-* [Donate](#donate)
+* [CodeSnip 5 Development](#codesnip-5-development) -- **frozen**
## Overview
+> **CodeSnip Is No Longer Being Supported**.
+
+> Bugs can no longer be reported and requests for new features are no longer being accepted.
+
+> It is hoped to produce one final version that removes the program's dependency on the delphidabbler.com webserver that is due to close 15th June 2020, but no guarantees.
+
CodeSnip is an open source code bank for storing and viewing your code snippets. While it can manage snippets in any source language, it is focussed mainly on Pascal and Delphi code for which additional features are available.
-CodeSnip also provides offline access to the DelphiDabbler [Code Snippets Database](http://snippets.delphidabbler.com/).
+CodeSnip also provides offline access to the DelphiDabbler [Code Snippets Database](http://snippets.delphidabbler.com/) -- *deprecated* † ‡.
The program is available in both standard and portable editions.
-For more information see [http://codesnip.delphidabbler.com/features](http://codesnip.delphidabbler.com/features).
+For more information see [http://codesnip.delphidabbler.com/features](http://codesnip.delphidabbler.com/features) -- *deprecated* †.
CodeSnip requires Windows 2000 or later and Internet Explorer 6 or later, although XP and IE 8 and later are preferred.
-## Installation
-
-CodeSnip is installed and removed using a standard Windows installer. Administrator privileges are required for installation.
-
-## Bugs & Feature Requests
+† DelphiDabbler.com is due to close down on 15 June 2020. After this time these links will no longer work.
-Bugs can be reported using the [Bug Tracker](https://sourceforge.net/p/codesnip/bugs/) on SourceForge. Info on how best to report bugs is provided on the tracker.
+‡ It is hoped to move the Code Snippets Database to GitHub before DelphiDabbler.com closes down.
-Feature requests can be made on the [Feature Request Tracker](https://sourceforge.net/p/codesnip/feature-requests/) on SourceForge. Once again info on how to proceed is provided.
+## Installation
-> In time the bug and feature request trackers will be moved to GitHub.
+CodeSnip is installed and removed using a standard Windows installer. Administrator privileges are required for installation.
## Support
-There's quite a lot of support available for CodeSnip:
+The following support is available for CodeSnip:
* A comprehensive help file.
-* A [read-me file](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/ReadMe.txt)* that discusses installation, configuration, updating and known issues.
-* A dedicated set of [web pages](http://delphidabbler.com/url/codesnip-home).
-* An [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppUsing).
-* A [discussion group](https://sourceforge.net/p/codesnip/discussion) on SourceForge (albeit barely used!).
-* An [RSS news feed](http://delphidabbler.com/feeds/site-news-feed?id=codesnip). This can also be accessed via the program.
+* A [read-me file](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/ReadMe.txt) * that discusses installation, configuration, updating and known issues.
+* A dedicated set of [web pages](http://codesnip.delphidabbler.com/) -- *deprecated* †.
+* An [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppUsing) -- *deprecated* † ‡.
+* An [RSS news feed](http://delphidabbler.com/feeds/site-news-feed?id=codesnip) -- *deprecated* †. This can also be accessed via the program.
* A [Blog](http://codesnip-app.blogspot.co.uk/).
* A [privacy statement](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/Privacy.txt)* that provides information about any personal information stored by the program and what info is transmitted over the net.
@@ -52,27 +51,29 @@ There's also plenty of info available on how to compile CodeSnip from source - s
* These links take you to the most recent version of the documents -- they can change from release to release.
+† These features are **deprecated** -- they are dependent on the delphidabbler.com web server which is due to close down on 15th June 2020.
+
+‡ This feature may be moved to GitHub -- no promises!
+
## Source Code
Up to and including release 4.13.1 the project's source code was maintained in a Subversion repository on [SourceForge](https://sourceforge.net/p/codesnip/code/). The Subversion repo was converted to Git on 21 5 October 2015 and imported to GitHub. All releases from v3.0.0 are marked by tags in the form `version-x.x.x` where `x.x.x` is the version number.
> Note that any branches that were created and deleted in the Subversion repo are missing from the Git history. So, for full details of the the project's history from v3.0.0 to v4.13.1 please refer to the old Subversion repo on SourceForge.
-Following tag `version-4.13.1` the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology was adopted, with the exception that development work on CodeSnip v5 exists outside Git Flow in the `pagoda` branch (See below for details).
+Following tag `version-4.13.1` the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology was adopted. The exception is the `pagoda` branch that sits outside Git Flow. This branch was originally planned to be the CodeSnip v5 development branch (see [below](#codesnip-5-development) for details).
Up to and including release 4.13.1, `master` is simply a copy of the old Subversion `trunk` and, as such, contains various development commits along with numerous commits related to management of Subversion. After release 4.13.1, and the addition of this read-me file, `master` contains only commits relating to an actual release.
### Contributions
-Contributions are welcome. Just fork the repo and create a feature branch off the `develop` branch. Commit your changes to your feature branch then submit a pull request when ready.
-
-If you are contributing to CodeSnip 5 development please create your feature branch off the `pagoda` branch instead.
+Contributions are no longer accepted for this repo. If you wish to take over development, please fork the repo and take it where you wish.
### Compiling
`master` and each branch will have a file in the root directory named `Build.html` that gives detailed information about how to compile CodeSnip.
-There is also a [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppSource).
+There is also an [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppSource) -- *deprecated* (see [Support](#support) above).
## Change Log
@@ -88,16 +89,14 @@ The [CodeSnip Compiling & Source Code FAQ](http://wiki.delphidabbler.com/index.p
## CodeSnip 5 Development
-Following a false start back in 2013/4 in the `parsnip` branch, development of CodeSnip 5 has restarted. The code can be found in the `pagoda` branch, which picks up where `parsnip` left off. (Don't ask where those names came from!)
+Following a false start back in 2013/4 in the `parsnip` branch, development of CodeSnip 5 restarted in the `pagoda` branch, which picked up where `parsnip` left off. (Don't ask where those names came from!)
-At present the direction CodeSnip is being taken is to:
+Unfortunately `pagoda` has also been abandoned now. The branch has been left in place in case anyone else wants to continue development.
-1. Generalise it to be a code bank for several different languages instead of just Pascal, while still providing some additional support for test-compiling Pascal code.
-2. Increase the focus on the user's own code while downplaying the importance of code downloaded from the DelphiDabbler [Code Snippets database](http://snippets.delphidabbler.com/). This will still be available but will be very much an add on, like [SWAG](http://swag.delphidabbler.com/) is at present.
-3. Remove the program's dependency on web services provided by [DelphiDabbler.com](http://delphidabbler.com) given the current uncertainty over that websites future.
-
-Comments on these ideas are welcome - just create a [feature request](https://sourceforge.net/p/codesnip/feature-requests/) and select the `v5 (pagoda)` milestone.
+The idea behind v5 was to:
-## Donate
+1. Generalise CodeSnip to be a code bank for several different languages instead of just Pascal, while still providing some additional support for test-compiling Pascal code.
+2. Increase the focus on the user's own code while downplaying the importance of code downloaded from the DelphiDabbler [Code Snippets database](http://snippets.delphidabbler.com/), like [SWAG](http://swag.delphidabbler.com/) is at present. †
+3. Remove the program's dependency on web services provided by [DelphiDabbler.com](http://delphidabbler.com) given the current uncertainty over that websites future.
-If you've found the program useful please consider making a donation to help cover costs. Donations are accepted by [PayPal](http://delphidabbler.com/url/donate-cs) in British Pounds (GBP) -- [see common exchange rates](http://www.xe.com/currency/gbp-british-pound).
+† It is hoped to move the Code Snippets database to GitHub before DelphiDabbler closes down on 15 June 2020.
From ac4c81b64dae953f381ff9f4f5c6dbefb7b4be78 Mon Sep 17 00:00:00 2001
From: Peter Johnson
Date: Tue, 4 Feb 2020 10:45:58 +0000
Subject: [PATCH 013/714] Update README.md
Updated with current work in progress on new CodeSnip before DelphiDabbler.com closes.
Also info about new code-snippets GitHub repo.
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 57baf832f..607ea72c0 100644
--- a/README.md
+++ b/README.md
@@ -11,11 +11,11 @@ A code bank designed with Pascal in mind.
## Overview
-> **CodeSnip Is No Longer Being Supported**.
+> **CodeSnip 4 Is No Longer Being Supported**.
-> Bugs can no longer be reported and requests for new features are no longer being accepted.
+> Bugs can no longer be reported and requests for new features in CodeSnip 4 are no longer being accepted.
-> It is hoped to produce one final version that removes the program's dependency on the delphidabbler.com webserver that is due to close 15th June 2020, but no guarantees.
+> It is hoped to produce one final version that removes the program's dependency on the delphidabbler.com webserver that is due to close 15th June 2020, but no guarantees. Work started late Jan 2020.
CodeSnip is an open source code bank for storing and viewing your code snippets. While it can manage snippets in any source language, it is focussed mainly on Pascal and Delphi code for which additional features are available.
@@ -29,7 +29,7 @@ CodeSnip requires Windows 2000 or later and Internet Explorer 6 or later, althou
† DelphiDabbler.com is due to close down on 15 June 2020. After this time these links will no longer work.
-‡ It is hoped to move the Code Snippets Database to GitHub before DelphiDabbler.com closes down.
+‡ The Code Snippets Database has been imported to GitHub: it's a work in progress. [See the repo](https://github.com/delphidabbler/code-snippets).
## Installation
From fc898cd167a7597445b0878db9db920042d80a58 Mon Sep 17 00:00:00 2001
From: delphidabbler
Date: Wed, 5 Feb 2020 01:37:32 +0000
Subject: [PATCH 014/714] Updated .gitignore
---
.gitignore | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index ad252c726..34885dadb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-# .gitignore file for CodeSnip project
+# .gitignore file for CodeSnip project
# Delphi generated temporary files and directories
*.local
@@ -15,3 +15,5 @@ Exe
Release
Src/CodeSnip.cfg
Src/AutoGen/IntfExternalObj.pas
+Src/Portable/CodeSnipPortable.cfg
+Src/Main/AutoGen/IntfExternalObj.pas
From a7f03bd1ebf529e624ae619d86087c11a7d7f276 Mon Sep 17 00:00:00 2001
From: delphidabbler
Date: Wed, 5 Feb 2020 02:13:09 +0000
Subject: [PATCH 015/714] Removed all program registration code .
Removed Web.URegistrar and FmRegistrationDlg unit from project.
Removed all UI widgets and dialogues that that were used in accessing registration code.
Removed code that recorded and read registration state and user name in settings.
Modified code that depended on registration key and user name.
Removed code to detect loss of registration info in first run code
---
Src/CodeSnip.dpr | 2 -
Src/CodeSnip.dproj | 4 -
Src/FirstRun.FmV4ConfigDlg.dfm | 20 ++
Src/FirstRun.FmV4ConfigDlg.pas | 3 -
Src/FirstRun.UMain.pas | 2 -
Src/FmAboutDlg.dfm | 15 -
Src/FmAboutDlg.pas | 68 +----
Src/FmMain.dfm | 14 -
Src/FmMain.pas | 31 --
Src/FmRegistrationDlg.dfm | 151 ----------
Src/FmRegistrationDlg.pas | 344 -----------------------
Src/Res/HTML/dlg-about-program-tplt.html | 4 -
Src/UAppInfo.pas | 63 -----
Src/UDialogMgr.pas | 12 +-
Src/UUserDetailsPersist.pas | 2 -
Src/Web.URegistrar.pas | 130 ---------
16 files changed, 26 insertions(+), 839 deletions(-)
delete mode 100644 Src/FmRegistrationDlg.dfm
delete mode 100644 Src/FmRegistrationDlg.pas
delete mode 100644 Src/Web.URegistrar.pas
diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr
index 78c718ef7..0c91accf1 100644
--- a/Src/CodeSnip.dpr
+++ b/Src/CodeSnip.dpr
@@ -129,7 +129,6 @@ uses
FmPrintDlg in 'FmPrintDlg.pas' {PrintDlg},
FmProgramUpdatesDlg in 'FmProgramUpdatesDlg.pas' {ProgramUpdatesDlg},
FmProxyServerDlg in 'FmProxyServerDlg.pas' {ProxyServerDlg},
- FmRegistrationDlg in 'FmRegistrationDlg.pas' {RegistrationDlg},
FmRenameCategoryDlg in 'FmRenameCategoryDlg.pas' {RenameCategoryDlg},
FmSelectionSearchDlg in 'FmSelectionSearchDlg.pas' {SelectionSearchDlg},
FmSnippetsEditorDlg in 'FmSnippetsEditorDlg.pas' {SnippetsEditorDlg},
@@ -405,7 +404,6 @@ uses
Web.UHTTPEx in 'Web.UHTTPEx.pas',
Web.UInfo in 'Web.UInfo.pas',
Web.UProgramUpdateMgr in 'Web.UProgramUpdateMgr.pas',
- Web.URegistrar in 'Web.URegistrar.pas',
Web.UStdWebService in 'Web.UStdWebService.pas',
Web.USWAGRESTMgr in 'Web.USWAGRESTMgr.pas',
Web.UXMLRequestor in 'Web.UXMLRequestor.pas';
diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj
index cf4f0b87b..22f085a4c 100644
--- a/Src/CodeSnip.dproj
+++ b/Src/CodeSnip.dproj
@@ -219,9 +219,6 @@
-
-
-
@@ -620,7 +617,6 @@
-
diff --git a/Src/FirstRun.FmV4ConfigDlg.dfm b/Src/FirstRun.FmV4ConfigDlg.dfm
index d5657e2d7..cfc977d4b 100644
--- a/Src/FirstRun.FmV4ConfigDlg.dfm
+++ b/Src/FirstRun.FmV4ConfigDlg.dfm
@@ -15,6 +15,10 @@ inherited V4ConfigDlg: TV4ConfigDlg
object tsIntro: TTabSheet
Caption = 'tsIntro'
TabVisible = False
+ ExplicitLeft = 0
+ ExplicitTop = 0
+ ExplicitWidth = 0
+ ExplicitHeight = 0
object lblIntro1: TLabel
Left = 0
Top = 3
@@ -70,6 +74,10 @@ inherited V4ConfigDlg: TV4ConfigDlg
Caption = 'tsConfigFile'
ImageIndex = 1
TabVisible = False
+ ExplicitLeft = 0
+ ExplicitTop = 0
+ ExplicitWidth = 0
+ ExplicitHeight = 0
object lblCopyConfig: TLabel
Left = 0
Top = 3
@@ -97,6 +105,10 @@ inherited V4ConfigDlg: TV4ConfigDlg
Caption = 'tsUserDB'
ImageIndex = 2
TabVisible = False
+ ExplicitLeft = 0
+ ExplicitTop = 0
+ ExplicitWidth = 0
+ ExplicitHeight = 0
object lblUserDB1: TLabel
Left = 0
Top = 3
@@ -136,6 +148,10 @@ inherited V4ConfigDlg: TV4ConfigDlg
Caption = 'tsSummary'
ImageIndex = 3
TabVisible = False
+ ExplicitLeft = 0
+ ExplicitTop = 0
+ ExplicitWidth = 0
+ ExplicitHeight = 0
object lblSummaryPrefix: TLabel
Left = 0
Top = 3
@@ -170,6 +186,10 @@ inherited V4ConfigDlg: TV4ConfigDlg
Caption = 'tsFinish'
ImageIndex = 4
TabVisible = False
+ ExplicitLeft = 0
+ ExplicitTop = 0
+ ExplicitWidth = 0
+ ExplicitHeight = 0
object lblFinish1: TLabel
Left = 0
Top = 3
diff --git a/Src/FirstRun.FmV4ConfigDlg.pas b/Src/FirstRun.FmV4ConfigDlg.pas
index 22086217e..1bbea7973 100644
--- a/Src/FirstRun.FmV4ConfigDlg.pas
+++ b/Src/FirstRun.FmV4ConfigDlg.pas
@@ -341,7 +341,6 @@ function TV4ConfigDlg.HeadingText(const PageIdx: Integer): string;
procedure TV4ConfigDlg.ListChanges;
resourcestring
- sRegistration = 'Program registration information has been lost.';
sHiliter = 'Syntax highlighter customisations have been lost.';
sProxyPwd = 'Your proxy server password needs to be re-entered.';
sSourceFormat = 'Source code formatting preferences may have been lost.';
@@ -353,8 +352,6 @@ procedure TV4ConfigDlg.ListChanges;
// there are changes to config file: show in bullet list
lblFinish2.Visible := True;
Changes := TIStringList.Create;
- if frcRegistration in fCfgChanges then
- Changes.Add(sRegistration);
if frcHiliter in fCfgChanges then
Changes.Add(sHiliter);
if frcProxyPwd in fCfgChanges then
diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas
index 9eeb14e4b..965707ed9 100644
--- a/Src/FirstRun.UMain.pas
+++ b/Src/FirstRun.UMain.pas
@@ -29,7 +29,6 @@ interface
/// Enumeration of changes that can be made to brought forward
/// config files that result in data loss.
TFirstRunCfgChanges = (
- frcRegistration, // local registration record lost
frcHiliter, // syntax highlighter customisation lost
frcProxyPwd, // internet proxy password lost
frcSourceFormat // source code output formatting lost
@@ -219,7 +218,6 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet);
begin
fUserConfigFile.UpdateFromOriginal;
Include(Changes, frcHiliter);
- Include(Changes, frcRegistration);
Include(Changes, frcSourceFormat);
end;
piV1_9, piV2:
diff --git a/Src/FmAboutDlg.dfm b/Src/FmAboutDlg.dfm
index 63858166b..cfc0062f7 100644
--- a/Src/FmAboutDlg.dfm
+++ b/Src/FmAboutDlg.dfm
@@ -162,19 +162,4 @@ inherited AboutDlg: TAboutDlg
end
end
end
- inherited btnHelp: TButton
- TabOrder = 3
- end
- inherited btnClose: TButton
- TabOrder = 2
- end
- object btnRegister: TButton
- Left = 8
- Top = 304
- Width = 113
- Height = 25
- Caption = '&Register CodeSnip...'
- TabOrder = 1
- OnClick = btnRegisterClick
- end
end
diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas
index 44e9d453f..48dcde61e 100644
--- a/Src/FmAboutDlg.pas
+++ b/Src/FmAboutDlg.pas
@@ -79,7 +79,6 @@ TPathInfoBox = class(TCustomGroupBox)
the program's easter egg.
}
TAboutDlg = class(TGenericViewDlg)
- btnRegister: TButton;
bvlSeparator: TBevel;
frmDatabase: THTMLTpltDlgFrame;
frmProgram: THTMLTpltDlgFrame;
@@ -91,7 +90,6 @@ TAboutDlg = class(TGenericViewDlg)
tsPaths: TTabSheet;
btnViewAppConfig: TButton;
btnViewUserConfig: TButton;
- procedure btnRegisterClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
/// Handles event triggered when user clicks on one of page
@@ -113,10 +111,6 @@ TAboutDlg = class(TGenericViewDlg)
@param Sender [in] Not used.
@param EventInfo [in] Object providing information about the event.
}
- function RegistrationHTML: string;
- {Builds HTML used to display registration information.
- @return Required HTML.
- }
function ContribListHTML(const ContribClass: TContributorsClass): string;
{Builds HTML used to display list of contributors or creates an error
message if contributor list is not available.
@@ -135,16 +129,12 @@ TAboutDlg = class(TGenericViewDlg)
{Configures form by creating custom controls and initialising HTML frames.
Called from ancestor class.
}
- procedure InitForm; override;
- {Initialises form's controls. Called from ancestor class.
- }
procedure InitHTMLFrames;
{Initialises HTML frames to use required template document with
placeholders replaced by required values.
}
procedure ArrangeForm; override;
- {Adjusts position of registration button on bottom button line. Called
- from ancestor class.
+ {Arranges controls on form.
}
procedure UpdateTitleCSS(Sender: TObject; const CSSBuilder: TCSSBuilder);
{Updates CSS used for HTML displayed in title frame.
@@ -172,7 +162,7 @@ implementation
// Delphi
SysUtils, Graphics, Math, Windows, ShellAPI, IOUtils,
// Project
- FmEasterEgg, FmPreviewDlg, FmRegistrationDlg, UAppInfo, UColours, UConsts,
+ FmEasterEgg, FmPreviewDlg, UAppInfo, UColours, UConsts,
UCSSUtils, UCtrlArranger, UEncodings, UFontHelper, UGraphicUtils, UHTMLUtils,
UHTMLTemplate, UIOUtils, UMessageBox, UResourceUtils, UThemesEx;
@@ -191,7 +181,6 @@ implementation
<%Release%> program release number
<%ResURL%> url of programs HTML resources
- <%Registered%> info about whether program is registered
<%ContribList%> list of program contributors
<%TesterList%> list of program testers
<%Year%> current year
@@ -217,8 +206,7 @@ function ExploreFolder(const Folder: string): Boolean;
{ TAboutDlg }
procedure TAboutDlg.ArrangeForm;
- {Adjusts position of registration button on bottom button line. Called from
- ancestor class.
+ {Arranges controls on form.
}
var
PathTabHeight: Integer;
@@ -245,17 +233,6 @@ procedure TAboutDlg.ArrangeForm;
pnlBody.ClientHeight := pnlTitle.Height + bvlSeparator.Height +
pcDetail.Height;
inherited;
- btnRegister.Left := pnlBody.Left;
- btnRegister.Top := btnHelp.Top;
-end;
-
-procedure TAboutDlg.btnRegisterClick(Sender: TObject);
- {Displays registration wizard when "Register CodeSnip" button is clicked.
- @param Sender [in] Not used.
- }
-begin
- if TRegistrationDlg.Execute(Self) then
- btnRegister.Hide; // hide registration button now that program registered OK
end;
procedure TAboutDlg.btnViewAppConfigClick(Sender: TObject);
@@ -429,15 +406,6 @@ procedure TAboutDlg.HTMLEventHandler(Sender: TObject;
end;
end;
-procedure TAboutDlg.InitForm;
- {Initialises form's controls.
- }
-begin
- inherited;
- // Decide whether to display register button
- btnRegister.Visible := not TAppInfo.IsRegistered;
-end;
-
procedure TAboutDlg.InitHTMLFrames;
{Initialises HTML frames to use required template document with placeholders
replaced by required values.
@@ -465,11 +433,12 @@ procedure TAboutDlg.InitHTMLFrames;
}
begin
pcDetail.ActivePage := tsProgram; // display page to let browser load OK
+ // TODO -cRefactor: Change this frmProgram so it's no longer a HTML template
frmProgram.Initialise(
'dlg-about-program-tplt.html',
procedure(Tplt: THTMLTemplate)
begin
- Tplt.ResolvePlaceholderHTML('Registered', RegistrationHTML);
+ // Do nothing: no template placeholders now registration removed
end
);
end;
@@ -510,33 +479,6 @@ procedure TAboutDlg.pcDetailMouseDown(Sender: TObject; Button: TMouseButton;
pcDetail.SetFocus;
end;
-function TAboutDlg.RegistrationHTML: string;
- {Builds HTML used to display registration information.
- @return Required HTML.
- }
-resourcestring
- // Registration messages
- sRegisteredMessage = 'Registered to %0:s.';
- sUnregisteredMessage = 'Unregistered copy:';
- sRegistrationPrompt = 'Please click the button below to register CodeSnip.';
-var
- SpanAttrs: IHTMLAttributes; // attributes of span tag
-begin
- if TAppInfo.IsRegistered then
- Result := THTML.Entities(
- Format(sRegisteredMessage, [TAppInfo.RegisteredUser])
- )
- else
- begin
- SpanAttrs := THTMLAttributes.Create('class', 'warning');
- Result :=
- THTML.CompoundTag(
- 'span', SpanAttrs, THTML.Entities(sUnregisteredMessage)
- ) +
- THTML.Entities(' ' + sRegistrationPrompt);
- end;
-end;
-
procedure TAboutDlg.UpdateDetailCSS(Sender: TObject;
const CSSBuilder: TCSSBuilder);
{Updates CSS used for HTML displayed in detail (i.e. program and database)
diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm
index 2da24ce52..9b296be6a 100644
--- a/Src/FmMain.dfm
+++ b/Src/FmMain.dfm
@@ -536,13 +536,6 @@ inherited MainForm: TMainForm
ImageIndex = 16
OnExecute = actPreferencesExecute
end
- object actRegister: TAction
- Category = 'Tools'
- Caption = '&Register CodeSnip...'
- Hint = 'Register CodeSnip|Register CodeSnip online'
- OnExecute = actRegisterExecute
- OnUpdate = actRegisterUpdate
- end
object actLicense: TAction
Category = 'Help'
Caption = 'License'
@@ -1204,13 +1197,6 @@ inherited MainForm: TMainForm
object miReportBug: TMenuItem
Action = actBugReport
end
- object miSpacer9: TMenuItem
- Caption = '-'
- end
- object miRegister: TMenuItem
- Action = actRegister
- Default = True
- end
end
object miHelp: TMenuItem
Caption = 'Help'
diff --git a/Src/FmMain.pas b/Src/FmMain.pas
index 6ddbae3a3..d3a94d351 100644
--- a/Src/FmMain.pas
+++ b/Src/FmMain.pas
@@ -82,7 +82,6 @@ TMainForm = class(THelpAwareForm)
actPrivacy: TAction;
actProgramUpdates: TAction;
actProxyServer: TAction;
- actRegister: TAction;
actRenameCategory: TAction;
actRestoreDatabase: TAction;
actSaveDatabase: TAction;
@@ -160,7 +159,6 @@ TMainForm = class(THelpAwareForm)
miPrint: TMenuItem;
miPrivacy: TMenuItem;
miProxyServer: TMenuItem;
- miRegister: TMenuItem;
miRenameCategory: TMenuItem;
miReportBug: TMenuItem;
miRestoreDatabase: TMenuItem;
@@ -181,7 +179,6 @@ TMainForm = class(THelpAwareForm)
miSpacer6: TMenuItem;
miSpacer7: TMenuItem;
miSpacer8: TMenuItem;
- miSpacer9: TMenuItem;
miSpacer10: TMenuItem;
miSpacer11: TMenuItem;
miSpacer12: TMenuItem;
@@ -394,13 +391,6 @@ TMainForm = class(THelpAwareForm)
/// Displays the Proxy Server Configuration dialogue box that can
/// be used to specify a proxy server to use for internet access.
procedure actProxyServerExecute(Sender: TObject);
- /// Displays the Registration Wizard that can be used to register
- /// CodeSnip.
- procedure actRegisterExecute(Sender: TObject);
- /// Determines whether the Register action is visible.
- /// The action is visible iff the program is not already
- /// registered.
- procedure actRegisterUpdate(Sender: TObject);
/// Displays a dialogue box that can be used to rename a user
/// defined category.
procedure actRenameCategoryExecute(Sender: TObject);
@@ -514,8 +504,6 @@ TMainForm = class(THelpAwareForm)
var Accept: Boolean);
strict private
var
- /// Flag denoting if application is registered.
- fIsAppRegistered: Boolean;
/// Object that notifies user-initiated events by triggering
/// actions.
fNotifier: INotifier;
@@ -621,8 +609,6 @@ implementation
procedure TMainForm.actAboutExecute(Sender: TObject);
begin
fDialogMgr.ShowAboutDlg;
- if not fIsAppRegistered then
- fIsAppRegistered := TAppInfo.IsRegistered;
end;
procedure TMainForm.actAddCategoryExecute(Sender: TObject);
@@ -1013,21 +999,6 @@ procedure TMainForm.actProxyServerExecute(Sender: TObject);
fDialogMgr.ExecProxyServerDlg;
end;
-procedure TMainForm.actRegisterExecute(Sender: TObject);
-begin
- if fDialogMgr.ExecRegistrationDlg then
- fIsAppRegistered := True;
-end;
-
-procedure TMainForm.actRegisterUpdate(Sender: TObject);
-begin
- with Sender as TAction do
- begin
- Visible := not fIsAppRegistered;
- Enabled := True;
- end;
-end;
-
procedure TMainForm.actRenameCategoryExecute(Sender: TObject);
begin
TUserDBMgr.RenameACategory;
@@ -1567,8 +1538,6 @@ procedure TMainForm.InitForm;
// Create object to handle compilation and assoicated UI and dialogues
fCompileMgr := TMainCompileMgr.Create(Self); // auto-freed
- // Record if app is registered
- fIsAppRegistered := TAppInfo.IsRegistered;
// Set event handler for snippets database
Database.AddChangeEventHandler(DBChangeHandler);
diff --git a/Src/FmRegistrationDlg.dfm b/Src/FmRegistrationDlg.dfm
deleted file mode 100644
index a2907c6b8..000000000
--- a/Src/FmRegistrationDlg.dfm
+++ /dev/null
@@ -1,151 +0,0 @@
-inherited RegistrationDlg: TRegistrationDlg
- Caption = 'Registration Wizard'
- ExplicitWidth = 565
- ExplicitHeight = 433
- PixelsPerInch = 96
- TextHeight = 13
- inherited pnlBody: TPanel
- inherited pcWizard: TPageControl
- ActivePage = tsAboutUser
- object tsIntro: TTabSheet
- Caption = 'tsIntro'
- TabVisible = False
- object lblIntro: TLabel
- Left = 0
- Top = 8
- Width = 369
- Height = 13
- AutoSize = False
- Caption = 'Thanks for deciding to register CodeSnip.'
- end
- object lblIntroExplain: TLabel
- Left = 0
- Top = 33
- Width = 369
- Height = 40
- AutoSize = False
- Caption =
- 'This wizard collects some information from you and the operating' +
- ' system then contacts the DelphiDabbler.com website to register ' +
- 'the program.'
- WordWrap = True
- end
- object lblInstructions: TLabel
- Left = 0
- Top = 72
- Width = 369
- Height = 13
- AutoSize = False
- Caption = 'Please click the Next button below to begin.'
- end
- end
- object tsAboutUser: TTabSheet
- Caption = 'tsAboutUser'
- ImageIndex = 1
- TabVisible = False
- object lblName: TLabel
- Left = 0
- Top = 8
- Width = 369
- Height = 41
- AutoSize = False
- Caption =
- 'The only information about you that is required to complete regs' +
- 'tration is your &name. You can use a nickname if your prefer. Pl' +
- 'ease enter it below (maximum 48 characters):'
- FocusControl = edName
- WordWrap = True
- end
- object edName: TEdit
- Left = 0
- Top = 55
- Width = 369
- Height = 21
- BevelInner = bvSpace
- BevelKind = bkFlat
- BevelOuter = bvRaised
- BorderStyle = bsNone
- MaxLength = 48
- TabOrder = 0
- end
- end
- object tsSubmit: TTabSheet
- Caption = 'tsSubmit'
- ImageIndex = 3
- TabVisible = False
- object lblReport: TLabel
- Left = 0
- Top = 8
- Width = 369
- Height = 26
- AutoSize = False
- Caption =
- 'You are now ready to submit the registration. Here is the inform' +
- 'ation that will be sent:'
- WordWrap = True
- end
- object lblSubmit: TLabel
- Left = 0
- Top = 162
- Width = 369
- Height = 26
- AutoSize = False
- Caption =
- 'Please ensure you are connected to the internet and then click t' +
- 'he Submit button to send the registration.'
- WordWrap = True
- end
- object edReport: TMemo
- Left = 0
- Top = 40
- Width = 369
- Height = 113
- TabStop = False
- BevelInner = bvSpace
- BevelKind = bkFlat
- BevelOuter = bvRaised
- BorderStyle = bsNone
- ParentColor = True
- ReadOnly = True
- ScrollBars = ssVertical
- TabOrder = 0
- end
- end
- object tsFinish: TTabSheet
- Caption = 'tsFinish'
- ImageIndex = 4
- TabVisible = False
- object lblThanks: TLabel
- Left = 0
- Top = 8
- Width = 369
- Height = 13
- AutoSize = False
- Caption = 'Your registration has been completed successfully - thankyou.'
- WordWrap = True
- end
- object lblRegCode: TLabel
- Left = 0
- Top = 40
- Width = 119
- Height = 13
- Caption = 'Your registration code is: '
- end
- object edRegCode: TEdit
- Left = 0
- Top = 59
- Width = 249
- Height = 21
- TabStop = False
- BevelInner = bvSpace
- BevelKind = bkFlat
- BevelOuter = bvRaised
- BorderStyle = bsNone
- ParentColor = True
- ReadOnly = True
- TabOrder = 0
- end
- end
- end
- end
-end
diff --git a/Src/FmRegistrationDlg.pas b/Src/FmRegistrationDlg.pas
deleted file mode 100644
index 061e278aa..000000000
--- a/Src/FmRegistrationDlg.pas
+++ /dev/null
@@ -1,344 +0,0 @@
-{
- * This Source Code Form is subject to the terms of the Mozilla Public License,
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
- * obtain one at http://mozilla.org/MPL/2.0/
- *
- * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com).
- *
- * $Rev$
- * $Date$
- *
- * Implements a wizard style dialogue box that registers the program online.
-}
-
-
-unit FmRegistrationDlg;
-
-
-interface
-
-
-uses
- // Delphi
- StdCtrls, ComCtrls, Controls, ExtCtrls, Classes,
- // Project
- FmWizardDlg, UBaseObjects;
-
-
-type
-
- {
- TRegistrationDlg:
- Wizard style dialog box that collects information and sends application
- registration to web server.
- }
- TRegistrationDlg = class(TWizardDlg, INoPublicConstruct)
- edName: TEdit;
- edRegCode: TEdit;
- edReport: TMemo;
- lblInstructions: TLabel;
- lblIntro: TLabel;
- lblIntroExplain: TLabel;
- lblName: TLabel;
- lblRegCode: TLabel;
- lblReport: TLabel;
- lblSubmit: TLabel;
- lblThanks: TLabel;
- tsAboutUser: TTabSheet;
- tsFinish: TTabSheet;
- tsIntro: TTabSheet;
- tsSubmit: TTabSheet;
- strict private
- fRegistered: Boolean; // Flag indicating whether program was registered
- procedure BuildSubmission(const Report: TStrings);
- {Builds registration submission as list of values in name=value format.
- @param Report [in] Stores submission on completion.
- }
- procedure DoRegistration;
- {Registers program and displays registration code.
- }
- function RegisterWithWebServer: string;
- {Gathers required registration data, sends to web server and gets
- registration code from it.
- @return Registration code.
- @except EWebError exception raised if there is a failure in interaction
- with web service.
- }
- function ValidateUserInfo: Boolean;
- {Validates data entered by user. Displays any error messages.
- @return True if data valid, false if not.
- }
- strict protected
- procedure ArrangeForm; override;
- {Vertically arranges controls as required and sizes the tab sheets to be
- able to display the longest page.
- }
- procedure ConfigForm; override;
- {Sets font styles where necessary and initialises HTML frames.
- }
- procedure InitForm; override;
- {Initialises controls.
- }
- procedure BeginPage(const PageIdx: Integer); override;
- {Performs required initialisation when a page is displayed.
- @param PageIdx [in] Index page to be initialised.
- }
- function HeadingText(const PageIdx: Integer): string; override;
- {Gets text of heading of a wizard page.
- @param PageIdx [in] Index of page for which heading is required.
- @return Heading text.
- }
- procedure MoveForward(const PageIdx: Integer;
- var CanMove: Boolean); override;
- {Performs required processing on moving forward from pages.
- @param PageIdx [in] Index of page we are leaving.
- @param CanMove [in/out] Flag set to indicate whether can leave page.
- Defaults to true.
- }
- procedure UpdateButtons(const PageIdx: Integer); override;
- {Updates wizard buttons depending on page and state.
- @param PageIdx [in] Index of current page.
- }
- public
- class function Execute(const Owner: TComponent): Boolean;
- {Displays dialog box.
- @param Owner [in] Component that owns this dialog.
- @return True if program was registered, false otherwise.
- }
- end;
-
-
-implementation
-
-
-uses
- // Delphi
- SysUtils, Forms,
- // Project
- UAppInfo, UFontHelper, UCtrlArranger, UMessageBox, UStrUtils, USystemInfo,
- UUserDetails, UUserDetailsPersist, Web.URegistrar;
-
-
-{$R *.dfm}
-
-const
- // Index of wizard pages
- cIntroPageIdx = 0;
- cAboutUserPageIdx = 1;
- cSubmitPageIdx = 2;
- cFinishPageIdx = 3;
-
-resourcestring
- // Pages headings
- sIntroHeading = 'Register CodeSnip';
- sAboutUserHeading = 'About you';
- sSubmitHeading = 'Submit registration';
- sFinishHeading = 'Registration complete';
- // Submit button caption
- sSubmitBtnCaption = '&Submit';
- // Error messages
- sErrNameRequired = 'You need to provide your name or a nickname.';
-
-
-{ TRegistrationDlg }
-
-procedure TRegistrationDlg.ArrangeForm;
- {Vertically arranges controls as required and sizes the tab sheets to be able
- to display the longest page.
- }
-begin
- // set heights of all labels with AutoSize = False
- TCtrlArranger.SetLabelHeights(Self);
-
- // tsIntro tabsheet
- lblIntroExplain.Top := TCtrlArranger.BottomOf(lblIntro, 8);
- lblInstructions.Top := TCtrlArranger.BottomOf(lblIntroExplain, 8);
-
- // tsAboutUser tabsheet
- edName.Top := TCtrlArranger.BottomOf(lblName, 8);
-
- // tsSubmit tabsheet
- edReport.Top := TCtrlArranger.BottomOf(lblReport, 8);
- lblSubmit.Top := TCtrlArranger.BottomOf(edReport, 8);
-
- // tsFinish tabsheet
- lblRegCode.Top := TCtrlArranger.BottomOf(lblThanks, 8);
- edRegCode.Top := TCtrlArranger.BottomOf(lblRegCode, 4);
-
- // set required height
- pnlBody.ClientHeight := TCtrlArranger.MaxContainerHeight(
- [tsAboutUser, tsFinish, tsIntro, tsSubmit]
- ) + pnlBody.ClientHeight - tsAboutUser.Height;
-
- // Arrange inherited controls and size the form
- inherited;
-end;
-
-procedure TRegistrationDlg.BeginPage(const PageIdx: Integer);
- {Performs required initialisation when a page is displayed.
- @param PageIdx [in] Index page to be initialised.
- }
-begin
- inherited;
- case PageIdx of
- cSubmitPageIdx:
- // Create data to be sent to website ready for submission
- BuildSubmission(edReport.Lines);
- cAboutUserPageIdx:
- // Focus first control on page
- edName.SetFocus;
- end;
-end;
-
-procedure TRegistrationDlg.BuildSubmission(const Report: TStrings);
- {Builds registration submission as list of values in name=value format.
- @param Report [in] Stores submission on completion.
- }
-begin
- Report.Clear;
- Report.Values['ProgId'] := TAppInfo.ProgramID;
- Report.Values['ProgName'] := TAppInfo.ProgramName;
- Report.Values['ProgVer'] := TAppInfo.ProgramReleaseVersion;
- Report.Values['ProgKey'] := TAppInfo.ProgramKey;
- Report.Values['UserName'] := StrTrim(edName.Text);
- Report.Values['OSDesc'] :=
- Format(
- '%0:s. IE Version %1:d.', [TOSInfo.Description, TIEInfo.MajorVersion]
- );
-end;
-
-procedure TRegistrationDlg.ConfigForm;
- {Sets font styles where necessary and initialises HTML frames.
- }
-begin
- inherited;
- TFontHelper.SetDefaultMonoFont(edRegCode.Font);
-end;
-
-procedure TRegistrationDlg.DoRegistration;
- {Registers program and displays registration code.
- }
-var
- UserDetails: TUserDetails; // information about user
-begin
- Screen.Cursor := crHourglass;
- try
- // register with server
- edRegCode.Text := RegisterWithWebServer;
- // record registration & user details
- UserDetails := TUserDetails.Create(StrTrim(edName.Text), '');
- TAppInfo.RegisterProgram(edRegCode.Text, UserDetails.Name);
- TUserDetailsPersist.Update(UserDetails);
- fRegistered := True;
- finally
- Screen.Cursor := crDefault;
- end;
-end;
-
-class function TRegistrationDlg.Execute(const Owner: TComponent): Boolean;
- {Displays dialog box.
- @param Owner [in] Component that owns this dialog.
- @return True if program was registered, false otherwise.
- }
-begin
- with InternalCreate(Owner) do
- try
- ShowModal;
- Result := fRegistered;
- finally
- Free;
- end;
-end;
-
-function TRegistrationDlg.HeadingText(const PageIdx: Integer): string;
- {Gets text of heading of a wizard page.
- @param PageIdx [in] Index of page for which heading is required.
- @return Heading text.
- }
-const
- // Map of page indexes to page heading
- cPageHeadings: array[0..3] of string = (
- sIntroHeading, sAboutUserHeading, sSubmitHeading, sFinishHeading
- );
-begin
- Result := cPageHeadings[PageIdx];
-end;
-
-procedure TRegistrationDlg.InitForm;
- {Initialises controls.
- }
-var
- UserDetails: TUserDetails; // any known information about user
-begin
- inherited;
- // Use user name if known
- UserDetails := TUserDetailsPersist.Load;
- edName.Text := UserDetails.Name;
-end;
-
-procedure TRegistrationDlg.MoveForward(const PageIdx: Integer;
- var CanMove: Boolean);
- {Performs required processing on moving forward from pages.
- @param PageIdx [in] Index of page we are leaving.
- @param CanMove [in/out] Flag set to indicate whether can leave page.
- Defaults to true.
- }
-begin
- inherited;
- case PageIdx of
- cAboutUserPageIdx:
- CanMove := ValidateUserInfo;
- cSubmitPageIdx:
- DoRegistration;
- end;
-end;
-
-function TRegistrationDlg.RegisterWithWebServer: string;
- {Gathers required registration data, sends to web server and gets registration
- code from it.
- @return Registration code.
- @except EWebError exception raised if there is a failure in interaction
- with web service.
- }
-var
- Reg: TRegistrar; // object that communicates with web server
- PostData: TStringList; // list of data items to be sent to web server
-begin
- PostData := nil;
- Reg := TRegistrar.Create;
- try
- PostData := TStringList.Create;
- BuildSubmission(PostData);
- Result := Reg.Submit(PostData); // raises exception on fail result
- finally
- FreeAndNil(PostData);
- FreeAndNil(Reg);
- end;
-end;
-
-procedure TRegistrationDlg.UpdateButtons(const PageIdx: Integer);
- {Updates wizard buttons depending on page and state.
- @param PageIdx [in] Index of current page.
- }
-begin
- inherited;
- if PageIdx = cSubmitPageIdx then
- btnNext.Caption := sSubmitBtnCaption;
- btnCancel.Enabled := PageIdx <> cFinishPageIdx;
-end;
-
-function TRegistrationDlg.ValidateUserInfo: Boolean;
- {Validates data entered by user. Displays any error messages.
- @return True if data valid, false if not.
- }
-begin
- Result := True;
- if StrTrim(edName.Text) = '' then
- begin
- Result := False;
- TMessageBox.Error(Self, sErrNameRequired);
- end;
-end;
-
-end.
-
diff --git a/Src/Res/HTML/dlg-about-program-tplt.html b/Src/Res/HTML/dlg-about-program-tplt.html
index 19a9aef2a..1ea073618 100644
--- a/Src/Res/HTML/dlg-about-program-tplt.html
+++ b/Src/Res/HTML/dlg-about-program-tplt.html
@@ -161,10 +161,6 @@
-
- <%Registered%>
-
-