Personal Updates Server
Personal Updates Server
Hello Guys,I opened my server and wanted to have my own updates server,but i dont know how to do it.Someone Knows how to?I don't know if this is the right section if not move it.Thanks
Never lose sight of the eyes of someone you love. Life is there, inside.
Re: Personal Updates Server
Moved to general support forum.
- 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: Personal Updates Server
How to play around with TMW resource files.
Click and read the above link for your answer. If you run into any problems, ask on this thread. This link is just for localhosting, not sure about setting up a server host.
Click and read the above link for your answer. If you run into any problems, ask on this thread. This link is just for localhosting, not sure about setting up a server host.
Current character is "Abolish".
Re: Personal Updates Server
I initially had trouble with this myself. Here's a mini-howto, if it works for you I'll see about putting it in the wiki
First you need web space somewhere you can upload files to. It's possible to run a webserver on your personal connection but this is not recommended due to the large size of the data files and the usually low speed of home connections. You need to be able to host .zip files somewhere via http. I'm sure you can find a free solution for this with enough googling
Check out tmwdata and Mana from git:
In order to make updates you need to use the adler32 tool from tools/ in the mana source tree:
Make a zip file of tmwdata, Then use adler32 to generate resources2.txt
Copy data.zip and resources2.txt to your web root. Edit login_local.conf to point to your web root and you should be good to go. You may also want to put a news.txt in your webroot for the sign-on news.
Next step: Making updates. I'll try to post this soon.
First you need web space somewhere you can upload files to. It's possible to run a webserver on your personal connection but this is not recommended due to the large size of the data files and the usually low speed of home connections. You need to be able to host .zip files somewhere via http. I'm sure you can find a free solution for this with enough googling
Check out tmwdata and Mana from git:
Code: Select all
git clone git://gitorious.org/tmwdata/mainline.git
git clone git://gitorious.org/mana/mana.git
Code: Select all
gcc -o adler32 mana/src/tools/adler32.c
Code: Select all
cd tmwdata
zip -r ../data.zip *
cd ..
./adler32 data.zip >resources2.txt
Next step: Making updates. I'll try to post this soon.
Head of the TMW Illuminati
Re: Personal Updates Server
Posting such howtos on the wiki and improving the current howtos there is encouraged.
This message used to be meaningful.
Re: Personal Updates Server
I'll put it in the wiki once I get some sort of feedback - I feel incorrect instructions can be worse than none at at times.
To make updates, one must make a zip file of only the files you have changed, put it in the webroot, and add it's adler32 checksum to resources2.txt. This can be done manually but I suggest tracking your changes in a git repository so it can be fully automated.
The manual method is pretty easy, but you have to keep track of what files you have changed on your own. Lets say you have edited maps/022-1.tmx and added a file named graphics/sprites/crazy.png
Then upload the .zip and new resources2.txt to your webroot.
Just a warning: You probably do not ever want to delete lines in your resources2.txt, this can cause weirdness if you're not sure what you are doing. Just append lines.
In releasing an update for TAW I use a tool that generates zip files based upon git revisions. If you are comfortable using git, this is the way to go.
Get the script and chmod +x it
Once the tool is set, pick the starting revision in your git log you would like to generate an update from and run the tool. The tool will generate an update zip file containing updates from the revision you specify all the way to current.
It will generate a file with a name like update-70859-41add.zip. Do the adler32 thing as in the manual method and put the files in your webroot.
Perhaps the TMW admins would have some tips to help flesh out these instructions on handling duplicate data and inefficient updates. I haven't gotten to that part yet myself.
To make updates, one must make a zip file of only the files you have changed, put it in the webroot, and add it's adler32 checksum to resources2.txt. This can be done manually but I suggest tracking your changes in a git repository so it can be fully automated.
The manual method is pretty easy, but you have to keep track of what files you have changed on your own. Lets say you have edited maps/022-1.tmx and added a file named graphics/sprites/crazy.png
Code: Select all
cd tmwdata
zip -r update-crazy.zip maps/022-1.tmx graphics/sprites/crazy.png
./adler32 update-crazy.zip >>resources2.txt
Just a warning: You probably do not ever want to delete lines in your resources2.txt, this can cause weirdness if you're not sure what you are doing. Just append lines.
In releasing an update for TAW I use a tool that generates zip files based upon git revisions. If you are comfortable using git, this is the way to go.
Get the script and chmod +x it
Code: Select all
cd tmwdata
wget http://server.thealternateworld.org/junk/makeupdatezip.sh
chmod +x makeupdatezip.sh
Code: Select all
git log
./makeupdatezip.sh 3db8bcdc615f5ca953a52ac79070859c84041add
Perhaps the TMW admins would have some tips to help flesh out these instructions on handling duplicate data and inefficient updates. I haven't gotten to that part yet myself.
Head of the TMW Illuminati
Re: Personal Updates Server
In the client repository is a PHP script (the upalyzer) that checks the updates for such things. Using that, you can see how much of each zip is actually used, and remove them (possibly with a new zip to hold the few files it still provides) from the resources file (just remove the line). Sample output: http://updates.themanaworld.org/analyze.php.MadCamel wrote:Perhaps the TMW admins would have some tips to help flesh out these instructions on handling duplicate data and inefficient updates. I haven't gotten to that part yet myself.
An automated mode where it also calls git pull and gets the starting revision automatically would be nice.MadCamel wrote:In releasing an update for TAW I use a tool that generates zip files based upon git revisions. If you are comfortable using git, this is the way to go.
Get the script and chmod +x itOnce the tool is set, pick the starting revision in your git log you would like to generate an update from and run the tool. The tool will generate an update zip file containing updates from the revision you specify all the way to current.Code: Select all
cd tmwdata wget http://server.thealternateworld.org/junk/makeupdatezip.sh chmod +x makeupdatezip.sh
It will generate a file with a name like update-70859-41add.zip. Do the adler32 thing as in the manual method and put the files in your webroot.Code: Select all
git log ./makeupdatezip.sh 3db8bcdc615f5ca953a52ac79070859c84041add
Re: Personal Updates Server
When i do I get this
Any ideas?
Code: Select all
gcc -o adler32 mana/src/tools/adler32.c
Code: Select all
adler32.c:(.text+0x81): undefined reference to `adler32'
adler32.c:(.text+0x9d): undefined reference to `adler32'
collect2: ld returned 1 exit status
Never lose sight of the eyes of someone you love. Life is there, inside.
Re: Personal Updates Server
Added -lz and command worked but when i give
I get this
Code: Select all
./adler32 data.zip >resources2.txt
Code: Select all
bash:./adler32: No file or directory
Never lose sight of the eyes of someone you love. Life is there, inside.
Re: Personal Updates Server
./ means "here". So ./adler32 would mean "adler32, which is here". Where you ran ./adler32 from was obviously not where adler32 is. That is also what your shell told you. I hope this helps you understand better what your computer is trying to tell you.
This message used to be meaningful.
Re: Personal Updates Server
Thanks,It worked,I had to run it from the directory it was placed in.
Never lose sight of the eyes of someone you love. Life is there, inside.
Re: Personal Updates Server
Ok, I made it through everything perfectly, and all went well until I got to the manual zip update part. I tried to do the zip -r etc... thing, but when I do I get this:
Do I have to install another cygwin package for this to work? If so, what one?
Anyway thanks for a great tutorial!
Oh, one other thing...the link to the makeupdatezip.sh thing is broken. I was wondering if you could fix that also.
Code: Select all
bash: zip: command not found
Anyway thanks for a great tutorial!
Oh, one other thing...the link to the makeupdatezip.sh thing is broken. I was wondering if you could fix that also.
Re: Personal Updates Server
hi!
are you sure zip is installed on that server?
you could try unzipping something with unzip something.zip to see if it works.
are you sure zip is installed on that server?
you could try unzipping something with unzip something.zip to see if it works.