Commit 47b57a4c authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

Move version info to help

Fix #2
parent 54fe7416
......@@ -4,7 +4,7 @@ CMAKE := cmake
build: dserial-protocol/Readme.md build-dserial-server/Makefile
cd build-dserial-server && make qmake && make
rm -rf build-dserial-cli && mkdir -p build-dserial-cli && cd build-dserial-cli && $(CMAKE) ../dserial-cli/ && make
mkdir -p build-dserial-cli && cd build-dserial-cli && $(CMAKE) ../dserial-cli/ && make
build-dserial-server/Makefile: dserial-server/Readme.md
mkdir -p build-dserial-server && cd build-dserial-server && $(QMAKE) ../dserial-server/dserial-server.pro
......
project("dserial-cli" C)
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.0.2)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/vala)
......@@ -32,14 +32,6 @@ set(VALA_FILES
src/commands/WriteCommand.vala
)
vala_precompile(VALA_C
${VALA_FILES}
PACKAGES
readline
gio-2.0
posix
)
find_package(PkgConfig)
pkg_check_modules(GOBJECT REQUIRED gobject-2.0)
add_definitions(${GOBJECT_CFLAGS} ${GOBJECT_CFLAGS_OTHER})
......@@ -48,8 +40,17 @@ link_directories(${GOBJECT_LIBRARY_DIRS})
link_libraries(readline gio-2.0)
set(CMAKE_C_FLAGS "-g")
vala_precompile(VALA_C
${VALA_FILES}
PACKAGES
readline
gio-2.0
posix
OPTIONS
-g
)
add_executable("dserial" ${VALA_C})
install(TARGETS dserial
RUNTIME DESTINATION bin)
......@@ -26,6 +26,10 @@ public class HelpCommand : Object, Command
if(args.length == 0) {
if(!state.interactive)
stdout.printf("dserial <command> [arguments]\n\n");
stdout.printf("dserial: Serial communication program\n");
stdout.printf("License: GPL3+\n");
stdout.printf("Version: 0.5.2\t\t\tServer version: %s\n",Serial.get_server_version());
stdout.printf("\n");
stdout.printf("Available commands:\n");
stdout.printf("interactive\t\t\tEnters interactive session.\n");
stdout.printf("help\t\t\t\tDisplays this help\n");
......
......@@ -75,7 +75,6 @@ public class InteractiveCommand : Object, Command
state.interactive = true;
stdout.printf("dserial: Serial communication program\n");
stdout.printf("License: GPL3+\n");
stdout.printf("Version: 0.5.1\t\t\tServer version: %s\n",Serial.get_server_version());
stdout.printf("Write help for help\n");
Readline.History.read(Environment.get_variable("HOME")+"/.dserial-history");
Readline.attempted_completion_function = readline_completion;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment