Commit f4f9aca8229227c6059d24e4c6ac03cb67f6d087
1 parent
61d7682c
Exists in
master
TODO: Pegar nome do computador e a versão (que tem que acrescentar também) do agente
Showing
2 changed files
with
16 additions
and
3 deletions
Show diff stats
install-cacic/installcacic.cpp
| ... | ... | @@ -58,10 +58,21 @@ void InstallCacic::run(QStringList argv, int argc) { |
| 58 | 58 | //TO DO: Fazer download do serviço |
| 59 | 59 | #ifdef Q_OS_WIN |
| 60 | 60 | oCacicComm->ftpDownload("agentes/cacic.exe"); |
| 61 | - QString exitStatus = oCacic.startProcess(oCacic.getCacicMainFolder() + "cacic.exe", false, &ok, QStringList("-install")); | |
| 61 | + | |
| 62 | + QString exitStatus = oCacic.startProcess(oCacic.getCacicMainFolder() + "cacic.exe", | |
| 63 | + false, | |
| 64 | + &ok, | |
| 65 | + QStringList("-install"); | |
| 62 | 66 | #else |
| 63 | 67 | oCacicComm->ftpDownload("agentes/cacic"); |
| 64 | - QString exitStatus = oCacic.startProcess(oCacic.getCacicMainFolder() + "cacic", false, &ok, QStringList("-install")); | |
| 68 | + QString exitStatus = oCacic.startProcess(oCacic.getCacicMainFolder() + "cacic", | |
| 69 | + false, | |
| 70 | + &ok, | |
| 71 | + QStringList("-install", | |
| 72 | + "cacic", | |
| 73 | + !configs["reply"].toObject()["te_senha_adm_agente"].isNull() ? | |
| 74 | + configs["reply"].toObject()["te_senha_adm_agente"].toString : | |
| 75 | + "ADMINCACIC"); | |
| 65 | 76 | #endif |
| 66 | 77 | if (!ok) |
| 67 | 78 | std::cout << "Erro ao iniciar o processo: " |
| ... | ... | @@ -70,7 +81,7 @@ void InstallCacic::run(QStringList argv, int argc) { |
| 70 | 81 | std::cout << "Instalação realizada com sucesso."; |
| 71 | 82 | } |
| 72 | 83 | } else { |
| 73 | - std::cout << "Falha ao pegar configurações: " << configs["error"].toString(); | |
| 84 | + std::cout << "Falha ao pegar configurações: " << configs["error"].toString().toStdString(); | |
| 74 | 85 | } |
| 75 | 86 | |
| 76 | 87 | } else | ... | ... |
src/cacic_computer.cpp
| ... | ... | @@ -53,6 +53,8 @@ QJsonObject CACIC_Computer::toJsonObject() |
| 53 | 53 | count++; |
| 54 | 54 | } |
| 55 | 55 | json["networkDevices"] = network; |
| 56 | + json["nmComputador"] = QJsonValue::fromVariant(QString("TODO")); | |
| 57 | + json["versaoAgente"] = QJsonValue::fromVariant(QString("TODO")); | |
| 56 | 58 | return json; |
| 57 | 59 | } |
| 58 | 60 | ... | ... |