Creating an update server
Creating an update server
Hi all. I am trying to make a private server that others on the internet can connect to on an Ubuntu 10.10 box. At this point they can connect, which is good, but cannot see maps and such or get an items.xml error. I know that I need an update server in order for their client to update. Here is my question... If I create my own update file by compressing all recursive directories in my client-data folder (which are up-to-date with server info) into one zip file and name it to update-00000 and uploading to my webhost in the home dir/subdir and properly pointing to that file in the login_local.conf... will their client update? If not, Why not? I know that this would at least mean that I have to manually title each compressed update file.
Do I even need to compress at all or is it simply an option?
Must it be .zip?
Thanks for the whole thread everyone. It has been helpful.
Do I even need to compress at all or is it simply an option?
Must it be .zip?
Thanks for the whole thread everyone. It has been helpful.
Ledmitz = Ardits = KillerBee = Mystic = Mystical_Servant = Tipsy Skeleton = BoomBoom = Cloak
Re: Creating an update server
Split from http://forums.themanaworld.org/viewtopi ... =13&t=2617
No, this is not enough. Before the client downloads any update files, it first downloads the file resources.xml. This file includes a list of updates. The client then tries to download this list. Here is the current resources.xml of the official server:
The "hash" is the adler32 checksum of the update. When the client already has a file with the same name in its update directory, the client calculates the checksum of the local file, compares it to the hash value, and redownloads it when they don't match. This allows to detect and fix an incomplete update.
There is a command-line based program in the Ubuntu software center which can calculate Adler32 checksums called "Jacksum". Use to get the correct checksum in the correct format*. You could also try this web-based calculator: http://hash.online-convert.com/adler32-generator
The names of the update files don't matter. TMW uses the Git revision numbers of the updates, but you can name your update packages any way you want.
*) Just because I don't like Linux, doesn't mean I don't know how to use it
No, this is not enough. Before the client downloads any update files, it first downloads the file resources.xml. This file includes a list of updates. The client then tries to download this list. Here is the current resources.xml of the official server:
Code: Select all
<updates>
<update type="data" file="database-918355f.zip" hash="2bc91ec6"/>
<update type="data" file="images-918355f.zip" hash="65a9de41"/>
<update type="data" file="items-918355f.zip" hash="d2ff7c75"/>
<update type="data" file="maps-918355f.zip" hash="cc54fbcf"/>
<update type="data" file="particles-918355f.zip" hash="93c2f554"/>
<update type="data" file="sfx-918355f.zip" hash="4f1fd60"/>
<update type="data" file="sprites-918355f.zip" hash="2b193034"/>
<update type="data" file="tiles-918355f.zip" hash="68b331ec"/>
<update type="data" file="update-918355f..d89ef64.zip" hash="713790b7"/>
<update type="data" file="update-d89ef64..782be6d.zip" hash="75792dba"/>
<update type="data" file="update-782be6d..ece001f.zip" hash="9acb3f9d"/>
<update type="data" file="update-ece001f..60760da.zip" hash="41d82a10"/>
<update type="data" file="update-60760da..8b9a29a.zip" hash="366766e1"/>
<update type="data" file="update-8b9a29a..4a13006.zip" hash="5139ecaf"/>
<update type="data" file="update-4a13006..a0909e6.zip" hash="8de3bf50"/>
<update type="data" file="update-a0909e6..eca7fc2.zip" hash="2c7b540c"/>
<update type="data" file="update-eca7fc2..48918d2.zip" hash="c4b0d76b"/>
<update type="data" file="update-48918d2..2485c88.zip" hash="94b64a40"/>
<update type="data" file="update-2485c88..b134fcb.zip" hash="59f23dda"/>
<update type="data" file="update-b134fcb..a897827.zip" hash="1635547d"/>
<update type="data" file="update-a897827..6e164a9_2.zip" hash="517071a5"/>
<update type="data" file="update-6e164a9..ea63bb9.zip" hash="d13e2260"/>
<update type="data" file="update-ea63bb9..2a02ef6.zip" hash="adcf4482"/>
<update type="data" file="update-2a02ef6..410e599.zip" hash="f04a4917"/>
<update type="music" required="no" file="music-af9f8a2a.zip" hash="973888bb" desciption="Music data v01"/>
<update type="music" required="no" file="music2-318df68.zip" hash="893e6f3b" description="Music updates"/>
<update type="music" required="no" file="music-318df68..e2ca581.zip" hash="b06cd8e3" description="Music updates"/>
</updates>
There is a command-line based program in the Ubuntu software center which can calculate Adler32 checksums called "Jacksum". Use
Code: Select all
jacksum -a adler32 -x [filename]
The names of the update files don't matter. TMW uses the Git revision numbers of the updates, but you can name your update packages any way you want.
*) Just because I don't like Linux, doesn't mean I don't know how to use it
- former Manasource Programmer
- former TMW Pixel artist
- NOT a game master
Please do not send me any inquiries regarding player accounts on TMW.
You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Re: Creating an update server
Thank you so much Crush. I downloaded JackSum from the software center. I guess I didn't have it. I did command as you stated and I received two different 'hashes'
The command: jacksum -a adler32 -x update-00000.zip
Message received: 85085a49 46407050 update-00000.zip
Which one do I use?
Also, My update file is quite large. I wondered if I needed to have all files from client-data in the update zip file or are there certain default files that I can leave out? I guess now is a good time to mention that it is an old UFB server too.
The command: jacksum -a adler32 -x update-00000.zip
Message received: 85085a49 46407050 update-00000.zip
Which one do I use?
Also, My update file is quite large. I wondered if I needed to have all files from client-data in the update zip file or are there certain default files that I can leave out? I guess now is a good time to mention that it is an old UFB server too.
Ledmitz = Ardits = KillerBee = Mystic = Mystical_Servant = Tipsy Skeleton = BoomBoom = Cloak
Re: Creating an update server
The first number is the hash, the second the filesize in bytes. 44 MB is indeed quite large, but it's hard to tell whether you have any redundant files or not without actually looking at it.
When you have the background music in it, you might want to omit it or move it to a separate, optional update. They are by far the largest part of the game data. Another wild guess is that you also included the .git directory (and thus every single version of every single file which has ever existed in the repository) in your update.
When you need more help, you have to provide a link to the file.
When you have the background music in it, you might want to omit it or move it to a separate, optional update. They are by far the largest part of the game data. Another wild guess is that you also included the .git directory (and thus every single version of every single file which has ever existed in the repository) in your update.
When you need more help, you have to provide a link to the file.
- former Manasource Programmer
- former TMW Pixel artist
- NOT a game master
Please do not send me any inquiries regarding player accounts on TMW.
You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Re: Creating an update server
Yes, you are correct about the music. I will do a separate file for that. I think I know how to, as well. Saw that on the wiki. That clears a lot up. However, I do not update from the git as I am trying to setup my own http server for that function. It is temporary and I probably will move to git or at least another host, but for now I just want to see if I can get it configured and then look at changing the update host after. I am not sure if that will cause duplicates of files or not though.
Ledmitz = Ardits = KillerBee = Mystic = Mystical_Servant = Tipsy Skeleton = BoomBoom = Cloak
Re: Creating an update server
OK, I have created an ftp update host on the other PC temporarily. I can connect with ftp client and the game client connects to it as well, but it seems that I do not know the proper method of structure. Waht files need to be left unzipped? Just resources, news and motd? or do I leave all xml's unzipped. At the moment, I connect but both clients, Mana and ManaPlus, return the same error message; could not create update directory! But when I check ftp log, I see that the client is trying to download news.txt. I see that I should not have zipped it now.
I also wondered if I have to pack thing individually as it looks like main does. I zipped all files except for music into one Zip and did music separate. I am wondering if that is ok to do as well.
I also wondered if I have to pack thing individually as it looks like main does. I zipped all files except for music into one Zip and did music separate. I am wondering if that is ok to do as well.
Ledmitz = Ardits = KillerBee = Mystic = Mystical_Servant = Tipsy Skeleton = BoomBoom = Cloak
Re: Creating an update server
So you have an FTP test server, not HTTP? I am not sure if we ever even tested that...K, I have created an ftp update host on the other PC temporarily. I can connect with ftp client and the game client connects to it as well
This is very likely referring to the directory in your home directory. The client names these after the hostname of the updateserver. What exactly it the URL the client downloads from?could not create update directory!
It doesn't matter.I also wondered if I have to pack thing individually as it looks like main does
- former Manasource Programmer
- former TMW Pixel artist
- NOT a game master
Please do not send me any inquiries regarding player accounts on TMW.
You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.