Commit 5d3ce900711edd0b71fd379884cb60f4a3c3ca36

Authored by Eli de Faria Junior
1 parent 4533c5c4
Exists in master

refactoring

cacic-daemon/cacicD/cacicD.pro
... ... @@ -8,43 +8,42 @@ QT += core
8 8 QT -= gui
9 9 QT += network
10 10  
11   -TARGET = cacic-service
12   -CONFIG += console
13   -CONFIG -= app_bundle
14   -CONFIG += static
  11 +TARGET = cacic-service
  12 +CONFIG += console
  13 +CONFIG -= app_bundle
  14 +CONFIG += static
  15 +TEMPLATE = app
  16 +INCLUDEPATH += ../../src \
  17 + ../../src/crypto++/include/
  18 +
15 19 win32 {
16   - LIBS += -LE:\LightBase\cacic-agente-project\cacic-agente\src\crypto++\lib -lcryptopp
17   - QT += axcontainer
  20 + LIBS += -LE:\LightBase\cacic-agente-project\cacic-agente\src\crypto++\lib -lcryptopp
  21 + QT += axcontainer
18 22 } else {
19   - LIBS += -L/usr/lib -lcryptopp
  23 + LIBS += -L/usr/lib -lcryptopp
20 24 }
21   -TEMPLATE = app
22   -
23   -SOURCES += main.cpp \
24   - cacicd.cpp \
25   - cacictimer.cpp \
26   - cacicthread.cpp \
27   - ../../src/cacic_comm.cpp \
28   - ../../src/ccacic.cpp \
29   - ../../src/wmi.cpp \
30   - ../../src/cacic_computer.cpp \
31   - ../../src/operatingsystem.cpp \
32   - ../../src/QLogger.cpp \
33   -
34   -
35   -HEADERS += cacicd.h \
36   - cacictimer.h \
37   - cacicthread.h \
38   - ../../src/ccacic.h \
39   - ../../src/wmi.h \
40   - ../../src/cacic_computer.h \
41   - ../../src/operatingsystem.h \
42   - ../../src/cacic_comm.h \
43   - ../../src/QLogger.h \
44 25  
  26 +SOURCES += main.cpp \
  27 + cacicd.cpp \
  28 + cacictimer.cpp \
  29 + cacicthread.cpp \
  30 + ../../src/cacic_comm.cpp \
  31 + ../../src/ccacic.cpp \
  32 + ../../src/wmi.cpp \
  33 + ../../src/cacic_computer.cpp \
  34 + ../../src/operatingsystem.cpp \
  35 + ../../src/QLogger.cpp
  36 +
  37 +
  38 +HEADERS += cacicd.h \
  39 + cacictimer.h \
  40 + cacicthread.h \
  41 + ../../src/ccacic.h \
  42 + ../../src/wmi.h \
  43 + ../../src/cacic_computer.h \
  44 + ../../src/operatingsystem.h \
  45 + ../../src/cacic_comm.h \
  46 + ../../src/QLogger.h
45 47  
46 48 include(../../src/qtservice/src/qtservice.pri)
47 49  
48   -INCLUDEPATH += ../../src \
49   - ../../src/crypto++/include/
50   -
... ...
install-cacic/installcacic.cpp
... ... @@ -57,11 +57,11 @@ void InstallCacic::run(QStringList argv, int argc) {
57 57  
58 58 //TO DO: Fazer download do serviço
59 59 #ifdef Q_OS_WIN
60   - oCacicComm->ftpDownload("agentes/cacic.exe");
61   - QString exitStatus = oCacic.startProcess(oCacic.getCacicMainFolder() + "cacic.exe", false, &ok, QStringList("-install"));
  60 + oCacicComm->ftpDownload("agentes/cacic-service.exe");
  61 + QString exitStatus = oCacic.startProcess(oCacic.getCacicMainFolder() + "cacic-service.exe", false, &ok, QStringList("-install"));
62 62 #else
63   - oCacicComm->ftpDownload("agentes/cacic");
64   - QString exitStatus = oCacic.startProcess(oCacic.getCacicMainFolder() + "cacic", false, &ok, QStringList("-install"));
  63 + oCacicComm->ftpDownload("agentes/cacic-service");
  64 + QString exitStatus = oCacic.startProcess(oCacic.getCacicMainFolder() + "cacic-service", false, &ok, QStringList("-install"));
65 65 #endif
66 66 if (!ok)
67 67 std::cout << "Erro ao iniciar o processo: "
... ... @@ -70,7 +70,7 @@ void InstallCacic::run(QStringList argv, int argc) {
70 70 std::cout << "Instalação realizada com sucesso.";
71 71 }
72 72 } else {
73   - std::cout << "Falha ao pegar configurações: " << configs["error"].toString();
  73 + std::cout << "Falha ao pegar configurações: " << configs["error"].toString().toStdString();
74 74 }
75 75  
76 76 } else
... ...