Help with creating a portable version of nethack
Guys...I have another question...I wanted to make a portable version of nethack and I found that changing an option in the sysconf file will do the trick but I had a few questions regarding that:
is there a pre existing sysconf file in one of the automatically made nethack directories which I have to edit or do I have to manually change the extension of the template file and then place it in the same folder as the binaries?
can the sysconf settings regarding portable installation be changed anytime or does it have to be done during a fresh installation. Will the change be apparent right after opening a new game?
are there any specific files that do not obey the portable installation setting and will get sent to random directories regardless of the option?
I would be really grateful if I got some help with this as I didn't get any response when I posted this in the roguelikes discord server.
Edit: figured it out with help from u/BlindGuyNW. What you have to do to activate portable mode is to uncomment that line in the sysconf file , Save the changes and then change sysconf.template to just sysconf. Once you do this all the files including the savefile and the rc file will get transferred to your main directory containing the .exe game files.
Edit 2: so I tried to make my installation of 3.6.7 portable as well and it turns out that the option is not given in the sysconf file as in 5.0 but inputting the same setting in the 3.6.7's sysconf file does enable portable mode. But unlike 5.0, in 3.6.7 on startup after changing options the game expects there to be all files of the original installation including the template file you just altered. If the template file is not present then it'll give you an error stating template file not found. An easy solution to this is once you change the option and rename the sysconf file just make another copy and add the .template extension back into it. Now you should have both the sysconf and the sysconf.template file allowing the game to run in portable mode.
Edit 3: one more thing...any changes you've made to your rc file prior to option change will not cross over after converting it to portable mode as it creates a brand new rc file...so you'll have to edit it once more. Just copy and paste the text from your old rc to the new rc.