Subversion Repositories checksum-tools

Compare Revisions

No changes between revisions

Regard whitespace Rev 1 → Rev HEAD

/trunk/LICENSE
0,0 → 1,202
 
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
 
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
 
1. Definitions.
 
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
 
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
 
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
 
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
 
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
 
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
 
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
 
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
 
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
 
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
 
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
 
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
 
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
 
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
 
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
 
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
 
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
 
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
 
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
 
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
 
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
 
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
 
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
 
END OF TERMS AND CONDITIONS
 
APPENDIX: How to apply the Apache License to your work.
 
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
 
Copyright 2020 Daniel Marschall, ViaThinkSoft
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
/trunk/PHP/md5_generate.php
0,0 → 1,143
#!/usr/bin/php
<?php
 
/*
Copyright 2020-2022 Daniel Marschall, ViaThinkSoft
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
 
// This script generates MD5 files
// If there is already an MD5 file existing, only new files get appended to the existing MD5 files.
 
function _rec($directory) {
$res = true;
 
if (!is_dir($directory)) {
fwrite(STDERR, "Invalid directory path '$directory'\n");
return false;
}
 
if ((basename($directory) == '.') || (basename($directory) == '..')) {
$md5_file = rtrim($directory,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.
basename(realpath($directory)).'.md5';
 
} else {
$md5_file = rtrim($directory,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.
basename($directory).'.md5';
}
 
if (file_exists($md5_file)) {
$existing_files = md5_get_files($md5_file);
} else {
$existing_files = array();
}
 
$sd = @scandir($directory);
if ($sd === false) {
fwrite(STDERR, "Error: Cannot scan directory $directory\n");
return false;
}
 
foreach ($sd as $file) {
if ($file === '.') continue;
if ($file === '..') continue;
if (substr($file,0,1) === '.') continue;
if (strtolower($file) === 'thumbs.db') continue;
if (strtolower(substr($file, -4)) === '.md5') continue;
if (strtolower(substr($file, -4)) === '.sfv') continue;
 
$fullpath = rtrim($directory,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$file;
if (is_dir($fullpath)) {
global $do_recursive;
if ($do_recursive) _rec($fullpath);
} else if (is_file($fullpath)) {
global $show_verbose;
if ($show_verbose) echo "$fullpath\n";
$dir = pathinfo($fullpath, PATHINFO_DIRNAME);
 
if (!file_exists($md5_file)) {
file_put_contents($md5_file, "; Generated by ViaThinkSoft\r\n"); // TODO: BOM
}
 
if (!in_arrayi($file, $existing_files)) {
$hash = md5_file($fullpath);
if ($hash === false) {
fwrite(STDERR, "Cannot get hash of '$fullpath'\n");
$res = false;
} else {
$md5 = strtolower($hash);
file_put_contents($md5_file, "$md5 *$file\r\n", FILE_APPEND);
}
}
} else {
// For some reason, some files on a NTFS volume are "FIFO" pipe files?!
fwrite(STDERR, "Warning: $fullpath is not a regular file!\n");
$res = false;
}
}
 
return $res;
}
 
function md5_get_files($filename) {
$out = array();
$lines = file($filename);
foreach ($lines as $line) {
$line = str_replace("\xEF\xBB\xBF",'',$line);
$line = trim($line);
if ($line == '') continue;
$line = str_replace('*', ' ', $line);
$line = str_replace("\t", ' ', $line);
list($checksum, $origname) = explode(' ', $line, 2);
$origname = dirname($filename) . '/' . trim($origname);
$checksum = trim($checksum);
$out[] = $origname;
}
 
return $out;
}
 
function in_arrayi($needle, $haystack) {
// Source: https://www.php.net/manual/en/function.in-array.php#89256
return in_array(strtolower($needle), array_map('strtolower', $haystack));
}
 
# ---
 
$show_verbose = false;
$do_recursive = false;
$dirs = array();
 
for ($i=1; $i<$argc; $i++) {
if ($argv[$i] == '-v') {
$show_verbose = true;
} else if ($argv[$i] == '-r') {
$do_recursive = true;
} else {
$dirs[] = $argv[$i];
}
}
 
if (count($dirs) == 0) {
echo "Syntax: $argv[0] [-v] [-r] <directory> [<directory> [...]]\n";
exit(2);
}
 
$res = 0;
foreach ($dirs as $dir) {
if (!_rec($dir)) $res = 1;
}
if ($show_verbose) echo "Done.\n";
exit($res);
 
/trunk/PHP/md5_verify.php
0,0 → 1,178
#!/usr/bin/php
<?php
 
/*
Copyright 2020-2022 Daniel Marschall, ViaThinkSoft
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
 
// TODO: On Windows file systems, accept file names case insensitively
 
function utf8_normalize($str) {
// This helps to handle decomposite Unicode endpoints (E.g. German Umlauts have different representations)
// Requires php-intl
if (!class_exists('Normalizer')) return $str;
return Normalizer::normalize($str);
}
 
function convertToUTF8($str) {
$enc = mb_detect_encoding($str);
if ($enc && $enc != 'UTF-8') {
return iconv($enc, 'UTF-8', $str);
} else {
return $str;
}
}
 
function testmd5($file) {
// TODO: warn if an entry is multiple times (with different checksums) in a single file
if (!file_exists($file)) {
fwrite(STDERR, "ERROR: File $file does not exist.\n");
return;
}
 
$files_checked = array();
 
$lines = file($file);
$is_first_line = true;
$force_utf8 = false;
foreach ($lines as $line) {
if ($is_first_line) {
$tmp = 0;
$line = str_replace("\xEF\xBB\xBF",'',$line,$tmp);
if ($tmp > 0) $force_utf8 = true;
$is_first_line = false;
}
if (!$force_utf8) $line = convertToUTF8($line);
 
if (substr(trim($line),0,1) == ';') continue;
 
$line = trim($line);
if ($line == '') continue;
$line = str_replace('*', ' ', $line);
$line = str_replace("\t", ' ', $line);
list($checksum, $origname) = explode(' ', $line, 2);
$origname = dirname($file) . '/' . trim($origname);
$checksum = trim($checksum);
if (!file_exists($origname)) {
fwrite(STDERR, "WARNING: File vanished : $origname\n");
} else {
if (is_file($origname)) {
$checksum2 = md5_file($origname);
if (strtolower($checksum) != strtolower($checksum2)) {
fwrite(STDERR, "CHECKSUM FAIL: $origname (expected $checksum, but is $checksum2)\n");
} else {
global $show_verbose;
if ($show_verbose) echo "OK: $origname\n";
}
} else {
// For some reason, some files on a NTFS volume are "FIFO" pipe files?!
fwrite(STDERR, "Warning: $origname is not a regular file!\n");
}
}
 
$origname = utf8_normalize(basename($origname));
$files_checked[] = dirname($file) . '/' . $origname;
}
 
// Now check if files have vanished!
$directory = dirname($file);
$sd = @scandir($directory);
if ($sd === false) {
fwrite(STDERR, "Error: Cannot scan directory $directory\n");
} else {
foreach ($sd as $file) {
if ($file === '.') continue;
if ($file === '..') continue;
if (substr($file,0,1) === '.') continue;
if (strtolower($file) === 'thumbs.db') continue;
if (strtolower(substr($file, -4)) === '.md5') continue;
if (strtolower(substr($file, -4)) === '.sfv') continue;
$fullpath = $directory . '/' . $file;
if (!is_dir($fullpath)) {
$fullpath = utf8_normalize($fullpath);
if (!in_array($fullpath,$files_checked)) {
fwrite(STDERR, "Warning: File not in SFV checksum file: $fullpath\n");
}
}
}
}
}
 
function _rec($directory) {
$directory = rtrim($directory, '/\\');
 
if (!is_dir($directory)) {
fwrite(STDERR, "Invalid directory path $directory\n");
return false;
}
 
if ($dont_add_files = count(glob("$directory/*.md5")) == 0) {
global $show_verbose;
if ($show_verbose) echo "Directory $directory has no MD5 file. Skipping.\n";
} else {
$out = array();
 
global $show_verbose;
if ($show_verbose) echo "Check directory $directory\n";
$md5files = glob($directory.'/*.md5');
foreach ($md5files as $md5file) {
testmd5($md5file);
}
}
 
$sd = @scandir($directory);
if ($sd === false) {
fwrite(STDERR, "Error: Cannot scan directory $directory\n");
return false;
}
 
foreach ($sd as $file) {
if ($file !== '.' && $file !== '..') {
$file = $directory . '/' . $file;
if (is_dir($file)) {
_rec($file);
}
}
}
 
return true;
}
 
 
# ---
 
$show_verbose = false;
$dirs = array();
 
for ($i=1; $i<$argc; $i++) {
if ($argv[$i] == '-v') {
$show_verbose = true;
} else {
$dirs[] = $argv[$i];
}
}
 
if (count($dirs) == 0) {
echo "Syntax: $argv[0] [-v] <directory> [<directory> [...]]\n";
exit(2);
}
 
$res = 0;
foreach ($dirs as $dir) {
if (!_rec($dir)) $res = 1;
}
if ($show_verbose) echo "Done.\n";
exit($res);
 
/trunk/PHP/phpstan.neon.dist
0,0 → 1,11
parameters:
level: 5
fileExtensions:
- php
- phps
paths:
- .
excludePaths:
analyseAndScan:
- .phpstan.tmp
tmpDir: .phpstan.tmp
/trunk/PHP/sfv_generate.php
0,0 → 1,153
#!/usr/bin/php
<?php
 
/*
Copyright 2020-2022 Daniel Marschall, ViaThinkSoft
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
 
// This script generates SFV files
// If there is already an SFV file existing, only new files get appended to the existing SFV files.
 
function _rec($directory) {
$res = true;
 
if (!is_dir($directory)) {
fwrite(STDERR, "Invalid directory path '$directory'\n");
return false;
}
 
if ((basename($directory) == '.') || (basename($directory) == '..')) {
$sfv_file = rtrim($directory,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.
basename(realpath($directory)).'.sfv';
 
} else {
$sfv_file = rtrim($directory,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.
basename($directory).'.sfv';
}
 
if (file_exists($sfv_file)) {
$existing_files = sfv_get_files($sfv_file);
} else {
$existing_files = array();
}
 
$sd = @scandir($directory);
if ($sd === false) {
fwrite(STDERR, "Error: Cannot scan directory $directory\n");
return false;
}
 
foreach ($sd as $file) {
if ($file === '.') continue;
if ($file === '..') continue;
if (substr($file,0,1) === '.') continue;
if (strtolower($file) === 'thumbs.db') continue;
if (strtolower(substr($file, -4)) === '.md5') continue;
if (strtolower(substr($file, -4)) === '.sfv') continue;
 
$fullpath = rtrim($directory,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$file;
if (is_dir($fullpath)) {
global $do_recursive;
if ($do_recursive) _rec($fullpath);
} else if (is_file($fullpath)) {
global $show_verbose;
if ($show_verbose) echo "$fullpath\n";
$dir = pathinfo($fullpath, PATHINFO_DIRNAME);
 
if (!file_exists($sfv_file)) {
file_put_contents($sfv_file, "; Generated by ViaThinkSoft\r\n"); // TODO: BOM
}
 
if (!in_arrayi($file, $existing_files)) {
$hash = crc32_file($fullpath);
if ($hash === false) {
fwrite(STDERR, "Cannot get hash of '$fullpath'\n");
$res = false;
} else {
$crc32 = strtoupper($hash);
file_put_contents($sfv_file, "$file $crc32\r\n", FILE_APPEND);
}
}
} else {
// For some reason, some files on a NTFS volume are "FIFO" pipe files?!
fwrite(STDERR, "Warning: $fullpath is not a regular file!\n");
$res = false;
}
}
 
return $res;
}
 
function sfv_get_files($filename) {
$out = array();
$lines = file($filename);
foreach ($lines as $line) {
$line = rtrim($line);
if ($line == '') continue;
if (substr($line,0,1) == ';') continue;
$out[] = substr($line, 0, strrpos($line, ' '));
 
}
return $out;
}
 
function swapEndianness($hex) {
return implode('', array_reverse(str_split($hex, 2)));
}
 
function crc32_file($filename, $rawOutput = false) {
$hash = hash_file('crc32b', $filename, true);
if ($hash === false) return false;
$out = bin2hex($hash);
if (hash('crc32b', 'TEST') == 'b893eaee') {
// hash_file() in PHP 5.2 has the wrong Endianess!
// https://bugs.php.net/bug.php?id=47467
$out = swapEndianness($out);
}
return $out;
}
 
function in_arrayi($needle, $haystack) {
// Source: https://www.php.net/manual/en/function.in-array.php#89256
return in_array(strtolower($needle), array_map('strtolower', $haystack));
}
 
# ---
 
$show_verbose = false;
$do_recursive = false;
$dirs = array();
 
for ($i=1; $i<$argc; $i++) {
if ($argv[$i] == '-v') {
$show_verbose = true;
} else if ($argv[$i] == '-r') {
$do_recursive = true;
} else {
$dirs[] = $argv[$i];
}
}
 
if (count($dirs) == 0) {
echo "Syntax: $argv[0] [-v] [-r] <directory> [<directory> [...]]\n";
exit(2);
}
 
$res = 0;
foreach ($dirs as $dir) {
if (!_rec($dir)) $res = 1;
}
if ($show_verbose) echo "Done.\n";
exit($res);
/trunk/PHP/sfv_verify.php
0,0 → 1,190
#!/usr/bin/php
<?php
 
/*
Copyright 2020-2022 Daniel Marschall, ViaThinkSoft
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
 
// TODO: On Windows file systems, accept file names case insensitively
 
function utf8_normalize($str) {
// This helps to handle decomposite Unicode endpoints (E.g. German Umlauts have different representations)
// Requires php-intl
if (!class_exists('Normalizer')) return $str;
return Normalizer::normalize($str);
}
 
function convertToUTF8($str) {
$enc = mb_detect_encoding($str);
if ($enc && $enc != 'UTF-8') {
return iconv($enc, 'UTF-8', $str);
} else {
return $str;
}
}
 
function testsfv($file) {
// TODO: warn if an entry is multiple times (with different checksums) in a single file
if (!file_exists($file)) {
fwrite(STDERR, "ERROR: File $file does not exist.\n");
return;
}
 
$files_checked = array();
 
$lines = file($file);
$is_first_line = true;
$force_utf8 = false;
foreach ($lines as $line) {
if ($is_first_line) {
$tmp = 0;
$line = str_replace("\xEF\xBB\xBF",'',$line,$tmp);
if ($tmp > 0) $force_utf8 = true;
$is_first_line = false;
}
if (!$force_utf8) $line = convertToUTF8($line);
 
if (substr(trim($line),0,1) == ';') continue;
 
$line = rtrim($line);
if ($line == '') continue;
$checksum = substr($line,-8);
$origname = rtrim(substr($line,0,strlen($line)-8));
$origname = dirname($file) . '/' . rtrim($origname);
if (!file_exists($origname)) {
fwrite(STDERR, "WARNING: File vanished : $origname\n");
} else {
if (is_file($origname)) {
$checksum2 = crc32_file($origname);
if (strtolower($checksum) != strtolower($checksum2)) {
fwrite(STDERR, "CHECKSUM FAIL: $origname (expected $checksum, but is $checksum2)\n");
} else {
global $show_verbose;
if ($show_verbose) echo "OK: $origname\n";
}
} else {
// For some reason, some files on a NTFS volume are "FIFO" pipe files?!
fwrite(STDERR, "Warning: $origname is not a regular file!\n");
}
}
 
$origname = utf8_normalize(basename($origname));
$files_checked[] = dirname($file) . '/' . $origname;
}
 
// Now check if files have vanished!
$directory = dirname($file);
$sd = @scandir($directory);
if ($sd === false) {
fwrite(STDERR, "Error: Cannot scan directory $directory\n");
} else {
foreach ($sd as $file) {
if ($file === '.') continue;
if ($file === '..') continue;
if (substr($file,0,1) === '.') continue;
if (strtolower($file) === 'thumbs.db') continue;
if (strtolower(substr($file, -4)) === '.md5') continue;
if (strtolower(substr($file, -4)) === '.sfv') continue;
$fullpath = $directory . '/' . $file;
if (!is_dir($fullpath)) {
$fullpath = utf8_normalize($fullpath);
if (!in_array($fullpath,$files_checked)) {
fwrite(STDERR, "Warning: File not in SFV checksum file: $fullpath\n");
}
}
}
}
}
 
function swapEndianness($hex) {
return implode('', array_reverse(str_split($hex, 2)));
}
 
function crc32_file($filename, $rawOutput = false) {
$out = bin2hex(hash_file ('crc32b', $filename , true));
if (hash('crc32b', 'TEST') == 'b893eaee') {
// hash_file() in PHP 5.2 has the wrong Endianess!
// https://bugs.php.net/bug.php?id=47467
$out = swapEndianness($out);
}
return $out;
}
 
function _rec($directory) {
$directory = rtrim($directory, '/\\');
 
if (!is_dir($directory)) {
fwrite(STDERR, "Invalid directory path $directory\n");
return false;
}
 
if ($dont_add_files = count(glob("$directory/*.sfv")) == 0) {
global $show_verbose;
if ($show_verbose) echo "Directory $directory has no SFV file. Skipping.\n";
} else {
$out = array();
 
global $show_verbose;
if ($show_verbose) echo "Check directory $directory\n";
$sfvfiles = glob($directory.'/*.sfv');
foreach ($sfvfiles as $sfvfile) {
testsfv($sfvfile);
}
}
 
$sd = @scandir($directory);
if ($sd === false) {
fwrite(STDERR, "Error: Cannot scan directory $directory\n");
return false;
}
 
foreach ($sd as $file) {
if ($file !== '.' && $file !== '..') {
$file = $directory . '/' . $file;
if (is_dir($file)) {
_rec($file);
}
}
}
 
return true;
}
 
 
# ---
 
$show_verbose = false;
$dirs = array();
 
for ($i=1; $i<$argc; $i++) {
if ($argv[$i] == '-v') {
$show_verbose = true;
} else {
$dirs[] = $argv[$i];
}
}
 
if (count($dirs) == 0) {
echo "Syntax: $argv[0] [-v] <directory> [<directory> [...]]\n";
exit(2);
}
 
$res = 0;
foreach ($dirs as $dir) {
if (!_rec($dir)) $res = 1;
}
if ($show_verbose) echo "Done.\n";
exit($res);
 
/trunk/PHP
Property changes:
Added: svn:ignore
+.phpstan.tmp
+
/trunk/README.md
0,0 → 1,19
 
# Directory checksum generator and verifier
 
### Verify SFV and MD5 files recursively
 
This project contains two things:
 
* PHP Directory: md5 and sfv generator or verifier scripts in pure PHP.
 
* Windows Directory: Contains two tools, where you can recursively check if files have been modified (or corrupted by a file system error) by checking all directories containing "MD5" and "SFV" files recursively.
 
## Windows tools
[Download Setup here](https://www.viathinksoft.de/download/246/checksum_tools_setup.exe)
 
### Windows tool: Checksum generate/verify/update
![Checksum generate/verify/update screenshot](https://www.viathinksoft.com/screenshot/55/SFV-MD5+Checksum+file+editor.png)
 
### Windows tool: Batch checksum verifier
![Batch checksum verifier screenshot](https://www.viathinksoft.com/screenshot/53/Windows+checksum+verifier.png)
/trunk/Windows/AuthentiCode Sign/sign_single.bat
0,0 → 1,25
@echo off
 
if "%~1"=="" goto :done
 
echo Sign %1 ...
 
>NUL 2>&1 "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" verify /pa %1 && (
echo File %1 is already signed, skipping
exit /b 0
) || (
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /a /tr http://timestamp.globalsign.com/tsa/r6advanced1 /td SHA256 /fd SHA256 /n "HickelSOFT" /v %1
>NUL 2>&1 "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" verify /pa %1 && (
echo File %1 is sucessfully signed!
exit /b 0
) || (
echo ERROR while signing file %1 !
echo.
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /a /tr http://timestamp.globalsign.com/tsa/r6advanced1 /td SHA256 /fd SHA256 /n "HickelSOFT" /v %1
echo.
pause.
exit /b 1
)
)
 
:done
/trunk/Windows/CRC32.pas
0,0 → 1,259
// CRC32 calculates a cyclic redundancy code (CRC), known as CRC-32, using
// a byte-wise algorithm.
//
// (C) Copyright 1989, 1995-1996, 1999 Earl F. Glynn, Overland Park, KS.
// All Rights Reserved.
//
// This UNIT was derived from the CRCT FORTRAN 77 program given in
// "Byte-wise CRC Calculations" by Aram Perez in IEEE Micro, June 1983,
// pp. 40-50. The constants here are for the CRC-32 generator polynomial,
// as defined in the Microsoft Systems Journal, March 1995, pp. 107-108
//
// This CRC algorithm emphasizes speed at the expense of the 256-element
// lookup table.
//
// Updated for Delphi 4 dynamic arrays and stream I/O. July 1999.
 
UNIT CRC32;
 
INTERFACE
 
USES
Windows; // DWORD for D3/D4 compatibility
 
TYPE
{$IFDEF VER130} // This is a bit awkward
// 8-byte integer
TInteger8 = Int64; // Delphi 5
{$ELSE}
{$IFDEF VER120}
TInteger8 = Int64; // Delphi 4
{$ELSE}
TInteger8 = COMP; // Delphi 2 or 3
{$ENDIF}
{$ENDIF}
 
PROCEDURE CalcCRC32 (p: pointer; ByteCount: DWORD; VAR CRCvalue: DWORD);
 
PROCEDURE CalcFileCRC32 (FromName: STRING; VAR CRCvalue: DWORD;
VAR TotalBytes: TInteger8;
VAR error: WORD);
 
IMPLEMENTATION
 
USES
{$IFDEF StreamIO}
SysUtils, // SysErrorMessage
{$ENDIF}
Dialogs, // ShowMessage
Classes, // TMemoryStream
LongFilenameOperations; // added by ViaThinkSoft
 
CONST
table: ARRAY[0..255] OF DWORD =
($00000000, $77073096, $EE0E612C, $990951BA,
$076DC419, $706AF48F, $E963A535, $9E6495A3,
$0EDB8832, $79DCB8A4, $E0D5E91E, $97D2D988,
$09B64C2B, $7EB17CBD, $E7B82D07, $90BF1D91,
$1DB71064, $6AB020F2, $F3B97148, $84BE41DE,
$1ADAD47D, $6DDDE4EB, $F4D4B551, $83D385C7,
$136C9856, $646BA8C0, $FD62F97A, $8A65C9EC,
$14015C4F, $63066CD9, $FA0F3D63, $8D080DF5,
$3B6E20C8, $4C69105E, $D56041E4, $A2677172,
$3C03E4D1, $4B04D447, $D20D85FD, $A50AB56B,
$35B5A8FA, $42B2986C, $DBBBC9D6, $ACBCF940,
$32D86CE3, $45DF5C75, $DCD60DCF, $ABD13D59,
$26D930AC, $51DE003A, $C8D75180, $BFD06116,
$21B4F4B5, $56B3C423, $CFBA9599, $B8BDA50F,
$2802B89E, $5F058808, $C60CD9B2, $B10BE924,
$2F6F7C87, $58684C11, $C1611DAB, $B6662D3D,
 
$76DC4190, $01DB7106, $98D220BC, $EFD5102A,
$71B18589, $06B6B51F, $9FBFE4A5, $E8B8D433,
$7807C9A2, $0F00F934, $9609A88E, $E10E9818,
$7F6A0DBB, $086D3D2D, $91646C97, $E6635C01,
$6B6B51F4, $1C6C6162, $856530D8, $F262004E,
$6C0695ED, $1B01A57B, $8208F4C1, $F50FC457,
$65B0D9C6, $12B7E950, $8BBEB8EA, $FCB9887C,
$62DD1DDF, $15DA2D49, $8CD37CF3, $FBD44C65,
$4DB26158, $3AB551CE, $A3BC0074, $D4BB30E2,
$4ADFA541, $3DD895D7, $A4D1C46D, $D3D6F4FB,
$4369E96A, $346ED9FC, $AD678846, $DA60B8D0,
$44042D73, $33031DE5, $AA0A4C5F, $DD0D7CC9,
$5005713C, $270241AA, $BE0B1010, $C90C2086,
$5768B525, $206F85B3, $B966D409, $CE61E49F,
$5EDEF90E, $29D9C998, $B0D09822, $C7D7A8B4,
$59B33D17, $2EB40D81, $B7BD5C3B, $C0BA6CAD,
 
$EDB88320, $9ABFB3B6, $03B6E20C, $74B1D29A,
$EAD54739, $9DD277AF, $04DB2615, $73DC1683,
$E3630B12, $94643B84, $0D6D6A3E, $7A6A5AA8,
$E40ECF0B, $9309FF9D, $0A00AE27, $7D079EB1,
$F00F9344, $8708A3D2, $1E01F268, $6906C2FE,
$F762575D, $806567CB, $196C3671, $6E6B06E7,
$FED41B76, $89D32BE0, $10DA7A5A, $67DD4ACC,
$F9B9DF6F, $8EBEEFF9, $17B7BE43, $60B08ED5,
$D6D6A3E8, $A1D1937E, $38D8C2C4, $4FDFF252,
$D1BB67F1, $A6BC5767, $3FB506DD, $48B2364B,
$D80D2BDA, $AF0A1B4C, $36034AF6, $41047A60,
$DF60EFC3, $A867DF55, $316E8EEF, $4669BE79,
$CB61B38C, $BC66831A, $256FD2A0, $5268E236,
$CC0C7795, $BB0B4703, $220216B9, $5505262F,
$C5BA3BBE, $B2BD0B28, $2BB45A92, $5CB36A04,
$C2D7FFA7, $B5D0CF31, $2CD99E8B, $5BDEAE1D,
 
$9B64C2B0, $EC63F226, $756AA39C, $026D930A,
$9C0906A9, $EB0E363F, $72076785, $05005713,
$95BF4A82, $E2B87A14, $7BB12BAE, $0CB61B38,
$92D28E9B, $E5D5BE0D, $7CDCEFB7, $0BDBDF21,
$86D3D2D4, $F1D4E242, $68DDB3F8, $1FDA836E,
$81BE16CD, $F6B9265B, $6FB077E1, $18B74777,
$88085AE6, $FF0F6A70, $66063BCA, $11010B5C,
$8F659EFF, $F862AE69, $616BFFD3, $166CCF45,
$A00AE278, $D70DD2EE, $4E048354, $3903B3C2,
$A7672661, $D06016F7, $4969474D, $3E6E77DB,
$AED16A4A, $D9D65ADC, $40DF0B66, $37D83BF0,
$A9BCAE53, $DEBB9EC5, $47B2CF7F, $30B5FFE9,
$BDBDF21C, $CABAC28A, $53B39330, $24B4A3A6,
$BAD03605, $CDD70693, $54DE5729, $23D967BF,
$B3667A2E, $C4614AB8, $5D681B02, $2A6F2B94,
$B40BBE37, $C30C8EA1, $5A05DF1B, $2D02EF8D);
 
// Use CalcCRC32 as a procedure so CRCValue can be passed in but
// also returned. This allows multiple calls to CalcCRC32 for
// the "same" CRC-32 calculation.
PROCEDURE CalcCRC32 (p: pointer; ByteCount: DWORD; VAR CRCValue: DWORD);
// The following is a little cryptic (but executes very quickly).
// The algorithm is as follows:
// 1. exclusive-or the input byte with the low-order byte of
// the CRC register to get an INDEX
// 2. shift the CRC register eight bits to the right
// 3. exclusive-or the CRC register with the contents of
// Table[INDEX]
// 4. repeat steps 1 through 3 for all bytes
 
VAR
i: DWORD;
q: ^BYTE;
BEGIN
q := p;
FOR i := 0 TO ByteCount-1 DO BEGIN
CRCvalue := (CRCvalue SHR 8) XOR
Table[ q^ XOR (CRCvalue AND $000000FF) ];
INC(q)
END
END {CalcCRC32};
 
 
{$IFDEF StreamIO} // Contemporary method using TMemoryStream
 
// The CRC-32 value calculated here matches the one from the PKZIP program.
// Use MemoryStream to read file in binary mode.
PROCEDURE CalcFileCRC32 (FromName: STRING; VAR CRCvalue: DWORD;
VAR TotalBytes: TInteger8;
VAR error: WORD);
VAR
Stream: TMemoryStream;
BEGIN
error := 0;
CRCValue := $FFFFFFFF;
Stream := TMemoryStream.Create;
TRY
TRY
Stream.LoadFromFile(FromName);
IF Stream.Size > 0
THEN CalcCRC32 (Stream.Memory, Stream.Size, CRCvalue)
EXCEPT
ON E: EReadError DO
error := 1
END;
 
CRCvalue := NOT CRCvalue
FINALLY
Stream.Free
END;
END {CalcFileCRC32};
 
{$ELSE} // "older" BlockRead method
 
// The CRC-32 value calculated here matches the one from the PKZIP program.
// Use BlockRead to read file in binary mode.
PROCEDURE CalcFileCRC32 (FromName: STRING; VAR CRCvalue: DWORD;
VAR TotalBytes: TInteger8;
VAR error: WORD);
CONST
BufferSize = 32768;
 
TYPE
BufferIndex = 0..BufferSize-1;
TBuffer = ARRAY[BufferIndex] OF BYTE;
pBuffer = ^TBuffer;
 
VAR
BytesRead: INTEGER;
FromFile : FILE;
FromFile2: THandle;
IOBuffer : pBuffer;
BEGIN
New(IOBuffer);
TRY
FileMode := 0; {Turbo default is 2 for R/W; 0 is for R/O}
CRCValue := $FFFFFFFF;
if Length(FromName) >= MAX_PATH then
begin
try
MyASSIGNFile (FromFile2,FromName);
MyRESET (FromFile2);
error := GetLastError;
except
error := 1;
end;
end
else
begin
ASSIGN (FromFile,FromName);
{$I-} RESET (FromFile,1); {$I+}
error := IOResult;
end;
IF error = 0
THEN BEGIN
TotalBytes := 0;
 
REPEAT
if Length(FromName) >= MAX_PATH then // [sic!] "greater equal" is correct! The Delphi functions fail if the filename is 260 or greater, but Microsoft says MAX_PATH is the maximum (legal) length!
begin
MyBlockRead (FromFile2, IOBuffer^, BufferSize, BytesRead);
end
else
begin
{$I-}
BlockRead (FromFile, IOBuffer^, BufferSize, BytesRead);
{$I+}
end;
error := IOResult;
IF (error = 0) AND (BytesRead > 0)
THEN BEGIN
CalcCRC32 (IOBuffer, BytesRead, CRCvalue);
TotalBytes := TotalBytes + BytesRead; // can't use INC with COMP
END
UNTIL (BytesRead = 0) OR (error > 0);
 
if Length(FromName) >= MAX_PATH then
begin
MyCLOSEFile (FromFile2)
end
else
begin
CLOSE (FromFile)
end;
END;
CRCvalue := NOT CRCvalue
FINALLY
Dispose(IOBuffer)
END
END {CalcFileCRC32};
 
{$ENDIF}
 
END {CRC32}.
 
/trunk/Windows/CheckSumToolsWindows.iss
0,0 → 1,116
; ViaThinkSoft Checksum Tools Setup Script for InnoSetup
; by Daniel Marschall, ViaThinkSoft
 
[Setup]
AppName=ViaThinkSoft Checksum Tools
AppVerName=ViaThinkSoft Checksum Tools 1.1
AppVersion=1.1
AppCopyright=© Copyright 2017 - 2024 ViaThinkSoft
AppPublisher=ViaThinkSoft
AppPublisherURL=https://www.viathinksoft.com/
AppSupportURL=https://www.daniel-marschall.de/
AppUpdatesURL=https://www.viathinksoft.com/
DefaultDirName={autopf}\ViaThinkSoft Checksum Tools
DefaultGroupName=Checksum Tools
VersionInfoCompany=ViaThinkSoft
VersionInfoCopyright=© Copyright 2017 - 2024 ViaThinkSoft
VersionInfoDescription=Checksum Tools Setup
VersionInfoTextVersion=1.1.0.0
VersionInfoVersion=1.1
ChangesAssociations=yes
OutputDir=.
OutputBaseFilename=ChecksumTools
LicenseFile=..\LICENSE
; Configure Sign Tool in InnoSetup at "Tools => Configure Sign Tools" (adjust the path to your SVN repository location)
; Name = sign_single
; Command = "C:\SVN\...\sign_single.bat" $f
SignTool=sign_single
SignedUninstaller=yes
 
[CustomMessages]
Assoc=File associations:
 
[Languages]
;Name: de; MessagesFile: "compiler:Languages\German.isl"
 
[LangOptions]
LanguageName=English
LanguageID=$0409
 
[Components]
Name: "dirchecker"; Description: "Recursive directory checker"; Types: full compact custom
Name: "editor"; Description: "Checksum file editor"; Types: full
 
[Tasks]
Name: fileassocSFV; Description: "{cm:AssocFileExtension,'SFV Checksum File','.sfv'}"; GroupDescription: "{cm:Assoc}"; Components: editor
Name: fileassocMD5; Description: "{cm:AssocFileExtension,'MD5 Checksum File','.md5'}"; GroupDescription: "{cm:Assoc}"; Components: editor
 
[Files]
Source: "MD5DirCheck.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Components: dirchecker
Source: "SFVCorrect.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Components: editor
Source: "ChecksumFileIcon.ico"; DestDir: "{app}"; Flags: ignoreversion; Components: editor
 
[Dirs]
 
[Icons]
Name: "{group}\Recursive directory checker"; Filename: "{app}\MD5DirCheck.exe"; Components: dirchecker
Name: "{group}\Checksum file editor"; Filename: "{app}\SFVCorrect.exe"; Components: editor
 
[Run]
Filename: "{app}\MD5DirCheck.exe"; Description: "Run recursive directory checker"; Flags: nowait postinstall skipifsilent; Components: dirchecker
Filename: "{app}\SFVCorrect.exe"; Description: "Run checksum file editor"; Flags: nowait postinstall skipifsilent unchecked; Components: editor
 
[Registry]
Root: HKCR; Subkey: ".sfv"; ValueName: ""; ValueType: string; ValueData: "VtsChecksumSFV"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocSFV
Root: HKCR; Subkey: ".sfv\ShellNew"; ValueName: "ItemName"; ValueType: string; ValueData: "SFV checksum file"; Components: editor; Tasks: fileassocSFV
Root: HKCR; Subkey: ".sfv\ShellNew"; ValueName: "NullFile"; ValueType: string; ValueData: ""; Components: editor; Tasks: fileassocSFV
Root: HKCR; Subkey: "VtsChecksumSFV"; ValueName: ""; ValueType: string; ValueData: "SFV checksum File"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocSFV
Root: HKCR; Subkey: "VtsChecksumSFV\DefaultIcon"; ValueName: ""; ValueType: string; ValueData: "{app}\ChecksumFileIcon.ico"; Components: editor; Tasks: fileassocSFV
Root: HKCR; Subkey: "VtsChecksumSFV\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SFVCorrect.exe"" ""%1"""; Components: editor; Tasks: fileassocSFV
 
Root: HKCR; Subkey: ".md5"; ValueName: ""; ValueType: string; ValueData: "VtsChecksumMD5"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocMD5
Root: HKCR; Subkey: ".md5\ShellNew"; ValueName: "ItemName"; ValueType: string; ValueData: "MD5 checksum file"; Components: editor; Tasks: fileassocMD5
Root: HKCR; Subkey: ".md5\ShellNew"; ValueName: "NullFile"; ValueType: string; ValueData: ""; Components: editor; Tasks: fileassocMD5
Root: HKCR; Subkey: "VtsChecksumMD5"; ValueName: ""; ValueType: string; ValueData: "MD5 checksum File"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocMD5
Root: HKCR; Subkey: "VtsChecksumMD5\DefaultIcon"; ValueName: ""; ValueType: string; ValueData: "{app}\ChecksumFileIcon.ico"; Components: editor; Tasks: fileassocMD5
Root: HKCR; Subkey: "VtsChecksumMD5\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SFVCorrect.exe"" ""%1"""; Components: editor; Tasks: fileassocMD5
 
 
[Code]
function InitializeSetup(): Boolean;
begin
if CheckForMutexes('VtsChecksumToolsSetup')=false then
begin
Createmutex('VtsChecksumToolsSetup');
Result := true;
end
else
begin
Result := False;
end;
end;
function IsAnyComponentSelected: Boolean;
var
I: Integer;
begin
// Source: https://stackoverflow.com/questions/20691583/innosetup-if-no-components-are-selected-go-back-to-components-page
Result := False;
for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do
if WizardForm.ComponentsList.Checked[I] then
begin
Result := True;
Exit;
end;
end;
function NextButtonClick(PageID: Integer): Boolean;
begin
Result:= True;
if PageID = wpSelectComponents then
begin
if not IsAnyComponentSelected then
begin
MsgBox('No items selected, please select at least one item', mbError, MB_OK);
Result := False;
end;
end;
end;
/trunk/Windows/ChecksumFileIcon.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Windows/Common.pas
0,0 → 1,24
unit Common;
 
interface
 
uses
Classes;
 
type
TChecksum = class(TObject)
public
checksum: string;
end;
 
TCheckSumFile = class(TObject)
public
constructor Create(AFileName: string); virtual; abstract;
procedure ToStringList(slOut: TStringList); virtual; abstract;
function SingleFileChecksum(AFileName: string): string; virtual; abstract;
function MergeLine(AFileName, ACheckSum: string): string; virtual; abstract;
end;
 
implementation
 
end.
/trunk/Windows/DelWaste.bat
0,0 → 1,6
@echo off
del *.dcu
del *.~*
del *.local
del *.stat
del *.identcache
/trunk/Windows/LICENSE
0,0 → 1,202
 
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
 
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
 
1. Definitions.
 
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
 
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
 
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
 
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
 
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
 
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
 
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
 
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
 
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
 
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
 
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
 
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
 
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
 
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
 
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
 
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
 
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
 
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
 
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
 
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
 
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
 
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
 
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
 
END OF TERMS AND CONDITIONS
 
APPENDIX: How to apply the Apache License to your work.
 
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
 
Copyright 2018 Daniel Marschall, ViaThinkSoft
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
/trunk/Windows/LongFilenameOperations.pas
0,0 → 1,113
unit LongFilenameOperations;
 
interface
 
// These procedures should replace the Delphi internal AssignFile(), Reset(), etc.
// functions. These functions should be able to support long file names
// by using the WinAPI (the "long filename" mode is switched when the file
// name format \\?\ is used).
 
procedure MyAssignFile(var hFile: THandle; filename: string);
procedure MyReset(hFile: THandle);
procedure MyRewrite(hFile: THandle);
procedure MyWriteLn(hFile: THandle; s: AnsiString);
procedure MyReadLn(hFile: THandle; var s: string);
procedure MyCloseFile(hFile: THandle);
function MyEOF(hFile: THandle): boolean;
procedure MyBlockRead(var hFile: THandle; var Buffer; RecordCount: integer; var RecordsRead: integer);
 
implementation
 
uses
Windows, SysUtils;
 
procedure MyAssignFile(var hFile: THandle; filename: string);
var
lastErr: DWORD;
begin
if Copy(filename, 2, 1) = ':' then filename := '\\?\' + filename; // To allow long filenames
hFile := CreateFile(PChar(filename), GENERIC_READ or GENERIC_WRITE, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, 0);
if hFile = INVALID_HANDLE_VALUE then
begin
lastErr := GetLastError;
if lastErr = ERROR_ACCESS_DENIED then
begin
hFile := CreateFile(PChar(filename), GENERIC_READ, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, 0);
if hFile = INVALID_HANDLE_VALUE then RaiseLastOSError;
end
else RaiseLastOSError(lastErr);
end;
end;
 
procedure MyReset(hFile: THandle);
begin
SetFilePointer(hFile, 0, nil, FILE_BEGIN);
end;
 
procedure MyRewrite(hFile: THandle);
begin
SetFilePointer(hFile, 0, nil, FILE_BEGIN);
SetEndOfFile(hFile);
end;
 
procedure MyWriteLn(hFile: THandle; s: AnsiString);
var
numWritten: Cardinal;
begin
s := s + #13#10;
WriteFile(hFile, s[1], Length(s), numWritten, nil);
if Cardinal(Length(s)) <> numWritten then RaiseLastOSError;
end;
 
procedure MyReadLn(hFile: THandle; var s: string);
var
buf: array [0..0] of ansichar;
dwread: LongWord;
begin
s := '';
ReadFile(hFile, buf, 1, dwread, nil);
while (dwread > 0) do
begin
if buf[0] <> #13 then // Note: The first line of SFV files contains a comment ended with LF while the other lines end with CR-LF
begin
if buf[0] = #10 then exit;
s := s + string(buf[0]);
end;
Readfile(hFile, buf, 1, dwread, nil);
end;
end;
 
procedure MyCloseFile(hFile: THandle);
begin
CloseHandle(hFile);
end;
 
function MyEOF(hFile: THandle): boolean;
var
buf: array [0..0] of ansichar;
dwread: LongWord;
begin
Readfile(hFile, buf, 1, dwread, nil);
if dwread > 0 then
begin
SetFilePointer(hFile, -dwread, nil, FILE_CURRENT);
result := false;
end
else
begin
result := true;
end;
end;
 
procedure MyBlockRead(var hFile: THandle; var Buffer; RecordCount: integer; var RecordsRead: integer);
var
RecordCount2, RecordsRead2: Cardinal;
begin
RecordCount2 := RecordCount;
RecordsRead2 := RecordsRead;
ReadFile(hFile, Buffer, RecordCount2, RecordsRead2, nil);
//RecordCount := RecordCount2;
RecordsRead := RecordsRead2;
end;
 
end.
/trunk/Windows/MD5.pas
0,0 → 1,130
unit MD5;
 
interface
 
uses
Classes, Common;
 
type
TCheckSumFileMD5 = class(TCheckSumFile)
protected
Fmd5File: string;
public
constructor Create(AFileName: string); override;
procedure ToStringList(slOut: TStringList); override;
function SingleFileChecksum(AFileName: string): string; override;
function MergeLine(AFileName, ACheckSum: string): string; override;
end;
 
function md5file(const filename: string): string;
procedure MD5FileToStringList(amd5file: string; slOut: TStringList);
 
implementation
 
uses
SysUtils, IdHashMessageDigest, idHash, LongFilenameOperations;
 
function md5file(const filename: string): string;
var
IdMD5: TIdHashMessageDigest5;
FS: TFileStream;
begin
IdMD5 := TIdHashMessageDigest5.Create;
FS := TFileStream.Create(filename, fmOpenRead or fmShareDenyWrite);
try
{$IFDEF UNICODE} // I actually do not know at which version of Delphi/Indy, this has changed.
Result := IdMD5.HashStreamAsHex(FS);
{$ELSE}
Result := IdMD5.AsHex(IdMD5.HashValue(FS));
{$ENDIF}
finally
FS.Free;
IdMD5.Free;
end;
end;
 
procedure MD5FileToStringList(amd5file: string; slOut: TStringList);
var
sLine: string;
originalFilename: string;
expectedChecksum: string;
fil: THandle;
csum: TChecksum;
firstLinePassed: boolean;
forceUTF8: boolean;
begin
if not FileExists(amd5file) then
exit;
 
MyAssignFile(fil, amd5file);
try
MyReset(fil);
firstLinePassed := false;
forceUTF8 := false;
while not MyEOF(fil) do
begin
MyReadLn(fil, sLine);
 
{$REGION 'Try UTF8 decode'}
if not firstLinePassed and (length(sLine)>2) and (sLine[1]=#$EF) and (sLine[2]=#$BB) and (sLine[3]=#$BF) then
begin
delete(sLine,1,3); // Remove BOM
forceUTF8 := true;
end;
firstLinePassed := true;
 
if forceUTF8 or (Pos(#$FFFD, Utf8ToString(RawByteString(sLine))) = 0) then
sLine := Utf8ToString(RawByteString(sLine));
{$ENDREGION}
 
if Copy(Trim(sLine),1,1) = ';' then continue;
// 25bfdef2651071efdd08bb3404797384 *Example.doc
sLine := Trim(sLine);
if sLine = '' then
continue;
expectedChecksum := Copy(sLine, 1, 32);
Delete(sLine, 1, 32);
sLine := Trim(sLine);
if Copy(sLine, 1, 1) = '*' then
Delete(sLine, 1, 1);
sLine := Trim(sLine);
originalFilename := sLine;
 
//slOut.Values[originalFilename] := expectedChecksum; // <-- with this, files cannot have an equal sign
slOut.OwnsObjects := true;
csum := TChecksum.Create;
csum.checksum := expectedChecksum;
slOut.AddObject(originalFilename, csum);
end;
finally
MyCloseFile(fil);
end;
end;
 
{ TCheckSumFileMD5 }
 
constructor TCheckSumFileMD5.Create(AFileName: string);
begin
inherited;
fmd5File := AFileName;
if not SameText(ExtractFileExt(AFileName),'.md5') then
raise Exception.Create('Invalid checksum file extension.');
end;
 
function TCheckSumFileMD5.MergeLine(AFileName, ACheckSum: string): string;
begin
result := ACheckSum + ' *' + AFileName;
end;
 
function TCheckSumFileMD5.SingleFileChecksum(AFileName: string): string;
begin
result := LowerCase(md5file(AFileName));
end;
 
procedure TCheckSumFileMD5.ToStringList(slOut: TStringList);
begin
inherited;
MD5FileToStringList(fmd5File, slOut);
end;
 
end.
/trunk/Windows/MD5DirCheck.dpr
0,0 → 1,19
program MD5DirCheck;
 
uses
Vcl.Forms,
Unit1 in 'Unit1.pas' {Form1},
SFV in 'SFV.pas',
MD5 in 'MD5.pas',
CRC32 in 'CRC32.pas',
Common in 'Common.pas',
LongFilenameOperations in 'LongFilenameOperations.pas';
 
{$R *.res}
 
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
/trunk/Windows/MD5DirCheck.dproj
0,0 → 1,978
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{1158C929-E612-4310-A28A-16D1439BBC00}</ProjectGuid>
<ProjectVersion>19.5</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<MainSource>MD5DirCheck.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>1</TargetedPlatforms>
<AppType>Application</AppType>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
<Base_Win64>true</Base_Win64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
<Cfg_1_Win32>true</Cfg_1_Win32>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
<Cfg_2_Win32>true</Cfg_2_Win32>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
<SanitizedProjectName>MD5DirCheck</SanitizedProjectName>
<VerInfo_Locale>1031</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;TeeDB;FireDAC;vcltouch;vcldb;bindcompfmx;svn;FireDACSqliteDriver;FireDACPgDriver;inetdb;FMXTee;soaprtl;DbxCommonDriver;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;Tee;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;TeeUI;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=ViaThinkSoft;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=(C) 2019 Daniel Marschall, ViaThinkSoft;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;TeeDB;FireDAC;vcltouch;vcldb;bindcompfmx;FireDACSqliteDriver;FireDACPgDriver;inetdb;FMXTee;soaprtl;DbxCommonDriver;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;Tee;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;TeeUI;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_DebugDCUs>true</DCC_DebugDCUs>
<DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=ViaThinkSoft;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=(C) 2019-2020 Daniel Marschall, ViaThinkSoft;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=ViaThinkSoft;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=(C) 2019 Daniel Marschall, ViaThinkSoft;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="Unit1.pas">
<Form>Form1</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="SFV.pas"/>
<DCCReference Include="MD5.pas"/>
<DCCReference Include="CRC32.pas"/>
<DCCReference Include="Common.pas"/>
<DCCReference Include="LongFilenameOperations.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>Application</Borland.ProjectType>
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">MD5DirCheck.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="4">
<DeployFile LocalName="MD5DirCheck.exe" Configuration="Debug" Class="ProjectOutput"/>
<DeployFile LocalName="MD5DirCheck.exe" Configuration="Release" Class="ProjectOutput"/>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClasses">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidFileProvider">
<Platform Name="Android">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiv7aFile">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStylesV21">
<Platform Name="Android">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Colors">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon192">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon24">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Strings">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyFramework">
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="DependencyPackage">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="Android64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
<Operation>0</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
<Operation>0</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
<Operation>0</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXDebug">
<Platform Name="OSX64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXEntitlements">
<Platform Name="OSX32">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXInfoPList">
<Platform Name="OSX32">
<RemoteDir>Contents</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
</Platform>
<Platform Name="Linux64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest">
<Platform Name="Win32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSEntitlements">
<Platform Name="iOSDevice32">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSInfoPList">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSLaunchScreen">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
<Operation>64</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
<Operation>64</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo150">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iOS_AppStore1024">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon152">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon167">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_SpotLight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon180">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification60">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting87">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimARM64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
</Deployment>
<Platforms>
<Platform value="Win32">True</Platform>
<Platform value="Win64">False</Platform>
</Platforms>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
</Project>
/trunk/Windows/MD5DirCheck.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Windows/MD5DirCheck.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Windows/ProjectGroup1.groupproj
0,0 → 1,48
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{9F63B99B-2849-42C5-B47A-16DB4D4AA407}</ProjectGuid>
</PropertyGroup>
<ItemGroup>
<Projects Include="SFVCorrect.dproj">
<Dependencies/>
</Projects>
<Projects Include="MD5DirCheck.dproj">
<Dependencies/>
</Projects>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Default.Personality.12</Borland.Personality>
<Borland.ProjectType/>
<BorlandProject>
<Default.Personality/>
</BorlandProject>
</ProjectExtensions>
<Target Name="SFVCorrect">
<MSBuild Projects="SFVCorrect.dproj"/>
</Target>
<Target Name="SFVCorrect:Clean">
<MSBuild Projects="SFVCorrect.dproj" Targets="Clean"/>
</Target>
<Target Name="SFVCorrect:Make">
<MSBuild Projects="SFVCorrect.dproj" Targets="Make"/>
</Target>
<Target Name="MD5DirCheck">
<MSBuild Projects="MD5DirCheck.dproj"/>
</Target>
<Target Name="MD5DirCheck:Clean">
<MSBuild Projects="MD5DirCheck.dproj" Targets="Clean"/>
</Target>
<Target Name="MD5DirCheck:Make">
<MSBuild Projects="MD5DirCheck.dproj" Targets="Make"/>
</Target>
<Target Name="Build">
<CallTarget Targets="SFVCorrect;MD5DirCheck"/>
</Target>
<Target Name="Clean">
<CallTarget Targets="SFVCorrect:Clean;MD5DirCheck:Clean"/>
</Target>
<Target Name="Make">
<CallTarget Targets="SFVCorrect:Make;MD5DirCheck:Make"/>
</Target>
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
</Project>
/trunk/Windows/SFV.pas
0,0 → 1,120
unit SFV;
 
interface
 
uses
Classes, Common;
 
type
TCheckSumFileSFV = class(TCheckSumFile)
protected
sfvFile: string;
public
constructor Create(AFileName: string); override;
procedure ToStringList(slOut: TStringList); override;
function SingleFileChecksum(AFileName: string): string; override;
function MergeLine(AFileName, ACheckSum: string): string; override;
end;
 
function CalcFileCRC32(filename: string): string; overload;
procedure SFVFileToStringList(aSFVFile: string; slOut: TStringList);
 
implementation
 
uses
Windows, SysUtils, CRC32, LongFilenameOperations;
 
function CalcFileCRC32(filename: string): string; overload;
var
checksum: DWORD;
totalbytes: TInteger8;
error: Word;
begin
CRC32.CalcFileCRC32(filename, checksum, totalbytes, error);
if error = 0 then
result := IntToHex(checksum, 8)
else
result := '';
end;
 
procedure SFVFileToStringList(aSFVFile: string; slOut: TStringList);
var
sLine: string;
originalFilename: string;
expectedChecksum: string;
fil: THandle;
csum: TChecksum;
firstLinePassed: boolean;
forceUTF8: boolean;
begin
if not FileExists(aSFVFile) then
exit;
 
MyAssignFile(fil, aSFVFile);
try
MyReset(fil);
firstLinePassed := false;
forceUTF8 := false;
while not MyEOF(fil) do
begin
MyReadLn(fil, sLine);
 
{$REGION 'Try UTF8 decode'}
if not firstLinePassed and (length(sLine)>2) and (sLine[1]=#$EF) and (sLine[2]=#$BB) and (sLine[3]=#$BF) then
begin
delete(sLine,1,3); // Remove BOM
forceUTF8 := true;
end;
firstLinePassed := true;
 
if forceUTF8 or (Pos(#$FFFD, Utf8ToString(RawByteString(sLine))) = 0) then
sLine := Utf8ToString(RawByteString(sLine));
{$ENDREGION}
 
if Copy(Trim(sLine),1,1) = ';' then continue;
// Example.doc 4323C92B
sLine := TrimRight(sLine); // Trim right, because file names may have leading white spaces
if sLine = '' then
continue;
expectedChecksum := Copy(sLine, 1+Length(sLine)-8, 8);
sLine := TrimRight(Copy(sLine, 1, Length(sLine)-8)); // Trim right, because file names may have leading white spaces
originalFilename := sLine;
 
//slOut.Values[originalFilename] := expectedChecksum; // <-- with this, files cannot have an equal sign
slOut.OwnsObjects := true;
csum := TChecksum.Create;
csum.checksum := expectedChecksum;
slOut.AddObject(originalFilename, csum);
end;
finally
MyCloseFile(fil);
end;
end;
 
{ TCheckSumFileSFV }
 
constructor TCheckSumFileSFV.Create(AFileName: string);
begin
inherited;
sfvFile := AFileName;
if not SameText(ExtractFileExt(AFileName),'.sfv') then
raise Exception.Create('Invalid checksum file extension.');
end;
 
function TCheckSumFileSFV.MergeLine(AFileName, ACheckSum: string): string;
begin
result := AFileName + ' ' + ACheckSum;
end;
 
function TCheckSumFileSFV.SingleFileChecksum(AFileName: string): string;
begin
result := CalcFileCRC32(AFileName);
end;
 
procedure TCheckSumFileSFV.ToStringList(slOut: TStringList);
begin
inherited;
SFVFileToStringList(sfvFile, slOut);
end;
 
end.
/trunk/Windows/SFVCorrect.dpr
0,0 → 1,19
program SFVCorrect;
 
uses
Vcl.Forms,
Unit3 in 'Unit3.pas' {Form3},
SFV in 'SFV.pas',
Common in 'Common.pas',
MD5 in 'MD5.pas',
LongFilenameOperations in 'LongFilenameOperations.pas',
CRC32 in 'CRC32.pas';
 
{$R *.res}
 
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm3, Form3);
Application.Run;
end.
/trunk/Windows/SFVCorrect.dproj
0,0 → 1,974
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{71A1CE43-CC79-4BF3-AB08-651A293E5A47}</ProjectGuid>
<ProjectVersion>19.5</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<MainSource>SFVCorrect.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>1</TargetedPlatforms>
<AppType>Application</AppType>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
<Base_Win64>true</Base_Win64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
<Cfg_1_Win32>true</Cfg_1_Win32>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
<Cfg_2_Win32>true</Cfg_2_Win32>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<VerInfo_Locale>1031</VerInfo_Locale>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
<VerInfo_Keys>CompanyName=ViaThinkSoft;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=(C) 2021 Daniel Marschall, ViaThinkSoft;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<SanitizedProjectName>SFVCorrect</SanitizedProjectName>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;svn;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_DebugDCUs>true</DCC_DebugDCUs>
<DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=ViaThinkSoft;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=(C) 2021 Daniel Marschall, ViaThinkSoft;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="Unit3.pas">
<Form>Form3</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="SFV.pas"/>
<DCCReference Include="Common.pas"/>
<DCCReference Include="MD5.pas"/>
<DCCReference Include="LongFilenameOperations.pas"/>
<DCCReference Include="CRC32.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>Application</Borland.ProjectType>
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">SFVCorrect.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="4">
<DeployFile LocalName="Win32\Debug\SFVCorrect.exe" Configuration="Debug" Class="ProjectOutput"/>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClasses">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidFileProvider">
<Platform Name="Android">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiv7aFile">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStylesV21">
<Platform Name="Android">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Colors">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon192">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon24">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Strings">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyFramework">
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="DependencyPackage">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="Android64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
<Operation>0</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
<Operation>0</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
<Operation>0</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXDebug">
<Platform Name="OSX64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXEntitlements">
<Platform Name="OSX32">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXInfoPList">
<Platform Name="OSX32">
<RemoteDir>Contents</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
</Platform>
<Platform Name="Linux64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest">
<Platform Name="Win32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSEntitlements">
<Platform Name="iOSDevice32">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSInfoPList">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSLaunchScreen">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
<Operation>64</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
<Operation>64</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo150">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iOS_AppStore1024">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon152">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon167">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_SpotLight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon180">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification60">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting87">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimARM64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimARM64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
</Deployment>
<Platforms>
<Platform value="Win32">True</Platform>
<Platform value="Win64">False</Platform>
</Platforms>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
</Project>
/trunk/Windows/SFVCorrect.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Windows/SFVCorrect.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Windows/TODO.txt
0,0 → 1,12
 
File icons: High resolution + add SFV/MD5 into the icon file
 
Program icons !!!
 
Directory checker:
- Button to select directory
- Button to convert drive letter (X:\) into long file name UNC path (\\?\)
==> Not required. It is done automatically internally.
- Pause/Cancel button
 
Documentation
/trunk/Windows/Unit1.dfm
0,0 → 1,132
object Form1: TForm1
Left = 0
Top = 0
Caption = 'Recursive MD5/SFV Directory Checksum checker'
ClientHeight = 621
ClientWidth = 1006
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnShow = FormShow
DesignSize = (
1006
621)
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 571
Width = 958
Height = 26
Anchors = [akLeft, akRight, akBottom]
Caption =
'Hints: MD5/SFV files can be created by TotalCommander or other t' +
'ools (also recursively). Multiple MD5/SFV files per directory a' +
're not permitted. To check directories with path names longer t' +
'han 255 characters, use the "long filename" path format \\?\<GUI' +
'D>\ (find out GUID by running "mountvol"), instead of the usual' +
' C:\ file name format.'
WordWrap = True
end
object Button1: TButton
Left = 776
Top = 72
Width = 217
Height = 33
Anchors = [akTop, akRight]
Caption = 'Check'
TabOrder = 0
OnClick = Button1Click
end
object Memo1: TMemo
Left = 8
Top = 184
Width = 985
Height = 381
Anchors = [akLeft, akTop, akRight, akBottom]
ReadOnly = True
ScrollBars = ssBoth
TabOrder = 1
end
object cbVerbose: TCheckBox
Left = 8
Top = 59
Width = 105
Height = 17
Caption = 'Verbose output'
TabOrder = 2
end
object LabeledEdit1: TLabeledEdit
Left = 8
Top = 32
Width = 985
Height = 21
Anchors = [akLeft, akTop, akRight]
EditLabel.Width = 91
EditLabel.Height = 13
EditLabel.Caption = 'Directory to check:'
TabOrder = 3
end
object cbWarnChecksumFileMissing: TCheckBox
Left = 8
Top = 82
Width = 353
Height = 17
Caption = 'Warning if directory with files does not contain a checksum file'
Checked = True
State = cbChecked
TabOrder = 4
end
object cbWarningMissingChecksumFileEntry: TCheckBox
Left = 8
Top = 105
Width = 417
Height = 17
Caption =
'If checksum file is present: Warn if there are files which do no' +
't have a checksum'
Checked = True
State = cbChecked
TabOrder = 5
end
object cbWarnVanishedFile: TCheckBox
Left = 8
Top = 128
Width = 401
Height = 17
Caption =
'If checksum file is present: Warn if files with checksum entries' +
' vanished'
Checked = True
State = cbChecked
TabOrder = 6
end
object cbWarnChecksumMismatch: TCheckBox
Left = 8
Top = 151
Width = 417
Height = 17
Caption =
'If checksum file is present: Warn if a checksum does not match t' +
'he checksum file'
Checked = True
State = cbChecked
TabOrder = 7
end
object RadioGroup1: TRadioGroup
Left = 440
Top = 72
Width = 105
Height = 97
Caption = 'Method'
ItemIndex = 0
Items.Strings = (
'SFV (CRC32)'
'MD5')
TabOrder = 8
end
end
/trunk/Windows/Unit1.pas
0,0 → 1,288
unit Unit1;
 
interface
 
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
 
type
TSeverity = (seOK, seWarning, seCritical);
 
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
cbVerbose: TCheckBox;
LabeledEdit1: TLabeledEdit;
cbWarnChecksumFileMissing: TCheckBox;
cbWarningMissingChecksumFileEntry: TCheckBox;
cbWarnVanishedFile: TCheckBox;
cbWarnChecksumMismatch: TCheckBox;
Label1: TLabel;
RadioGroup1: TRadioGroup;
procedure Button1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
CheckSumFileCount: integer;
function CheckDirectory(ADirectory: string; recursive: boolean): TSeverity;
function VerifyChecksumFile(aChecksumFile: string): TSeverity;
function GetChecksumSafe(const filename: string): string;
end;
 
var
Form1: TForm1;
 
implementation
 
{$R *.dfm}
 
uses
MD5, SFV, Common;
 
const
DUMMY_FILE = 'DUMMY.$$$';
 
procedure TForm1.Button1Click(Sender: TObject);
var
sev: TSeverity;
begin
Memo1.Clear;
if not DirectoryExists(LabeledEdit1.Text) then
begin
showmessage('Directory does not exist');
exit;
end;
Application.ProcessMessages;
CheckSumFileCount := 0;
sev := CheckDirectory(LabeledEdit1.Text, true);
Beep;
case sev of
seOK:
showmessage('OK');
seWarning:
showmessage('Warning');
seCritical:
showmessage('Critical');
end;
Caption := Format('Done. Checked %d checksum files.', [CheckSumFileCount]);
end;
 
function SevMax(a, b: TSeverity): TSeverity;
begin
if Ord(a) > Ord(b) then
Result := a
else
Result := b;
end;
 
function TForm1.VerifyChecksumFile(aChecksumFile: string): TSeverity;
var
slFile: TStringList;
i: integer;
originalFilename: string;
expectedChecksum: string;
IsFound: boolean;
SR: TSearchRec;
fullfilename: string;
ADirectory: string;
originalFilenameFull: string;
begin
if Copy(aChecksumFile, 2, 1) = ':' then aChecksumFile := '\\?\' + aChecksumFile; // To allow long filenames
 
if ExtractFileName(aChecksumFile) <> DUMMY_FILE then
begin
Inc(CheckSumFileCount);
end;
 
if cbVerbose.Checked then
begin
Form1.Memo1.Lines.Add('Check: ' + StringReplace(aChecksumFile,'\\?\','',[]));
end;
 
Result := seOK;
ADirectory := IncludeTrailingPathDelimiter(ExtractFilePath(aChecksumFile));
 
try
slFile := TStringList.Create;
try
slFile.CaseSensitive := false;
slFile.OwnsObjects := true;
 
if radiogroup1.itemindex = 0 then
SFVFileToStringList(aChecksumFile, slFile)
else
MD5FileToStringList(aChecksumFile, slFile);
// TODO: If multiple checksum files => put them together into a single array (beware conflicts!)
 
// 1. Check existing entries in the checksum file
 
for i := 0 to slFile.Count - 1 do
begin
originalFilename := slFile.Strings[i];
expectedChecksum := TChecksum(slFile.Objects[i]).checksum;
 
originalFilenameFull := ADirectory + originalFilename;
if not FileExists(originalFilenameFull) then
begin
if cbWarnVanishedFile.Checked then
begin
Form1.Memo1.Lines.Add('FILE VANISHED: ' + StringReplace(originalFilenameFull,'\\?\','',[]));
Result := SevMax(Result, seCritical);
end;
end
else if LowerCase(GetChecksumSafe(originalFilenameFull))
= LowerCase(expectedChecksum) then
begin
if cbVerbose.Checked then
begin
Form1.Memo1.Lines.Add('OK: ' + StringReplace(originalFilenameFull,'\\?\','',[]) + ' = ' +
expectedChecksum);
end;
Result := SevMax(Result, seOK);
end
else
begin
if cbWarnChecksumMismatch.Checked then
begin
Form1.Memo1.Lines.Add('CHECKSUM MISMATCH: ' + StringReplace(originalFilenameFull,'\\?\','',[]) +
' <> ' + expectedChecksum);
Result := SevMax(Result, seCritical);
end;
end;
end;
 
// 2. Checking for entries which are NOT in the checksum file
 
IsFound := FindFirst(ADirectory + '*', faAnyFile - faDirectory, SR) = 0;
while IsFound do
begin
fullfilename := ADirectory + SR.Name;
if (LowerCase(ExtractFileExt(fullfilename)) <> '.md5') and
(LowerCase(ExtractFileExt(fullfilename)) <> '.sfv') and
(LowerCase(ExtractFileName(fullfilename)) <> 'thumbs.db') then
begin
if slFile.IndexOf(SR.Name) = -1 then //if slFile.Values[SR.Name] = '' then
begin
if ExtractFileName(aChecksumFile) = DUMMY_FILE then
begin
if cbWarnChecksumFileMissing.Checked then
begin
Form1.Memo1.Lines.Add('NEW FILE WITHOUT CHECKSUM FILE: ' +
StringReplace(fullfilename,'\\?\','',[]));
Result := SevMax(Result, seWarning);
end;
end
else
begin
if cbWarningMissingChecksumFileEntry.Checked then
begin
Form1.Memo1.Lines.Add('NEW FILE WITHOUT CHECKSUM ENTRY: ' +
StringReplace(fullfilename,'\\?\','',[]));
Result := SevMax(Result, seWarning);
end;
end;
end;
end;
IsFound := FindNext(SR) = 0;
end;
FindClose(SR);
finally
slFile.Free;
end;
except
on E: Exception do
begin
Memo1.Lines.Add('Invalid checksum file: ' + aChecksumFile + ' : ' + E.Message);
Result := seCritical;
end;
end;
end;
 
function TForm1.CheckDirectory(ADirectory: string; recursive: boolean)
: TSeverity;
var
IsFound: boolean;
SR: TSearchRec;
fullfilename: string;
begin
Caption := ADirectory;
Application.ProcessMessages;
if Application.Terminated then Abort;
 
Result := seOK;
ADirectory := IncludeTrailingPathDelimiter(ADirectory);
 
// Check checksum files
if radiogroup1.itemindex = 0 then
IsFound := FindFirst(ADirectory + '*.sfv', faAnyFile - faDirectory, SR) = 0
else
IsFound := FindFirst(ADirectory + '*.md5', faAnyFile - faDirectory, SR) = 0;
if not IsFound then
begin
fullfilename := ADirectory + DUMMY_FILE; // virtual "empty" file
Result := SevMax(Result, VerifyChecksumFile(fullfilename));
end
else
begin
while IsFound do
begin
fullfilename := ADirectory + SR.Name;
 
Caption := fullfilename;
Application.ProcessMessages;
if Application.Terminated then Abort;
 
Result := SevMax(Result, VerifyChecksumFile(fullfilename));
IsFound := FindNext(SR) = 0;
end;
end;
FindClose(SR);
 
// Check other dirs
if recursive then
begin
IsFound := FindFirst(ADirectory + '*', faAnyFile, SR) = 0;
while IsFound do
begin
fullfilename := ADirectory + SR.Name;
if DirectoryExists(fullfilename) and (SR.Name <> '.') and (SR.Name <> '..')
then
begin
Result := SevMax(Result, CheckDirectory(fullfilename, recursive));
end;
IsFound := FindNext(SR) = 0;
end;
FindClose(SR);
end;
end;
 
procedure TForm1.FormShow(Sender: TObject);
begin
if ParamCount >= 1 then
begin
LabeledEdit1.Text := ParamStr(1);
end;
end;
 
function TForm1.GetChecksumSafe(const filename: string): string;
begin
Caption := filename;
Application.ProcessMessages;
if Application.Terminated then Abort;
 
try
if radiogroup1.itemindex = 0 then
Result := CalcFileCRC32(filename)
else
Result := md5file(filename);
except
on E: Exception do
begin
Memo1.Lines.Add('Cannot read file ' + filename + ' : ' + E.Message);
Result := 'ERROR';
end;
end;
end;
 
end.
/trunk/Windows/Unit3.dfm
0,0 → 1,126
object Form3: TForm3
Left = 0
Top = 0
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
ClientHeight = 619
ClientWidth = 630
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
KeyPreview = True
OldCreateOrder = False
OnKeyDown = FormKeyDown
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 8
Width = 42
Height = 13
Caption = 'Files OK:'
end
object Label2: TLabel
Left = 8
Top = 235
Width = 99
Height = 13
Caption = 'Checksum mismatch:'
end
object Label3: TLabel
Left = 8
Top = 346
Width = 62
Height = 13
Caption = 'Files missing:'
end
object Label4: TLabel
Left = 8
Top = 457
Width = 113
Height = 13
Caption = 'Files without checksum:'
end
object Memo1: TMemo
Left = 8
Top = 27
Width = 601
Height = 190
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ScrollBars = ssBoth
TabOrder = 0
end
object Memo2: TMemo
Left = 8
Top = 254
Width = 601
Height = 86
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ScrollBars = ssBoth
TabOrder = 1
end
object Memo3: TMemo
Left = 8
Top = 365
Width = 601
Height = 86
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ScrollBars = ssBoth
TabOrder = 2
end
object Memo4: TMemo
Left = 8
Top = 476
Width = 601
Height = 86
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ScrollBars = ssBoth
TabOrder = 3
end
object Button1: TButton
Left = 8
Top = 568
Width = 209
Height = 38
Caption = 'Merge, save and re-check (F6)'
TabOrder = 4
OnClick = Button1Click
end
object OpenDialog1: TOpenDialog
Filter = 'SFV Files (*.sfv)|*.sfv|MD5 files (*.md5)|*.md5'
Options = [ofHideReadOnly, ofFileMustExist, ofEnableSizing]
Left = 560
Top = 552
end
object Timer1: TTimer
Enabled = False
Interval = 100
OnTimer = Timer1Timer
Left = 496
Top = 552
end
end
/trunk/Windows/Unit3.pas
0,0 → 1,283
unit Unit3;
 
interface
 
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
 
type
TForm3 = class(TForm)
Memo1: TMemo;
Label1: TLabel;
Memo2: TMemo;
Label2: TLabel;
Memo3: TMemo;
Label3: TLabel;
Memo4: TMemo;
Label4: TLabel;
Button1: TButton;
OpenDialog1: TOpenDialog;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure Timer1Timer(Sender: TObject);
private
FChecksumFile: string;
public
function ParamChecksumFile: string;
procedure LoadSFV;
procedure SaveSFV;
end;
 
var
Form3: TForm3;
 
implementation
 
{$R *.dfm}
 
uses
Common, SFV, MD5, LongFilenameOperations;
 
procedure TForm3.Button1Click(Sender: TObject);
begin
SaveSFV;
LoadSFV;
end;
 
procedure TForm3.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Shift = []) and (Key = VK_F6) then
begin
Key := 0;
SaveSFV;
LoadSFV;
end
else if (Shift = []) and (Key = VK_ESCAPE) then
begin
Key := 0;
Close;
end
else if (Shift = []) and (Key = VK_F5) then
begin
Key := 0;
LoadSFV;
end;
end;
 
procedure TForm3.FormShow(Sender: TObject);
begin
Caption := ParamChecksumFile;
Timer1.Enabled := true;
end;
 
procedure TForm3.LoadSFV;
var
FileName: string;
ADirectory: string;
slSFV: TStringList;
SR: TSearchRec;
IsFound: Boolean;
i: Integer;
TestFilename: string;
SollChecksum: string;
IstChecksum: string;
existingFiles: TStringList;
j: Integer;
csman: TCheckSumFile;
begin
Color := clGray;
Refresh;
 
FileName := ParamChecksumFile;
if Copy(FileName, 2, 1) = ':' then FileName := '\\?\' + FileName; // To allow long filenames
ADirectory := ExtractFilePath(FileName);
 
if not FileExists(FileName) then
begin
ShowMessageFmt('File not found: %s', [FileName]);
Close;
exit;
end;
 
Memo1.Clear;
Memo2.Clear;
Memo3.Clear;
Memo4.Clear;
 
if SameText(ExtractFileExt(FileName), '.sfv') then
csman := TCheckSumFileSFV.Create(FileName)
else if SameText(ExtractFileExt(FileName), '.md5') then
csman := TCheckSumFileMD5.Create(FileName)
else
Exception.Create('Unknown file extension. Only supporting MD5 and SFV.');
 
slSFV := TStringList.Create;
existingFiles := TStringList.Create;
try
// Read SFV/MD5 file
csman.ToStringList(slSFV);
 
// List existing files
IsFound := FindFirst(ADirectory + '*', faAnyFile xor faDirectory, SR) = 0;
while IsFound do
begin
if (SR.Name <> '.') and (SR.Name <> '..') then
begin
existingFiles.Add(SR.Name);
end;
IsFound := FindNext(SR) = 0;
end;
FindClose(SR);
 
// Checksum mismatch or missing files
for i := 0 to slSFV.Count-1 do
begin
TestFilename := IncludeTrailingPathDelimiter(ADirectory) + slSFV.Strings[i];
SollChecksum := TCheckSum(slSFV.Objects[i]).checksum;
if not FileExists(TestFilename) then
begin
Memo3.Lines.Add(csman.MergeLine(slSFV.Strings[i], SollChecksum));
end
else
begin
IstChecksum := csman.SingleFileChecksum(TestFilename);
if SameText(SollChecksum, IstChecksum) then
begin
Memo1.Lines.Add(csman.MergeLine(slSFV.Strings[i], SollChecksum));
end
else
begin
Memo2.Lines.Add('; [CURRENT FILE CHECKSUM] ' + csman.MergeLine(slSFV.Strings[i], IstChecksum));
Memo2.Lines.Add(csman.MergeLine(slSFV.Strings[i], SollChecksum));
end;
 
{$IFDEF MSWINDOWS}
existingFiles.CaseSensitive := false;
{$ELSE}
existingFiles.CaseSensitive := true;
{$ENDIF}
j := existingFiles.IndexOf(slSFV.Strings[i]);
if j >= 0 then existingFiles.Delete(j);
end;
end;
 
// Check non-indexed files
for i := 0 to existingFiles.Count-1 do
begin
TestFileName := existingFiles[i];
if not SameText(ExtractFileExt(TestFileName), '.sfv') and
not SameText(ExtractFileExt(TestFileName), '.md5') and
not SameText(TestFileName, 'Thumbs.db') then
begin
IstChecksum := csman.SingleFileChecksum(IncludeTrailingPathDelimiter(ADirectory) + TestFilename);
Memo4.Lines.Add(csman.MergeLine(TestFileName, IstChecksum));
end;
end;
 
if (Memo2.Text = '') and (Memo3.Text = '') and (Memo4.Text = '') then
Color := clMoneyGreen
else if (Memo2.Text <> '') then
Color := clRed
else
Color := clYellow;
 
Memo1.SelStart := 0;
Memo1.SelLength := 0;
Memo2.SelStart := 0;
Memo2.SelLength := 0;
Memo3.SelStart := 0;
Memo3.SelLength := 0;
Memo4.SelStart := 0;
Memo4.SelLength := 0;
 
if Memo2.Text <> '' then Memo2.SetFocus
else if Memo3.Text <> '' then Memo3.SetFocus
else if Memo4.Text <> '' then Memo4.SetFocus
else Memo1.SetFocus;
finally
FreeAndNil(slSFV);
FreeAndNil(existingFiles);
FreeAndNil(csman);
end;
end;
 
function TForm3.ParamChecksumFile: string;
begin
if FChecksumFile <> '' then
begin
result := FChecksumFile;
end
else
begin
result := ParamStr(1);
if result = '' then
begin
if not OpenDialog1.Execute then
begin
Close;
Abort;
end;
result := OpenDialog1.FileName;
end;
FChecksumFile := result;
end;
end;
 
procedure TForm3.SaveSFV;
var
hFile: THandle;
i: Integer;
slOut: TStringList;
begin
MyAssignFile(hFile, ParamChecksumFile);
try
MyRewrite(hFile); // clear File
 
slOut := TStringList.Create;
try
// Fill slOut with the Memo contents
for i := 0 to memo1.Lines.Count-1 do
begin
slOut.Add(Memo1.Lines[i]);
end;
for i := 0 to memo2.Lines.Count-1 do
begin
slOut.Add(Memo2.Lines[i]);
end;
for i := 0 to memo3.Lines.Count-1 do
begin
slOut.Add(Memo3.Lines[i]);
end;
for i := 0 to memo4.Lines.Count-1 do
begin
slOut.Add(Memo4.Lines[i]);
end;
 
// Sort
slOut.Sort;
 
// Write to SFV/MD5 file
for i := 0 to slOut.Count-1 do
begin
if Trim(slOut[i]) <> '' then
MyWriteLn(hFile, AnsiString(utf8encode(slOut[i])));
end;
finally
FreeAndNil(slOut);
end;
finally
MyCloseFile(hFile);
end;
end;
 
procedure TForm3.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := false;
LoadSFV;
end;
 
end.
/trunk/Windows/screenshots/batch_verify_tool.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Windows/screenshots/generator_tool.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Windows
Property changes:
Added: svn:global-ignores
+*.dcu
+*.local
+*.identcache
Added: svn:ignore
+__history
+__recovery