Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Updater package
Re: Updater package [message #30865 is a reply to message #30692] Tue, 25 January 2011 23:19 Go to previous messageGo to previous message
mdelfede is currently offline  mdelfede
Messages: 1308
Registered: September 2007
Ultimate Contributor
Well, finally the Updater is running ok on both Linux and Windows.
It should work from Xp to Windows7 and in most Linux flavours.
Here a sample code :

GUI_APP_MAIN
{
	Updater updater;
	updater
		// accept 1.6 as maximum downloadable version
		.SetMaxVersion(1.6)
		
		// setup web root for program downloads
		.SetWebRoot("www.timberstruct.com/webupdater/updatertest")
		
		// ask for updates on launch
		.UpdateManual()
		
		// program menu goes in "Office" cathegory
		// (Linux only by now, no harm on windows)
		.SetCathegory("Office")
		
		// helper comment for application
		// (shows in associated files properties)
		.SetComment("A sample test program")
		
		// associates .xxx and .yyy extensions to this application
		// and sets application icons for this files
		.SetExtensions(Vector<String>() << "*.xxx" << "*.yyy")
		
		// setup the icon for application
		// (here Updater default icon)
		.SetIcon(updater.DefaultIcon())
		
		// we want a desktop icon too
		.DesktopIcon();
	
	// run updater -- DON'T change this !
	if(!updater.Run())
		return;
	
	// run the default prompts -- see Updater source code
	// if you need some fine-grained control
	if(!updater.DefaultPrompts())
		return;
	
	// here the rest of your application......
	PromptOK("App version is 1.0");

}


As you can see, the Installer/Updater is completely transparent to your code; it's enough to add above lines just after GUI_APP_MAIN and setup a web repository (instruction on first post)... That's all. Once run your application will install itself and on each run will check the webserver for updates, installing them on requests.
It handles file associations, icons and menu items, uninstaller (windows) and does a complete system cleanup on uninstall.

It would be trivial to add installation of data files if requested, but for now it's enough Smile

Ciao

Max
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: User configurable menu system
Next Topic: XMLMenu - User configurable menu system - completed
Goto Forum:
  


Current Time: Sun Jul 06 22:15:49 CEST 2025

Total time taken to generate the page: 0.03070 seconds