I asked this question in a more general design context before. Now, I'd like to talk about the specifics.
Imagine that I have app.exe
running. It downloads update.exe
into the same folder. How would app.exe
copy update.exe
over the contents of app.exe
? I am asking specifically in a C++ context. Do I need some kind of 3rd mediator app? Do I need to worry about file-locking? What is the most robust approach to a binary updating itself (barring obnoxious IT staff having extreme file permissions)? Ideally, I'd like to see portable solutions (Linux + OSX), but Windows is the primary target.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…