Skip to content

Commit 35ec9e9

Browse files
committed
Merge branch 'release/2.3.0'
Release v2.3.0
2 parents 5b72091 + 11e8707 commit 35ec9e9

17 files changed

Lines changed: 716 additions & 568 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*.dsk
99
*.~*
1010
__history/
11+
__recovery/
1112

1213
# Project specific directories
1314
_build

Build.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CompFileDate Build Instructions
22
===============================
33

4-
These instructions assume you are building the program using Delphi 12. Later
4+
These instructions assume you are building the program using Delphi 13. Later
55
versions of Delphi may be suitable.
66

77

@@ -28,7 +28,7 @@ Step 2: Configure the Build Environment
2828

2929
The following tools must be installed to build CompFileDate:
3030

31-
+ Delphi 12.1 or later
31+
+ Delphi 13 or later
3232

3333
+ `VIEd.exe` (Version Information Editor by DelphiDabbler). See
3434
https://delphidabbler.com/software/vied.

CHANGELOG.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,33 @@ All notable changes to this project are documented in this file.
66

77
This change log begins with the first public release version of _CompFileDate_. Releases are listed in reverse version number order.
88

9-
## Release v2.2.0 of 27 August 2024
9+
## Release v2.3.0 of 31 January 2026
10+
11+
* Error messages are now written to standard error instead of standard output [[issue #13](https://github.com/ddabapps/compfiledate/issues/13)].
12+
* Modified the `--version` / `-V` command line option to so that, in addition to the program version number, information about whether the program was built as either a 32 bit or 64 bit Windows application is displayed [[issue #23](https://github.com/ddabapps/compfiledate/issues/23)].
13+
* Updated the program to compile with Delphi 13 [[issue #22](https://github.com/ddabapps/compfiledate/issues/22)].
14+
* Corrected errors in some error messages [[issue #26](https://github.com/ddabapps/compfiledate/issues/26)].
15+
* Refactorings:
16+
* The source code was refactored and re-arranged, in large part to take advantage of modern compiler features [[issue #17](https://github.com/ddabapps/compfiledate/issues/17)] & [[issue #25](https://github.com/ddabapps/compfiledate/issues/25)].
17+
* The program release version is no longer hard coded in `VerInfo.vi` but is instead obtained from a new `VERSION` file.
18+
* Redundant code was removed [[issue #27](https://github.com/ddabapps/compfiledate/issues/27)].
19+
* Updated the `Deploy.bat` release creation script:
20+
* Fixed a typo that was causing a potential bug [[issue #18](https://github.com/ddabapps/compfiledate/issues/18)].
21+
* The user no longer has to pass the program version as a parameter when calling `Deploy.bat`. The script now gets the information by reading the `VERSION` file [[issue #21](https://github.com/ddabapps/compfiledate/issues/21)].
22+
* Updated documentation re the changes:
23+
* Fixed errors in the description of error codes in `Docs/ReadMe.txt` [[issue #24](https://github.com/ddabapps/compfiledate/issues/24)].
24+
* Source code commenting was changed to use the XMLDoc format [[issue #17](https://github.com/ddabapps/compfiledate/issues/17)].
25+
* The program's help screen and the help section of `Docs/ReadMe.txt` were updated re the change to writing error messages to standard error.
26+
* `Build.txt` was updated re the change to using Delphi 13.
27+
* Updated the URLs of issues in `CHANGELOG.md` to reference the `ddabapps/compfiledate` GitHub repo instead of the old `delphidabbler/compfiledate` repo.
1028

29+
## Release v2.2.0 of 27 August 2024
1130

12-
* Added 64 bit version of the program. [[issue #12](https://github.com/delphidabbler/compfiledate/issues/12)]
13-
* Fixed bug where no error code was returned by the program when a file name passed on the command line does not exist. [[issue #14](https://github.com/delphidabbler/compfiledate/issues/14)]
14-
* Refactoring: Delphi units are now referenced in source code by fully qualified unit scope names. [[issue #15](https://github.com/delphidabbler/compfiledate/issues/15)]
31+
* Added 64 bit version of the program. [[issue #12](https://github.com/ddabapps/compfiledate/issues/12)]
32+
* Fixed bug where no error code was returned by the program when a file name passed on the command line does not exist. [[issue #14](https://github.com/ddabapps/compfiledate/issues/14)]
33+
* Refactoring: Delphi units are now referenced in source code by fully qualified unit scope names. [[issue #15](https://github.com/ddabapps/compfiledate/issues/15)]
1534
* Changed build process:
16-
* Updated program to compile with Delphi 12.1. [[issue #11](https://github.com/delphidabbler/compfiledate/issues/11)]
35+
* Updated program to compile with Delphi 12.1. [[issue #11](https://github.com/ddabapps/compfiledate/issues/11)]
1736
* MSBuild replaces use of Embarcadero Make. `Makefile` and `CompFileDate.cfg` were removed.
1837
* A new `Deploy.bat` script is now used to create releases.
1938
* Binaries are now created in the `_build` directory instead of `Build`.
@@ -23,20 +42,20 @@ This change log begins with the first public release version of _CompFileDate_.
2342

2443
## Release v2.1.0 of 30 September 2021
2544

26-
* Replaced error message displayed when no files are provided on command line with a brief help message that prompts the use of the `--help` command. [[issue #6](https://github.com/delphidabbler/compfiledate/issues/6)]
27-
* Updated application manifest. [[issue #7](https://github.com/delphidabbler/compfiledate/issues/7)]
28-
* Converted change log and license files to markdown format. [[issue #8](https://github.com/delphidabbler/compfiledate/issues/8)] and [[issue #9](https://github.com/delphidabbler/compfiledate/issues/9)]
29-
* Fixed problem in `Makefile` where it was failing to find `Zip.exe` when not on the system path. [[issue #10](https://github.com/delphidabbler/compfiledate/issues/10)]
45+
* Replaced error message displayed when no files are provided on command line with a brief help message that prompts the use of the `--help` command. [[issue #6](https://github.com/ddabapps/compfiledate/issues/6)]
46+
* Updated application manifest. [[issue #7](https://github.com/ddabapps/compfiledate/issues/7)]
47+
* Converted change log and license files to markdown format. [[issue #8](https://github.com/ddabapps/compfiledate/issues/8)] and [[issue #9](https://github.com/ddabapps/compfiledate/issues/9)]
48+
* Fixed problem in `Makefile` where it was failing to find `Zip.exe` when not on the system path. [[issue #10](https://github.com/ddabapps/compfiledate/issues/10)]
3049
* Updated many URLs in program and documentation.
3150
* Documentation updated re changes.
3251

3352
## Release v2.0.0 of 20 July 2014
3453

35-
* Operator used in date comparison can now be specified using new --compare or -c commands. This enables user to choose whether date of 1st file is tested to be <, <=, >, >=, <> or = to date of second file. [[issue #1](https://github.com/delphidabbler/compfiledate/issues/1)]
36-
* Comparison can now operate on either creation or last modification date of files. This is specified with new --datetype or -d commands. [[issue #2](https://github.com/delphidabbler/compfiledate/issues/2)]
37-
* When comparing the dates of shortcut files the date of the shortcut's target file can now be compared by using the new --followshortcuts or -s commands. [[issue #3](https://github.com/delphidabbler/compfiledate/issues/3)]
38-
* Program version number can now be displayed using the new --version or -V commands. Version is no longer displayed in normal program output. [[issue #5](https://github.com/delphidabbler/compfiledate/issues/5)]
39-
* Long forms of -v and -h commands added: --verbose and --help respectively. [[issue #4](https://github.com/delphidabbler/compfiledate/issues/4)]
54+
* Operator used in date comparison can now be specified using new --compare or -c commands. This enables user to choose whether date of 1st file is tested to be <, <=, >, >=, <> or = to date of second file. [[issue #1](https://github.com/ddabapps/compfiledate/issues/1)]
55+
* Comparison can now operate on either creation or last modification date of files. This is specified with new --datetype or -d commands. [[issue #2](https://github.com/ddabapps/compfiledate/issues/2)]
56+
* When comparing the dates of shortcut files the date of the shortcut's target file can now be compared by using the new --followshortcuts or -s commands. [[issue #3](https://github.com/ddabapps/compfiledate/issues/3)]
57+
* Program version number can now be displayed using the new --version or -V commands. Version is no longer displayed in normal program output. [[issue #5](https://github.com/ddabapps/compfiledate/issues/5)]
58+
* Long forms of -v and -h commands added: --verbose and --help respectively. [[issue #4](https://github.com/ddabapps/compfiledate/issues/4)]
4059
* Help screen revised re changes.
4160
* Now compiled with Delphi XE.
4261
* Updated and rationalised documentation re changes.

Deploy.bat

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,61 @@
88
::
99
:: Get zip.exe from https://delphidabbler.com/extras/info-zip
1010
:: Get Version Information Editor from https://delphidabbler.com/software/vied
11-
12-
:: To use the script:
13-
:: 1) Start the Embarcadero RAD Studio Command Prompt to set the required
14-
:: environment variables for MSBuild.
15-
:: 2) Set the ZIPROOT environment variable to the directory where zip.exe is
16-
:: installed.
17-
:: 3) Set the VIEDROOT environment variable to the directory where VIEd.exe is
18-
:: installed.
19-
:: 3) Change directory to that where this script is located.
20-
:: 4) Run the script.
2111
::
22-
:: Usage:
23-
:: Deploy <version>
24-
:: where
25-
:: <version> is the version number of the release, e.g. 2.2.0 or 3.1.0-beta.
12+
:: To use the script:
13+
:: To use the script:
14+
:: 1) Start the Embarcadero RAD Studio Command Prompt to set the required
15+
:: environment variables for MSBuild.
16+
:: 2) Set the BDSBIN variable to %BDS%\bin (required by MSBuild/Delphi).
17+
:: 3) Set the ZIPROOT environment variable to the directory where zip.exe is
18+
:: installed.
19+
:: 4) Set the VIEDROOT environment variable to the directory where VIEd.exe
20+
:: is installed.
21+
:: 5) Change directory to that where this script is located.
22+
:: 6) Run the script, without parameters
2623

2724
@echo off
2825

2926
echo ------------------------------
3027
echo Deploying CompFileDate Release
3128
echo ------------------------------
3229

33-
:: Check for required parameter
34-
if "%1"=="" goto paramerror
35-
3630
:: Check for required environment variables
3731
if "%ZipRoot%"=="" goto envvarerror
38-
if "%VIEdRoot"=="" goto envvarerror
32+
if "%VIEdRoot%"=="" goto envvarerror
33+
34+
:: Get version info from Src\VERSION
35+
36+
:: Set path to file containing version information
37+
set VerFile=.\Src\VERSION
38+
39+
:: Undefine the variables used to collect version information
40+
set vernum=
41+
set suffix=
42+
43+
:: Get the version number from the version info file - this MUST exist
44+
for /f "tokens=2 delims==" %%A in (
45+
'findstr /rc:"^version" %VerFile%'
46+
) do (
47+
set vernum=%%A
48+
)
49+
)
50+
if not defined vernum (
51+
goto badversionerror
52+
)
53+
54+
:: Get the optional version number suffix from the version info file
55+
for /f "tokens=2 delims==" %%A in (
56+
'findstr /rc:"^suffix" %VerFile%'
57+
) do (
58+
set suffix=%%A
59+
)
60+
61+
:: Record & report the build version
62+
set Version=%vernum%%suffix%
63+
echo Building release v%Version%
3964

4065
:: Set variables
41-
set Version=%1
4266
set BuildRoot=.\_build
4367
set Win32Dir=%BuildRoot%\Win32\Release\exe
4468
set Win64Dir=%BuildRoot%\Win64\Release\exe
@@ -101,15 +125,15 @@ goto end
101125

102126
:: Error messages
103127

104-
:paramerror
128+
:envvarerror
105129
echo.
106-
echo ***ERROR: Please specify a version number as a parameter
130+
echo ***ERROR: ZipRoot or VIEdRoot environment variable not set
107131
echo.
108132
goto end
109133

110-
:envvarerror
134+
:badversionerror
111135
echo.
112-
echo ***ERROR: ZipRoot environment variable not set
136+
echo ***ERROR: "version" field not set in %VerFile%
113137
echo.
114138
goto end
115139

Docs/ReadMe.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,24 @@ options are:
9090
shortcut file itself is used in the comparison.
9191

9292
-v or --verbose
93-
Verbose: writes output to standard output. No output is generated if this
94-
option is not provided. Output is always written when an error occurs or
95-
when help or the program's version number are requested.
93+
Verbose: writes output to standard output. No output is written if the
94+
option is not provided. Output is always written to standard error when an
95+
error occurs or to standard output when help or the program's version
96+
number are requested.
9697

9798
-h or -? or --help
9899
Displays a help screen. Any file names and other options are ignored.
99100

100101
-V or --version.
101-
Displays the program's version number on standard output and halts. Any file
102-
names and other options are ignored.
102+
Displays the program's version number and platform on standard output and
103+
halts. Any file names and other options are ignored.
103104

104105
If no file names are provided on the command line and none of the help or
105106
version commands are used then a brief help message is displayed.
106107

107108
The program's exit code is 1 if the comparison is true and 0 if it is false.
108109
If an error occurs then an error code >= 100 is returned and an error message
109-
is written to standard output. The error codes are:
110+
is written to standard error. The error codes are:
110111

111112
100 - unknown error
112113
101 - invalid command or option
@@ -115,8 +116,8 @@ is written to standard output. The error codes are:
115116
104 - one or both files cannot be found
116117
105 - no comparison type was specified for the -c or --compare option
117118
106 - an invalid comparison type was specified for the -c or --compare option
118-
107 - no date type was specified for the -t or --datetype option
119-
108 - an invalid date type was specified for the -t or --datetype option
119+
107 - no date type was specified for the -d or --datetype option
120+
108 - an invalid date type was specified for the -d or --datetype option
120121

121122

122123
4. Source Code

Src/CompFileDate.dpr

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
44
* obtain one at https://mozilla.org/MPL/2.0/
55
*
6-
* Copyright (C) 2009-2024, Peter Johnson (https://delphidabbler.com).
6+
* Copyright (C) 2009-2026, Peter Johnson (https://delphidabbler.com).
77
*
88
* Main project file.
99
}
@@ -17,22 +17,20 @@ program CompFileDate;
1717
{$RESOURCE VerInfo.res} // version information
1818

1919
uses
20-
System.SysUtils,
2120
UAppException in 'UAppException.pas',
2221
UConsole in 'UConsole.pas',
2322
UMain in 'UMain.pas',
2423
UParams in 'UParams.pas',
25-
UStdOutput in 'UStdOutput.pas',
2624
UDateComparer in 'UDateComparer.pas',
2725
UDateExtractor in 'UDateExtractor.pas',
2826
UFileInfo in 'UFileInfo.pas';
2927

3028
begin
31-
with TMain.Create do
32-
try
33-
Execute;
34-
finally
35-
Free;
36-
end;
29+
var App := TMain.Create;
30+
try
31+
App.Execute;
32+
finally
33+
App.Free;
34+
end;
3735
end.
3836

Src/CompFileDate.dproj

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<ProjectGuid>{7AD279F8-D795-4200-882E-D2EFA27C797F}</ProjectGuid>
4-
<ProjectVersion>20.1</ProjectVersion>
4+
<ProjectVersion>20.3</ProjectVersion>
55
<FrameworkType>FMX</FrameworkType>
66
<Base>True</Base>
77
<Config Condition="'$(Config)'==''">Debug</Config>
@@ -120,7 +120,6 @@ $(PostBuildEvent)]]></PostBuildEvent>
120120
<DCCReference Include="UConsole.pas"/>
121121
<DCCReference Include="UMain.pas"/>
122122
<DCCReference Include="UParams.pas"/>
123-
<DCCReference Include="UStdOutput.pas"/>
124123
<DCCReference Include="UDateComparer.pas"/>
125124
<DCCReference Include="UDateExtractor.pas"/>
126125
<DCCReference Include="UFileInfo.pas"/>
@@ -151,7 +150,7 @@ $(PostBuildEvent)]]></PostBuildEvent>
151150
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp290.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
152151
</Excluded_Packages>
153152
</Delphi.Personality>
154-
<Deployment Version="4">
153+
<Deployment Version="5">
155154
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
156155
<Platform Name="iOSSimulator">
157156
<Overwrite>true</Overwrite>
@@ -167,12 +166,13 @@ $(PostBuildEvent)]]></PostBuildEvent>
167166
<Overwrite>true</Overwrite>
168167
</Platform>
169168
</DeployFile>
170-
<DeployFile LocalName="Win32\Debug\CompFileDate.exe" Configuration="Debug" Class="ProjectOutput">
169+
<DeployFile LocalName="..\_build\Win32\Debug\exe\CompFileDate.exe" Configuration="Debug" Class="ProjectOutput">
171170
<Platform Name="Win32">
172171
<RemoteName>CompFileDate.exe</RemoteName>
173172
<Overwrite>true</Overwrite>
174173
</Platform>
175174
</DeployFile>
175+
<DeployFile LocalName="Win32\Debug\CompFileDate.exe" Configuration="Debug" Class="ProjectOutput"/>
176176
<DeployClass Name="AdditionalDebugSymbols">
177177
<Platform Name="iOSSimulator">
178178
<Operation>1</Operation>
@@ -185,16 +185,6 @@ $(PostBuildEvent)]]></PostBuildEvent>
185185
<Operation>0</Operation>
186186
</Platform>
187187
</DeployClass>
188-
<DeployClass Name="AndroidClasses">
189-
<Platform Name="Android">
190-
<RemoteDir>classes</RemoteDir>
191-
<Operation>64</Operation>
192-
</Platform>
193-
<Platform Name="Android64">
194-
<RemoteDir>classes</RemoteDir>
195-
<Operation>64</Operation>
196-
</Platform>
197-
</DeployClass>
198188
<DeployClass Name="AndroidFileProvider">
199189
<Platform Name="Android">
200190
<RemoteDir>res\xml</RemoteDir>
@@ -297,6 +287,16 @@ $(PostBuildEvent)]]></PostBuildEvent>
297287
<Operation>1</Operation>
298288
</Platform>
299289
</DeployClass>
290+
<DeployClass Name="AndroidSplashStylesV35">
291+
<Platform Name="Android">
292+
<RemoteDir>res\values-v35</RemoteDir>
293+
<Operation>1</Operation>
294+
</Platform>
295+
<Platform Name="Android64">
296+
<RemoteDir>res\values-v35</RemoteDir>
297+
<Operation>1</Operation>
298+
</Platform>
299+
</DeployClass>
300300
<DeployClass Name="Android_AdaptiveIcon">
301301
<Platform Name="Android">
302302
<RemoteDir>res\drawable-anydpi-v26</RemoteDir>

0 commit comments

Comments
 (0)