Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Jun 19, 2013 9:20 pm

All times are UTC




Post new topic Reply to topic  [ 146 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next
Author Message
PostPosted: Mon Jul 24, 2006 6:19 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 12837
Location: The Netherlands
I haven't tested this program yet but I do have a suggestion though. People that start using TTDPatch for the first time won't have ttdpatch.cfg in the TTD directory. I think you should offer the possibility to create ttdpatch.cfg if it isn't present yet.

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
 Profile  
 
PostPosted: Mon Jul 24, 2006 7:31 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 19, 2004 8:09 pm
Posts: 1676
Location: Sweden
Hyronymus wrote:
People that start using TTDPatch for the first time won't have ttdpatch.cfg in the TTD directory. I think you should offer the possibility to create ttdpatch.cfg if it isn't present yet.


Will they want to start by running a configurator? No, what they need is a RUN_ME_THE_FIRST_TIME.EXE that checks the installation, creates the registry setting(s) needed (if any), creates a default ttdpatchw.cfg, newgrfw.cfg etc. and then starts the program (maybe a wizard for some primary choices, but nothing more). That's another project (probably best done with InnoSetup)...

But of course, ttdpc can create a default config if none is present, no problem.

_________________
Image
Swedish trains * Swedish Town Names * BlockCAD * The GRFMaker Community Page


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 7:43 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 19, 2004 8:09 pm
Posts: 1676
Location: Sweden
Csaboka wrote:
Do we really need that button? When people make changes, they usually want them to stay that way, without pressing an extra button every time. Maybe you should do it the other way around: have a Revert button that restores the switch to its original state (the one read from the CFG), but otherwise update things instantly.


I understand, but I don't know. I think it's too easy to inadvertently change a switch without the button. Remember, this program should make it possible for (relative) newbies to change their configuration.

OTOH, it's a lot of clicking when you want to change many switches. One solution is settings: Easy, Quick, or something, which makes the program more complicated (at some time we'll need a configurator for setting up the configurator). I want it as simple as possible, to ensure that it really gets finished.

If you are a speed-craving pro, maybe it's better to use Notepad?

_________________
Image
Swedish trains * Swedish Town Names * BlockCAD * The GRFMaker Community Page


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 8:09 am 
Offline
Engineer
Engineer

Joined: Wed Jan 25, 2006 4:06 pm
Posts: 92
Location: England UK
I agree this should be written for the newbie only at present. Updated for general users only when it works properly for newbies. Updated again for experts next and lastly for power users (i.e. NOT me)

_________________
I maybe old but at least I'm not dead (yet).
OK! I admit it I AM dead (from the neck up)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 8:09 am 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Fri Mar 07, 2003 1:10 pm
Posts: 3592
Location: Germany
Actually I would call such a button "Save Settings" (as it's much expressive what it really does), do you plan to have multi-language support?

_________________
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image


Top
 Profile  
 
PostPosted: Mon Jul 24, 2006 8:35 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 12837
Location: The Netherlands
AndersI wrote:
Will they want to start by running a configurator? No, what they need is a RUN_ME_THE_FIRST_TIME.EXE that checks the installation, creates the registry setting(s) needed (if any), creates a default ttdpatchw.cfg, newgrfw.cfg etc. and then starts the program (maybe a wizard for some primary choices, but nothing more). That's another project (probably best done with InnoSetup)...

But of course, ttdpc can create a default config if none is present, no problem.

If you add 2 executables to the package you're bound to lead people astray :). Isn't it easier to stick to 1 executable that performs all the required operations when it's the first time it runs and create a settings file (or a registry key?!) afterwards that prevents it from doing this every time after the first time?

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 8:49 am 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 4456
> [...] do you plan to have multi-language support?

Multi-language support is essential needed given alone those lots and lots of german users unable to understand any English. 8)

@AndersI
I do appreciate your work very much. Hopefully, TTPatch will get a simple but flawless tool for setting up its configuration. Although Andrex´ tool had been a good start and is still in wide use today we had lots of trouble every so often.

regards
Michael

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 8:53 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Feb 15, 2006 12:00 pm
Posts: 1973
Location: Cambridgeshire
whynot call 'RUN_ME_THE_FIRST_TIME.EXE' 'setup.exe'?

_________________
The occasional look back at your past can teach you a great many things...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 9:48 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 19, 2004 8:09 pm
Posts: 1676
Location: Sweden
OK, so we have to decide what's the primary goal with this project.

My aim, when starting the project was only to create 'a better Notepad' for the config file, taking advantage of the information in the switches.xml to make it automatically work with every new version of the patch.

IMO, the more generalized 'make TTDPatch work the first time I start it' should be a separate program, probably an installer - isn't there a thread about that already?

As for multiple languages, that's a given - when I reach version 1.0, not earlier. One thing at a time.

_________________
Image
Swedish trains * Swedish Town Names * BlockCAD * The GRFMaker Community Page


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 10:31 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 12837
Location: The Netherlands
AndersI wrote:
IMO, the more generalized 'make TTDPatch work the first time I start it' should be a separate program, probably an installer - isn't there a thread about that already?

I must say you led me to believe you wanted to address that as well in your second post in this topic. But it seems I misunderstood your intentions, sorry :oops: .

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 11:05 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 19, 2004 8:09 pm
Posts: 1676
Location: Sweden
Hyronymus wrote:
I must say you led me to believe you wanted to address that as well in your second post in this topic. But it seems I misunderstood your intentions, sorry


No need to be sorry! I would like to see a complete program that helps the newbie (plus all others!), but I really think this is best done with a suite of programs, each of them specialized on doing their thing. This way programming effort can be spread out, and the separate programs have a chance of getting finished :-)

Collecting them into one installer is no problem, a small central 'hub' is also no problem.

So, who writes the 'very_first_start' program that checks the installation, fixes the registry, creates config files with resonable defaults etc.? (That's what I thought there was a thread about, already)

_________________
Image
Swedish trains * Swedish Town Names * BlockCAD * The GRFMaker Community Page


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 11:50 am 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 4456
Quote:
So, who writes the 'very_first_start' program that checks the installation, fixes the registry, creates config files with resonable defaults etc.? (That's what I thought there was a thread about, already)


AutoInstaller

regards
Michael

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 12:07 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Fri Mar 07, 2003 1:10 pm
Posts: 3592
Location: Germany
Generally autoinstaller doesn't fix the registry, but I guess I can check it for inconsistency and so let TTDPatch run in noregistry mode... and aswell download and install a configurator programm (and create the necessary links to it) ... (Windows only)

-edit-
May I ask what vcltest3.dll is?

Anyway...

When ttdpatch(w) can't be found I think you should abort your app...

_________________
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image


Last edited by eis_os on Mon Jul 24, 2006 12:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 12:20 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 19, 2004 8:09 pm
Posts: 1676
Location: Sweden
All right. So there's definitely no need for me to duplicate any of that functionality.

eis_os wrote:
May I ask what vcltest3.dll is?

Where do you find that? Or do you see a reference to it in the exe? Grepping the sources...

It is something put by Borland in the core library (TApplication.WndProc in Forms.pas if you happen to have a Delphi installation)

Code:
        WM_COPYDATA:
          if (PCopyDataStruct(Message.lParam)^.dwData = DWORD($DE534454)) and
            (FAllowTesting) then
            if FTestLib = 0 then
            begin
              FTestLib := SafeLoadLibrary('vcltest3.dll');
              if FTestLib <> 0 then
              begin
                Result := 0;
                @InitTestLibrary := GetProcAddress(FTestLib, 'RegisterAutomation');
                if @InitTestLibrary <> nil then
                  InitTestLibrary(PCopyDataStruct(Message.lParam)^.cbData,
                    PCopyDataStruct(Message.lParam)^.lpData);
              end
              else
              begin
                Result := GetLastError;
                FTestLib := 0;
              end;
            end
            else
              Result := 0;

It looks a bit suspicious, almost like a backdoor. I don't know what it's supposed to do, but it looks like an anchor point for automated testing of something...

See http://groups.google.se/groups?q=vcltest3&oe=UTF-8&client=firefox-a&rls=org.mozilla:en-US:official&ie=UTF-8&sa=N&tab=wg for more discussion about it.

Quote:
When ttdpatch(w) can't be found I think you should abort your app

Actually I do (will do), but that part of the code is commented out in the current beta, as I don't run development in my TTD folder :-)

_________________
Image
Swedish trains * Swedish Town Names * BlockCAD * The GRFMaker Community Page


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 7:09 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 19, 2004 8:09 pm
Posts: 1676
Location: Sweden
How do I get ttdpatch to write a new cfg file and not start TTD?

_________________
Image
Swedish trains * Swedish Town Names * BlockCAD * The GRFMaker Community Page


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 7:30 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Fri Mar 07, 2003 1:10 pm
Posts: 3592
Location: Germany
Sorry, I don't own any delphi version...

http://wiki.ttdpatch.net/tiki-index.php ... ugSwitches
is your friend, actually T- should do...

_________________
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 24, 2006 9:05 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 19, 2004 8:09 pm
Posts: 1676
Location: Sweden
eis_os wrote:
T- should do...

Thanks. When I realized it was -!T- as the first switch it finally worked.

_________________
Image
Swedish trains * Swedish Town Names * BlockCAD * The GRFMaker Community Page


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 25, 2006 1:33 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Feb 07, 2003 1:58 am
Posts: 11725
Location: Washington DC, USA
I do think that there's a need for both an auto installer, and for a configuration interface. It's OK if they aren't the same exact tool, but if they can work together, and pass from one to the other as need be, that would be ideal. And it sounds like that's the direction we're working towards, which is great! It even sounds like they'll be able to download and install missing pieces automatically, which would be even better. Great work!

_________________
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 25, 2006 6:54 am 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Mon Nov 25, 2002 4:30 pm
Posts: 1202
Location: Tiszavasvári, Hungary
AndersI wrote:
I understand, but I don't know. I think it's too easy to inadvertently change a switch without the button. Remember, this program should make it possible for (relative) newbies to change their configuration.

You mean, do newbies accidentally click a radio button when they don't really want to? Do they modify an edit box by accident? And even if they do, why would a Revert button be any worse to fix their mistake?

I think it's also inconsistent with what a regular computer user would expect. Does your word processor have a "yes, I really meant what I just typed" button? No, it has an Undo button, because you usually do the right thing and you want to keep it. (And you really wouldn't like pressing a button every minute just to make sure your work gets saved, do you?)

When I first used your program, I tried modifying some switches before noticing that there is an Update button. If a newbie does the same mistake and realizes that his changes are gone, probably he'll get frustrated about the program...
AndersI wrote:
If you are a speed-craving pro, maybe it's better to use Notepad?

Well, I probably will, but this topic isn't about me, it's about the people who will use your program frequently.

And it isn't about speed, either. It's about making people jump through extra hoops without a good reason. I guess most people wouldn't like that.

_________________
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 25, 2006 11:35 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 19, 2004 8:09 pm
Posts: 1676
Location: Sweden
OK, I have reversed the GUI logic, changes take effect immediately, but you have an Undo-button. Also, ttdpatch.cfg should be created if it doesn't exist.

Save button still writes to ttdpatch.cfg.new, don't worry.

Please test this for me, as I have certainly introduced new bugs in the rewrite :)

(First post updated, as usual)

_________________
Image
Swedish trains * Swedish Town Names * BlockCAD * The GRFMaker Community Page


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 146 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000-2013 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2013.
Hosted by Zernebok Hosting.