remove remote_console
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
message(STATUS "Building picloud")
|
||||
list(APPEND PIP_UTILS_LIST "picloud")
|
||||
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||
file(GLOB CPPS "*.cpp")
|
||||
file(GLOB HDRS "*.h")
|
||||
add_executable(picloud ${CPPS} ${HDRS})
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
message(STATUS "Building pip_cmg")
|
||||
list(APPEND PIP_UTILS_LIST "pip_cmg")
|
||||
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||
import_version(pip_cmg pip)
|
||||
set_deploy_property(pip_cmg
|
||||
LABEL "PIP code model generator"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
message(STATUS "Building picrypt")
|
||||
list(APPEND PIP_UTILS_LIST "picrypt")
|
||||
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||
add_executable(picrypt "main.cpp")
|
||||
target_link_libraries(picrypt pip pip_crypt)
|
||||
if (DEFINED LIB)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
message(STATUS "Building deploy_tool")
|
||||
list(APPEND PIP_UTILS_LIST "deploy_tool")
|
||||
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||
import_version(deploy_tool pip)
|
||||
set_deploy_property(deploy_tool
|
||||
LABEL "PIP deploy tool"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
message(STATUS "Building pip_remote_console")
|
||||
add_executable(pip_remote_console "main.cpp")
|
||||
target_link_libraries(pip_remote_console pip pip_console)
|
||||
if (DEFINED LIB)
|
||||
install(TARGETS pip_remote_console DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
endif ()
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Remote console viewer
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pip.h"
|
||||
|
||||
void key_event(PIKbdListener::KeyEvent key, void * );
|
||||
|
||||
PIConsole console(false, key_event);
|
||||
PIStringList as;
|
||||
bool selected = false;
|
||||
|
||||
void key_event(PIKbdListener::KeyEvent key, void * ) {
|
||||
if (key.key < '1' || key.key > '9') return;
|
||||
int ind = key.key - '1';
|
||||
if (ind < 0 || ind >= as.size_s()) return;
|
||||
selected = true;
|
||||
console.connectToServer(as[ind]);
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
console.enableExitCapture();
|
||||
console.listenServers();
|
||||
while (!PIKbdListener::exiting) {
|
||||
msleep(200);
|
||||
if (selected) break;
|
||||
console.clearScreen();
|
||||
as = console.availableServers();
|
||||
if (as.isEmpty()) {
|
||||
piCout << "No servers are available!";
|
||||
} else {
|
||||
piCout << "Select one with numeric key:";
|
||||
for (int i = 0; i < as.size_s(); ++i)
|
||||
piCout << (i + 1) << as[i];
|
||||
}
|
||||
}
|
||||
if (!selected) return 0;
|
||||
piCout << "Connecting to" << console.selectedServer() << "...";
|
||||
while (!PIKbdListener::exiting) {
|
||||
msleep(20);
|
||||
if (console.isConnected())
|
||||
break;
|
||||
}
|
||||
if (PIKbdListener::exiting)
|
||||
return 0;
|
||||
console.start();
|
||||
console.waitForFinish();
|
||||
};
|
||||
@@ -1,4 +1,5 @@
|
||||
message(STATUS "Building pip_rc")
|
||||
list(APPEND PIP_UTILS_LIST "pip_rc")
|
||||
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||
import_version(pip_rc pip)
|
||||
set_deploy_property(pip_rc
|
||||
LABEL "PIP resources compiler"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
message(STATUS "Building pisd")
|
||||
list(APPEND PIP_UTILS_LIST "pisd")
|
||||
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||
file(GLOB CPPS "*.cpp")
|
||||
file(GLOB HDRS "*.h")
|
||||
add_executable(pisd ${CPPS} ${HDRS})
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
message(STATUS "Building pip_system_test")
|
||||
list(APPEND PIP_UTILS_LIST "pip_system_test")
|
||||
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||
add_executable(pip_system_test "main.cpp")
|
||||
target_link_libraries(pip_system_test pip)
|
||||
if (DEFINED LIB)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
message(STATUS "Building pift")
|
||||
list(APPEND PIP_UTILS_LIST "pift")
|
||||
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||
add_executable(pift "main.cpp")
|
||||
target_link_libraries(pift pip pip_console)
|
||||
if (DEFINED LIB)
|
||||
|
||||
Reference in New Issue
Block a user