Skip to content

Commit

Permalink
Merge branch 'release/4.21.1'
Browse files Browse the repository at this point in the history
Release v4.21.1
  • Loading branch information
delphidabbler committed Apr 9, 2023
2 parents 02656b8 + d4af4f3 commit 7482558
Show file tree
Hide file tree
Showing 46 changed files with 2,703 additions and 1,196 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
__history/

# Project specific directories & files
Bin
Exe
Release
_build
Src/CodeSnip.cfg
Src/AutoGen/IntfExternalObj.pas
83 changes: 62 additions & 21 deletions Build.html
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@ <h3>
|
+-- DUnit - test source code that uses the DUnit framework</pre>
<p>
If, by chance you also have <code>Bin</code>, <code>Exe</code> and / or
<code>Release</code> directories don't worry - all will become clear.
If, by chance you also have a <code>_build</code> directory don't worry - all will become clear.
Git users may also see the usual <code>.git</code> hidden
directory. If you have done some editing in the Delphi IDE you may also see
occasional hidden <code>__history</code> folders.
Expand Down Expand Up @@ -498,18 +497,18 @@ <h3>

<pre>./
|
+-- Bin - receives object files for CodeSnip
|
...
|
+-- Exe - receives executable code and compiled help file
|
+-- Release - receives release files
+-- _build - contains all the build files
| |
| +-- bin - receives object files for CodeSnip
| |
| +-- exe - receives executable code and compiled help file
| |
| +-- release - receives release files
|
...</pre>

<p>
If the <code>Bin</code> folder already existed, it will have been emptied.
If the <code>_build/bin</code> folder already existed, it will have been emptied.
In addition, <code>Make</code> will have created a <code>.cfg</code> file from
template in the <code>Src</code> folder. This <code>.cfg</code> file is needed
for DCC32 to run correctly. The file will be ignored by Git.
Expand Down Expand Up @@ -625,7 +624,7 @@ <h3>

<p>
The <em>CodeSnip</em> executable, named <code>CodeSnip.exe</code> will be
placed in the <code>Exe</code> folder.
placed in the <code>_build\exe</code> folder.
</p>

<h4>
Expand All @@ -640,7 +639,7 @@ <h4>
<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE codesnip</pre>

<p>
Again the executable is placed in the <code>Exe</code> folder, but this time
Again the executable is placed in the <code>_build/exe</code> folder, but this time
it is named <code>CodeSnip-p.exe</code>
</p>

Expand All @@ -654,13 +653,16 @@ <h3>

<pre class="cmd"><span class="prompt">&gt;</span> Make help</pre>

<p>
The compiled help file will be written to the <code>_build\exe</code> folder.
</p>
<h3>
Build the Setup Program
</h3>

<p>
The setup program requires that the <em>CodeSnip</em> excutable and the
compiled help file are already present in the <code>Exe</code> directory.
compiled help file are already present in the <code>_build\exe</code> directory.
</p>

<p>
Expand All @@ -679,7 +681,7 @@ <h3>
<p>
The setup program is named <code>CodeSnip-Setup-x.x.x.exe</code>, where
x.x.x is the version number extracted from <em>CodeSnip</em>'s version
information. It is placed in the <code>Exe</code> directory.
information. It is placed in the <code>_build/exe</code> directory.
</p>

<p>
Expand All @@ -704,6 +706,7 @@ <h3>

<p>
Make can create zip files containing all the files that are included in a release.
Zip files are written to the <code>_build/release</code> directory.
</p>

<h4>
Expand All @@ -723,13 +726,17 @@ <h4>
<pre class="cmd"><span class="prompt">&gt;</span> Make release</pre>

<p>
By default the release file is named <code>dd-codesnip.zip</code>. You can
By default the release file is named <code>codesnip-exe.zip</code>. You can
change this name by defining the <code>RELEASEFILENAME</code> macro or
enviroment variable. For example, you can name the file
<code>MyRelease.zip</code> by doing:
</p>

<pre class="cmd"><span class="prompt">&gt;</span> Make -DRELEASEFILENAME=MyRelease.zip release</pre>
<pre class="cmd"><span class="prompt">&gt;</span> Make -DRELEASEFILENAME=MyRelease release</pre>

<p>
Note that the <code>.zip</code> extension should not be included in the file name.
</p>

<h4>
Portable edition
Expand All @@ -754,7 +761,11 @@ <h4>
<code>MyPortableRelease.zip</code> by doing:
</p>

<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE -DRELEASEFILENAME=MyPortableRelease.zip release</pre>
<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE -DRELEASEFILENAME=MyPortableRelease release</pre>

<p>
Once again note that the <code>.zip</code> extension should not be included in the file name.
</p>

<p class="note">
<strong>Warning:</strong> If you are building both the standard and portable
Expand All @@ -763,6 +774,35 @@ <h4>
built release will overwrite the first.
</p>

<h4>
Including version numbers in zip file names
</h4>

<p>
A version number can be suffixed to the release zip file name by defining the <code>VERSION</code> macro.
This macro works with both the <code>PORTABLE</code> and <code>RELEASEFILENAME</code> macros.
</p>

<p>
For example to appended version number 4.22.0 to the zip file name on a standard edition build, with the default
file name do:
</p>

<pre class="cmd"><span class="prompt">&gt;</span> Make -DVERSION=4.22.0 release</pre>

<p>
This will create a zip file named <code>codesnip-exe-4.22.0.zip</code>.
</p>

<p>
A more complex example would be to append the same version number to a portable edition build named <code>MyPortableRelease</code>. Do:
</p>

<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE -DRELEASEFILENAME=MyPortableRelease -DVERSION=4.22.0 release</pre>

<p>
This time the resulting zip file will be named <code>MyPortableRelease-4.22.0.zip</code>.
</p>

<h3>
Build and Release Everything
Expand All @@ -784,16 +824,17 @@ <h3>
<span class="prompt">&gt;</span> Make setup
<span class="prompt">&gt;</span> Make release</pre>

<h4>
Portable edition
</h4>

<p>
To perform a complete build of the portable edition of <em>CodeSnip</em> do
</p>

<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE</pre>

<p>
Note that the <code>RELEASEFILENAME</code> and <code>VERSION</code> macros that can be used for customising
zip file names can be used here too.
</p>

<h3>
Clean Up
</h3>
Expand Down
34 changes: 28 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,40 @@
# Changelog

This is the change log for _DelphiDabbler CodeSnip_.
This is the change log for _DelphiDabbler CodeSnip_. It begins with the first ever pre-release version of _CodeSnip_.

All notable changes to this project are documented in this file.

This change log begins with the first ever pre-release version of _CodeSnip_. Releases are listed in reverse version number order.
Releases are listed in reverse version number order.

> Note that _CodeSnip_ v4 was developed in parallel with v3 for a while. As a consequence some v3 releases have later release dates than early v4 releases.
From v4.1.0 the version numbering has attempted to adhere to the principles of [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Release v4.21.1 of 09 April 2023

* Completed implementation of support for [REML version 5](https://htmlpreview.github.io/?https://github.com/delphidabbler/codesnip/blob/version-4.21.0/Docs/Design/reml.html) (ommitted from v4.20.0 in error) and fixed some bugs in the original implementation [issues #81 and #82], including:
* Heavily revised "active text" handling code and document model to fix support for lists introduced in v4.21.0.
* Added support for rendering lists in plain text reports and generated source code header comments.
* Added support for rendering lists in Rich Text Format for use in printed information and in reports copied to the clipboard.
* Overhauled HTML rendering code that generates HTML for display in the UI.
* Heavily revised parsing and generation of REML code.
* Updated "active text" validation code.
* Prevented snippets editor from stripping REML `<p>` tags [issue #103].
* Fixed garbled copyright symbols in generated source code [issue #80].
* Fixed bug in code that compresses multiple white space into a single space [issue #95].
* Fixed out of range error in code that handles text encodings [issue #97].
* Fixed broken formatting of compiler result tables in text and rich text snippet reports & print outs [issue #101].
* Updated copyright date displayed in about box [issue #98].
* Updated operating system detection code to detect Windows 10/11 builds released in December 2022 and Q1 2023.
* Some refactoring [including issue #83]
* Changed build process to create all files in `_build` directory and to use different zip file names [issue #78].
* Documentation changes:
* Updated `Build.html` to document changes in build process.
* Updated `CHANGELOG.md` to fix broken link [issue #76] and to remove information about semantic versioning.
* Removed broken links in `Docs/License.html`.
* Updated copyright date in various license files [including issue #96].
* Fixed errors and oversights in REML documentation.
* Removed some redundant tests that were failing due to passing invalid parameters to the revised _StrWrap_ routine [issue #79].

## Release v4.21.0 of 16 December 2022

* Updated to support [REML version 5](https://htmlpreview.github.io/?https://github.com/delphidabbler/codesnip/blob/version-4.21.0`/Docs/Design/reml.html) in snippet description & extra information [issue #71]:
* Updated to support [REML version 5](https://htmlpreview.github.io/?https://github.com/delphidabbler/codesnip/blob/version-4.21.0/Docs/Design/reml.html) in snippet description & extra information [issue #71]:
* Numerous new character entities supported.
* New list tags: `<ol>`, `<ul>` & `<li>`.
* Program now automatically detects new (supported) Delphi installations at startup and offers to register the compiler(s) to be used for test compiling snippets. This feature is on by default but can be turned off completely or for specifically excluded compilers [issue #19].
Expand Down
27 changes: 15 additions & 12 deletions Docs/Design/reml.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>

<!--
* This file copyright (C) 2020-2021, Peter Johnson (gravatar.com/delphidabbler) and
* This file copyright (C) 2020-2023, Peter Johnson (gravatar.com/delphidabbler) and
* is licensed under the MIT License: https://opensource.org/licenses/MIT
*
* DelphiDabbler Code Snippets Database Documentation: REML markup language
Expand Down Expand Up @@ -279,19 +279,19 @@ <h2>
</p>
<ul class="half-spaced">
<li>
<code class="value">&lt;p&gt;...&lt;/p&gt;</code> &ndash; Renders the enclosed markup as a simple paragraph.
<code class="value">&lt;p&gt;...&lt;/p&gt;</code> &ndash; Renders the enclosed markup as a simple paragraph.
</li>
<li>
<code class="value">&lt;heading&gt;...&lt;/heading&gt;</code> &ndash; Renders the enclosed markup as a heading.
</li>
<li>
<code class="value">&lt;ol&gt;...&lt;/ol&gt;</code> &ndash; Renders the enclosed HTML as an ordered list. <span class="very-strong">Must</span> contain <code class="value">&lt;li&gt;...&lt;/li&gt</code> blocks and nothing else.
<code class="value">&lt;ol&gt;...&lt;/ol&gt;</code> &ndash; Renders the enclosed markup as an ordered list.
</li>
<li>
<code class="value">&lt;ul&gt;...&lt;/ul&gt;</code> &ndash; Renders the enclosed HTML as an unordered list. <span class="very-strong">Must</span> contain <code class="value">&lt;li&gt;...&lt;/li&gt</code> blocks and nothing else.
<code class="value">&lt;ul&gt;...&lt;/ul&gt;</code> &ndash; Renders the enclosed markup as an unordered list.
</li>
<li>
<code class="value">&lt;li&gt;...&lt;/li&gt;</code> &ndash; Renders the enclosed HTML as a list item. <span class="very-strong">Must</span> only be used within <code class="value">&lt;ol&gt;...&lt;/ol&gt;</code> and <code class="value">&lt;ul&gt;...&lt;/ul&gt;</code> blocks.
<code class="value">&lt;li&gt;...&lt;/li&gt;</code> &ndash; Renders the enclosed markup as a list item.
</li>
</ul>
<p>
Expand All @@ -308,7 +308,7 @@ <h2>
<code class="value">&lt;ol&gt;...&lt;/ol&gt;</code> and <code class="value">&lt;ul&gt;...&lt;/ul&gt;</code> blocks <span class="very-strong">must only</span> contain one or more <code class="value">&lt;li&gt;...&lt;/li&gt;</code> blocks.
</li>
<li>
<code class="value">&lt;li&gt;...&lt;/li&gt;</code> blocks <span class="very-strong">must not</span> contain <code class="value">&lt;p&gt;...&lt;/p&gt;</code>, <code class="value">&lt;heading&gt;...&lt;/heading&gt;</code> or other <code class="value">&lt;li&gt;...&lt;/li&gt;</code> blocks directly, but <em>may</em> contain <code class="value">&lt;ol&gt;...&lt;/ol&gt;</code> and <code class="value">&lt;ul&gt;...&lt;/ul&gt;</code> blocks.
<code class="value">&lt;li&gt;...&lt;/li&gt;</code> blocks <span class="very-strong">must</span> only be used within <code class="value">&lt;ol&gt;...&lt;/ol&gt;</code> and <code class="value">&lt;ul&gt;...&lt;/ul&gt;</code> blocks. <em>May</em> contain <code class="value">&lt;p&gt;...&lt;/p&gt;</code> and <code class="value">&lt;heading&gt;...&lt;/heading&gt;</code> blocks, but it is permitted to include text and inline tags directly without enclosing them one of the permitted blocks. Nested lists are permitted by including further <code class="value">&lt;ul&gt;...&lt;/ul&gt;</code> and <code class="value">&lt;ol&gt;...&lt;/ol&gt;</code> blocks.
</li>
<li>
All text <em>should</em> be embedded within <code class="value">&lt;p&gt;...&lt;/p&gt;</code>, <code class="value">&lt;heading&gt;...&lt;/heading&gt;</code> or <code class="value">&lt;li&gt;...&lt;/li&gt;</code> block level tags, e.g. <code class="value">&lt;heading&gt;heading&lt;/heading&gt;&lt;p&gt;text&lt;/p&gt;</code> or simply <code class="value">&lt;p&gt;text&lt;/p&gt;</code>.
Expand All @@ -320,20 +320,23 @@ <h2>
<p>
Here is a valid example:
</p>
<pre class="sample">&lt;p&gt;Hello World&lt;/p&gt;
&lt;heading&gt;Hello&lt;/heading&gt;
<pre class="sample">&lt;heading&gt;Hello&lt;/heading&gt;
&lt;p&gt;Hello World&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;one&lt;/li&gt;
&lt;li&gt;two&lt;/li&gt;
&lt;li&gt;&lt;p&gt;two&lt;/p&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;two A&lt;/li&gt;
&lt;li&gt;two B&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;three&lt;/li&gt;
&lt;/ol&gt;</pre>
<p>
Strictly speaking, the following example is invalid code &ndash; all occurrences of <code class="value">wrong</code> are in error because they are not contained within block tags.
</p>
<pre class="sample">wrong &lt;heading&gt;blah&lt;/heading&gt; wrong &lt;p&gt;blah&lt;/p&gt; wrong</pre>
<p>
However interpreting code <em>may</em> interpret this permissively. If this is done the text outside blocks <span class="very-strong">must</span> be interpreted as if it was enclosed in <code class="value">&lt;p&gt;</code> and <code class="value">&lt;/p&gt;</code> tags. Therefore the above code would be interpreted as:
However interpreting code <em>may</em> interpret this permissively. If this is done the text outside blocks <em>should</em> be interpreted as if it was enclosed in <code class="value">&lt;p&gt;</code> and <code class="value">&lt;/p&gt;</code> tags. Therefore the above code would be interpreted as:
</p>
<pre class="sample">&lt;p&gt;wrong &lt;/p&gt;&lt;heading&gt;blah&lt;/heading&gt;&lt;p&gt;wrong &lt;/p&gt;&lt;p&gt;blah&lt;/p&gt;&lt;p&gt;wrong&lt;/p&gt;</pre>
<aside>
Expand Down Expand Up @@ -375,13 +378,13 @@ <h2>
</p>
<ul class="unspaced">
<li>
In-line tags <span class="very-strong">must</span> be embedded inside a block level tag. E.g. <code class="value">&lt;p&gt;one&lt;strong&gt;two&lt;/strong&gt;three&lt;/p&gt;</code>.
In-line tags <span class="very-strong">must</span> be embedded inside a valid block level tag. E.g. <code class="value">&lt;p&gt;one&lt;strong&gt;two&lt;/strong&gt;three&lt;/p&gt;</code>.
</li>
<li>
Tags <span class="very-strong">must</span> match. E.g. <code class="value">&lt;em&gt;</code> must be matched with <code class="value">&lt;/em&gt;</code>.
</li>
<li>
Tags may be nested, providing the tags match. E.g. <code class="value">&lt;em&gt;blah &lt;var&gt;blah&lt;/var&gt;&lt;/em&gt;</code> is valid but <code class="value">&lt;em&gt;blah &lt;var&gt;blah&lt;/em&gt;&lt;/var&gt;</code> is not.
Tags may be nested, providing the tags are balanced. E.g. <code class="value">&lt;em&gt;blah &lt;var&gt;blah&lt;/var&gt;&lt;/em&gt;</code> is valid but <code class="value">&lt;em&gt;blah &lt;var&gt;blah&lt;/em&gt;&lt;/var&gt;</code> is not.
</li>
</ul>
<p>
Expand Down
16 changes: 7 additions & 9 deletions Docs/License.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/
*
* Copyright (C) 2012-2022, Peter Johnson (gravatar.com/delphidabbler).
* Copyright (C) 2012-2023, Peter Johnson (gravatar.com/delphidabbler).
*
* CodeSnip license.
-->
Expand Down Expand Up @@ -225,7 +225,7 @@ <h2>
Executable Program
</h2>
<p>
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2022 by <a
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2023 by <a
href="https://gravatar.com/delphidabbler"
>Peter D Johnson</a>.
</p>
Expand Down Expand Up @@ -327,7 +327,7 @@ <h2>
<div>
This condition applies to all files in the
<kbd>Src/Res/Img/Branding</kbd> directory, all of which are original
work copyright &copy; 2012-2022 by <a
work copyright &copy; 2012-2023 by <a
href="https://gravatar.com/delphidabbler"
>Peter D Johnson</a>.
</div>
Expand Down Expand Up @@ -1615,7 +1615,7 @@ <h2 id="toolbar-icons-mit">
<p>Toolbar Icons is made available under the terms of the MIT License.
See <a
href="https://toolbaricons.sourceforge.net/"
>http://toolbaricons.sourceforge.net/</a> for more information.</p>
>https://toolbaricons.sourceforge.net/</a> for more information.</p>

<p>Copyright &copy; 2010 Florian Haag</p>

Expand Down Expand Up @@ -1674,12 +1674,10 @@ <h1>
</div>
<ul>
<li>
Silk Icon Set 1.3 by Mark James: <a
href="http://www.famfamfam.com/lab/icons/silk/"
>http://www.famfamfam.com/lab/icons/silk/</a>.
Silk Icon Set 1.3 by Mark James: <del>http://www.famfamfam.com/lab/icons/silk/</del> [link broken].
</li>
<li>
Silk Companion 1 by Damien Guard: <del>https://www.damieng.com/icons/silkcompanion</del> [link broken]
Silk Companion 1 by Damien Guard: <del>https://www.damieng.com/icons/silkcompanion</del> [link broken].
</li>
<li>
Led Icon Set v1.0: <del>http://led24.de/iconset/</del> [link broken].
Expand Down Expand Up @@ -1714,7 +1712,7 @@ <h1>
<li>
Some program icons are based on Florian Haag's Toolbar Icons set at <a
href="https://toolbaricons.sourceforge.net/"
>http://toolbaricons.sourceforge.net/</a>.
>https://toolbaricons.sourceforge.net/</a>.
</li>
<li>
Some images used in the program's Easter Egg are based on public domain
Expand Down
Loading

0 comments on commit 7482558

Please sign in to comment.