mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-13 22:50:33 +05:00
44 lines
1.7 KiB
Batchfile
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.....!!
|