Up to Main Index Up to Journal for February, 2013 JOURNAL FOR WEDNESDAY 13TH FEBRUARY, 2013 ______________________________________________________________________________ SUBJECT: Deploying and finding resources DATE: Wed Feb 13 22:28:04 GMT 2013 This evening I actually got some time to work on WolfMUD. As you may remember I was last working on resources[1]. The first problem was where to put resources and how to distribute them. I have decided to put them into the repository under a 'data' directory. Anyone using 'go get' or git directly will automatically pull the files. For the binary downloads I will package a separate download common to all the binaries. The second problem was how to locate them on the local file system. For this I decided to define a number of search paths. Each is searched in order until a 'config.wrj' file is found: - current working directory (cwd) - {cwd}/data - binary directory (bin) - {bin}/data - {bin}/../src/code.wolfmud.org/WolfMUD.git/data These should cover most situations automatically. If not there is also a command line option to pass in a custom location and configuration file name. The last unwieldy looking search path locates the configuration when doing a 'go get' with a standard go workspace containing bin, pkg and src directories. Most of it is working for Linux and Windows file systems. Need to do some cleaning up and also need to do some addition work on the Record Jar loader[2]. In case you are wondering I have decided to use the '.wrj' extension for data files: WolfMUD Record Jar - at least for now anyway. At last, a healthy dose of progress... -- Diddymus [1] See entry for Tuesday 29th January: ../1/29.html [2] See entry for Wednesday 9th January: ../1/9.html Up to Main Index Up to Journal for February, 2013