JNIEXPORT void JNICALL Java_org_transterpreter_jeditwinsparkleplugin_JEditWinSparklePlugin_init (JNIEnv *env, jobject obj, jstring company, jstring app, jstring version, jstring url) { char c[1000], a[1000], v[1000], u[4000]; wchar_t wc[WIDE_LEN], wa[WIDE_LEN], wv[WIDE_LEN]; int len; memset(c, 0, 1000); memset(a, 0, 1000); memset(v, 0, 1000); memset(u, 0, 4000); memset(wc, 0, sizeof(wchar_t) * WIDE_LEN); memset(wa, 0, sizeof(wchar_t) * WIDE_LEN); memset(wv, 0, sizeof(wchar_t) * WIDE_LEN); len = env->GetStringLength(company); env->GetStringUTFRegion(company, 0, len, c); MultiByteToWideChar(CP_UTF8, 0, c, len, wc, WIDE_LEN); len = env->GetStringLength(app); env->GetStringUTFRegion(app, 0, len, a); MultiByteToWideChar(CP_UTF8, 0, a, len, wa, WIDE_LEN); len = env->GetStringLength(version); env->GetStringUTFRegion(version, 0, len, v); MultiByteToWideChar(CP_UTF8, 0, v, len, wv, WIDE_LEN); len = env->GetStringLength(url); env->GetStringUTFRegion(url, 0, len, u); win_sparkle_set_app_details(wc, wa, wv); win_sparkle_set_appcast_url(u); win_sparkle_init(); }
WinSparkleUpdater::WinSparkleUpdater( const QString& url ) { win_sparkle_set_appcast_url( url.toUtf8().data() ); win_sparkle_set_app_details( qApp->organizationName().toStdWString().c_str(), qApp->applicationName().toStdWString().c_str(), WIDEN(VERSION) ); win_sparkle_init(); }
void MainWindow::initWinSparkle() { // Setup updates feed. This must be done before win_sparkle_init(), but // could be also, often more conveniently, done using a VERSIONINFO Windows // resource. See the "psdk" example and its .rc file for an example of that // (these calls wouldn't be needed then). win_sparkle_set_appcast_url("http://winsparkle.org/example/appcast.xml"); win_sparkle_set_app_details(L"winsparkle.org", L"WinSparkle Qt Example", L"1.0"); // Initialize the updater and possibly show some UI win_sparkle_init(); }
WinLabexe::WinLabexe(QWidget *parent, Qt::WFlags flags) : GLabControlPanel(parent) { // that makes the code enter those respective dlls so that the workbenches get registered. LabExeImaging(); // LabExeOptimizing(); // Initialize WinSparkle as soon as the app itself is initialized, right before entering the event loop: win_sparkle_set_appcast_url("http://labexe.com/WinLabexe32AutoUpdate.xml"); wchar_t company_name[] = L"LabExe"; wchar_t app_name[] = L"WinLabexe"; wchar_t app_version[] = L"2.8.2"; win_sparkle_set_app_details(company_name, app_name, app_version); win_sparkle_init(); }
void MainWindow::initWinSparkle() { // Setup updates feed. This must be done before win_sparkle_init(), but // could be also, often more conveniently, done using a VERSIONINFO Windows // resource. See the "psdk" example and its .rc file for an example of that // (these calls wouldn't be needed then). win_sparkle_set_appcast_url("https://winsparkle.org/example/appcast.xml"); win_sparkle_set_app_details(L"winsparkle.org", L"WinSparkle Qt Example", L"1.0"); // Set DSA public key used to verify update's signature. // This is na example how to provide it from external source (i.e. from Qt // resource). See the "psdk" example and its .rc file for an example how to // provide the key using Windows resource. win_sparkle_set_dsa_pub_pem(reinterpret_cast<const char *>(QResource(":/pem/dsa_pub.pem").data())); // Initialize the updater and possibly show some UI win_sparkle_init(); }
static void app_init_sparkle() { win_sparkle_set_app_details(L"Andrey Tarantsov", L"LiveReload", TEXT(LIVERELOAD_VERSION)); win_sparkle_set_appcast_url("http://download.livereload.com/LiveReload-Windows-appcast.xml"); win_sparkle_set_registry_path("Software\\LiveReload\\Updates"); }