RhostMUSH / trunk

RhostMUSH 4.0: This is the official main repository of RhostMUSH. Visit us at rhostdev.mushpark.com 4201
23 stars 21 forks source link

[Proposal] Proposed changes in the rhostmush.conf file #88

Open mdziczkowski opened 3 years ago

mdziczkowski commented 3 years ago

I wanted to propose following changes into the rhostmush.conf file, starting from it's begining:

OWNER=[owner's e'mail address] GAMENAME=[your name of the game]

Folder definitions

GAMEDIR=[absolute path to the game folder]

DATA_DIR=${GAMEDIR}/data LOG_DIR=${GEMEDIR}/logs

image_dir ${GAMEDIR}/image txt_dir ${DATA_DIR}/txt

File definitions

MUSHLOGNAME=${LOG_DIR}/$GAMENAME.log SAVENAME=${GAMEDIR}/${GAMENAME}.tar.Z

Database definitions

crash_database ${DATA_DIR}/crash.db gdbm_database ${DATA_DIR}/gdbm.db input_database ${DATA_DIR}/in.db output_database ${DATA_DIR}/out.db

Rest of configuration

Additionally, I would like to propose to move the:

include ${GAMEDIR}/conf/alias.conf include ${GAMEDIR}/conf/muxalias.conf include ${GAMEDIR}/conf/pennalias.conf include ${GAMEDIR}/conf/rhost_ingame.conf include ${GAMEDIR}/conf/rhost_mysql.conf include ${GAMEDIR}/conf/tm3alias.conf

and all script and binaries into bin sub-dir. This would cause that the game dir would be more tidy

warmstarter commented 3 years ago

Personally I would find 'DATA_DIR=${GAMEDIR}' very confusing if added. Besides mixing syntax, it would imply to me that the .conf file has something to do with shell scripts. Also, while I think that there are places with more organization could help, I have a few a disagreements with the exact organizational structure you're proposing.

My recommendation?

Make a directory called something like 'mygame' and create an actual shell script that creates symlinks with 'mygame' to the rest of the directory structure, making 'mygame' look the way you want. Once that's done you can share the shell script with others so that they are able to more clearly see your proposal in actual use.

This shell script is useful for a few reasons:

1) It gets you at least most of what you want no matter what others think about it.

2) If it's not something that is wanted as part of the change for the main repository, it becomes an option for others that do want it.

3) If it is wanted for the main repository, the shell script can be modified to take care of moving the files. In addition, something like this shell script would be necessary in order to provide the backwards compatibility for those that don't want to make the change.

mdziczkowski commented 3 years ago

I understand your point of the view and I agree that it would be a good way to do that. My proposal was based on the fact that the script have sometimes difficulties with the statically hardcoded path in form of data/, especially when running it from another directory. I give bellow a example to try out, to see if it get sucessfully completed when following those steps:

  1. create a sub-directory (for example: "output") and enter it
  2. execute the make as normally done from this directory, but use the "../Makefile" as makefile
  3. try to sucess ;-)