Renamed configuration file for windows to .nethackrc.

Also adjusted name of template files populated during windows builds.
This commit is contained in:
Bart House
2019-11-02 19:11:26 -07:00
parent 2b73494296
commit 11018da6b8
7 changed files with 25 additions and 26 deletions

12
Files
View File

@@ -273,12 +273,12 @@ stat.h
sys/winnt:
(files for Windows 7/8.x/10 version)
Install.nt Makefile.gcc Makefile.msc console.rc
defaults.nh nethack.def nh340key.c nhdefkey.c
nhico.uu nhraykey.c nhsetup.bat ntsound.c
nttty.c porthelp stub-pdcscrn.c stubs.c
sysconf win10.c win10.h win32api.h
windmain.c winnt.c winos.h
Install.nt Makefile.gcc Makefile.msc console.rc
.nethackrc.template nethack.def nh340key.c nhdefkey.c
nhico.uu nhraykey.c nhsetup.bat ntsound.c
nttty.c porthelp stub-pdcscrn.c stubs.c
sysconf.template win10.c win10.h win32api.h
windmain.c winnt.c winos.h
util:
(files for all versions)

View File

@@ -81,7 +81,7 @@
*/
#define CONFIG_FILE ".nethackrc"
#define CONFIG_TEMPLATE ".nethack.template"
#define CONFIG_TEMPLATE ".nethackrc.template"
#define SYSCF_TEMPLATE "sysconf.template"
#define SYMBOLS_TEMPLATE "symbols.template"
#define GUIDEBOOK_FILE "Guidebook.txt"

View File

@@ -305,23 +305,23 @@ void copy_config_content()
/* Keep templates up to date */
/* TODO: Update the package to store config file as .nethackrc */
update_file(fqn_prefix[CONFIGPREFIX], CONFIG_TEMPLATE,
fqn_prefix[DATAPREFIX], CONFIG_FILE, FALSE);
fqn_prefix[DATAPREFIX], CONFIG_TEMPLATE, FALSE);
update_file(fqn_prefix[SYSCONFPREFIX], SYSCF_TEMPLATE,
fqn_prefix[DATAPREFIX], SYSCF_FILE, FALSE);
fqn_prefix[DATAPREFIX], SYSCF_TEMPLATE, FALSE);
/* If the required early game file does not exist, copy it */
/* NOTE: We never replace .nethackrc or sysconf */
copy_file(fqn_prefix[CONFIGPREFIX], CONFIG_FILE,
fqn_prefix[DATAPREFIX], CONFIG_FILE);
fqn_prefix[DATAPREFIX], CONFIG_TEMPLATE);
copy_file(fqn_prefix[SYSCONFPREFIX], SYSCF_FILE,
fqn_prefix[DATAPREFIX], SYSCF_FILE);
fqn_prefix[DATAPREFIX], SYSCF_TEMPLATE);
/* Update symbols and save a copy if we are replacing */
/* TODO: Can't HACKDIR be changed during option parsing
causing us to perhaps be checking options against the wrong
symbols file? */
update_file(fqn_prefix[HACKPREFIX], SYMBOLS,
fqn_prefix[DATAPREFIX], SYMBOLS, TRUE);
fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, TRUE);
}
void
@@ -335,7 +335,7 @@ copy_hack_content()
/* Keep templates up to date */
update_file(fqn_prefix[HACKPREFIX], SYMBOLS_TEMPLATE,
fqn_prefix[DATAPREFIX], SYMBOLS, FALSE);
fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, FALSE);
}

View File

@@ -113,8 +113,8 @@
<Content Include="Images\Wide310x150Logo.scale-125.png" />
<Content Include="Images\Wide310x150Logo.scale-150.png" />
<Content Include="Images\Wide310x150Logo.scale-200.png" />
<Content Include="$(BinDir)defaults.nh">
<Link>NetHackW\defaults.nh</Link>
<Content Include="$(BinDir).nethackrc.template">
<Link>NetHackW\.nethackrc.template</Link>
</Content>
<Content Include="$(BinDir)Guidebook.txt">
<Link>NetHackW\Guidebook.txt</Link>
@@ -128,11 +128,11 @@
<Content Include="$(BinDir)opthelp">
<Link>NetHackW\opthelp</Link>
</Content>
<Content Include="$(BinDir)symbols">
<Link>NetHackW\symbols</Link>
<Content Include="$(BinDir)symbols.template">
<Link>NetHackW\symbols.template</Link>
</Content>
<Content Include="$(BinDir)sysconf">
<Link>NetHackW\sysconf</Link>
<Content Include="$(BinDir)sysconf.template">
<Link>NetHackW\sysconf.template</Link>
</Content>
<Content Include="Images\Wide310x150Logo.scale-400.png" />
<None Include="NetHackPackage_StoreKey.pfx" />

View File

@@ -3,13 +3,12 @@
<Import Project="files.props"/>
<!-- TODO not copying record -->
<Target Name="Build"
Inputs="$(SysWinntDir)defaults.nh;$(DocDir)Guidebook.txt;$(DatDir)license;$(SysWinntDir)sysconf;$(DocDir)nethack.txt;$(DatDir)symbols;$(WinWin32Dir)record;$(DatDir)opthelp"
Outputs="$(BinDir)defaults.nh;$(BinDir)Guidebook.txt;$(BinDir)license;$(BinDir)sysconf;$(BinDir)symbols;$(BinDir)record;$(BinDir)opthelp">
<Copy SourceFiles="$(SysWinntDir)defaults.nh;$(DocDir)Guidebook.txt;$(DatDir)license;$(SysWinntDir)sysconf;$(DocDir)nethack.txt;$(DatDir)symbols;$(WinWin32Dir)record;$(DatDir)opthelp" DestinationFolder="$(BinDir)"/>
</Target>
Inputs="$(SysWinntDir).nethackrc.template;$(DocDir)Guidebook.txt;$(DatDir)license;$(SysWinntDir)sysconf.template;$(DocDir)nethack.txt;$(DatDir)symbols;$(WinWin32Dir)record;$(DatDir)opthelp"
Outputs="$(BinDir).nethackrc.template;$(BinDir)Guidebook.txt;$(BinDir)license;$(BinDir)sysconf.template;$(BinDir)symbols.template;$(BinDir)record;$(BinDir)opthelp">
<Copy SourceFiles="$(SysWinntDir).nethackrc.template;$(DocDir)Guidebook.txt;$(DatDir)license;$(SysWinntDir)sysconf.template;$(DocDir)nethack.txt;$(DatDir)symbols;$(WinWin32Dir)record;$(DatDir)opthelp"
DestinationFiles="$(BinDir).nethackrc.template;$(BinDir)Guidebook.txt;$(BinDir)license;$(BinDir)sysconf.template;$(BinDir)nethack.txt;$(BinDir)symbols.template;$(BinDir)record;$(BinDir)opthelp" />
</Target>
<Target Name="Clean">
<Delete Files="$(BinDir)defaults.nh;$(BinDir)Guidebook.txt;$(BinDir)license;$(BinDir)sysconf;$(BinDir)nethack.txt;$(BinDir)symbols;$(BinDir)record;$(BinDir)opthelp"/>
<Delete Files="$(BinDir).nethackrc.template;$(BinDir)Guidebook.txt;$(BinDir)license;$(BinDir)sysconf.template;$(BinDir)nethack.txt;$(BinDir)symbols.template;$(BinDir)record;$(BinDir)opthelp"/>
</Target>
</Project>