OpenTTD Updater

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Re: OpenTTD Updater

Post by zypa »

I did not read the whole thread. (too lazy....)

@Desolator:
Thank you! Your updater is great!

BUT:
It would be even better if you'd put a link to the actual version on page 1.

if someone wants to download the latest updater (and has never downloaded the updater before) he/she will try to download 0.6.x on the first page.
At least I tried that.
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: OpenTTD Updater

Post by CMircea »

zypa wrote:I did not read the whole thread. (too lazy....)

@Desolator:
Thank you! Your updater is great!

BUT:
It would be even better if you'd put a link to the actual version on page 1.

if someone wants to download the latest updater (and has never downloaded the updater before) he/she will try to download 0.6.x on the first page.
At least I tried that.
That link doesn't work >.> And I said I'm rewriting this thing as well.
gamesfunk wrote:
Desolator wrote:When reporting a bug, do your best to replicate it and copy the text in the debug window. This way it's very easy for me to see where it failed, or if it isn't a bug in OTTD Updater.

Code: Select all

*** LOCATION: Project -> On Startup
[58]: if Folder.DoesExist(strTempUpdate) == false then
TRACE: LastError = 0 ("Success.")
[60]: Folder.Create(strTempUpdate);
TRACE: LastError = 0 ("Success.")
[61]: end

*** LOCATION: Main Page -> On Preload
[2]: if boolIsSilent == true then
[11]: end

*** LOCATION: Main Page -> On Show
[2]: if boolIsInTheGameFolder == true then
[4]: Button.SetEnabled("Browse", false);
TRACE: LastError = 0 ("Success.")
[5]: end
It happens to me every time, though.

G.
That's useless to me, I need the log from when it has finished updating, try your best to catch it.
Lithium
Engineer
Engineer
Posts: 7
Joined: 14 Jul 2006 20:03

Re: OpenTTD Updater

Post by Lithium »

That's the problem, there is none, it just doesn't show it after updating.

G.
frankdoom
Engineer
Engineer
Posts: 21
Joined: 03 Apr 2006 10:56

Re: OpenTTD Updater

Post by frankdoom »

I wouldn't be able to do it either...
User avatar
denny577
Engineer
Engineer
Posts: 111
Joined: 20 Nov 2005 16:10
Location: Netherlands

Re: OpenTTD Updater

Post by denny577 »

The download server doesn't work here :? anyone got an idea?
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: OpenTTD Updater

Post by CMircea »

Yeah, I don't use that domain anymore, nor does The PMN Organization exist, and I'm not working on this OTTD Updater kind anymore. However, I put it on sendspace, and I edited the first post. (http://www.sendspace.com/file/r34m17)
User avatar
denny577
Engineer
Engineer
Posts: 111
Joined: 20 Nov 2005 16:10
Location: Netherlands

Re: OpenTTD Updater

Post by denny577 »

Sorry for not reading the thread first :P
I just saw that.

Suggestion
In AutoIt you can do FileGetVersion(), then strip the string to get the revision number of the current nightly installed :P.
Then you haven't got the problem of the changelog being deleted, but I don't know if it's possible in PHP. I was writing an Updater as well :P (in AutoIt, as you might have guessed :P), but I thought I'd first ask if anyone minds before publishing, I don't want to be stealing you're publicity :mrgreen:

BTW, If anyone wants the source or the program itself, mail me, because I can't host it anywhere I know of, looking though. :P

EDIT: I found MediaFire, but I'll wait for your response before putting the link here :))

EDIT2:
SendSpace wrote: Sorry, the file you requested is not available.

Possible reasons include:

- File date limit has expired.
- File was not successfully uploaded.

Please contact the uploader and ask them to upload the file again. sendspace is not able to help you in this matter.
User avatar
leno4
Traffic Manager
Traffic Manager
Posts: 247
Joined: 10 Mar 2008 02:45
Location: Australia

Re: OpenTTD Updater

Post by leno4 »

Code: Select all

Sorry, the file you requested is not available.

Possible reasons include:

- File date limit has expired.
- File was not successfully uploaded.

Please contact the uploader and ask them to upload the file again. sendspace is not able to help you in this matter.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OpenTTD Updater

Post by Zuu »

denny577 wrote:I was writing an Updater as well :P (in AutoIt, as you might have guessed :P), but I thought I'd first ask if anyone minds before publishing, I don't want to be stealing you're publicity :mrgreen:
I think there is room for more than one application as different people like different things. If I've understood correctly Madassasin (formerly known as Desolator) likes cool installers and all that stuff, and if I understand correctly OpenTTD Updater uses a wizard-style GUI (I have not tried it myself). Personally I like unzip-and-run installation, and have not put much effort into a flashy cool GUI. (Yes I've also written an updater, in Delphi)

So soon there can bee a long list of unofficial updaters on the wiki. ;) And users will be lost in the jungle of updaters :p

denny577 wrote:BTW, If anyone wants the source or the program itself, mail me, because I can't host it anywhere I know of, looking though. :P
I don't know what sizes you are talking about, I could simply upload my program in a zip file[1], but then I've chosen at that time in that project to not release the sources.

[1] http://www.tt-forums.net/viewtopic.php?p=607653#p607653


EDIT:
Here is the wiki-page I talked about: http://wiki.openttd.org/index.php/OpenTTD_Updaters please feel free to enhance it.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
leno4
Traffic Manager
Traffic Manager
Posts: 247
Joined: 10 Mar 2008 02:45
Location: Australia

Re: OpenTTD Updater

Post by leno4 »

Zuu wrote:
denny577 wrote:I was writing an Updater as well :P (in AutoIt, as you might have guessed :P), but I thought I'd first ask if anyone minds before publishing, I don't want to be stealing you're publicity :mrgreen:
I think there is room for more than one application as different people like different things. If I've understood correctly Madassasin (formerly known as Desolator) likes cool installers and all that stuff, and if I understand correctly OpenTTD Updater uses a wizard-style GUI (I have not tried it myself). Personally I like unzip-and-run installation, and have not put much effort into a flashy cool GUI. (Yes I've also written an updater, in Delphi)

So soon there can bee a long list of unofficial updaters on the wiki. ;) And users will be lost in the jungle of updaters :p

denny577 wrote:BTW, If anyone wants the source or the program itself, mail me, because I can't host it anywhere I know of, looking though. :P
I don't know what sizes you are talking about, I could simply upload my program in a zip file[1], but then I've chosen at that time in that project to not release the sources.

[1] http://www.tt-forums.net/viewtopic.php?p=607653#p607653


EDIT:
Here is the wiki-page I talked about: http://wiki.openttd.org/index.php/OpenTTD_Updaters please feel free to enhance it.
Your updater is great
User avatar
denny577
Engineer
Engineer
Posts: 111
Joined: 20 Nov 2005 16:10
Location: Netherlands

Re: OpenTTD Updater

Post by denny577 »

Zuu wrote:
denny577 wrote:BTW, If anyone wants the source or the program itself, mail me, because I can't host it anywhere I know of, looking though. :P
I don't know what sizes you are talking about, I could simply upload my program in a zip file[1], but then I've chosen at that time in that project to not release the sources.

[1] http://www.tt-forums.net/viewtopic.php?p=607653#p607653


EDIT:
Here is the wiki-page I talked about: http://wiki.openttd.org/index.php/OpenTTD_Updaters please feel free to enhance it.
My program is about 760kb, but I already put it on MediaFire, here. I Bzip2'ed with 7-Zip, link in my sig.

Mine is unzip-and-run style, with a GUI. I did take the graphics from OpenTTD, I don't know if I was allowed to, so please tell me if you know.

It checks the version of OpenTTD in the path specified in OpenTTD.ini againt the latest version available on the net, it also downloads the graphics files if they're missing, so you can just run it and it will put OpenTTD in the directory specified, no need for a previous installation. It does have lot's of bugs though :D.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OpenTTD Updater

Post by Zuu »

leno4 wrote:Your updater is great
Thanks, and now the next version 'beta 5' is available, and no, it does not updates itself yet. Most important new feature is that it extracts what have changed since last update from changes.txt.
denny577 wrote:My program is about 760kb, but I already put it on MediaFire, here. I Bzip2'ed with 7-Zip, link in my sig.

Mine is unzip-and-run style, with a GUI. I did take the graphics from OpenTTD, I don't know if I was allowed to, so please tell me if you know.

It checks the version of OpenTTD in the path specified in OpenTTD.ini againt the latest version available on the net, it also downloads the graphics files if they're missing, so you can just run it and it will put OpenTTD in the directory specified, no need for a previous installation. It does have lot's of bugs though :D.
Nice GUI, but there are some things that you should concider:
* Change the name, since "OpenTTD Updater" is already taken.
* Downloading the graphics is a no-no, since they are copyrighted. But copying them from a TTD CD or directory on the hard drive would be okay I think.
* Your program seam to leave the downloaded zip-files. So after a few days the folder-size will explode.
* I don't think OpenTTD.ini is a good name for the ini-file of the updater as OpenTTD refers to the game, not to the updater.
* WindowsXP failed to open your zip-file. I had to use 7zip to unzip it. Is that intended?
* OpenTTD is GPL so if you want to take the graphics from OpenTTD then your program have to be GPL too.

Also your question-windows seams to fail under some conditions.


EDIT: But I think we should leave this thread for OpenTTD Updater (the one developed by Madassasin) and if you need a thread for your application start one. Also you can use this page: http://wiki.openttd.org/index.php/OpenTTD_Updaters to list your updater.
Last edited by Zuu on 22 Mar 2008 18:53, edited 1 time in total.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
denny577
Engineer
Engineer
Posts: 111
Joined: 20 Nov 2005 16:10
Location: Netherlands

Re: OpenTTD Updater

Post by denny577 »

*REMOVED* :mrgreen:
Last edited by denny577 on 23 Mar 2008 12:25, edited 1 time in total.
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: OpenTTD Updater

Post by CMircea »

I'm sorry to say, but I have lost the source of a recent version of my updater, so I'm stuck with 0.6, but I won't continue it anyway. However, I have plans to rewrite it in C++ to have the ability of adding portability. But there's the problem of the GUI, it would be extremely bad to write a wrapper just for what I need on top the system API, because if I change something in the interface, boom, code needs update. I 'd use Qt, but no support for MSVC sucks, as MSVC is the best compiler for Windows (obviously why). GTK+ needs runtime on Windows, and it's not small at all. wxWidgets seems good, but I need a GUI designer for it so I can easily change the GUI (for GTK+ I'd just link statically with libglade) without dealing with numbers and such.

The next problem comes with how to download the ZIP file (or whatever). I don't know of any portable HTTP libraries, so if you know of one, just say. Now it's the problem of decompressing that archive. wxWidgets has a zlib library with it, so that's nice. But what if I'd use Qt instead? Other problems like running the game are minor as they can easily be solved with an inline function and some preprocessor usage.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OpenTTD Updater

Post by Zuu »

If you want to go low level, the HTTP-protocol is not that complicated. Then use sockets and simply send the HTTP-messages as a text-string. Since you are going to only talk to pre-known servers you only need to implement the HTTP-protocol that the server responds to. (Yes there are servers that only talk HTTP 1.0 or 1.1, but most can do both)

Other than the RFCs I have no online resource to recommend on the HTTP standard. (I got some general books in the topic of data communication but they are quite hard to link to ;) )


I once made a C++ program with a standard GUI toolkit. Then I wrote the program in C++, and wrote the GUI in Ruby/GTK, but that requires both Ruby and GTK to be installed so not much of an option. Else, I've only implemented my own GUI toolkits for C++ in SDL/DirectX.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: OpenTTD Updater

Post by CMircea »

/me gravedigs.

Project is being restarted, and as promised two years ago, rewritten - in C++ using Qte. I'm aiming at support the top three platforms (Windows, OS X, Linux) so portability should be no issue. With that said, if anyone still has the source code to the old updater I'd be very grateful - it could jumpstart ~50% of the initial work (I can't remember how I did most stuff). Community support would be very welcome, especially since this one would solve some limitations of the original one (locked to Windows, needs proprietary and expensive build tools, no native UI, etc.). I am aware that other updaters have appeared after I left, I am not familiar with them, but will look into them to see what users need.

I won't continue it as a simple updater, but as an OpenTTD manager. I will look into automatizing server management, configuration and other things (even if included in OpenTTD) - it won't be easy however, so if anyone feels like helping, you are free to do so. I'll continue using this thread for a little while until the project reaches a half-baked state when I'll set up a public repository, bug tracker and so on. If you want to ask about anything or are interested in helping, you can find me on IRC as Wikie, or you can contact me via e-mail or IM.

/me poofs.
Xaroth
Engineer
Engineer
Posts: 103
Joined: 01 May 2006 09:09

Re: OpenTTD Updater

Post by Xaroth »

Feel free to port parts of the AutoTTD code to C/C++ .. not sure if it's any use but it should at least give pointers.
Lead Manager of OpenDUNE
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: OpenTTD Updater

Post by CMircea »

Considering I have next to no knowledge of C#, I hope your code is readable :P Thanks, I'll look into it.
Dave_McMahon
Traffic Manager
Traffic Manager
Posts: 253
Joined: 22 Apr 2005 15:40
Location: Ipswich U.K

Re: OpenTTD Updater

Post by Dave_McMahon »

Well it's been a while but getting the new post notifier has inspired me to do some more OTTD'ing :)

p.s who is the Girl in the Pic Madassasin?
David McMahon
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OpenTTD Updater

Post by Zuu »

I wish you good luck with the coding. A thick client is probably the way to go. I was thinking about adding md5 checksum checking to my program, but since I have abstracted the understanding of finger.openttd.org to my server end I can't just change the download URL a bit to get the md5 on the binaries server, without braking that abstraction. On the positive side though is that I use XML for server-client communication, so adding more information to a response don't stop old clients from work.

By restarting from scratch you can probably take hg-versioning into account and do not need to make a dirty hack to get that into work.

For unzipping I use InfoZip(.exe), but by choosing C/C++ you can probably find GPL/LGPL code to use for that and don't have to rely on an external binary for unzipping.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 5 guests