mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-12 03:28:58 +08:00
Merge pull request #626 from naxostech/StrDraco
Add version string output to cli tools. When -v is passed to draco_decoder or draco_encoder, the version is printed and the tool will exit.
This commit is contained in:
commit
359048ea86
@ -15,6 +15,7 @@
|
||||
#include <cinttypes>
|
||||
|
||||
#include "draco/compression/decode.h"
|
||||
#include "draco/core/draco_version.h"
|
||||
#include "draco/core/cycle_timer.h"
|
||||
#include "draco/io/file_utils.h"
|
||||
#include "draco/io/obj_encoder.h"
|
||||
@ -55,6 +56,9 @@ int main(int argc, char **argv) {
|
||||
if (!strcmp("-h", argv[i]) || !strcmp("-?", argv[i])) {
|
||||
Usage();
|
||||
return 0;
|
||||
} else if (!strcmp("-v", argv[i])) {
|
||||
printf("draco_decoder version: %s\n", draco::Version());
|
||||
return 0;
|
||||
} else if (!strcmp("-i", argv[i]) && i < argc_check) {
|
||||
options.input = argv[++i];
|
||||
} else if (!strcmp("-o", argv[i]) && i < argc_check) {
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <cstdlib>
|
||||
|
||||
#include "draco/compression/encode.h"
|
||||
#include "draco/core/draco_version.h"
|
||||
#include "draco/core/cycle_timer.h"
|
||||
#include "draco/io/file_utils.h"
|
||||
#include "draco/io/mesh_io.h"
|
||||
@ -195,6 +196,9 @@ int main(int argc, char **argv) {
|
||||
if (!strcmp("-h", argv[i]) || !strcmp("-?", argv[i])) {
|
||||
Usage();
|
||||
return 0;
|
||||
} else if (!strcmp("-v", argv[i])) {
|
||||
printf("draco_encoder version: %s\n", draco::Version());
|
||||
return 0;
|
||||
} else if (!strcmp("-i", argv[i]) && i < argc_check) {
|
||||
options.input = argv[++i];
|
||||
} else if (!strcmp("-o", argv[i]) && i < argc_check) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user