Skip to content
Snippets Groups Projects
Commit 47b57a4c authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

Move version info to help

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