Making updates and mods to c++ apps

390 views Asked by At

I am pretty new to c++, so this is going to be a VERY big rookie question.

Lets say I want to make an update to my app, like adding a new function to a class, adding a new class, or just changing some code to improve the app. The IDE is use(Visual Studios) builds my code into a single .exe file. But when I want to make an update to the code, I have to rebuild the whole application. This is bad because when I distribute my app, then want to update it, I have to send everyone with my app an updated version of the .exe file, and that will use up a lot of memory. Is there any way for my .exe file to update without having to download the whole code, or a specific way I should distribute it so it is easy to update and mod?

1

There are 1 answers

0
myss On

If you wish to update .exe you'll need to rebuild it, and send clients that version, only compiler can merge code on binary level safely. But even several dozen thousands of code don't take up a lot of space, so I assume you're having some resources that use a lot of space. Split them into .dll library and ship once, your .exe will be faster and smaller. If by any case you have a lot of code, and only part needs to be updated, you can add functions/classes into another .dll aswel, mark them as extern 'C', calling them from your program and easily replace when needed.

Making some autoupdater isn't a bad idea aswel, eventually you'll get tired of sending files manually each time.