On 2015-10-03 19:30, Bo Berglund wrote: > But how could one exchange a running program on the pi from within > itself?
On non-Windows platforms it is much easier, because you can normally replace a program on file, while it is running in memory. Windows doesn't allow that. Either way the solution is quite simple for most platforms. tiOPF's 'tiopf_apps' repository includes one such solution. In summary, the program checks for updates at startup - using HTTP, a database or whatever. If a update exists, launch the update program and quit. The update program will then fetch the update, and unpack the archive, then launch the original program and quit itself. For our desktop applications will added a message prompt to ask the end-user if the want to update, but for a automated system you obviously don't want that part. This solution has worked for us in production site for a good few years already. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal