recreate winsetup? Which toolkit would you choose?

Started by abstauber, Thu 27/05/2010 13:36:50

Previous topic - Next topic

abstauber

Hey,

due to the recent discussion about winsetup I've started to think about how much sense it would make to simply clone it.

It shouldn't be a big task since the cfg file is already well documented.
The more important question for me is: which language / toolkit combination is the best for the job.

* AGS launcher game with ssh's module
Some people block vbs, doesn't work with the linux port

* Visual Studio Stuff (C++, J#, C#, VB etc)
might need a runtime, needs to be compiled -> not easy to customize

* tcl/tk
crossplatform, easy to script, interpreted script -> easy to customize, ugly


Well, my current favourite is tcl/tk - but I bet there are tons of other languages/interpreters/whatsoever which can do the same job.

What do you think?
Does it even make sense?

Gilbert

#1
To be precise, the setup routines aren't provided by winsetup.exe. ALL it does is to launch "GAMENAME --setup". so there is little point in cloning its functionality. You can always delete winsetup.exe and either create a shortcut or a batch file to invoke the game's own executable with the "--setup" parameter.

But since the config file is just a text file, you can always make another frontend which modifies its content, and IMO any language will do. One thing worth notice is that as features in AGS change with versions, it is possible that such programme needs to be updated accordingly to reflect any additions on the format once a new version of AGS comes out too.

cat

Well, I'm not sure a new program will fix the main problem, namely not being able to write the a file in the gamefolder.

abstauber

Quote from: Gilbet V7000a on Thu 27/05/2010 14:26:43
To be precise, the setup routines aren't provided by winsetup.exe. ALL it does is to launch "GAMENAME --setup".

Argh, I got the default answer.  :=
Yes, this knowledge is widespread all over the board.

My question was targeting more in the directon of creating a replacement that does things better (translation support, masking features like DX9 etc.)


@cat
QuoteWell, I'm not sure a new program will fix the main problem, namely not being able to write the a file in the gamefolder.
Yep, this problem can't be fixed unless AGS gets an option to load config files from a different directory.

cat

Quote from: abstauber on Thu 27/05/2010 14:33:20
My question was targeting more in the directon of creating a replacement that does things better (translation support, masking features like DX9 etc.)

Ah, so then I'd suggest going with C# .NET 2.0. This is part of of Vista and Windows7 afaik and very easy to customize -> totally awsome XML support. You code the standard form and show/hide controls depending on the xml document.

Dataflashsabot

Quote from: abstauber on Thu 27/05/2010 14:33:20
Yep, this problem can't be fixed unless AGS gets an option to load config files from a different directory.
...why? Wouldn't the purpose of a new program be to write the same config file, just with a friendlier interface?

Monsieur OUXX

I must confess this thread seems to be dealing with 2 aims at the same time. and I can't quite grasp their overlapping area, and what is/isn't feasible.
 

Vince Twelve

2 conversations:

1) Remake the winsetup interface to allow, ideally, customization of which options to allow the users to set.  Doable and desirable.  I was planning on doing something like this for Resonance which does not support certain settings, and I'd rather them not be there.

2) Overcome Vista/Windows 7's draconian security which does not allow a program to write to the program files directory without being elevated to Administrator level.  Not Doable as far as I know, since the program that you make will still need Administrator rights.

Conversation 2 really only applies to games that are installed into program files directory.  Seems like the only solution is to default install the game somewhere other than program files.

abstauber

Topic one:
Right, let's focus on this one again.
The idea of storing everything customizable inside a xml file sounds good. It just also sounds like a lot of work... anyone wants to do it? ;D

As for myself, I'd still somehow favor tcl. It also supports i18n stuff and the script can directly be changed all the time. But since I never started a serious project in .net I can't really evaluate the workload.




Topic two:
A feature request allowing to store the .cfg in "my saved games" would do the trick.

cat

The workload in .NET isn't that much. I could certainly write at least the xml stuff. But the other 'thing'  ;) would have to wait.

But I only start working on it, if C#/.NET sounds resonable to at least some other people. I guess it would be open source anyway.

I don't know if tcl needs some framework or other prerequisits installed on the pc and I also don't know if .NET framework would be a problem for someone.

RickJ

Friendlier Interface?
Who gets to decide what is friendlier and will everyone agree?    I suspect it doesn't matter who decides because people won't agree on what is friendlier.   So IMHO it doesn't make a lot of sense to spend a lot of effort to enshrine a new version in a compiled language where most people won't have opportunity or knowledge to modify it to their own whim.  I think it would make much more sense to just do it in an AGS module.   

It's not that difficult to read and write ini files using AGS.  I wrote a now  obsolete module that does this.  As I understand it, the problem with this approach is that the changes would not take effect until the game was exited and then re-started.   As I understand it the SSH Game launcher module overcomes this but requires VBS which is a problem with Linux (which by the way is also a problem using .Net).

I was thinking that this could be overcome using RunAGSGame(...).  A quick test reveals that a game can indeed run itself via RunAGSGAme()  but does not reload the configuration file.   I have not tested the possibility of using a second game as an intermediary to see that would cause the original game to reload it's config data  but I suspect not. 

CFG File Location
The obvious and simple solution is to use a search list.   When the game starts it could use the  config file in the save games directory.  If there wasn't one there it could use the default in the exe directory.   

Conclusion
1.  It would not be too difficult to update the INI module and add some extra functionality specific to the cfg file.  It's demo game could  contain GUI and code example that duplicates winsetup.exe  People could use and modify  this as they see fit. 

2. To get the file location problem straightened out it will be necessary to ask to make a modification to AGS.   In addition to asking for an option to store the CFG file in the Save Game directory we could also ask for the ability to reload the cfg file and restart a game. from within it's own script.

abstauber

Topic 1:
Maybe I'm just looking for a lame excuse to learn some tcl :P

@cat: At least for me, the thing has a slightly higher priority ;)


Topic 2: Where to store the config file
As far as I know, SSH's module creates a new .cfg, saves the game, quits the game and the vbscript re-runs the game again. The module checks for the savestate and loads it.

QuoteIn addition to asking for an option to store the CFG file in the Save Game directory we could also ask for the ability to reload the cfg file and restart a game. from within it's own script.
We should do both ;) 

I just hope that adding it on the wishlist will help.


Wyz

Personally I wouldn't go for anything that uses a runtime environment for configuration tools. Such applications will not be run very often. It might be a bit off a hassle to supply all the required files in that case.

I'd go for C++ because it needs to run cross platform, although it might be a bit more work.
Life is like an adventure without the pixel hunts.

frogking

I don't think there is anything wrong with the C# approach, it's use is
common enough that dependency issues shouldn't be too bad. It might
be advisable to use an older version such as C# 2005 express so your
dependency is to the older .NET 2.0 runtime which is bound to have
already ended up on the system for some time.

Regarding Vista / W7 security, it's not so draconion and not even
strictly speaking a security feature (it affects everyday usage more
than it hinders malicious attackers). Its main purpose is to make it
annoying to work with software which requires administrator
privileges, to force developers to write better software. So that
in the future it may actually be feasible to work with a normal
user account, which in turn increases security.

If you can avoid the need for administrative privileges, that
is the preferred way. Otherwise, the recommendation is to split
the application into an normal usage executable and a separate
configuration executable (almost like winsetup.exe except that
the latter just calls ... ). The configuration executable will then
required administrator privileges and it should contain a
manifest which states so (this means it will automatically
ask for elevation when started, without the need for
the user to right-click and use run as).




SSH

In linux you could create a symbolic link from the game directory to somewhere more user-permission-accessible for the acsetup.cfg file. Dunno if symlinks like that exist on NTFS. I'm pretty sure they don't in FAT32. Are there likely to be any Win7 or Vista installs on FAT32?

Aaah, apparently not in XP (which doesnt have the problem anyway) but from Vista onwards:

http://msdn.microsoft.com/en-us/library/aa363878%28v=VS.85%29.aspx
12

Codex

I'm not sure I grasp some of the more technical talk in this thread, but I'd like to cast a vote with Vince and say that it would absolutely rocking to be able to disable certain elements of the winsetup, such as the antialiasing filter (which makes my game look horrid). 

I'd rather not have people stumble onto this filter, which they are likely to do, considering when you apply antialiasing to MODERN games, it makes them look BETTER.

If this is possible and I'm just not finding it, please let me know, I've been searching for a long time to see if it is.

xenogia

Quote from: Codex on Fri 18/06/2010 01:30:38
I'm not sure I grasp some of the more technical talk in this thread, but I'd like to cast a vote with Vince and say that it would absolutely rocking to be able to disable certain elements of the winsetup, such as the antialiasing filter (which makes my game look horrid). 

I'd rather not have people stumble onto this filter, which they are likely to do, considering when you apply antialiasing to MODERN games, it makes them look BETTER.

If this is possible and I'm just not finding it, please let me know, I've been searching for a long time to see if it is.

I double this notion.  Anyone up to the challenge?

sev7en

Hi to everyone,
I am bringing up this (old) thread because I'd like to speak about the people rised up the question. I localized the WinSetup by using SuSelizer as you can see below:


The window dialogue comes within the main game file not the one called WinSetup.exe but when I replace it with the newer, it's still English. I can export directly a DLL for multi-language translation but the question is: how did I can point it out?


Regards.

SMF spam blocked by CleanTalk