version info also for client, still cmake to do
This commit is contained in:
@@ -179,7 +179,8 @@ CORESRCS = uart/uart_posix.c \
|
||||
scandir.c \
|
||||
crc16.c \
|
||||
crc32.c \
|
||||
comms.c
|
||||
comms.c \
|
||||
version.c
|
||||
|
||||
CMDSRCS = crapto1/crapto1.c \
|
||||
crapto1/crypto1.c \
|
||||
@@ -308,7 +309,7 @@ CMDOBJS = $(CMDSRCS:%.c=$(OBJDIR)/%.o)
|
||||
OBJCOBJS = $(OBJCSRCS:%.m=$(OBJDIR)/%.o)
|
||||
|
||||
BINS = proxmark3
|
||||
CLEAN = $(BINS) src/*.moc.cpp src/ui/ui_overlays.h lualibs/pm3_cmd.lua lualibs/mfc_default_keys.lua
|
||||
CLEAN = $(BINS) src/version.c src/*.moc.cpp src/ui/ui_overlays.h lualibs/pm3_cmd.lua lualibs/mfc_default_keys.lua
|
||||
# transition: cleaning also old path stuff
|
||||
CLEAN += flasher *.moc.cpp ui/ui_overlays.h
|
||||
|
||||
@@ -426,6 +427,11 @@ zlib:
|
||||
|
||||
.PHONY: all clean install uninstall tarbin liblua jansson tinycbor reveng hardnested amiibo cliparser whereami mbedtls zlib
|
||||
|
||||
# version.c should be remade on every compilation
|
||||
src/version.c: default_version.c
|
||||
$(info [=] GEN $@)
|
||||
$(Q)sh ../tools/mkversion.sh > $@ || perl ../tools/mkversion.pl > $@ || $(CP) $^ $@
|
||||
|
||||
# easy printing of MAKE VARIABLES
|
||||
print-%: ; @echo $* = $($*)
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "ui.h"
|
||||
#include "cmdhw.h"
|
||||
#include "cmddata.h"
|
||||
#include "commonutil.h"
|
||||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
@@ -688,7 +689,9 @@ void pm3_version(bool verbose, bool oneliner) {
|
||||
|
||||
if (oneliner) {
|
||||
// For "proxmark3 -v", simple printf, avoid logging
|
||||
printf("Client: RRG/Iceman compiled with " PM3CLIENTCOMPILER __VERSION__ PM3HOSTOS PM3HOSTARCH "\n");
|
||||
char temp[PM3_CMD_DATA_SIZE - 12]; // same limit as for ARM image
|
||||
FormatVersionInformation(temp, sizeof(temp), "Client: ", &version_information);
|
||||
printf("%s compiled with " PM3CLIENTCOMPILER __VERSION__ PM3HOSTOS PM3HOSTARCH "\n", temp);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -701,9 +704,11 @@ void pm3_version(bool verbose, bool oneliner) {
|
||||
SendCommandNG(CMD_VERSION, NULL, 0);
|
||||
|
||||
if (WaitForResponseTimeout(CMD_VERSION, &resp, 1000)) {
|
||||
char temp[PM3_CMD_DATA_SIZE - 12]; // same limit as for ARM image
|
||||
PrintAndLogEx(NORMAL, "\n " _YELLOW_("[ Proxmark3 RFID instrument ]"));
|
||||
PrintAndLogEx(NORMAL, "\n " _YELLOW_("[ CLIENT ]"));
|
||||
PrintAndLogEx(NORMAL, " client: RRG/Iceman"); // TODO version info?
|
||||
FormatVersionInformation(temp, sizeof(temp), " client: ", &version_information);
|
||||
PrintAndLogEx(NORMAL, "%s", temp);
|
||||
PrintAndLogEx(NORMAL, " compiled with " PM3CLIENTCOMPILER __VERSION__ PM3HOSTOS PM3HOSTARCH);
|
||||
|
||||
if (IfPm3Flash() == false && IfPm3Smartcard() == false && IfPm3FpcUsartHost() == false) {
|
||||
|
||||
Reference in New Issue
Block a user