Skip to content

Commit

Permalink
Add version info, WiP #72
Browse files Browse the repository at this point in the history
  • Loading branch information
vmdocua committed Jan 31, 2024
1 parent 4ddb10c commit 81f9141
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ jobs:
working-directory: Capture

- name: Test "reprostim-videocapture -h"
run: ./reprostim-videocapture -h
run: |
./reprostim-videocapture -V
./reprostim-videocapture -h
working-directory: Capture/build/videocapture

- name: Test "reprostim-screencapture -h"
run: ./reprostim-screencapture -h
run: |
./reprostim-screencapture -V
./reprostim-screencapture -h
working-directory: Capture/build/screencapture
5 changes: 5 additions & 0 deletions Capture/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ set(CAPTURE_VERSION_PATCH 0)
set(CAPTURE_VERSION_BUILD 1)
set(CAPTURE_VERSION_STRING "${CAPTURE_VERSION_MAJOR}.${CAPTURE_VERSION_MINOR}.${CAPTURE_VERSION_PATCH}.${CAPTURE_VERSION_BUILD}")
string(TIMESTAMP CAPTURE_VERSION_DATE "%Y-%m-%d %H:%M:%S")
execute_process(
COMMAND git describe --tags --always
OUTPUT_VARIABLE CAPTURE_VERSION_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
)

# ARCH:=$(shell uname -m)
set(ARCH x64)
Expand Down
1 change: 1 addition & 0 deletions Capture/capturelib/include/CaptureVer.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
#define CAPTURE_VERSION_BUILD ${CAPTURE_VERSION_BUILD}
#define CAPTURE_VERSION_STRING "${CAPTURE_VERSION_STRING}"
#define CAPTURE_VERSION_DATE "${CAPTURE_VERSION_DATE}"
#define CAPTURE_VERSION_TAG "${CAPTURE_VERSION_TAG}"

#endif //CAPTURE_CAPTUREVER_H
3 changes: 2 additions & 1 deletion Capture/capturelib/src/CaptureApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ namespace reprostim {

void CaptureApp::printVersion() {
_INFO(appName << " " << CAPTURE_VERSION_STRING);
_INFO(" Build date " << CAPTURE_VERSION_DATE);
_INFO(" Build Date : " << CAPTURE_VERSION_DATE);
_INFO(" Build Tag : " << CAPTURE_VERSION_TAG);
}

int CaptureApp::run(int argc, char* argv[]) {
Expand Down

0 comments on commit 81f9141

Please sign in to comment.