mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
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.
This commit is contained in:
parent
12396702af
commit
23b64f8357
@ -223,7 +223,6 @@ RELEASE PREPARATION
|
|||||||
* configure.ac
|
* configure.ac
|
||||||
* libqpdf/QPDF.cc
|
* libqpdf/QPDF.cc
|
||||||
* manual/conf.py
|
* manual/conf.py
|
||||||
* qpdf/qpdf.cc
|
|
||||||
`make_dist` verifies this consistency.
|
`make_dist` verifies this consistency.
|
||||||
|
|
||||||
* Update release notes in manual. Look at diffs and ChangeLog.
|
* Update release notes in manual. Look at diffs and ChangeLog.
|
||||||
|
22
make_dist
22
make_dist
@ -64,7 +64,6 @@ cd($tmpdir);
|
|||||||
my $config_version = get_version_from_configure();
|
my $config_version = get_version_from_configure();
|
||||||
my $code_version = get_version_from_source();
|
my $code_version = get_version_from_source();
|
||||||
my $doc_version = get_version_from_manual();
|
my $doc_version = get_version_from_manual();
|
||||||
my $cli_version = get_version_from_cli();
|
|
||||||
|
|
||||||
my $version_error = 0;
|
my $version_error = 0;
|
||||||
if ($version ne $config_version)
|
if ($version ne $config_version)
|
||||||
@ -82,11 +81,6 @@ if ($version ne $doc_version)
|
|||||||
print "$whoami: doc version = $doc_version\n";
|
print "$whoami: doc version = $doc_version\n";
|
||||||
$version_error = 1;
|
$version_error = 1;
|
||||||
}
|
}
|
||||||
if ($version ne $cli_version)
|
|
||||||
{
|
|
||||||
print "$whoami: qpdf.cc version = $cli_version\n";
|
|
||||||
$version_error = 1;
|
|
||||||
}
|
|
||||||
if ($version_error)
|
if ($version_error)
|
||||||
{
|
{
|
||||||
die "$whoami: version numbers are not consistent\n";
|
die "$whoami: version numbers are not consistent\n";
|
||||||
@ -157,22 +151,6 @@ sub get_version_from_manual
|
|||||||
$doc_version;
|
$doc_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_version_from_cli
|
|
||||||
{
|
|
||||||
my $fh = safe_open("qpdf/qpdf.cc");
|
|
||||||
my $cli_version = 'unknown';
|
|
||||||
while (<$fh>)
|
|
||||||
{
|
|
||||||
if (m/expected_version = \"([^\"]+)\"/)
|
|
||||||
{
|
|
||||||
$cli_version = $1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$fh->close();
|
|
||||||
$cli_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub safe_open
|
sub safe_open
|
||||||
{
|
{
|
||||||
my $file = shift;
|
my $file = shift;
|
||||||
|
13
qpdf/qpdf.cc
13
qpdf/qpdf.cc
@ -24,8 +24,6 @@ static int constexpr EXIT_CORRECT_PASSWORD = 3;
|
|||||||
|
|
||||||
static char const* whoami = 0;
|
static char const* whoami = 0;
|
||||||
|
|
||||||
static std::string expected_version = "10.5.0";
|
|
||||||
|
|
||||||
class ArgParser
|
class ArgParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -445,17 +443,6 @@ ArgParser::argPositional(char* arg)
|
|||||||
void
|
void
|
||||||
ArgParser::argVersion()
|
ArgParser::argVersion()
|
||||||
{
|
{
|
||||||
if (expected_version != QPDF::QPDFVersion())
|
|
||||||
{
|
|
||||||
std::cerr << "***\n"
|
|
||||||
<< "WARNING: qpdf CLI from version " << expected_version
|
|
||||||
<< " is using library version " << QPDF::QPDFVersion()
|
|
||||||
<< ".\n"
|
|
||||||
<< "This probably means you have multiple versions of qpdf installed\n"
|
|
||||||
<< "and don't have your library path configured correctly.\n"
|
|
||||||
<< "***"
|
|
||||||
<< std::endl;
|
|
||||||
}
|
|
||||||
std::cout
|
std::cout
|
||||||
<< whoami << " version " << QPDF::QPDFVersion() << std::endl
|
<< whoami << " version " << QPDF::QPDFVersion() << std::endl
|
||||||
<< "Run " << whoami << " --copyright to see copyright and license information."
|
<< "Run " << whoami << " --copyright to see copyright and license information."
|
||||||
|
Loading…
Reference in New Issue
Block a user