mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 00:19:55 +02:00
added build signature reporting
This commit is contained in:
@@ -70,6 +70,7 @@ unix {
|
||||
QMAKE_CFLAGS_RELEASE += -Wno-unused-parameter
|
||||
QMAKE_CXXFLAGS_DEBUG += -Wno-unused-parameter
|
||||
QMAKE_CXXFLAGS_RELEASE += -Wno-unused-parameter
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +78,10 @@ win32 {
|
||||
CONFIG -= debug
|
||||
}
|
||||
|
||||
FWB_SIG = $$(FWB_SIG)
|
||||
if (isEmpty(FWB_SIG)) { FWB_SIG=26932 }
|
||||
DEFINES += FWB_SIG=$$FWB_SIG
|
||||
|
||||
exists(qmake2.inc) {
|
||||
include(qmake2.inc)
|
||||
}
|
||||
|
||||
+10
-12
@@ -102,26 +102,24 @@ bool HttpGet::get(const QUrl &_url)
|
||||
|
||||
QString locale = QLocale::system().name();//"en_US";//
|
||||
|
||||
QString agent = QString("fwbuilder/%1 (").arg(VERSION);
|
||||
|
||||
QString os;
|
||||
#if defined(Q_WS_MAC)
|
||||
agent += "MacOSX; ";
|
||||
os = "MacOSX";
|
||||
#else
|
||||
#if defined(Q_WS_WIN)
|
||||
agent += "Windows; ";
|
||||
os= "Windows";
|
||||
#else
|
||||
agent += QString("%1; %2; ").arg(OS).arg(DISTRO);
|
||||
os = QString("%1; %2").arg(OS).arg(DISTRO);
|
||||
#endif
|
||||
#endif
|
||||
agent += locale;
|
||||
agent += QString("; b:%1; ").arg(build_num);
|
||||
|
||||
QString reg = "u";
|
||||
#ifdef ELC
|
||||
if (getRegistrationStatus()==2) agent += "r";
|
||||
else agent += "u";
|
||||
#else
|
||||
agent += "u";
|
||||
if (getRegistrationStatus()==2) reg = "r";
|
||||
#endif
|
||||
agent += ")";
|
||||
|
||||
QString agent = QString("fwbuilder/%1 (%2; %3; b:%4; s:%5; %6)")
|
||||
.arg(VERSION).arg(os).arg(locale).arg(build_num).arg(sig).arg(reg);
|
||||
|
||||
hdr.setValue("User-Agent", agent);
|
||||
request_id = http.request(hdr, NULL, &strm);
|
||||
|
||||
@@ -54,6 +54,7 @@ extern std::string ee;
|
||||
extern int fwbdebug;
|
||||
extern QString build_num;
|
||||
extern QString user_name;
|
||||
extern int sig;
|
||||
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ int fwbdebug = 0;
|
||||
bool safemode = false;
|
||||
bool cli_print = false;
|
||||
QString cli_print_fwname = "";
|
||||
|
||||
int sig = FWB_SIG;
|
||||
|
||||
void usage()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user