Start ATBUpdateSync
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
QT += core
 | 
					QT += core
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TARGET = update_sync_cust_repo
 | 
					TARGET = ATBUpdateSync
 | 
				
			||||||
 | 
					
 | 
				
			||||||
VERSION="1.0.0"
 | 
					VERSION="1.0.0"
 | 
				
			||||||
win32 {
 | 
					win32 {
 | 
				
			||||||
@@ -64,9 +64,19 @@ contains( CONFIG, DesktopLinux ) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SOURCES += \
 | 
					SOURCES += \
 | 
				
			||||||
        main.cpp
 | 
					        main.cpp \
 | 
				
			||||||
 | 
					        message_handler.cpp \
 | 
				
			||||||
 | 
					        ../common/src/utils_internal.cpp \
 | 
				
			||||||
 | 
					        ../common/src/command.cpp \
 | 
				
			||||||
 | 
					        sync_command.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# HEADERS += \
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HEADERS += \
 | 
				
			||||||
 | 
					        message_handler.h \
 | 
				
			||||||
 | 
					        ../common/include/utils_internal.h \
 | 
				
			||||||
 | 
					        ../common/include/command.h \
 | 
				
			||||||
 | 
					        sync_command.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##########################################################################################
 | 
					##########################################################################################
 | 
				
			||||||
# for running program on target through QtCreator
 | 
					# for running program on target through QtCreator
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,28 @@
 | 
				
			|||||||
#include <QDir>
 | 
					#include <QDir>
 | 
				
			||||||
#include <QDebug>
 | 
					#include <QDebug>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "message_handler.h"
 | 
				
			||||||
 | 
					#include "utils_internal.h"
 | 
				
			||||||
 | 
					#include "sync_command.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main(int argc, char **argv) {
 | 
					int main(int argc, char **argv) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QByteArray const value = qgetenv("LC_ALL");
 | 
				
			||||||
 | 
					    if (value.isEmpty() || value != "C") {
 | 
				
			||||||
 | 
					        qputenv("LC_ALL", "C");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    openlog("ATB-UPDATE-SYNC", LOG_PERROR | LOG_PID | LOG_CONS, LOG_USER);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QCoreApplication a(argc, argv);
 | 
				
			||||||
 | 
					    QCoreApplication::setApplicationName("ATBUpdateSync");
 | 
				
			||||||
 | 
					    QCoreApplication::setApplicationVersion(APP_VERSION);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!messageHandlerInstalled()) { // change internal qt-QDebug-handling
 | 
				
			||||||
 | 
					        atbInstallMessageHandler(nullptr);
 | 
				
			||||||
 | 
					        //atbInstallMessageHandler(atbDebugOutput);
 | 
				
			||||||
 | 
					        setDebugLevel(LOG_NOTICE);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,6 +26,10 @@ namespace internal {
 | 
				
			|||||||
    static constexpr const char *UPDATE_DC_FIRMARE_SUCCESS{"success"};
 | 
					    static constexpr const char *UPDATE_DC_FIRMARE_SUCCESS{"success"};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    static constexpr const char *OPKG_MARKER{"<OPKG>"};
 | 
					    static constexpr const char *OPKG_MARKER{"<OPKG>"};
 | 
				
			||||||
 | 
					    static constexpr const char *SYNC_MARKER{"<SYNC>"};
 | 
				
			||||||
 | 
					    static constexpr const char *DC_MARKER{"<DC>"};
 | 
				
			||||||
 | 
					    static constexpr const char *GIT_MARKER{"<GIT>"};
 | 
				
			||||||
 | 
					    static constexpr const char *ISMAS_MARKER{"<ISMAS>"};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int read1stLineOfFile(QString fileName);
 | 
					    int read1stLineOfFile(QString fileName);
 | 
				
			||||||
    QString customerRepoRoot();
 | 
					    QString customerRepoRoot();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user