all: use functions from version.h instead of PACKAGE_VERSION defininition

This commit is contained in:
Moritz Bunkus 2019-09-11 19:00:40 +02:00
parent 7b6cbf3eaa
commit 4569b4fdb7
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
7 changed files with 14 additions and 7 deletions

View File

@ -19,6 +19,7 @@
#include "common/hacks.h"
#include "common/mm_io_x.h"
#include "common/mm_file_io.h"
#include "common/version.h"
#include "extract/xtr_avi.h"
xtr_avi_c::xtr_avi_c(const std::string &codec_id,
@ -63,7 +64,7 @@ xtr_avi_c::create_file(xtr_base_c *master,
std::string writing_app = "mkvextract";
if (!mtx::hacks::is_engaged(mtx::hacks::NO_VARIABLE_DATA))
writing_app += fmt::format(" {0}", PACKAGE_VERSION);
writing_app += fmt::format(" {0}", get_current_version().to_string());
m_avi->writing_app = safestrdup(writing_app.c_str());
char ccodec[5];

View File

@ -18,6 +18,7 @@
#include "common/mm_io_x.h"
#include "common/mm_file_io.h"
#include "common/translation.h"
#include "common/version.h"
static bool g_opt_checksum = false;
static bool g_opt_frame_headers = false;
@ -40,7 +41,7 @@ show_help() {
static void
show_version() {
mxinfo("ac3parser v" PACKAGE_VERSION "\n");
mxinfo(get_version_info("ac3parser") + "\n");
mxexit();
}

View File

@ -15,6 +15,7 @@
#include "common/bluray/mpls.h"
#include "common/command_line.h"
#include "common/mm_file_io.h"
#include "common/version.h"
static char const * const s_program_name = "bluray_dump";
@ -22,7 +23,7 @@ static void
setup(char const *argv0) {
mtx_common_init(s_program_name, argv0);
mtx::cli::g_version_info = fmt::format("{0} v{1}", s_program_name, PACKAGE_VERSION);
mtx::cli::g_version_info = get_version_info("bluray_dump");
mtx::cli::g_usage_text = fmt::format("{0} [options] input_file_name\n"
"\n"
"General options:\n"

View File

@ -16,6 +16,7 @@
#include "common/dirac.h"
#include "common/mm_file_io.h"
#include "common/translation.h"
#include "common/version.h"
static bool g_opt_checksum = false;
static bool g_opt_sequence_headers = false;
@ -154,7 +155,7 @@ show_help() {
static void
show_version() {
mxinfo("diracparser v" PACKAGE_VERSION "\n");
mxinfo(get_version_info("diracparser") + "\n");
mxexit();
}

View File

@ -22,6 +22,7 @@
#include "common/mm_file_io.h"
#include "common/strings/parsing.h"
#include "common/translation.h"
#include "common/version.h"
#include "element_info.h"
@ -81,7 +82,7 @@ show_help() {
static void
show_version() {
mxinfo("ebml_validator v" PACKAGE_VERSION "\n");
mxinfo(get_version_info("ebml_validator") + "\n");
mxexit();
}

View File

@ -14,6 +14,7 @@
#include "common/hevc_es_parser.h"
#include "common/mm_io_x.h"
#include "common/mm_file_io.h"
#include "common/version.h"
static void
show_help() {
@ -28,7 +29,7 @@ show_help() {
static void
show_version() {
mxinfo("hevc_dump v" PACKAGE_VERSION "\n");
mxinfo(get_version_info("hevc_dump") + "\n");
mxexit();
}

View File

@ -16,6 +16,7 @@
#include "common/mm_file_io.h"
#include "common/translation.h"
#include "common/vc1.h"
#include "common/version.h"
static bool g_opt_checksum = false;
static bool g_opt_entrypoints = false;
@ -275,7 +276,7 @@ show_help() {
static void
show_version() {
mxinfo("vc1parser v" PACKAGE_VERSION "\n");
mxinfo(get_version_info("vc1parser") + "\n");
mxexit();
}