diff --git a/Build.html b/Build.html
index fc6947166..5dde59363 100644
--- a/Build.html
+++ b/Build.html
@@ -6,7 +6,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) 2009-2023, Peter Johnson (gravatar.com/delphidabbler).
+ * Copyright (C) 2009-2024, Peter Johnson (gravatar.com/delphidabbler).
*
* Instructions for building CodeSnip from source.
-->
@@ -284,11 +284,19 @@
- This program is used to create CodeSnip's release file.
- You can get a Windows command line version at
+ This program is used to create CodeSnip's release file. The InfoZip
+ version of zip is required. You can get a Windows command line version at
http://stahlforce.com/dev/index.php?tool=zipunzip.
+ >http://stahlforce.com/dev/index.php?tool=zipunzip.
+
+
+
+ Warning: The above link is http
only. If you or
+ your browser object to the insecure link you can download an identical version
+ from delphidabbler.com, using the https
protocol. See https://delphidabbler.com/extras/info-zip.
@@ -513,12 +521,14 @@
| +-- exe - receives executable code and compiled help file
| |
| +-- release - receives release files
+ | |
+ | +-- ~tmp~ - store for temp files ceated in release process
|
...
If the _build/bin
folder already existed, it will have been emptied.
- In addition, Make
will have created a .cfg
file from
+ In addition, Make
will have created a .cfg
file from a
template in the Src
folder. This .cfg
file is needed
for DCC32 to run correctly. The file will be ignored by Git.
@@ -580,7 +590,7 @@
You have several options:
-
+
-
Build the CodeSnip Executable
@@ -599,10 +609,10 @@
-
Clean Up.
-
+
- Each of these options is described below. All except the last assume that
+ Each of these options is described below. All except options 5 and 6 assume that
Make config
has been run.
@@ -648,7 +658,7 @@
> Make -DPORTABLE codesnip
- Again the executable is placed in the _build/exe
folder, but this time
+ Again the executable is placed in the _build\exe
folder, but this time
it is named CodeSnip-p.exe
@@ -665,12 +675,17 @@
The compiled help file will be written to the _build\exe
folder.
+
+
+ The same help file is used for the standard and portable editions.
+
+
Build the Setup Program
- The setup program requires that the CodeSnip excutable and the
+ The setup program requires that the CodeSnip executable and the
compiled help file are already present in the _build\exe
directory.
@@ -690,7 +705,7 @@
The setup program is named CodeSnip-Setup-x.x.x.exe
, where
x.x.x is the version number extracted from CodeSnip's version
- information. It is placed in the _build/exe
directory.
+ information. It is placed in the _build\exe
directory.
@@ -715,7 +730,7 @@
Make can create zip files containing all the files that are included in a release.
- Zip files are written to the _build/release
directory.
+ Zip files are written to the _build\release
directory.
@@ -723,9 +738,13 @@
- The release file for the standard edition of CodeSnip includes the
- setup file along with ReadMe.txt
from the Docs
- directory. Both files must exist.
+ The release zip file for the standard edition requires that the setup files is already
+ present in the _build\exe
directory.
+
+
+
+ The release file includes the setup file along with ReadMe.txt
+ that is automatically generated from Docs\ReadMe-standard.txt
.
@@ -752,9 +771,16 @@
- The release file for the portable edition includes the portable executable
- file, CodeSnip-p.exe
, the help file CodeSnip.chm
and
- several files from the Docs
directory. All must be present.
+ The release zip file for the portable edition cannot be created until the
+ CodeSnip excutable and the compiled help file are already present in the
+ _build\exe
directory.
+
+
+
+ The release file includes the portable executable file, CodeSnip-p.exe
,
+ the help file CodeSnip.chm
, Docs\License.html
and
+ ReadMe.txt
that is automatically generated from
+ Docs\ReadMe-portable.txt
.
@@ -844,6 +870,31 @@
zip file names can be used here too.
+
+ There is also a quicker way to build a release, but you must provide a version number to use it. First navigate up
+ to the repository root. Then run
+
+
+> Deploy 9.9.9
+
+
+ where 9.9.9
is the release version number.
+
+
+
+ This command will build both the standard and portable executables, the help file, the standard edition setup file
+ and finally create the release zip files for both editions, with the release version number incorporated in the file names.
+
+
+
+ Using Deploy 9.9.9
is the equivalent of doing:
+
+
+> cd Src
+> Make -DVERSION=9.9.9
+> Make -DPORTABLE -DVERSION=9.9.9
+> cd ..
+
Clean Up
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5aeb246be..d3fbdcf23 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,84 @@ 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.
+## Release v4.26.0 of 02 May 2025
+
+* Updated the dialogue box displayed when saving units and annotated source code [issue #166]:
+ * The _File Encoding_ drop down list control is disabled if there is only one encoding option.
+ * Updated and clarified the naming of encodings in the _File Encoding_ drop down list.
+ * The sole encoding option displayed for the _Rich text file_ file type was changed from the erroneous ANSI to the correct ASCII.
+* Fixed bug where, when ANSI encoding was selected in the _Save Unit_ and _Save Annotated Source_ dialogue boxes, snippets containing characters not supported in the default locale's code page were being rendered diffently in the Preview dialogue box to when saved to file [issue #164]. The previewed code is now the same as that of the saved source code.
+* Updated file formats available when the _File | Save Snippet Information_ menu option is selected:
+ * Syntax highlighting of the existing RTF format output is now optional.
+ * Added the option to save snippet information in the following new formats:
+ * Plain text, in UTF-8, UTF-16LE, UTF-16BE and the system locale's default ANSI code page. [issue #162]
+ * HMTL 5 with optional syntax highlighting, in UTF-8 format [issue #153].
+ * XHTML with optional syntax highlighting, in UTF-8 format [issue #153].
+ * Markdown, in UTF-8, UTF-16LE, UTF-16BE and the system locale's default ANSI code page [issue #155].
+ * Changed the _Save Snippet Information_ dialogue box:
+ * It is now based on that used for saving unit and annotated source code in that file encoding and snippet highlighting can be customised where relevant, although the _Comment style_ controls are disabled since they are not relevant.
+ * The suggested file name was changed from "SnippetInfo" to the display name of the selected snippet.
+ * The dialogue box caption now contains the display name of the selected snippet.
+* Changed the title of the _Save Annotated Source_ dialogue box when displaying snippets.
+* Added option to prevent descriptive comments from appearing in the implementation section of generated units. A check box for this option has been added to the _Code Formatting_ tab of the _Preferences_ dialogue box [issue #85].
+* The _Help | CodeSnip News Blog_ menu item was changed to link to the [DelphiDabbler Blog](https://delphidabbler.blogspot.com/) instead of the CodeSnip Blog, because the latter is to be closed down. The menu item was renamed to _Help | CodeSnip News On DelphiDabbler Blog_ [issue #161].
+* Improved how the CSS used in generated HTML 5 and XHTML files is generated:
+ * The ordering of CSS selectors can now be pre-determined.
+ * CSS lengths and sizes can now be specified in units, such as `em`, instead of just pixels.
+* Refactored the `USourceGen` unit to remove an unnecessary dependency on user preferences [issue #167].
+* Updated the help file:
+ * Re changes when saving snippet information [issue #163].
+ * Re changes to the _Save Unit_ and _Save Annotated Source_ dialogue boxes.
+ * Re changes to the blog linked from the _Help_ menu.
+ * Re the new option to inhibit comments in the implementation sections of generated units.
+* Updated documentation:
+ * File format documentation was changed re the addition of the Markdown file format and the changes to the encodings used in saved files.
+ * Read-me files were updated re the change of news blog.
+
+## Release v4.25.0 of 19 April 2025
+
+* Added new feature to save snippet information to file in RTF format using the new _File | Save Snippet Information_ menu option [issue #140].
+* Added the option to save optionally highlighted annotated source code and units in HTML 5 format [issue #87].
+* Fixed malformed bullet character(s) in the list of imported snippets on the last page of the Snippets Import Wizard dialogue box [issue #147].
+* Improved the solution to the crash after hibernation bug, initially fixed in v4.24.1 and v4.24.2, with much improved and more stable code [issue #158]. Implemented by [@SirRufo](https://github.com/SirRufo).
+* Overhauled rich text format processing:
+ * Fixed bug where Unicode characters that don't exist in the system code page were not being displayed correctly [issue #157].
+ * Fixed potential bug where some reserved ASCII characters may not be escaped properly [issue #159].
+ * Refactored and improved the rich text handling code [issue #100].
+* Corrected the copyright date displayed in the About Box to include 2025 [issue #149].
+* Documentation changes:
+ * Fixed error in the export file formation documentation and related help topic [issue #151].
+ * Corrected erroneous comments for the _TREMLEntities.MapToEntity_ method [issue #84].
+ * Updated file format documentation with details the changes introduced when implementing issues #87 and #140.
+ * Updated the help file with details of the new features added in this release.
+
+## Release v4.24.2 of 14 April 2025
+
+Hotfix release.
+
+* Updated bug fix implemented in v4.24.1 to avoid relying on a potentially problematic windows event [issue #70 (2nd attempt)].
+* Corrected release date error for v4.24.1 in `CHANGELOG.md`.
+
+## Release v4.24.1 of 13 April 2025
+
+* Fixed bug where CodeSnip occasionally crashes after a computer resumes from hibernation [issue #70].
+* Updated license copyright dates for 2025.
+
+## Release v4.24.0 of 23 October 2024
+
+* Compilers with which a snippet has not been tested are now omitted from snippet information that is copied to the clipboard and included in print outs [issue #143].
+* Reversed order of compilers in the snippets editor's _Compile Results_ tab so that later compilers are display first. This change was accidentally left out of release v4.22.0 when similar changes were made in other parts of the UI [issue #135].
+* Release version number is now displayed in the program title bar [issue #122].
+* Fixed incorrect copyright date displayed in About Box [issue #129].
+* Fixed bug when checking for correct preamble bytes (BOMs) in UTF-8 and UTF-16 format text files [issue #139].
+* Portable and Standard edition now use the same program names. Portable edition was previously declaring itself as _DelphiDabbler CodeSnip-p_ instead of _DelphiDabbler CodeSnip_ [issue #130].
+* Updated operating system detection code [issues #126 and #144].
+* Added `Deploy.bat` script to create and package both the CodeSnip standard and portable releases [issue #128].
+* Documentation changes:
+ * CodeSnip standard and portable releases now each have their own release read-me files instead of both releases being shipped with the same read-me [issue #127]. Updated `Build.html` and `README.md` re this change.
+ * Updated and corrected REML documentation and REML help topic. Those documents and others that discuss REML were also changed to link to authoritative REML definitions in the `delphidabbler/reml` repository. [issues #131, #133 & #134].
+ * Updated `Build.html` with alternative, more secure, download link for `zip.exe` program that is required to package releases [issue #137].
+
## Release v4.23.0 of 02 April 2024
* Removed marketing names (e.g. "Athens" or "Rio") from Delphi compiler names to save space when the compiler names are displayed in the UI [issue #125].
diff --git a/Deploy.bat b/Deploy.bat
new file mode 100644
index 000000000..23d95a425
--- /dev/null
+++ b/Deploy.bat
@@ -0,0 +1,99 @@
+:: 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 https://mozilla.org/MPL/2.0/
+::
+:: Copyright (C) 2024, Peter Johnson (gravatar.com/delphidabbler).
+::
+:: Deploy script for CodeSnip.
+::
+:: This script compiles release versions of the standard and portable editions
+:: of CodeSnip and places them into two different zip files ready for release.
+::
+:: This script uses Embarcadero Make. Various other programs are required to
+:: run Make. See Src/Makefile for details.
+::
+:: To use the script:
+:: 1) Set the environment variables required for Make to succeed. See
+:: Src/Makefile for details
+:: 2) Change directory to that where this script is located.
+:: 3) Run the script.
+::
+:: Usage:
+:: Deploy
+:: where
+:: is the version number of the release, e.g. 0.5.3-beta or 1.2.0.
+
+@echo off
+
+setlocal
+
+:: Check for required parameter
+if "%1"=="" goto paramerror
+
+:: Store parameter
+set Version=%1
+
+:: Store common make parameters
+set CommonParams=-DVERSION=%Version%
+
+:: Store standard edition make parameters
+set StandardParams=%CommonParams%
+
+:: Store portable edition make parameters
+set PortableParams=-DPORTABLE %CommonParams%
+
+:: Set command line
+set MakeCmd=Make
+set StandardMakeCmd=%MakeCmd% %StandardParams%
+set PortableMakeCmd=%MakeCmd% %PortableParams%
+
+echo ----------------------------------------------
+echo Deploying CodeSnip Standard And Portable Builds
+echo -----------------------------------------------
+echo.
+echo Standard edition Make command: %StandardMakeCmd%
+echo Portable edition Make command: %PortableMakeCmd%
+
+cd Src
+
+echo.
+echo.
+echo.
+echo =========================
+echo Building Standard edition
+echo =========================
+echo.
+echo.
+%StandardMakeCmd%
+
+echo.
+echo.
+echo.
+echo =========================
+echo Building Portable edition
+echo =========================
+echo.
+echo.
+%PortableMakeCmd%
+
+echo.
+echo.
+echo.
+echo ====================
+echo Deployment completed
+echo ====================
+
+goto end
+
+:: Error messages
+
+:paramerror
+echo.
+echo ***ERROR: Please specify a version number as a parameter
+echo.
+goto end
+
+:: End
+:end
+
+endlocal
diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html
index d6a57c49a..915d7098f 100644
--- a/Docs/Design/FileFormats/config.html
+++ b/Docs/Design/FileFormats/config.html
@@ -167,7 +167,7 @@
- There have been several versions of this file. The current one is version 19. The change to version 19 came with CodeSnip v4.21.0 and the addition of the [Compilers] section and the CanAutoInstall
key in the [Cmp:XXX] sections.
+ There have been several versions of this file. The current one is version 20. The change to version 20 came with CodeSnip v4.26.0 and the addition of the UseCommentsInUnitImpl
key in the [Prefs:SourceCode]
section.
@@ -771,7 +771,7 @@
The version number of the config file. Incremented whenever the file format changes. If this section or this value is missing then the default value is 1
.
- The current value is 19
.
+ The current value is 20
.
@@ -1262,6 +1262,12 @@
Flag indicating whether multi-paragraph snippet descriptions are to be truncated to the first paragraph only in documentation comments. True
⇒ truncate the description; False
⇒ use the full description.
+
+ UseCommentsInUnitImpl
(Boolean)
+
+
+ Flag indicating whether source code comments are repeated in a generated unit's implementation section. True
⇒ emit comments in both the interface and implementation sections; False
⇒ emit comments in the interface section only.
+
UseSyntaxHiliting
(Boolean)
diff --git a/Docs/Design/FileFormats/export.html b/Docs/Design/FileFormats/export.html
index 29ca8a849..7f6e80653 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 https://mozilla.org/MPL/2.0/
*
- * Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
+ * Copyright (C) 2012-2025, Peter Johnson (gravatar.com/delphidabbler).
*
* CodeSnip File Format Documentation: Export
-->
@@ -57,6 +57,9 @@
File Format
+
+ Erratum
+
Change Log
@@ -114,8 +117,8 @@
- There have been seven different versions of the XML export file format – v1 to
- v7. Tags used by all versions are explained below, with notes describing
+ There have been eight different versions of the XML export file format – v1 to
+ v8. Tags used by all versions are explained below, with notes describing
which versions a tag applies to. Where there is no note the tag is valid in
all versions.
@@ -176,7 +179,7 @@
Identifies major version of file. Determines which tags are valid and
- establishes rules concerning content. Valid versions are 1 to 7.
+ establishes rules concerning content. Valid versions are 1 to 8.
@@ -198,7 +201,7 @@
versions 1 to 6: Contains information about user who created the file used for submissions to the online database, omitted for other exports.
- version 7: Not supported. Ignored if present.
+ version 7 and later: Not supported. Ignored if present.
@@ -212,7 +215,7 @@
versions 1 to 6: User's name or nickname.
- version 7: Not supported. Ignored if present.
+ version 7 and later: Not supported. Ignored if present.
@@ -226,7 +229,7 @@
versions 1 to 6: User's email address.
- version 7: Not supported. Ignored if present.
+ version 7 and later: Not supported. Ignored if present.
@@ -240,7 +243,7 @@
versions 1 to 6: Any comments provided by user.
- version 7: Not supported. Ignored if present.
+ version 7 and later: Not supported. Ignored if present.
@@ -687,33 +690,21 @@
-
- codesnip-export/routines/routine/xref
-
-
- List of cross-referenced snippets.
-
+
-
- codesnip-export/routines/routine/xref/pascal-name
-
-
-
- Name of a snippet within cross-reference list.
-
-
- -
- versions 1 to 4: Name must begin with an
- English language letter or the underscore.
-
- -
- version 5 and later: Name can begin with
- any character that is valid as the first character of a Unicode Pascal
- identifier.
-
-
-
-
+
+
+
+ Erratum
+
+
+
+ The codesnip-export/routines/routine/xref and codesnip-export/routines/routine/xref/pascal-name tags were included in versions 1 to 7 of this specification in error. XRefs were never intended to be written to export files by any version of CodeSnip, as source code comments make clear.
+
+
+
+ These tags have been removed from this document entirely of specification version 8.
+
@@ -1008,6 +999,18 @@
+
+
+ Version 8 - 15 April 2025
+
+
+
+ Introduced with CodeSnip v4.24.3.
+
+
+ The codesnip-export/routines/routine/xref and codesnip-export/routines/routine/xref/pascal-name tags were removed from the specification. See Erratum above for details.
+
+
@@ -1058,6 +1061,10 @@
Readers of v2 files and later can parse REML as v6, since all versions of REML up to v6 are backwards compatible.
+
+ Readers of v1 to v7 files must ignore any codesnip-export/routines/routine/xref tags and sub tags in the unlikely event that they are found. For an explanation see Erratum above.
+
+