Skip to content

Commit 43a3220

Browse files
committed
Merge branch 'feature/finalise-docs-for-v4.16' into develop
2 parents e59a14c + 057b416 commit 43a3220

15 files changed

+543
-30
lines changed

Build.html

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,15 @@ <h3>
222222
</h3>
223223

224224
<p>
225-
The Unicode version of the Inno setup command line compiler is needed to
226-
create <em>CodeSnip</em>'s install program. v5.5.2(u) or later is required.
225+
The Unicode version of the Inno Setup <strong>v5</strong> command line
226+
compiler is needed to create <em>CodeSnip</em>'s install program. v5.5.2(u) or
227+
later is required.
228+
</p>
229+
230+
<p class="note">
231+
<strong>Warning:</strong> Do not use Inno Setup v6. This will fail to compile
232+
the setup script. Inno Setup 6 does not support Windows 2000 or XE, while
233+
<em>CodeSnip</em> still does.
227234
</p>
228235

229236
<p>
@@ -283,10 +290,6 @@ <h3>
283290
You do not need Zip if you do not intend to create release files.
284291
</p>
285292

286-
<p class="note">
287-
<strong>Note:</strong> You can use the Delphi IDE to edit the code and test compile it. However you will need to build the code from the makefile first to ensure all the required resource files and auto-generated files are present. If you change any resource files or type libraries you also need to re-run the makefile. Final builds should always be created using the makefile.
288-
</p>
289-
290293

291294
<h2>
292295
Preparation
@@ -538,6 +541,12 @@ <h4>
538541
<code>CodeSnip.exe</code>. You can rename the file manually.
539542
</p>
540543

544+
<p>
545+
After you have gone through these steps you can edit Pascal code and test
546+
compile from the Delphi IDE. However if you change any files compiled into resources, or the type library, or run a clean up, then you must repeat the
547+
above steps and do a complete build from the IDE.
548+
</p>
549+
541550
<p>
542551
Note that building with the make file insted of the IDE performs all the above
543552
steps automatically.

Docs/ReadMe.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ Uninstalling the Standard Edition
144144
---------------------------------
145145

146146
CodeSnip can be uninstalled via "Apps and Features" (a.k.a. "Programs and
147-
Features", a.k.a. "Add / Remove Programs") from the Windows Control Panel or by choosing "Uninstall DelphiDabbler CodeSnip" from the program's start menu group.
147+
Features", a.k.a. "Add / Remove Programs") from the Windows Control Panel or by
148+
choosing "Uninstall DelphiDabbler CodeSnip" from the program's start menu group.
148149

149150
Administrator privileges will be required to uninstall CodeSnip. Windows Vista
150151
to Windows 10 with UAC prompts enabled will prompt for an admin password if

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ A code bank designed with Pascal in mind.
77
* [Support](#support)
88
* [Source Code](#source-code)
99
* [Change Log](#change-log)
10-
* [CodeSnip 5 Development](#codesnip-5-development) -- **frozen**
10+
* [License](#license)
11+
* [Bug Reports and Features](#bug-reports-and-features)
1112

1213
## Overview
1314

@@ -21,41 +22,53 @@ CodeSnip requires Windows 2000 or later and Internet Explorer 6 or later, althou
2122

2223
## Installation
2324

24-
CodeSnip is installed and removed using a standard Windows installer. Administrator privileges are required for installation.
25+
The standard edition of CodeSnip is installed and removed using a standard Windows installer. Administrator privileges are required for installation.
26+
27+
The portable edition has no installer. Simply follow the instructions in the [read me file](https://github.com/delphidabbler/codesnip/blob/master/Docs/ReadMe.txt) that is included in the download zip file.
2528

2629
## Support
2730

28-
The following support is available for CodeSnip:
31+
The following support is available CodeSnip users:
2932

3033
* A comprehensive help file.
3134
* A [read-me file](https://github.com/delphidabbler/codesnip/master/Docs/ReadMe.txt)<sup> *</sup> that discusses installation, configuration, updating and known issues.
32-
* An [FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md)
35+
* A [Using CodeSnip FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md).
3336
* A [Blog](http://codesnip-app.blogspot.co.uk/).
3437

3538
There's also plenty of info available on how to compile CodeSnip from source - see below.
3639

3740
<sup>*</sup> These links take you to the most recent version of the documents -- they can change from release to release.
3841

39-
4042
## Source Code
4143

42-
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 in 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.
44+
CodeSnip's source code is maintained in the [`delphidabbler/codesnip`](https://github.com/delphidabbler/codesnip) Git repository on GitHub†.
45+
46+
[Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology has been adopted, with the exception of some branches that have been used in abortive attempts to start work on CodeSnip 5.
47+
48+
The following branches existed at the time when CodeSnip v4.16.0 was released:
49+
50+
* `master`: Always reflects the state of the source code as of the latest release.‡
51+
* `develop`: Main development branch. The head of this branch contains the latest development code.
52+
* `pagoda`: An abortive attempt at developing CodeSnip 5. Work on this branch has halted. It does not follow GitFlow methodology. ***Do not use this branch: it may be pruned.***
53+
* `pavilion`: Another attempt at working on CodeSnip 5. It branched off `pagoda` and it's future is uncertain. Again it does not follow GitFlow methodology.
54+
55+
New features and most bug fixes are worked on in `feature/xxxx` branches locally. They are merged into `develop` as they are completed and the branches are deleted.
4356

44-
> 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.
57+
**Note** that the default branch on GitHub is `develop` rather than `master`. This is because that's where all the work takes place. If you want to see the state of play at the last release make sure to switch to `master`.
4558

46-
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).
59+
> † Up to and including v4.13.1 the source code was kept in a Subversion repository on SourceForge. It was converted to Git in October 2015 and imported into 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. None of the Subversion branches made it through the conversion to Git, so to see a full history look at the old [SourceForge repository](https://sourceforge.net/p/codesnip/code/).
4760
48-
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.
61+
> ‡ All the converted Subversion code was committed to `master`, making it a copy of the old Subversion `trunk`. As such `master` contains various development commits along with numerous commits related to management of Subversion. After release 4.13.1, and the the first commit of this read-me file, `master` contains only commits relating to actual releases.
4962
5063
### Contributions
5164

52-
To contribute to the project please fork the repository on GitHub. Create a feature branch off the development branch. Make your changes to that branch then submit a pull request on GitHub.
65+
To contribute to the project please fork the repository on GitHub. Create a feature branch off the `develop` branch. Make your changes to the feature branch then submit a pull request via GitHub.
5366

5467
### Compiling
5568

56-
`master` and each branch will have a file in the root directory named `Build.html` that gives detailed information about how to compile CodeSnip.
69+
`master` has a file in the root directory named [`Build.html`](https://htmlpreview.github.io/?https://github.com/delphidabbler/codesnip/blob/master/Build.html) that gives detailed information about how to compile the current release of CodeSnip.
5770

58-
There is also an [FAQ](https://github.com/delphidabbler/codesnip-faq) -- (see [Support](#support) above).
71+
There is also a [Compiling & Source Code FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/SourceCode.md).
5972

6073
## Change Log
6174

@@ -65,7 +78,7 @@ The program's current change log can be found in the file `CHANGELOG.md` in the
6578
6679
## License
6780

68-
The program's EULA, which gives full details of the license applying to the latest release, can be found in the file `Docs\License.html` in the `master` branch. The license has changed between releases, so if you need to see an older one, select the appropriate `version-x.x.x` tag and read the older version of the file.
81+
The program's EULA, which gives full details of the license applying to the latest release, can be found in the file [`Docs\License.html`](https://htmlpreview.github.io/?https://github.com/delphidabbler/codesnip/blob/master/Docs/License.html) in the `master` branch. The license has changed between releases, so if you need to see an older one, select the appropriate `version-x.x.x` tag and read the older version of the file.
6982

7083
Most of the original code is made available under the [Mozilla Public License v2](https://www.mozilla.org/MPL/2.0/).
7184

Src/CodeSnip.dpr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ uses
7878
Favourites.UFavourites in 'Favourites.UFavourites.pas',
7979
Favourites.UPersist in 'Favourites.UPersist.pas',
8080
FirstRun.FmV4ConfigDlg in 'FirstRun.FmV4ConfigDlg.pas' {V4ConfigDlg},
81+
FirstRun.FmWhatsNew in 'FirstRun.FmWhatsNew.pas' {WhatsNewDlg},
82+
FirstRun.FmWhatsNew.FrHTML in 'FirstRun.FmWhatsNew.FrHTML.pas' {WhatsNewHTMLFrame: TFrame},
8183
FirstRun.UConfigFile in 'FirstRun.UConfigFile.pas',
8284
FirstRun.UDatabase in 'FirstRun.UDatabase.pas',
8385
FirstRun.UIniFile in 'FirstRun.UIniFile.pas',

Src/CodeSnip.dproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@
8383
<DCCReference Include="FirstRun.FmV4ConfigDlg.pas">
8484
<Form>V4ConfigDlg</Form>
8585
</DCCReference>
86+
<DCCReference Include="FirstRun.FmWhatsNew.pas">
87+
<Form>WhatsNewDlg</Form>
88+
</DCCReference>
89+
<DCCReference Include="FirstRun.FmWhatsNew.FrHTML.pas">
90+
<Form>WhatsNewHTMLFrame</Form>
91+
<DesignClass>TFrame</DesignClass>
92+
</DCCReference>
8693
<DCCReference Include="FirstRun.UConfigFile.pas"/>
8794
<DCCReference Include="FirstRun.UDatabase.pas"/>
8895
<DCCReference Include="FirstRun.UIniFile.pas"/>
@@ -566,7 +573,6 @@
566573
<DCCReference Include="UXMLDocConsts.pas"/>
567574
<DCCReference Include="UXMLDocHelper.pas"/>
568575
<DCCReference Include="UXMLDocumentEx.pas"/>
569-
<DCCReference Include="SWAG.UVersion.pas"/>
570576
<None Include="CodeSnip.todo"/>
571577
<BuildConfiguration Include="Base">
572578
<Key>Base</Key>

Src/FirstRun.FmWhatsNew.FrHTML.dfm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
inherited WhatsNewHTMLFrame: TWhatsNewHTMLFrame
2+
inherited pnlBrowser: TPanel
3+
inherited wbBrowser: TWebBrowser
4+
ControlData = {
5+
4C000000A9200000641800000000000000000000000000000000000000000000
6+
000000004C000000000000000000000001000000E0D057007335CF11AE690800
7+
2B2E126208000000000000004C0000000114020000000000C000000000000046
8+
8000000000000000000000000000000000000000000000000000000000000000
9+
00000000000000000100000000000000000000000000000000000000}
10+
end
11+
end
12+
end

Src/FirstRun.FmWhatsNew.FrHTML.pas

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
unit FirstRun.FmWhatsNew.FrHTML;
2+
3+
interface
4+
5+
uses
6+
// VCL
7+
OleCtrls,
8+
SHDocVw,
9+
Classes,
10+
Controls,
11+
ExtCtrls,
12+
// Project
13+
FrBrowserBase,
14+
UCSSBuilder;
15+
16+
17+
type
18+
TWhatsNewHTMLFrame = class(TBrowserBaseFrame)
19+
strict protected
20+
procedure BuildCSS(const CSSBuilder: TCSSBuilder); override;
21+
{Generates CSS classes specific to this frame. This CSS is added
22+
to that provided by parent class.
23+
@param CSSBuilder [in] Object used to build the CSS code.
24+
}
25+
public
26+
constructor Create(AOwner: TComponent); override;
27+
{Object constructor. Sets up frame and initialises web browser.
28+
@param AOwner [in] Component that owns the frame (must be a form).
29+
}
30+
procedure Initialise(const HTML: string);
31+
end;
32+
33+
34+
implementation
35+
36+
37+
uses
38+
// VCL
39+
Graphics,
40+
// Project
41+
Browser.UUIMgr,
42+
UCSSUtils,
43+
UFontHelper;
44+
45+
{$R *.dfm}
46+
47+
48+
{ TWhatsNewHTMLFrame }
49+
50+
procedure TWhatsNewHTMLFrame.BuildCSS(const CSSBuilder: TCSSBuilder);
51+
var
52+
CSSFont: TFont; // font used to set CSS properties
53+
begin
54+
inherited;
55+
CSSFont := TFont.Create;
56+
try
57+
TFontHelper.SetContentFont(CSSFont);
58+
CSSFont.Size := CSSFont.Size + 2;
59+
with CSSBuilder.AddSelector('body') do
60+
begin
61+
AddProperty(TCSS.FontProps(CSSFont));
62+
AddProperty(TCSS.MarginProp(0, 8, 0, 8));
63+
end;
64+
with CSSBuilder.AddSelector('.lead') do
65+
begin
66+
AddProperty(TCSS.FontSizeProp(CSSFont.Size + 2));
67+
AddProperty(TCSS.FontWeightProp(cfwBold));
68+
AddProperty(TCSS.ColorProp($233bc2));
69+
end;
70+
// Sets paragraph margins and padding
71+
with CSSBuilder.AddSelector('p') do
72+
begin
73+
AddProperty(TCSS.MarginProp(cssTop, 6));
74+
AddProperty(TCSS.MarginProp(cssBottom, 0));
75+
AddProperty(TCSS.PaddingProp(0));
76+
end;
77+
with CSSBuilder.AddSelector('ul') do
78+
begin
79+
AddProperty(TCSS.MarginProp(cssTop, 6));
80+
AddProperty(TCSS.MarginProp(cssBottom, 0));
81+
AddProperty(TCSS.PaddingProp(0));
82+
end;
83+
with CSSBuilder.AddSelector('li') do
84+
begin
85+
AddProperty(TCSS.MarginProp(cssTop, 6));
86+
end;
87+
finally
88+
CSSFont.Free;
89+
end;
90+
end;
91+
92+
constructor TWhatsNewHTMLFrame.Create(AOwner: TComponent);
93+
begin
94+
inherited;
95+
WBController.UIMgr.ScrollbarStyle := sbsNormal;
96+
WBController.UIMgr.AllowTextSelection := False;
97+
end;
98+
99+
procedure TWhatsNewHTMLFrame.Initialise(const HTML: string);
100+
begin
101+
WBController.IOMgr.LoadFromString(HTML);
102+
end;
103+
104+
end.

Src/FirstRun.FmWhatsNew.dfm

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
inherited WhatsNewDlg: TWhatsNewDlg
2+
Caption = 'What'#39's New'
3+
ExplicitWidth = 474
4+
ExplicitHeight = 375
5+
PixelsPerInch = 96
6+
TextHeight = 13
7+
inherited pnlBody: TPanel
8+
inline frmHTML: TWhatsNewHTMLFrame
9+
Left = 0
10+
Top = 0
11+
Width = 377
12+
Height = 281
13+
Align = alClient
14+
TabOrder = 0
15+
TabStop = True
16+
ExplicitWidth = 377
17+
ExplicitHeight = 281
18+
inherited pnlBrowser: TPanel
19+
Width = 377
20+
Height = 281
21+
ExplicitWidth = 377
22+
ExplicitHeight = 281
23+
inherited wbBrowser: TWebBrowser
24+
Width = 377
25+
Height = 281
26+
ExplicitWidth = 377
27+
ExplicitHeight = 281
28+
ControlData = {
29+
4C000000F72600000B1D00000000000000000000000000000000000000000000
30+
000000004C000000000000000000000001000000E0D057007335CF11AE690800
31+
2B2E126208000000000000004C0000000114020000000000C000000000000046
32+
8000000000000000000000000000000000000000000000000000000000000000
33+
00000000000000000100000000000000000000000000000000000000}
34+
end
35+
end
36+
end
37+
end
38+
inherited btnHelp: TButton
39+
Visible = False
40+
end
41+
end

0 commit comments

Comments
 (0)