netgen/windows/postBuild_Install.bat
Philippose Rajan 8212006b9c * Microsoft Visual C++ 2008 Solution and Project files for compiling Netgen in Windows
* A Compiler Switch (MSVC_EXPRESS) allows the code to be compiled in the Express Editions of Visual C++ without any further modifications
* These project files also include build configurations for compiling Netgen with OpenCascade support
2009-01-31 20:19:54 +00:00

44 lines
1.7 KiB
Batchfile

REM *********************************************************************************
REM *** Netgen Windows Post-Build Script
REM *** Author: Philippose Rajan
REM *** Date: 31/01/2009
REM ***
REM *** Used to perform an "Install" of the generated executable
REM *** along with the required *.tcl files
REM ***
REM *** Call from Windows using:
REM *** postBuild_Install.bat $(InputName) $(TargetFileName) $(OutDir) $(ProjectDir)
REM *********************************************************************************
if [%1]==[] goto BuildEventFailed
set PROJ_NAME=%1
set PROJ_EXEC=%2
set BUILD_TYPE=%3
set PROJ_DIR=%4
REM *** Change these Folders if required ***
set NETGEN_TCLSRC=%PROJ_DIR%..\ng
set INSTALL_FOLDER=%PROJ_DIR%%BUILD_TYPE%-inst
echo POSTBUILD Script for %PROJ_NAME% ........
REM *** Embed the Windows Manifest into the Executable File ***
echo Embedding Manifest into the executable: %PROJ_EXEC% ....
mt.exe -manifest "%BUILD_TYPE%\%PROJ_EXEC%.intermediate.manifest" "-outputresource:%BUILD_TYPE%\%PROJ_EXEC%;1"
if errorlevel 1 goto BuildEventFailed
REM *** Copy the TCL files and the executable to the Install Folder ***
echo Installing required files into %INSTALL_FOLDER% ....
xcopy "%NETGEN_TCLSRC%\*.tcl" "%INSTALL_FOLDER%" /i /d /y
if errorlevel 1 goto BuildEventFailed
xcopy "%PROJ_DIR%%BUILD_TYPE%\%PROJ_EXEC%" "%INSTALL_FOLDER%" /i /d /y
if errorlevel 1 goto BuildEventFailed
REM *** If there have been no errors so far, we are done ***
goto BuildEventOK
:BuildEventFailed
echo POSTBUILD Script for %PROJ_NAME% FAILED..... Install Manually !!!
exit 1
:BuildEventOK
echo POSTBUILD Script for %PROJ_NAME% completed OK.....!!