TTDPC: New configuration program - Version 1.3.1 Released

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Beta version of new configuration program

Post by Hyronymus »

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.
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Beta version of new configuration program

Post by AndersI »

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.
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

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?
Ramshill
Engineer
Engineer
Posts: 92
Joined: 25 Jan 2006 16:06
Location: England UK
Contact:

Post by Ramshill »

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)
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

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
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Beta version of new configuration program

Post by Hyronymus »

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?
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

> [...] 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
User avatar
m3henry
Tycoon
Tycoon
Posts: 1985
Joined: 15 Feb 2006 12:00
Location: Hampshire

Post by m3henry »

whynot call 'RUN_ME_THE_FIRST_TIME.EXE' 'setup.exe'?
The occasional look back at your past can teach you a great many things...
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

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.
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

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: .
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

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)
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

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
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

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...
Last edited by eis_os on 24 Jul 2006 12:22, edited 1 time in total.
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

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: Select all

        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=vcltes ... a=N&tab=wg for more discussion about it.
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 :-)
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

How do I get ttdpatch to write a new cfg file and not start TTD?
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

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
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

eis_os wrote: T- should do...
Thanks. When I realized it was -!T- as the first switch it finally worked.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

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
User avatar
Csaboka
Tycoon
Tycoon
Posts: 1202
Joined: 25 Nov 2002 16:30
Location: Tiszavasvári, Hungary
Contact:

Post by Csaboka »

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
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

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)
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests