Resolved Sequential Download System

melihxrist

Member
Joined
Aug 31, 2023
Messages
13
Location
Turkey
Programming Experience
3-5
Hello, everything about my launcher is complete, I only have 1 problem left. My update system is done through version control. For example, if my version value is 1 and I have 3 update packages, I need to set the version on the server side to 3. But when I make version 3, my update only downloads the 3rd update package. I want it to download the packages I want from 1 to 3. It should go down to 1,2,3 and update each one as an update. With which feature can I do it?
 
Without seeing your code for you how you determine that an update is available and how you download updates, it's really hard for us to help you except talk at a high level.

For example, the only possible response for your query above would be: "There is no built in feature. You would need to iterate over the versions available on the server starting with the lowest version that is higher than what is currently installed on the machine. There is no black magic voodoo around it."

Moving this out of WinForms, since there is nothing WinForms specific about this question.
 
Without seeing your code for you how you determine that an update is available and how you download updates, it's really hard for us to help you except talk at a high level.

For example, the only possible response for your query above would be: "There is no built in feature. You would need to iterate over the versions available on the server starting with the lowest version that is higher than what is currently installed on the machine. There is no black magic voodoo around it."

Moving this out of WinForms, since there is nothing WinForms specific about this question.

Since my project is a form, I thought I could open it in that field. If you want, I can share the codes, you can see how it works and give suggestions accordingly.
 
Why doesn't update 3 contain update 2?

Let me explain it like this. I developed an updater launcher for mmorpg. That's why it is necessary to constantly add new things to the game, so update packages are constantly created. I gave an example of 3, for example, even if there are 18, if the personal version is 1 in the original updater, all update packages starting from 1 to 18 are downloaded and added to the game data.
 
That still doesn't explain why each succeeding update contains the previous updates within it.
 
That still doesn't explain why each succeeding update contains the previous updates within it.

If you say that, my project directly selects the version of the new update. I don't know how to explain it, only one package worth the number I wrote in the version downloads from the updates in the update folder.
 
In other words you actually don't control the contents of the updates, and so you don't know why each update is not cumulative. This is really odd considering that you had another thread where you were trying to figure out how to put contents into the game files.

Anyway, if you really must sequentially download updates why not have some simple logic like the following pseudo code:
C#:
Let latest = latest version number from server
Let current = current version on the machine
while (current < latest)
    download current + 1 version
    install version downloaded version
    let current = current version on the machine
 
But you said you use version control to achieve this. I've never used git where I had to patch / pick / merge every commit between the commit 3 weeks ago, and now.. I just get the latest and i'm up to date..

.. but even if you do have some system where updates must be applied sequentially, why not just commit the updates in a date-in-the-FileName zip file, so when you pull you have all the zips and you can apply them in order?

Y'know.. like database migrations
 
In other words you actually don't control the contents of the updates, and so you don't know why each update is not cumulative. This is really odd considering that you had another thread where you were trying to figure out how to put contents into the game files.

Anyway, if you really must sequentially download updates why not have some simple logic like the following pseudo code:
C#:
Let latest = latest version number from server
Let current = current version on the machine
while (current < latest)
    download current + 1 version
    install version downloaded version
    let current = current version on the machine

I am thinking of creating such a code, but I do not have full knowledge of that information. For example, I will specify a value, it will check the numbers from 1 to the latest updated version value, and it will start downloading from the current version value.
 
But you said you use version control to achieve this. I've never used git where I had to patch / pick / merge every commit between the commit 3 weeks ago, and now.. I just get the latest and i'm up to date..

.. but even if you do have some system where updates must be applied sequentially, why not just commit the updates in a date-in-the-FileName zip file, so when you pull you have all the zips and you can apply them in order?

Y'know.. like database migrations

I think I found what to do. Normally, I would download the update package directly according to the version and set the version to the latest version. But if I set it to add +1 to the version instead and add it to the loop, I think I can download the updates up to the latest version and make a complete update.
 
It makes no sense. You're reinventing what version control does

If you have these in your local disk:

230905_1200.zip
230907_1400.zip

And the server has these in its repo:

230905_1200.zip
230907_1400.zip
230910_1130.zip
230910_1445.zip

And you do a pull, then your local disk will match the server and you can install the two newly arrived updates inside the zip files, in order of name
 
It makes no sense. You're reinventing what version control does

Since the game was made in 2007, the system is a bit old and the update launcher can work with this system. Because they are the same files, for example, if I add the check files feature, it will not be of any benefit.
 
It makes no sense. You're reinventing what version control does

If you have these in your local disk:

230905_1200.zip
230907_1400.zip

And the server has these in its repo:

230905_1200.zip
230907_1400.zip
230910_1130.zip
230910_1445.zip

And you do a pull, then your local disk will match the server and you can install the two newly arrived updates inside the zip files, in order of name

Yes, that's exactly what I want to do
 
Back
Top Bottom