From 848d284bdc4450c811333bdc875213e658a54156 Mon Sep 17 00:00:00 2001 From: delphidabbler <5164283+delphidabbler@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:54:58 +0100 Subject: [PATCH 001/104] Split Docs/ReadMe.txt into two different versions Split into ReadMe-portable.txt relating to Portable edition and ReadMe-standard.txt for Standard edition. Both files were edited according to new purpose and to update content where necessary. --- Docs/ReadMe-portable.txt | 257 +++++++++++++++++++++++ Docs/{ReadMe.txt => ReadMe-standard.txt} | 174 ++++----------- 2 files changed, 303 insertions(+), 128 deletions(-) create mode 100644 Docs/ReadMe-portable.txt rename Docs/{ReadMe.txt => ReadMe-standard.txt} (64%) diff --git a/Docs/ReadMe-portable.txt b/Docs/ReadMe-portable.txt new file mode 100644 index 000000000..e0883fa5c --- /dev/null +++ b/Docs/ReadMe-portable.txt @@ -0,0 +1,257 @@ +================================================================================ + +DELPHIDABBLER CODESNIP v4 PORTABLE EDITION README + +================================================================================ + + +What is CodeSnip? +================================================================================ + +DelphiDabbler CodeSnip 4 is a code snippets repository targetted at the Pascal / +Delphi programming languages. It can download and display code snippets from the +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 12.x and +Free Pascal. + +Compilable Pascal units can be created that contain selected snippets. + + +CodeSnip Editions +================================================================================ + +This document relates to the PORTABLE edition of CodeSnip. This edition can be +run from any writeable removable storage medium (e.g. a USB memory stick) or +from any folder on the computer's hard disk. It makes no changes to the host +computer. + +There is also a standard edition of the program. This edition is installed on +the user's computer using an installer. It records its presence in the registry +and stores data in the system's application and user data directories. You can +get the standard edition from the same place you downloaded the this edition. + +You can run both the standard and portable editions together on the same +computer and even run them at the same time. However, each edition maintains its +own settings and keeps its own copies of the snippets databases. To share user +defined snippets you must export them from one edition and import into the +other. CodeSnip provides no mechanism for keeping them synchronised. + + +Installation +================================================================================ + +CodeSnip requires Windows 2000 or later. It also requires MS Internet Explorer 6 +or later, although IE 8, 9 or 10 are strongly recommended. Note that recent +releases have only been tested on Windows 11. + +The portable edition of CodeSnip 4 is distributed in a zip file that contains +the program executable, the help file and various documentation files. + +Install the program using the following steps: + +1) Mount any storage medium on which you want to install CodeSnip. + +2) Create a folder on the storage medium or on your computer's internal disk in + which to copy the required files. + +3) Copy the files CodeSnip-p.exe (the executable program) and CodeSnip.chm + (the help file) into the folder you created. + + CodeSnip does not need the other files included in the zip file in order to + run, but you may find them useful. Copy them if you wish. + +Run the program by double clicking it. When it first runs it will create two +sub-directories within the folder where you installed the program. These will +be named AppData and UserData. Do not remove these directories or alter any of +the contents because CodeSnip uses them to store configuration data along with +your code snippets. + +No files are written outside the folder where you copied the files and the +registry is not modified. + +** WARNING: When updating an existing portable installation with a new version +of CodeSnip it is important that you do not change or delete the AppData and +UserData folders. If you do this you risk loosing your settings and/or database. + + +Uninstallation +================================================================================ + +Simply delete the folder where you installed the portable edition of CodeSnip +along with all its contents. + +Be aware that any snippets you have created will be lost. If you want to keep +them for use in another CodeSnip installation, either export them or back up the +user database before deleting the folder. See the help file for details of how +to do this. + + +Downloading & Updating the Code Snippets Database +================================================================================ + +The online DelphiDabbler Code Snippets database is not installed with the +program. + +CodeSnip's start-up screen shows details of any installed databases. If there is +no copy of the online database then a link is displayed that enables the +database to be installed. This link opens the "Install or Update DelphiDabbler +Snippets Database" wizard dialogue box. The dialogue box explains how to +download and install the database. + +You can download or update the database later by opening the same dialogue box +using the "Database | Install or Update DelphiDabbler Snippets Database" menu +option. + + +Configuring CodeSnip to Work With Your Compilers +================================================================================ + +A feature of CodeSnip is its ability to test compile snippets with any installed +Windows 32 version of Delphi (from Delphi 2 to Delphi.x) and FreePascal, +providing some simple rules are followed. + +When CodeSnip is first installed it knows nothing about the available compilers +and so test compilations cannot be performed. If any supported Delphi compiler +is detected when the program is first run you will be given the option of +registering it. This does not work for Free Pascal. + +You can also tell CodeSnip about the available compilers by using the "Tools | +Configure Compilers" menu option. The resulting dialogue can automatically +detect all installed versions of supported Delphi compilers at the click of a +button. Free Pascal, where installed, must be set up manually. The Welcome page +displays a list of compilers it has been configured to work with. + +Compilers that do not use English as their output language will need further +configuration. See the help file for information (look up "configure compilers +dialogue" in the help file index). + +Each user can configure compilers differently. + +Delphi XE2 and later 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 +https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md#faq-7 + +Any type of snippet other than "freeform" can be test compiled. + + +Updating the Program +================================================================================ + +Updates are published on GitHub. See +https://github.com/delphidabbler/codesnip/releases + +News of new updates is published on the CodeSnip Blog: +https://codesnip-app.blogspot.com/. + + +Known Installation and Upgrading Issues +================================================================================ + ++ If you have updated to CodeSnip v4.2.0 or later from any earlier v4 release, + and then run the earlier version of the program again, its saved main window + state, size, position and layout will have been lost and the program will + display in its default size. + ++ If you have updated to CodeSnip v4.3.0 or later from v4.2.x or earlier any -NS + command line options you have specified on the "Switches" (aka "Command Line") + tab of the Configure Compilers dialogue box for Delphi XE2 or later will be + removed and equivalent entries will have been made on the "Namespaces" tab. + ++ CodeSnip v4.16.0 and later cannot be registered. Any previous registration + information may be lost. + + +License & Disclaimer +================================================================================ + +CodeSnip is made available under the terms of the Mozilla Public License v2.0. +The license is explained in full in the file License.html that is installed with +CodeSnip. A summary of the license can be viewed from the "Help | License" menu +option. + +CodeSnip is supplied on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either +express or implied. See License.html for details. + +The source code of any snippet managed by CodeSnip, whether from the +DelphiDabbler Code Snippets Database or the user database, is used WITHOUT +WARRANTY OF ANY KIND, either express or implied. The code is used entirely at +the user's own risk. + +The snippets from the DelphiDabbler Code Snippets Database are open source. See +the "About The Database" tab of the About dialogue box for details of the +applicable license. (You can display the About box from the "Help" menu.) + +The user is responsible to ensure that any code snippets managed by CodeSnip are +used in accordance with any applicable license. + + +Source Code +================================================================================ + +CodeSnip's source code is freely available. For details of how to obtain the +source see the FAQ at +https://github.com/delphidabbler/codesnip-faq/blob/master/SourceCode.md#faq-1 + +The portable edition of CodeSnip shares the same source code base with the +standard edition. + +The original source code of v4 is released under the Mozilla Public license +v2.0 (see https://www.mozilla.org/MPL/) and other open source licenses. See the +file "License.html" in the "Docs" directory of the repository for full licensing +information. + + +Bugs & Feature Requests +================================================================================ + +Please do report any bugs you find. Suggestions for new features are also +welcomed. + +Both bug reports and feature requests are made using the GitHub issue tracker +(GitHub account required). For details about using the issue tracker see +https://github.com/delphidabbler/codesnip/blob/master/CONTRIBUTING.md#issues. + + +FAQs +================================================================================ + +There are Frequently Asked Questions pages for CodeSnip on the web, at +https://github.com/delphidabbler/codesnip-faq/blob/master/README.md + + +Privacy +================================================================================ + +From v4.16.0 CodeSnip neither stores nor transmits any personally identifiable +data. + +Do note though that CodeSnip can display web pages via your default web browser, +but only in response to user input. No guarantee is made about any personal data +collected by such web pages. + + +Thanks +================================================================================ + +Thanks to: + ++ David Mustard and Bill Miller for providing information that enabled me to add + Delphi 2007 and Delphi 2009 support, respectively, to the program. + ++ geoffsmith82 and an anonymous contributor for information about getting + CodeSnip to work with Delphi XE2. + ++ The authors of the third party source code and images used by the program. See + the program's about box or License.html for details. + ++ Various contributors to the DelphiDabbler Code Snippets database. Names of + contributors are listed in the program's About Box (use the "Help | About" + menu option then select the "About the Database" tab). The list will be empty + if the Code Snippets Database has not been installed. + + +================================================================================ diff --git a/Docs/ReadMe.txt b/Docs/ReadMe-standard.txt similarity index 64% rename from Docs/ReadMe.txt rename to Docs/ReadMe-standard.txt index b7806db53..5f5ea703f 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe-standard.txt @@ -1,6 +1,6 @@ ================================================================================ -DELPHIDABBLER CODESNIP v4 README +DELPHIDABBLER CODESNIP v4 STANDARD EDITION README ================================================================================ @@ -14,30 +14,26 @@ 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 12 Athens -and Free Pascal. +with each installed Win32 version of Delphi from Delphi 2 to Delphi 12.x and +Free Pascal. Compilable Pascal units can be created that contain selected snippets. -Features new to CodeSnip 4 are listed in the "What's New In CodeSnip 4" topic -in the program's help file. - CodeSnip Editions ================================================================================ -There are two different editions of CodeSnip 4 available: - -+ The standard edition, which is installed on the user's computer using an - installer and which records its presence in the registry and stores data in - the system's application and user data directories. +This document relates to the STANDARD edition of CodeSnip. This edition is +installed on the user's computer using a standard Windows installer and which +records its presence in the registry and stores data in the system's application +and user data directories. -+ The portable edition that can be run from any writeable removable storage - medium (e.g. a USB memory stick) and that makes no changes to the host - computer. This edition has no installer and is simply copied onto the required - medium. +There is also a portable edition of the program. This edition can be run from +any writeable removable storage medium (e.g. a USB memory stick) or from any +folder on the computer's hard disk. It makes no changes to the host computer. +This edition has no installer and is simply copied to the required location. -You can run both the standard and portable editions together on the same +You can run both the portable and standard editions together on the same computer and even run them at the same time. However, each edition maintains its own settings and keeps its own copies of the snippets databases. To share user defined snippets you must export them from one edition and import into the @@ -48,18 +44,14 @@ Installation ================================================================================ CodeSnip requires Windows 2000 or later. It also requires MS Internet Explorer 6 -or later, although IE 8, 9 or 10 are strongly recommended. But note that recent -releases have only been tested on Windows 10/11. +or later, although IE 8, 9 or 10 are strongly recommended. Note that recent +releases have only been tested on Windows 11. -Installing the Standard Edition -------------------------------- - -You will need administrator privileges to run the setup program for the standard -edition. If you are using a non-admin user account on Windows 2000 or XP you -should run setup as administrator. By default Windows Vista to Windows 11 will -require an admin password if running as a standard user and setup will attempt -to elevate the process. If UAC prompts are disabled you must run setup as -administrator. +You will need administrator privileges to run the setup program. If you are +using a non-admin user account on Windows 2000 or XP you should run setup as +administrator. By default Windows Vista to Windows 11 will require admin +privileges and setup will attempt to elevate the process if required. If UAC +prompts are disabled you must run setup as administrator. CodeSnip v4 will install alongside any v3 or earlier release that may already be installed. If you want to replace the earlier version simply uninstall it in the @@ -106,53 +98,15 @@ If you are updating to CodeSnip 4 from version 3 or earlier, CodeSnip will give you the option of bringing forward your old settings and / or user defined database. This happens the first time v4 is run for each user. -Installing the Portable Edition -------------------------------- - -The portable edition of CodeSnip 4 is distributed in a zip file that contains -the program executable, the help file and various documentation files. - -Install the program using the following steps: - -1) Mount any storage medium on which you want to install CodeSnip. - -2) Create a folder on the storage medium or on your computer's internal disk in - which to copy the required files. - -3) Copy the files CodeSnip-p.exe (the executable program) and CodeSnip.chm - (the help file) into the folder you created. - - CodeSnip does not need the other files included in the zip file in order to - run, but you may find them useful. Copy them if you wish. - -Run the program by double clicking it. When it first runs it will create two -sub-directories within the folder where you installed the program. These will -be named AppData and UserData. Do not remove these directories or alter any of -the contents. CodeSnip uses them to store configuration data along with your -code snippets. - -No files are written outside the folder where you copied the files and the -registry is not modified. - -** WARNING: When updating an existing portable installation with a new version -of CodeSnip it is important that you do not change or delete the AppData and -UserData folders. If you do this you risk loosing your settings and/or database. - Uninstallation ================================================================================ -Uninstalling the Standard Edition ---------------------------------- - -CodeSnip can be uninstalled via "Installed Apps" (a.k.a. "Apps and Features", -a.k.a. "Programs and Features", a.k.a. "Add / Remove Programs") accessed from the -Windows Control Panel or by choosing "Uninstall DelphiDabbler CodeSnip" from the -program's start menu group. +CodeSnip can be uninstalled using your version of Windows' application +uninstaller, run from Control Panel. Alternatively you can choose "Uninstall +DelphiDabbler CodeSnip" from the program's start menu group. -Administrator privileges will be required to uninstall CodeSnip. Windows Vista -to Windows 11 with UAC prompts enabled will prompt for an admin password if -necessary. +Administrator privileges will be required to uninstall CodeSnip. The uninstall program will delete any local copy of the online Code Snippets database but will leave any user defined database, configuration data and @@ -161,16 +115,6 @@ delete the %AppData%\DelphiDabbler\CodeSnip.4 directory and all its contents for each user who ran CodeSnip. If any user has moved the user database directory those directories also need to be deleted. -Uninstalling the Portable Edition ---------------------------------- - -Simply delete the folder where you installed CodeSnip, with all its contents. - -Be aware that any snippets you have created will be lost. If you want to keep -them for use in another CodeSnip installation either export them or back up the -user database before deleting the folder. See the help file for details of how -to do this. - Downloading & Updating the Code Snippets Database ================================================================================ @@ -179,22 +123,19 @@ The online DelphiDabbler Code Snippets database is not installed with the program. CodeSnip's start-up screen shows details of any installed databases. If there is -no copy of the online database a link is displayed that enables the database to -be installed. This link opens the "Install or Update DelphiDabbler Snippets -Database" wizard style dialogue box. The dialogue box explains how to download -and install the database. +no copy of the online database then a link is displayed that enables the +database to be installed. This link opens the "Install or Update DelphiDabbler +Snippets Database" wizard dialogue box. The dialogue box explains how to +download and install the database. You can download or update the database later by opening the same dialogue box using the "Database | Install or Update DelphiDabbler Snippets Database" menu option. -Standard Edition Only ---------------------- - -When installing the standard edition, the setup program will detect if an older -database installation is present and will give the option to carry it forward. -When setup completes it checks for the presence of the database and puts up a -message if it is not present. +During installation the setup program will detect if an older database version +is present and will give the option to carry it forward. When setup completes it +checks for the presence of the database and puts up a message if it is not +present. Database updates will apply to all users of the computer the next time they start CodeSnip. @@ -204,7 +145,7 @@ Configuring CodeSnip to Work With Your Compilers ================================================================================ A feature of CodeSnip is its ability to test compile snippets with any installed -Windows 32 version of Delphi (from Delphi 2 to Delphi 12 Athens) and FreePascal, +Windows 32 version of Delphi (from Delphi 2 to Delphi.x) and FreePascal, providing some simple rules are followed. When CodeSnip is first installed it knows nothing about the available compilers @@ -235,7 +176,7 @@ Any type of snippet other than "freeform" can be test compiled. Updating the Program ================================================================================ -Updates are published on GitHub. See +Updates are published on GitHub. See https://github.com/delphidabbler/codesnip/releases News of new updates is published on the CodeSnip Blog: @@ -288,7 +229,7 @@ DelphiDabbler Code Snippets Database or the user database, is used WITHOUT WARRANTY OF ANY KIND, either express or implied. The code is used entirely at the user's own risk. -The snippets from the DelphiDabbler Code Snippets Database is open source. See +The snippets from the DelphiDabbler Code Snippets Database are open source. See the "About The Database" tab of the About dialogue box for details of the applicable license. (You can display the About box from the "Help" menu.) @@ -303,7 +244,8 @@ CodeSnip's source code is freely available. For details of how to obtain the source see the FAQ at https://github.com/delphidabbler/codesnip-faq/blob/master/SourceCode.md#faq-1 -The standard and portable editions of CodeSnip share the same source code. +The standard edition of CodeSnip shares the same source code base with the +portable edition. The original source code of v4 is released under the Mozilla Public license v2.0 (see https://www.mozilla.org/MPL/) and other open source licenses. See the @@ -311,36 +253,15 @@ file "License.html" in the "Docs" directory of the repository for full licensing information. -Bugs +Bugs & Feature Requests ================================================================================ -Please do report any bugs you find. - -Bugs are recorded in tracker software. View the reported and fixed bugs via -https://github.com/delphidabbler/codesnip/issues (GitHub account required). - -You can also access the bug tracker from CodeSnip by using the "Tools | Report -Bug Online" menu option then following the link that appears in the resulting -dialogue box. - -If you wish to report a bug, please check the current reports on the bug -tracker. If your bug hasn't already been reported or fixed please add a report -using the "Add new" link on Tracker. +Please do report any bugs you find. Suggestions for new features are also +welcomed. -Please ensure that you have installed the latest version of CodeSnip and checked -if the bug is still present before reporting it. - - -Feedback -================================================================================ - -If you want to suggest new features please use the feature request tracker -accessed from https://github.com/delphidabbler/codesnip/issues (GitHub account -required). Please check whether anyone else has requested something similar and -add a comment to their request if so. - -Always check the latest version of CodeSnip before requesting a feature just in -case it has already been implemented! +Both bug reports and feature requests are made using the GitHub issue tracker +(GitHub account required). For details about using the issue tracker see +https://github.com/delphidabbler/codesnip/blob/master/CONTRIBUTING.md#issues. FAQs @@ -353,15 +274,12 @@ https://github.com/delphidabbler/codesnip-faq/blob/master/README.md Privacy ================================================================================ -As of v4.16.0 CodeSnip no longer stores or transmits any personally identifiable +From v4.16.0 CodeSnip neither stores nor transmits any personally identifiable data. -Because of this change the privacy statement that used to be provided with the -program has been removed. - -Do note though that CodeSnip can display web pages via your default web -browser, but only in response to user input. No guarantee is made about any -personal data collected by such web pages. +Do note though that CodeSnip can display web pages via your default web browser, +but only in response to user input. No guarantee is made about any personal data +collected by such web pages. Thanks From 7f2f758efc9ef2785c51a92a0cee0c266ac330fe Mon Sep 17 00:00:00 2001 From: delphidabbler <5164283+delphidabbler@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:09:29 +0100 Subject: [PATCH 002/104] Release different ReadMe.txt for standard & portable Makefile updated to copy appropriate ReadMe-portable.txt or ReadMe-standard.txt as ReadMe.txt to release zip files for portable and standard edition builds respectively. Made similar changes to Inno Setup script to copy ReadMe-standard.txt as ReadMe.txt into the install program. Both versions of ReadMe.txt were temporarily stored in new _build\release\~tmp~ directory. --- Src/Install/CodeSnip.iss | 3 ++- Src/Makefile | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Src/Install/CodeSnip.iss b/Src/Install/CodeSnip.iss index 47a85f471..3e154e1d0 100644 --- a/Src/Install/CodeSnip.iss +++ b/Src/Install/CodeSnip.iss @@ -29,6 +29,7 @@ #define SrcDocsPath SourcePath + "..\..\Docs\" #define SrcAssetsPath SourcePath + "\Assets\" #define SrcExePath SourcePath + "..\..\_build\exe\" +#define TmpPath SourcePath + "..\..\_build\release\~tmp~\" #define ProgDataSubDir AppName + ".4" #define ExeProg SrcExePath + ExeFile #define AppVersion DeleteToVerStart(GetFileProductVersion(ExeProg)) @@ -89,7 +90,7 @@ Name: {commonappdata}\{#AppPublisher}\{#ProgDataSubDir}\Database; permissions: e Source: {#SrcExePath}{#ExeFile}; DestDir: {app} Source: {#SrcExePath}{#HelpFile}; DestDir: {app}; Flags: ignoreversion Source: {#SrcDocsPath}{#LicenseTextFile}; DestDir: {app}; Flags: ignoreversion -Source: {#SrcDocsPath}{#ReadMeFile}; DestDir: {app}; Flags: ignoreversion +Source: {#TmpPath}{#ReadMeFile}; DestDir: {app}; Flags: ignoreversion Source: {#SrcAssetsPath}UpdatingPreview.rtf; Flags: dontcopy [Icons] diff --git a/Src/Makefile b/Src/Makefile index 17b443abf..ce6cb8cf8 100644 --- a/Src/Makefile +++ b/Src/Makefile @@ -12,12 +12,15 @@ BUILD_ROOT = _build BIN_ROOT = $(BUILD_ROOT)\bin EXE_ROOT = $(BUILD_ROOT)\exe RELEASE_ROOT = $(BUILD_ROOT)\release +RELEASE_TMP_ROOT = $(RELEASE_ROOT)\~tmp~ DOCS_ROOT = Docs SRC_ROOT = Src # Defines macros giving directories relative to location of the Makefile BIN_REL = ..\$(BIN_ROOT) EXE_REL = ..\$(EXE_ROOT) +DOCS_REL = ..\$(DOCS_ROOT) +RELEASE_TMP_REL = ..\$(RELEASE_TMP_ROOT) # Check for required environment variables @@ -115,6 +118,7 @@ config: @mkdir $(BIN_ROOT) @if not exist $(EXE_ROOT) mkdir $(EXE_ROOT) @if not exist $(RELEASE_ROOT) mkdir $(RELEASE_ROOT) + @if not exist $(RELEASE_TMP_ROOT) mkdir $(RELEASE_TMP_ROOT) @cd $(SRC_ROOT) # Builds CodeSnip pascal files and links program @@ -160,8 +164,10 @@ typelib: # Builds setup program setup: !ifndef PORTABLE - @del $(EXE_REL)\CodeSnip-Setup-* + copy $(DOCS_REL)\ReadMe-standard.txt $(RELEASE_TMP_REL)\ReadMe.txt + del $(EXE_REL)\CodeSnip-Setup-* @$(ISCC) Install\CodeSnip.iss + del $(RELEASE_TMP_REL)\ReadMe.txt !else @echo **** Portable build - no setup file created **** !endif @@ -195,12 +201,16 @@ release: @cd .. -@if exist $(OUTFILE) del $(OUTFILE) !ifndef PORTABLE - @$(ZIP) -j -9 $(OUTFILE) $(EXE_ROOT)\CodeSnip-Setup-*.exe $(DOCS_ROOT)\ReadMe.txt + copy $(DOCS_ROOT)\ReadMe-standard.txt $(RELEASE_TMP_ROOT)\ReadMe.txt + @$(ZIP) -j -9 $(OUTFILE) $(EXE_ROOT)\CodeSnip-Setup-*.exe $(RELEASE_TMP_ROOT)\ReadMe.txt + del $(RELEASE_TMP_ROOT)\ReadMe.txt !else + copy $(DOCS_ROOT)\ReadMe-portable.txt $(RELEASE_TMP_ROOT)\ReadMe.txt @$(ZIP) -j -9 $(OUTFILE) $(EXE_ROOT)\CodeSnip-p.exe @$(ZIP) -j -9 $(OUTFILE) $(EXE_ROOT)\CodeSnip.chm - @$(ZIP) -j -9 $(OUTFILE) $(DOCS_ROOT)\ReadMe.txt + @$(ZIP) -j -9 $(OUTFILE) $(RELEASE_TMP_ROOT)\ReadMe.txt @$(ZIP) -j -9 $(OUTFILE) $(DOCS_ROOT)\License.html + del $(RELEASE_TMP_ROOT)\ReadMe.txt !endif @cd $(SRC_ROOT) From dc7cb79e3c82c94a6e8526949c73fec5957c01e3 Mon Sep 17 00:00:00 2001 From: delphidabbler <5164283+delphidabbler@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:49:25 +0100 Subject: [PATCH 003/104] Update copyright date in header comments --- Src/Install/CodeSnip.iss | 2 +- Src/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Install/CodeSnip.iss b/Src/Install/CodeSnip.iss index 3e154e1d0..229db969a 100644 --- a/Src/Install/CodeSnip.iss +++ b/Src/Install/CodeSnip.iss @@ -2,7 +2,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) 2006-2022, Peter Johnson (gravatar.com/delphidabbler). +; Copyright (C) 2006-2024, Peter Johnson (gravatar.com/delphidabbler). ; ; Install file generation script for use with Inno Setup. diff --git a/Src/Makefile b/Src/Makefile index ce6cb8cf8..b8b69e3b5 100644 --- a/Src/Makefile +++ b/Src/Makefile @@ -2,7 +2,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-2022, Peter Johnson (gravatar.com/delphidabbler). +# Copyright (C) 2009-2024, Peter Johnson (gravatar.com/delphidabbler). # # Makefile for the CodeSnip project. From bcaf6cc90084ff19a45480904d4227dccab4ea90 Mon Sep 17 00:00:00 2001 From: delphidabbler <5164283+delphidabbler@users.noreply.github.com> Date: Wed, 3 Apr 2024 15:08:59 +0100 Subject: [PATCH 004/104] Update Build.html re changes per issue #127 Updated re change from using single ReadMe.txt to using a version of the files for each edition. Made some other changes for clarity. --- Build.html | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Build.html b/Build.html index fc6947166..0f96ec05e 100644 --- a/Build.html +++ b/Build.html @@ -723,9 +723,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 +756,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
.
From 4e120754407cde6a4124e6ff0a85b979e933c3b3 Mon Sep 17 00:00:00 2001
From: delphidabbler <5164283+delphidabbler@users.noreply.github.com>
Date: Wed, 3 Apr 2024 15:46:38 +0100
Subject: [PATCH 005/104] Add Deploy.bat
Deployment script that creates release zip files for both editions of
CodeSnip and includes the version number passed on command line in zip
file names.
Fixes #128
---
Deploy.bat | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
create mode 100644 Deploy.bat
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
If the
| +-- exe - receives executable code and compiled help file
| |
| +-- release - receives release files
+ | |
+ | +-- ~tmp~ - store for temp files ceated in release process
|
...
_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.
You have several options:
- 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.
> 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
The compiled help file will be written to the _build\exe
folder.
+ The same help file is used for the standard and portable editions. +
+
- 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.
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 +722,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.
The release zip file for the standard edition requires that the setup files is already
- present in the _build/exe
directory.
+ 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
.
+ that is automatically generated from Docs\ReadMe-standard.txt
.
@@ -763,9 +770,9 @@
The release file includes the portable executable file, CodeSnip-p.exe
,
- the help file CodeSnip.chm
, Docs/License.html
and
+ the help file CodeSnip.chm
, Docs\License.html
and
ReadMe.txt
that is automatically generated from
- Docs/ReadMe-portable.txt
.
+ Docs\ReadMe-portable.txt
.
@@ -855,6 +862,31 @@
+ 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 ..+
- DelphiDabbler CodeSnip is copyright © 2005-2023 by CodeSnip is copyright © 2005-2024 by Peter D Johnson. From 6d33c8df7b5d3b97b7f3f55e61303a2b94fbcdca Mon Sep 17 00:00:00 2001 From: delphidabbler <5164283+delphidabbler@users.noreply.github.com> Date: Thu, 4 Apr 2024 01:46:59 +0100 Subject: [PATCH 010/104] Add version number to program caption Program release version number now displayed in the main form caption. Fixes #122 --- Src/UAppInfo.pas | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Src/UAppInfo.pas b/Src/UAppInfo.pas index eacc0d65d..37958f245 100644 --- a/Src/UAppInfo.pas +++ b/Src/UAppInfo.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 https://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2021, Peter Johnson (gravatar.com/delphidabbler). + * Copyright (C) 2005-2024, Peter Johnson (gravatar.com/delphidabbler). * * Class that provides information about the application. } @@ -36,12 +36,6 @@ TAppInfo = class(TNoConstructObject) const ProgramName = 'CodeSnip-p'; {$ENDIF} {Name of program} - {$IFNDEF PORTABLE} - const ProgramCaption = 'CodeSnip 4'; - {$ELSE} - const ProgramCaption = 'CodeSnip 4 (Portable Edition)'; - {$ENDIF} - {Name of program displayed in main window and task bar caption} const FullProgramName = CompanyName + ' ' + ProgramName; {Full name of program, including company name} const ProgramID = 'codesnip'; @@ -107,6 +101,10 @@ TAppInfo = class(TNoConstructObject) {Gets version number of program's executable file. @return Version number as dotted quad. } + class function ProgramCaption: string; + {Gets the program caption to be displayed in main window, + @return Required caption, + } end; @@ -214,6 +212,19 @@ class function TAppInfo.HelpFileName: string; Result := AppExeDir + '\CodeSnip.chm'; end; +class function TAppInfo.ProgramCaption: string; +var + ProductVer: TVersionNumber; +begin + ProductVer := TVersionInfo.ProductVerNum; + Result := Format( + 'CodeSnip v%d.%d.%d', [ProductVer.V1, ProductVer.V2, ProductVer.V3] + ); + {$IFDEF PORTABLE} + Result := Result + ' (Portable Edition)' + {$ENDIF} +end; + class function TAppInfo.ProgramFileVersion: string; {Gets version number of program's executable file. @return Version number as dotted quad. From b0d0726d6ae953adc42253a81d0be7f94f57b4a9 Mon Sep 17 00:00:00 2001 From: delphidabbler <5164283+delphidabbler@users.noreply.github.com> Date: Thu, 4 Apr 2024 01:57:02 +0100 Subject: [PATCH 011/104] Fix full program name used by portable edition The full program name is now always "DelphiDabbler CodeSnip", regardless of the edition. Previously the name was "DelphiDabbler CodeSnip-p" on the portable edition. Fixes #130 --- Src/UAppInfo.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/UAppInfo.pas b/Src/UAppInfo.pas index 37958f245..7bc91fd6e 100644 --- a/Src/UAppInfo.pas +++ b/Src/UAppInfo.pas @@ -36,7 +36,7 @@ TAppInfo = class(TNoConstructObject) const ProgramName = 'CodeSnip-p'; {$ENDIF} {Name of program} - const FullProgramName = CompanyName + ' ' + ProgramName; + const FullProgramName = CompanyName + ' CodeSnip'; {Full name of program, including company name} const ProgramID = 'codesnip'; {Machine readable identifier of program} From 6d7a9925160333c8f2d50cec412696c74b9bcf77 Mon Sep 17 00:00:00 2001 From: delphidabbler <5164283+delphidabbler@users.noreply.github.com> Date: Thu, 4 Apr 2024 02:23:33 +0100 Subject: [PATCH 012/104] Fix REML documentation and help topic * REML docs in Docs/Design/reml.html has duplicate ¢ character entity entry. * REML help topic was never updated for the new ' character entity. Fixes #131 --- Docs/Design/reml.html | 4 ---- Src/Help/HTML/reml.htm | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Docs/Design/reml.html b/Docs/Design/reml.html index b945f4332..43adc650f 100644 --- a/Docs/Design/reml.html +++ b/Docs/Design/reml.html @@ -524,10 +524,6 @@
°
¢
«
¿
'
From 0fb7ce6de170769f3f7aa102375ce8d533fda714 Mon Sep 17 00:00:00 2001 From: delphidabbler <5164283+delphidabbler@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:04:27 +0100 Subject: [PATCH 013/104] Rewrite Docs/Design/reml.html Docs/Design/reml.html now contains a brief overview of REML and links to documentation in the new delphidabbler/reml repository for a full language definition. --- Docs/Design/reml.html | 537 ++---------------------------------------- 1 file changed, 20 insertions(+), 517 deletions(-) diff --git a/Docs/Design/reml.html b/Docs/Design/reml.html index 43adc650f..fb8b0ce15 100644 --- a/Docs/Design/reml.html +++ b/Docs/Design/reml.html @@ -19,7 +19,7 @@ - +