Mostly it's just project formats, but VS2013 does require parallel compilation to be turned off and synchronous PDB writes to be turned on (since we reuse intermediate output directories). Cleaning that up is for some time in the future.
149 lines
4.8 KiB
Batchfile
Executable File
149 lines
4.8 KiB
Batchfile
Executable File
@REM NetHack 3.5 nhsetup.bat $Date$ $Revision$ */
|
|
@REM Copyright (c) NetHack PC Development Team 1993-2010
|
|
@REM NetHack may be freely redistributed. See license for details.
|
|
@REM Win32 setup batch file, see Install.nt for details
|
|
@REM
|
|
@echo off
|
|
|
|
set _pause=
|
|
set MSVCVERSION=2013
|
|
set WIN32PATH=..\..\win\win32
|
|
set BUILDPATH=..\..\build
|
|
set BINPATH=..\..\binary
|
|
set SRCPATH=%WIN32PATH%\vs%MSVCVERSION%
|
|
|
|
: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
|
|
if not exist ..\..\dat\wizard.des goto :err_dir
|
|
if not exist ..\..\util\makedefs.c goto :err_dir
|
|
if not exist ..\..\sys\winnt\winnt.c goto :err_dir
|
|
echo Directories look ok.
|
|
|
|
:do_tty
|
|
if NOT exist %BINPATH%\*.* mkdir %BINPATH%
|
|
if NOT exist %BINPATH%\license copy ..\..\dat\license %BINPATH%\license >nul
|
|
echo Copying Microsoft Makefile - Makefile.msc to ..\..\src\Makefile.
|
|
if NOT exist ..\..\src\Makefile goto :domsc
|
|
copy ..\..\src\Makefile ..\..\src\Makefile-orig >nul
|
|
echo Your existing
|
|
echo ..\..\src\Makefile
|
|
echo has been renamed to
|
|
echo ..\..\src\Makefile-orig
|
|
:domsc
|
|
copy Makefile.msc ..\..\src\Makefile >nul
|
|
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
|
|
:dobor
|
|
copy Makefile.bcc ..\..\src\Makefile.bcc >nul
|
|
echo Borland Makefile copied ok.
|
|
|
|
echo Copying MinGW Makefile - Makefile.gcc to ..\..\src\Makefile.gcc
|
|
if NOT exist ..\..\src\Makefile.gcc goto :dogcc
|
|
copy ..\..\src\Makefile.gcc ..\..\src\Makefile.gcc-orig >nul
|
|
echo Your existing
|
|
echo ..\..\src\Makefile.gcc
|
|
echo has been renamed to
|
|
echo ..\..\src\Makefile.gcc-orig
|
|
:dogcc
|
|
copy Makefile.gcc ..\..\src\Makefile.gcc >nul
|
|
echo MinGW Makefile copied ok.
|
|
|
|
:do_win
|
|
if not exist %SRCPATH%\nethack.sln goto :err_win
|
|
|
|
echo.
|
|
if exist %BUILDPATH%\*.* goto projectcopy
|
|
|
|
echo Creating %BUILDPATH% directory
|
|
mkdir %BUILDPATH%
|
|
|
|
:projectcopy
|
|
|
|
@REM Visual Studio Express solution file
|
|
if NOT exist %SRCPATH%\nethack.sln goto skipsoln
|
|
echo Copying %SRCPATH%\nethack.sln ..\..\nethack.sln
|
|
copy %SRCPATH%\nethack.sln ..\.. >nul
|
|
:skipsoln
|
|
|
|
if NOT exist %BINPATH%\*.* echo Creating %BINPATH% directory
|
|
if NOT exist %BINPATH%\*.* mkdir %BINPATH%
|
|
if NOT exist %BINPATH%\license copy ..\..\dat\license %BINPATH%\license >nul
|
|
|
|
echo Copying Visual C project files to %BUILDPATH% directory
|
|
|
|
copy %WIN32PATH%\dgnstuff.mak %BUILDPATH% >nul
|
|
copy %WIN32PATH%\levstuff.mak %BUILDPATH% >nul
|
|
copy %WIN32PATH%\tiles.mak %BUILDPATH% >nul
|
|
|
|
@REM Visual C++ 201X Express project files
|
|
:vcexpress
|
|
if NOT exist %SRCPATH%\makedefs.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\tile2bmp.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\tilemap.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\uudecode.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\NetHackW.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\dgncomp.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\dgnstuff.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\dlb_main.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\levcomp.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\levstuff.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\recover.vcxproj goto skipvcexpress
|
|
if NOT exist %SRCPATH%\tiles.vcxproj goto skipvcexpress
|
|
|
|
copy %SRCPATH%\makedefs.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\tile2bmp.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\tilemap.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\uudecode.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\NetHackW.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\dgncomp.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\dgnstuff.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\dlb_main.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\levcomp.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\levstuff.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\recover.vcxproj %BUILDPATH% >nul
|
|
copy %SRCPATH%\tiles.vcxproj %BUILDPATH% >nul
|
|
:skipvcexpress
|
|
|
|
goto :done
|
|
|
|
:err_win
|
|
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 :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 :fini
|
|
|
|
:err_dir
|
|
echo Your directories are not set up properly, please re-read the
|
|
echo documentation and sys/winnt/Install.nt.
|
|
goto :fini
|
|
|
|
:done
|
|
echo done!
|
|
echo.
|
|
echo Proceed with the next step documented in Install.nt
|
|
echo.
|
|
|
|
:fini
|
|
:end
|
|
set _pause=Y
|
|
if "%0"=="nhsetup" set _pause=N
|
|
if "%0"=="NHSETUP" set _pause=N
|
|
if "%_pause%"=="Y" pause
|
|
set _pause=
|