2015-12-16 13 views
7

मैं वर्तमान में क्यूटी इंस्टॉलर फ्रेमवर्क का उपयोग कर रहा हूं और एक ऑनलाइन भंडार स्थापित करने में कामयाब रहा हूं। मैं क्या जानना चाहता हूं:क्यूटी इंस्टॉलर फ्रेमवर्क: ऑटो अपडेट

क्या फ्रेमवर्क किसी प्रकार का "ऑटो-अपडेट" तंत्र प्रदान करता है, उदाहरण के लिए एक प्लगइन/सेवा जो प्रोग्राम/सिस्टम शुरू होने पर हर बार अपडेट के लिए जांचती है?
अपडेट के लिए जांच पर्याप्त होगी, क्योंकि स्थापना स्वयं रखरखाव उपकरण का उपयोग करके किया जा सकता है।

अंतिम उपयोगकर्ता प्रारंभिक स्थापना के बाद सर्वर से अतिरिक्त घटक स्थापित करने के लिए, साथ ही रखरखाव उपकरण का उपयोग कर सकते हैं के रूप में स्वत: अद्यतन प्राप्त करते हैं:

सभी मैं इस विषय के बारे में मिल सकता है इस छोटे से वाक्य था जैसे ही सर्वर पर अद्यतन प्रकाशित होते हैं, सामग्री के लिए।

यहां से: http://doc.qt.io/qtinstallerframework/ifw-overview.html#choosing-installer-type

आपकी मदद के लिए धन्यवाद!

संपादित करें: सुझाव
इस सवाल के स्वीकार किए जाते हैं answere के आधार पर मैं अपने आप संस्थापक ढांचे का उपयोग कर अद्यतन के लिए जाँच करने के लिए एक छोटा सा पुस्तकालय बनाया - https://github.com/Skycoder42/QtAutoUpdater

+0

आप [मेंडेली/अपडेट-इंस्टालर] (https://github.com/Mendeley/Update-Installer) दिलचस्प पा सकते हैं। –

उत्तर

13

मैं क्या करता हूं, QProcess का उपयोग करके रखरखाव उपकरण चलाता है, और फिर आउटपुट की जांच करता है। इसमें एक मोड है जहां यह जीयूआई नहीं चलाता है, लेकिन उपलब्ध होने पर केवल अद्यतन जानकारी आउटपुट करता है।

ध्यान दें कि जब मैं अनुप्रयोग शुरू करता हूं तो मैं कार्यशील निर्देशिका को कार्य पथ पर सेट करता हूं, इसलिए मैं केवल maintainenancetool चला सकता हूं।

QProcess process; 
process.start("maintenancetool --checkupdates"); 

// Wait until the update tool is finished 
process.waitForFinished(); 

if(process.error() != QProcess::UnknownError) 
{ 
    qDebug() << "Error checking for updates"; 
    return false; 
} 

// Read the output 
QByteArray data = process.readAllStandardOutput(); 

// No output means no updates available 
// Note that the exit code will also be 1, but we don't use that 
// Also note that we should parse the output instead of just checking if it is empty if we want specific update info 
if(data.isEmpty()) 
{ 
    qDebug() << "No updates available"; 
    return false; 
} 

// Call the maintenance tool binary 
// Note: we start it detached because this application need to close for the update 
QStringList args("--updater"); 
bool success = QProcess::startDetached("maintenancetool", args); 

// Close the application 
qApp->closeAllWindows(); 
0

वहाँ इसे कैसे करना के बारे में गाइड में एक खंड है, लेकिन वे ऑटो अपडेट, IFW Updates on doc.qt.io के बजाय अपडेट को बढ़ावा देने कहते हैं।

+0

मैंने इसे देखा, लेकिन यदि मैं सही समझता हूं, तो उपयोगकर्ता को उन अपडेट प्राप्त करने के लिए Maintटेनसूल चलाने की आवश्यकता होगी? – Felix

संबंधित मुद्दे