Feature Request: User Config File

Monkey Forums/Monkey Bug Reports/Feature Request: User Config File

c.k.(Posted 2013) [#1]
Can I put a feature request here? :-)

How about having a secondary config file for each platform. This secondary file is NOT distributed with monkey source, but is created by the programmer. Anything in this secondary file takes precedent over what's in the config files distributed with monkey source.

For example, in config.winnt.txt, you have something like this:

ANT_PATH="${SYSTEMDRIVE}\monkey_sdks\apache-ant-1.8.4"


But in user-config.winnt.txt, I have something like this:

ANT_PATH="${SYSTEMDRIVE}\Program Files (x86)\apache-ant-1.8.4"


All you're basically doing is (pseudo-code):

   parse("config.winnt.txt")
   parse("user-config.winnt.txt")


right?

The benefit being, I don't have to modify the config file each and every time there's a new monkey source release. I just have to, literally, move my user-config file over.

That would be so nice. Ahhhh...

You'd want to make a provision that MODPATH gets appended, not replaced...

THANK YOU IN ADVANCE! :-)


AdamRedwoods(Posted 2013) [#2]
either this or create a small exe that copies over updates. the exe could be created using monkey as well.


c.k.(Posted 2013) [#3]
The way I do it now is

1. rename current MonkeyPro dir back to its original (e.g., MonkeyPro68c)
2. copy new MonkeyPro69 to MonkeyPro
3. rename new config.winnt.txt to config.winnt.old.txt
4. copy old config.winnt.txt from MonkeyPro68c to MonkeyPro
5. compare config.winnt.txt with config.winnt.old.txt to make sure MY config file isn't missing anything new
6. Profit

Let's eliminate steps 3 through 5 with just "copy user-config.winnt.txt" to new MonkeyPro/bin folder.


Samah(Posted 2013) [#4]
This is why I have every version of Monkey in a single Mercurial repository. That way I can shelve my config file and/or merge it.


marksibly(Posted 2013) [#5]
> I just have to, literally, move my user-config file over.

Why not just move the 'normal' config file over?

Either way, your're gonna have to change *something* in the new release!

Another possibility would be for Ted to detect most recent existing installation and offer to do the copy for you, which could be QED if all your Monkey installs are in the same dir. Will have a think about this...


c.k.(Posted 2013) [#6]
I can't just move the normal config file over because something NEW might be in the new config file, which, since it's not present in the old config file, might mess things up.

This has happened already I think.

The config.winnt.txt file should remain untouched by the user, because you might introduce new stuff into it, so it can't just be replaced by my old, modified version.

I hope I've been clear here. Let me know! :-)


marksibly(Posted 2013) [#7]
I think the config files have only changed once in the last year or so, when I recently added the MODPATH var.

But everything in the config files is where stuff is located on *your* machine anyway, the included ones are really just guides (ie: where stuff is located on *my* machine) and I kind of intended for them to be easily replaceable.


c.k.(Posted 2013) [#8]
OK, so we have a case where the config file changed. I would bet it will change again in the future, possibly significantly.

Since you don't intend the files to be used as-is, maybe you could name them with a "-sample" moniker, as is often done with these types of files. The user is then expected to create their own, even if just renaming the -sample file.

e.g., config.winnt-sample.txt

I'll operate on the belief that I can simply replace the config file each time I upgrade monkey source. It might be good to have a file that explains everything that could be configed. Maybe that's already available...?