Make nhsetup.bat double-clickable
Picking up on a suggestion made by Yitzhak, allow nhsetup.bat to be double-clicked in Windows to accomplish the necessary file movements.
This commit is contained in:
@@ -42,22 +42,21 @@ environments:
|
||||
FIRST STEP:
|
||||
|
||||
The first step in building either version of NetHack is to execute
|
||||
sys/winnt/nhsetup.bat. Specify either TTY, or WIN.
|
||||
sys/winnt/nhsetup.bat.
|
||||
|
||||
For the tty version using the NT Console I/O subsystem:
|
||||
From the command prompt:
|
||||
cd sys\winnt
|
||||
nhsetup TTY
|
||||
nhsetup
|
||||
|
||||
For the graphical version (NetHackW)
|
||||
cd sys\winnt
|
||||
nhsetup WIN
|
||||
From a Windows explorer window:
|
||||
double-click on nhsetup.bat
|
||||
|
||||
A "binary" directory will be created off the top of the NetHack source
|
||||
tree to house the completed build for TTY and WIN.
|
||||
tree to house the completed build.
|
||||
|
||||
If you specified "WIN", the build subdirectory will also be created off the
|
||||
top of the NetHack source tree, and many files appropriate for that build
|
||||
will be moved there.
|
||||
A build subdirectory will also be created off the top of the NetHack
|
||||
source tree, and many files appropriate for a graphical build will be
|
||||
moved there.
|
||||
|
||||
If you wish to build the TTY version, proceed now to "BUILDING TTY VERSION."
|
||||
If you wish to build the graphical version, proceed now to "BUILDING GRAPHICAL VERSION."
|
||||
@@ -268,7 +267,7 @@ I. Dispelling the Myths:
|
||||
|
||||
It is also assumed that you already changed your directory to
|
||||
sys\winnt and executed:
|
||||
nhsetup win
|
||||
nhsetup
|
||||
as described at the top of this document. If you didn't, you must
|
||||
go back and do so before proceeding.
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
@REM
|
||||
@echo off
|
||||
|
||||
set err_copy=
|
||||
set opt=
|
||||
set _opt=
|
||||
set _donebor=
|
||||
set _pause=
|
||||
|
||||
:nxtcheck
|
||||
echo Checking to see if directories are set up properly
|
||||
if not exist ..\..\include\hack.h goto err_dir
|
||||
if not exist ..\..\src\hack.c goto err_dir
|
||||
@@ -16,43 +18,37 @@ if not exist ..\..\util\makedefs.c goto err_dir
|
||||
if not exist ..\..\sys\winnt\winnt.c goto err_dir
|
||||
echo Directories look ok.
|
||||
|
||||
if "%1"=="tty" goto do_tty
|
||||
if "%1"=="TTY" goto do_tty
|
||||
if "%1"=="win" goto do_win
|
||||
if "%1"=="WIN" goto do_win
|
||||
if "%1"=="gui" goto do_win
|
||||
if "%1"=="GUI" goto do_win
|
||||
goto err_set
|
||||
|
||||
:do_tty
|
||||
set opt=NetHack for NT Console
|
||||
set _opt=NetHack for NT Console
|
||||
if NOT exist ..\..\binary\*.* mkdir ..\..\binary
|
||||
if NOT exist ..\..\binary\license copy ..\..\dat\license ..\..\binary\license >nul
|
||||
echo "Copying Makefile.nt to ..\..\src\Makefile"
|
||||
echo Copying Microsoft Makefile - Makefile.nt to ..\..\src\Makefile.
|
||||
copy Makefile.nt ..\..\src\Makefile >nul
|
||||
echo Microsoft nmake Makefile copied ok.
|
||||
echo "Copying Makefile.bcc to ..\..\src\Makefile.bcc"
|
||||
echo Microsoft Makefile copied ok.
|
||||
echo Copying Borland Makefile - Makefile.bcc to ..\..\src\Makefile.bcc
|
||||
if NOT exist ..\..\src\Makefile.bcc goto dobor
|
||||
copy ..\..\src\Makefile.bcc ..\..\src\Makefile.bcc-orig >nul
|
||||
echo Your existing
|
||||
echo ..\..\src\Makefile.bcc
|
||||
echo has been renamed to
|
||||
echo ..\..\src\Makefile.bcc-orig
|
||||
echo Borland Makefile copied ok.
|
||||
:dobor
|
||||
copy Makefile.bcc ..\..\src\Makefile.bcc >nul
|
||||
echo Borland make Makefile.bcc copied ok.
|
||||
echo done!
|
||||
echo.
|
||||
echo Proceed with the next step documented in Install.nt
|
||||
echo.
|
||||
goto done
|
||||
set _donebor=Y
|
||||
|
||||
:do_win
|
||||
set opt=Graphical NetHack for Windows
|
||||
set _opt=Graphical NetHack for Windows
|
||||
if not exist ..\..\win\win32\nethack.dsw goto err_win
|
||||
|
||||
echo.
|
||||
echo "Copying Visual C project files file to ..\..\build directory"
|
||||
|
||||
echo Copying Visual C project files to ..\..\build directory
|
||||
REM copy ..\..\win\win32\winnt.dsw ..\.. >nul
|
||||
echo copy ..\..\win\win32\nethack.dsw ..\..
|
||||
copy ..\..\win\win32\nethack.dsw ..\..
|
||||
|
||||
echo Copying ..\..\win\win32\nethack.dsw ..\..\nethack.dsw
|
||||
copy ..\..\win\win32\nethack.dsw ..\.. >nul
|
||||
if NOT exist ..\..\binary\*.* echo Creating ..\..\binary directory
|
||||
if NOT exist ..\..\binary\*.* mkdir ..\..\binary
|
||||
if NOT exist ..\..\binary\license copy ..\..\dat\license ..\..\binary\license >nul
|
||||
if NOT exist ..\..\build\*.* echo Creating ..\..\binary directory
|
||||
if NOT exist ..\..\build\*.* mkdir ..\..\build
|
||||
copy ..\..\win\win32\dgncomp.dsp ..\..\build >nul
|
||||
copy ..\..\win\win32\dgnstuff.dsp ..\..\build >nul
|
||||
@@ -69,8 +65,13 @@ copy ..\..\win\win32\tiles.mak ..\..\build >nul
|
||||
copy ..\..\win\win32\tilemap.dsp ..\..\build >nul
|
||||
copy ..\..\win\win32\uudecode.dsp ..\..\build >nul
|
||||
copy ..\..\win\win32\nethackw.dsp ..\..\build >nul
|
||||
if "%_donebor%"=="Y" goto done
|
||||
if NOT exist ..\..\src\Makefile.bcc goto dobor
|
||||
copy ..\..\src\Makefile.bcc ..\..\src\Makefile.bcc-orig >nul
|
||||
echo Your existing
|
||||
echo ..\..\src\Makefile.bcc
|
||||
echo has been renamed to
|
||||
echo ..\..\src\Makefile.bcc-orig
|
||||
:dobor
|
||||
copy Makefile.bcc ..\..\src\Makefile.bcc >nul
|
||||
|
||||
@@ -81,41 +82,31 @@ echo Some of the files needed to build graphical NetHack
|
||||
echo for Windows are not in the expected places.
|
||||
echo Check "Install.nt" for a list of the steps required
|
||||
echo to build NetHack.
|
||||
goto done
|
||||
goto fini
|
||||
|
||||
:err_data
|
||||
echo A required file ..\..\dat\data.bas seems to be missing.
|
||||
echo Check "Files." in the root directory for your NetHack distribution
|
||||
echo and make sure that all required files exist.
|
||||
goto done
|
||||
goto fini
|
||||
|
||||
:err_dir
|
||||
echo Your directories are not set up properly, please re-read the
|
||||
echo documentation and sys/winnt/Install.nt.
|
||||
goto done
|
||||
|
||||
:err_set
|
||||
echo.
|
||||
echo Usage:
|
||||
echo "%0 <tty | win>"
|
||||
echo.
|
||||
echo Run this batch file specifying either "tty" or "win."
|
||||
echo.
|
||||
echo The tty argument is for preparing to build a console I/O TTY version
|
||||
echo of NetHack.
|
||||
echo.
|
||||
echo The win argument is for preparing to build a graphical version
|
||||
echo of NetHack.
|
||||
echo.
|
||||
goto end
|
||||
goto fini
|
||||
|
||||
:done
|
||||
echo done!
|
||||
echo.
|
||||
echo Proceed with the next step documented in Install.nt
|
||||
echo for building %opt%.
|
||||
echo Proceed with the next step documented in Install.nt
|
||||
echo.
|
||||
|
||||
:fini
|
||||
:end
|
||||
|
||||
set _opt=
|
||||
set _donebor=
|
||||
set _pause=Y
|
||||
if "%0"=="nhsetup" set _pause=N
|
||||
if "%0"=="NHSETUP" set _pause=N
|
||||
if "%_pause%"=="Y" pause
|
||||
set _pause=
|
||||
|
||||
Reference in New Issue
Block a user