Commit 23b64f8357f9a605eae9c153a5fe10e2135eb355

Authored by Jay Berkenbilt
1 parent 12396702

Remove qpdf.cc version check

Remove comparison of qpdf CLI version with library. With almost all
the functionality moving into the library, this check is no longer
meaningful.
README-maintainer
... ... @@ -223,7 +223,6 @@ RELEASE PREPARATION
223 223 * configure.ac
224 224 * libqpdf/QPDF.cc
225 225 * manual/conf.py
226   - * qpdf/qpdf.cc
227 226 `make_dist` verifies this consistency.
228 227  
229 228 * Update release notes in manual. Look at diffs and ChangeLog.
... ...
make_dist
... ... @@ -64,7 +64,6 @@ cd($tmpdir);
64 64 my $config_version = get_version_from_configure();
65 65 my $code_version = get_version_from_source();
66 66 my $doc_version = get_version_from_manual();
67   -my $cli_version = get_version_from_cli();
68 67  
69 68 my $version_error = 0;
70 69 if ($version ne $config_version)
... ... @@ -82,11 +81,6 @@ if ($version ne $doc_version)
82 81 print "$whoami: doc version = $doc_version\n";
83 82 $version_error = 1;
84 83 }
85   -if ($version ne $cli_version)
86   -{
87   - print "$whoami: qpdf.cc version = $cli_version\n";
88   - $version_error = 1;
89   -}
90 84 if ($version_error)
91 85 {
92 86 die "$whoami: version numbers are not consistent\n";
... ... @@ -157,22 +151,6 @@ sub get_version_from_manual
157 151 $doc_version;
158 152 }
159 153  
160   -sub get_version_from_cli
161   -{
162   - my $fh = safe_open("qpdf/qpdf.cc");
163   - my $cli_version = 'unknown';
164   - while (<$fh>)
165   - {
166   - if (m/expected_version = \"([^\"]+)\"/)
167   - {
168   - $cli_version = $1;
169   - last;
170   - }
171   - }
172   - $fh->close();
173   - $cli_version;
174   -}
175   -
176 154 sub safe_open
177 155 {
178 156 my $file = shift;
... ...
qpdf/qpdf.cc
... ... @@ -24,8 +24,6 @@ static int constexpr EXIT_CORRECT_PASSWORD = 3;
24 24  
25 25 static char const* whoami = 0;
26 26  
27   -static std::string expected_version = "10.5.0";
28   -
29 27 class ArgParser
30 28 {
31 29 public:
... ... @@ -445,17 +443,6 @@ ArgParser::argPositional(char* arg)
445 443 void
446 444 ArgParser::argVersion()
447 445 {
448   - if (expected_version != QPDF::QPDFVersion())
449   - {
450   - std::cerr << "***\n"
451   - << "WARNING: qpdf CLI from version " << expected_version
452   - << " is using library version " << QPDF::QPDFVersion()
453   - << ".\n"
454   - << "This probably means you have multiple versions of qpdf installed\n"
455   - << "and don't have your library path configured correctly.\n"
456   - << "***"
457   - << std::endl;
458   - }
459 446 std::cout
460 447 << whoami << " version " << QPDF::QPDFVersion() << std::endl
461 448 << "Run " << whoami << " --copyright to see copyright and license information."
... ...