Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37700199
en ru br
Репозитории ALT
S:6.2.2303-alt1
5.1: 4.9.9-alt2
www.altlinux.org/Changes

Группа :: Науки/Математика
Пакет: netgen

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

demoapp/000075500000000000000000000000001223636010500124775ustar00rootroot00000000000000demoapp/Makefile.am000064400000000000000000000003411223636010500145310ustar00rootroot00000000000000include_HEADERS = demoapp.h

AM_CPPFLAGS = $(NETGEN_INCLUDES)

lib_LTLIBRARIES = libdemoapp.la

libdemoapp_la_SOURCES = demoapp.cpp

dist_bin_SCRIPTS = demoapp.tcl

libdemoapp_la_LDFLAGS = -avoid-version

SUBDIRS = windows

demoapp/README000064400000000000000000000017371223636010500133670ustar00rootroot00000000000000The package demoapp explains how to add one's onw program
on top of Netgen. This is, e.g., a good students exercise
for a finite element class.



Have a look into

demoapp.tcl .... defining the GUI
demoapp.cpp .... implementing the functions
configure.ac ... configures the package
Makefile.am .... defines the file structure



if you've got the svn - version, run first

autoreconf --install

this requires the packages 'automake' and 'libtool' installed.



compile with

./configure --with-netgen=/opt/netgen
make

install with

make install


Make sure that the directory /opt/netgen/lib is in your shared
library search path (LD_LIBRARY_PATH=...)

and start netgen. You should have a new menu-item "DemoApp"



And, how did Netgen find to demoapp ?
There is the command "load libdemoapp.so demoapp"
at the end of /opt/netgen/bin/ng.tcl

If it does not work, comment in the following two lines to
obtain a proper error-message.




You can uninstall with

make uninstall

demoapp/configure.ac000064400000000000000000000007201223636010500147640ustar00rootroot00000000000000AC_INIT([demoapp],[4.9.10],[])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])

AC_PREFIX_DEFAULT(["/opt/netgen"])


AC_ARG_WITH([netgen],
[ --with-netgen=dir use Netgen installed in directory dir],
[netgendir=$withval],
[netgendir="/opt/netgen"]
)


AC_SUBST([NETGEN_INCLUDES], ["-I$netgendir/include"])


AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL

AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES(Makefile windows/Makefile)

AC_OUTPUT
demoapp/demoapp.cpp000064400000000000000000000055421223636010500146360ustar00rootroot00000000000000// ------------------------------------------------------------------
/*!
\file demoapp.cpp
\brief Demonstration application for a Netgen Application Program
\author Joachim Schoeberl
\date
*/
// ------------------------------------------------------------------


#include <iostream>
using namespace std;

// for tcltk ...
#include <tcl.h>

// netgen interface
#include <nginterface.h>

// Include the local header for declaration of locally
// exported functions
#include "demoapp.h"


#ifdef HAVE_CONFIG_H
#include "config.h"
#endif



// ****** Local function declarations ******
int DA_ChooseMe (ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
int DA_PrintMesh (ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
int DA_SetSolution (ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);

// ****** Start of Code ******

// Initialisation function for Netgen -> Application interface
// through TCL
int Demoapp_Init (Tcl_Interp * interp)
{
cout << "Init demoapp"
#ifdef HAVE_CONFIG_H
<< " - " << VERSION
#endif
<< endl;

Tcl_CreateCommand (interp, "DA_ChooseMe", DA_ChooseMe,
(ClientData)NULL,
(Tcl_CmdDeleteProc*) NULL);

Tcl_CreateCommand (interp, "DA_PrintMesh", DA_PrintMesh,
(ClientData)NULL,
(Tcl_CmdDeleteProc*) NULL);

Tcl_CreateCommand (interp, "DA_SetSolution", DA_SetSolution,
(ClientData)NULL,
(Tcl_CmdDeleteProc*) NULL);

return TCL_OK;
}



int DA_ChooseMe (ClientData clientData,
Tcl_Interp * interp,
int argc, const char *argv[])
{
cout << "Hi" << endl;
return TCL_OK;
}



int DA_PrintMesh (ClientData clientData,
Tcl_Interp * interp,
int argc, const char *argv[])
{
int np = Ng_GetNP();
int ne = Ng_GetNE();

cout << "Points: " << np << endl;
cout << "Tets: " << ne << endl;

double point[3];
int tet[4];

for (int i = 1; i <= np; i++)
{
Ng_GetPoint (i, point);
cout << "Point " << i << ": ";
cout << point[0] << " " << point[1] << " "
<< point[2] << endl;
}

for (int i = 1; i <= ne; i++)
{
Ng_GetElement (i, tet);
cout << "Tet " << i << ": ";
cout << tet[0] << " " << tet[1] << " "
<< tet[2] << " " << tet[3] << endl;
}

return TCL_OK;
}



int DA_SetSolution (ClientData clientData,
Tcl_Interp * interp,
int argc, const char *argv[])
{
int np = Ng_GetNP();

if (!np)
{
Tcl_SetResult (interp, (char*)"This operation needs a mesh", TCL_STATIC);
return TCL_ERROR;
}

double point[3];

double * sol = new double[np];

for (int i = 1; i <= np; i++)
{
Ng_GetPoint (i, point);
sol[i-1] = point[0];
}


Ng_SolutionData soldata;
Ng_InitSolutionData (&soldata);

soldata.data = sol;
soldata.name = "My Solution";

Ng_SetSolutionData (&soldata);

return TCL_OK;
}

demoapp/demoapp.h000064400000000000000000000017011223636010500142740ustar00rootroot00000000000000#ifndef DEMOAPP
#define DEMOAPP

/**************************************************************************/
/* File: demoapp.h */
/* Author: Joachim Schoeberl */
/* Date: */
/**************************************************************************/

/*!
\file demoapp.h
\brief Header - Demonstration application for a Netgen Application Program
\author Joachim Schoeberl
\date
*/

// DLL Import Headers for Netgen functions

#ifdef WIN32
#define LOCAL_EXPORTS __declspec(dllexport)
#else
#define LOCAL_EXPORTS
#endif


// ****** Functions exported by the Application ******
// initialize Tcl commands
// Must always be <appname>_Init(Tcl_Interp*)
extern "C" LOCAL_EXPORTS int Demoapp_Init (Tcl_Interp * interp);


// ****** End of Module ******
#endif // #ifndef DEMOAPP

demoapp/demoapp.tcl000064400000000000000000000010271223636010500146300ustar00rootroot00000000000000puts "loading demo-application"

if { [catch { load libdemoapp[info sharedlibextension] demoapp } result] } {
puts "cannot load demoapp"
puts "error: $result"
} {

.ngmenu add cascade -label "DemoApp" -menu .ngmenu.demo -underline 0

menu .ngmenu.demo
.ngmenu.demo add command -label "Choose me" \
-command { DA_ChooseMe }

.ngmenu.demo add command -label "Print Mesh" \
-command { DA_PrintMesh }

.ngmenu.demo add command -label "Compute Solution" \
-command { DA_SetSolution }
}
demoapp/windows/000075500000000000000000000000001223636010500141715ustar00rootroot00000000000000demoapp/windows/Makefile.am000064400000000000000000000000761223636010500162300ustar00rootroot00000000000000dist_noinst_DATA = demoapp.sln demoapp.vcproj postBuild.bat


demoapp/windows/demoapp.sln000064400000000000000000000023261223636010500163370ustar00rootroot00000000000000О╩©
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demoapp", "demoapp.vcproj", "{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}.Debug|Win32.ActiveCfg = Debug|Win32
{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}.Debug|Win32.Build.0 = Debug|Win32
{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}.Debug|x64.ActiveCfg = Debug|x64
{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}.Debug|x64.Build.0 = Debug|x64
{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}.Release|Win32.ActiveCfg = Release|Win32
{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}.Release|Win32.Build.0 = Release|Win32
{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}.Release|x64.ActiveCfg = Release|x64
{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
demoapp/windows/demoapp.vcproj000064400000000000000000000254631223636010500170550ustar00rootroot00000000000000<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="demoapp"
ProjectGUID="{784BEA12-FC66-4FE1-A5C8-54AE6EC3A383}"
RootNamespace="demoapp"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(NETGENDIR)\..\include&quot;;&quot;$(SolutionDir)..&quot;;&quot;$(SolutionDir)..\..\ext_libs\tcl\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DEMOAPP_EXPORTS;MSVC_EXPRESS;WINVER=0x0600;NTDDI_VERSION=NTDDI_VISTA"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="tcl85.lib nginterface.lib"
OutputFile="$(OutDir)\lib$(ProjectName).dll"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(NETGENDIR)\..\lib&quot;;&quot;$(SolutionDir)..\..\ext_libs\tcl\lib&quot;"
ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
EnableUAC="true"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)lib$(TargetName).lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
OutputManifestFile="$(OutDir)\$(TargetFileName).embed.manifest"
ManifestResourceFile="$(OutDir)\$(TargetFileName).embed.manifest.res"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="&quot;$(ProjectDir)\postBuild&quot; &quot;$(ProjectName)&quot; &quot;$(TargetName)&quot; &quot;$(ConfigurationName)&quot; &quot;$(PlatformName)&quot; &quot;$(ProjectDir)&quot;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(NETGENDIR)\..\include&quot;;&quot;$(SolutionDir)..&quot;;&quot;$(SolutionDir)..\..\ext_libs\tcl-64\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DEMOAPP_EXPORTS;MSVC_EXPRESS;WINVER=0x501"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="tcl85.lib nginterface.lib"
OutputFile="$(OutDir)\lib$(ProjectName).dll"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(NETGENDIR)\..\lib&quot;;&quot;$(SolutionDir)..\..\ext_libs\tcl-64\lib&quot;"
ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
EnableUAC="true"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)lib$(TargetName).lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
OutputManifestFile="$(OutDir)\$(TargetFileName).embed.manifest"
ManifestResourceFile="$(OutDir)\$(TargetFileName).embed.manifest.res"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="&quot;$(ProjectDir)\postBuild&quot; &quot;$(ProjectName)&quot; &quot;$(TargetName)&quot; &quot;$(ConfigurationName)&quot; &quot;$(PlatformName)&quot; &quot;$(ProjectDir)&quot;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="&quot;$(NETGENDIR)\..\include&quot;;&quot;$(SolutionDir)..&quot;;&quot;$(SolutionDir)..\..\ext_libs\tcl\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DEMOAPP_EXPORTS;MSVC_EXPRESS;WINVER=0x0600;NTDDI_VERSION=NTDDI_VISTA"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
WarningLevel="2"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="tcl85.lib nginterface.lib"
OutputFile="$(OutDir)\lib$(ProjectName).dll"
LinkIncremental="0"
AdditionalLibraryDirectories="&quot;$(NETGENDIR)\..\lib&quot;;&quot;$(SolutionDir)..\..\ext_libs\tcl\lib&quot;"
ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
EnableUAC="true"
GenerateDebugInformation="false"
SubSystem="2"
OptimizeReferences="0"
EnableCOMDATFolding="0"
LinkTimeCodeGeneration="1"
ProfileGuidedDatabase=""
ImportLibrary="$(TargetDir)$(TargetName).lib"
TargetMachine="1"
AllowIsolation="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
OutputManifestFile="$(OutDir)\$(TargetFileName).embed.manifest"
ManifestResourceFile="$(OutDir)\$(TargetFileName).embed.manifest.res"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="&quot;$(ProjectDir)\postBuild&quot; &quot;$(ProjectName)&quot; &quot;$(TargetName)&quot; &quot;$(ConfigurationName)&quot; &quot;$(PlatformName)&quot; &quot;$(ProjectDir)&quot;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="&quot;$(NETGENDIR)\..\include&quot;;&quot;$(SolutionDir)..&quot;;&quot;$(SolutionDir)..\..\ext_libs\tcl-64\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DEMOAPP_EXPORTS;MSVC_EXPRESS;WINVER=0x0600;NTDDI_VERSION=NTDDI_VISTA"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
WarningLevel="2"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="tcl85.lib nginterface.lib"
OutputFile="$(OutDir)\lib$(ProjectName).dll"
LinkIncremental="0"
AdditionalLibraryDirectories="&quot;$(NETGENDIR)\..\lib&quot;;&quot;$(SolutionDir)..\..\ext_libs\tcl-64\lib&quot;"
ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
EnableUAC="true"
GenerateDebugInformation="false"
SubSystem="2"
OptimizeReferences="0"
EnableCOMDATFolding="0"
LinkTimeCodeGeneration="1"
ProfileGuidedDatabase=""
ImportLibrary="$(TargetDir)$(TargetName).lib"
TargetMachine="17"
AllowIsolation="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
OutputManifestFile="$(OutDir)\$(TargetFileName).embed.manifest"
ManifestResourceFile="$(OutDir)\$(TargetFileName).embed.manifest.res"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="&quot;$(ProjectDir)\postBuild&quot; &quot;$(ProjectName)&quot; &quot;$(TargetName)&quot; &quot;$(ConfigurationName)&quot; &quot;$(PlatformName)&quot; &quot;$(ProjectDir)&quot;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\demoapp.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\demoapp.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
demoapp/windows/postBuild.bat000064400000000000000000000073501223636010500166330ustar00rootroot00000000000000REM *********************************************************************************
REM *** Netgen Demonstration Application (demoapp) Windows Post-Build Script
REM *** Author: Philippose Rajan
REM *** Date: 05/04/2009
REM ***
REM *** Used to perform an "Install" of the generated Dynamic Link Library (DLL)
REM *** and the corresponding TCL file(s).
REM ***
REM *** NOTE: This script copies all the TCL files present in the folder into the
REM *** installation folder.
REM ***
REM *** Call from Visual C++ using:
REM *** postBuild.bat $(ProjectName) $(TargetName) $(ConfigurationName) $(ProjectDir)
REM *********************************************************************************
if [%1]==[] goto InputParamsFailed
set PROJ_NAME=%~1
set PROJ_EXEC=%~2
set BUILD_TYPE=%~3
set BUILD_ARCH=%~4
set PROJ_DIR=%~5

REM *** Change these Folders if required ***
REM Check if the environment variable NETGENDIR exists,
REM and use it as the installation folder
if defined NETGENDIR (
echo Environment variable NETGENDIR found: %NETGENDIR%
set INSTALL_FOLDER=%NETGENDIR%\..
) else (
echo Environment variable NETGENDIR not found.... using default location!!!
set INSTALL_FOLDER=%PROJ_DIR%..\..\%PROJ_NAME%-inst_%BUILD_ARCH%
)

set APP_TCLSRC=%PROJ_DIR%..


echo POSTBUILD Script for %PROJ_NAME% ........

REM *** Embed the Windows Manifest into the Executable File ***
REM echo Embedding Manifest into the DLL: %PROJ_EXEC%.dll ....
REM mt.exe -manifest "%BUILD_TYPE%\%PROJ_EXEC%.dll.intermediate.manifest" "-outputresource:%BUILD_TYPE%\%PROJ_EXEC%.dll;2"
REM if errorlevel 1 goto ManifestFailed
REM echo Embedding Manifest into the DLL: Completed OK!!

REM *** Copy the DLL and LIB Files into the install folder ***
echo Installing application DLL file into %INSTALL_FOLDER%\bin ....
if /i "%BUILD_ARCH%" == "win32" (
xcopy "%PROJ_DIR%\%BUILD_TYPE%\%PROJ_EXEC%.dll" "%INSTALL_FOLDER%\bin\" /i /d /y
if errorlevel 1 goto DLLInstallFailed
)
if /i "%BUILD_ARCH%" == "x64" (
xcopy "%PROJ_DIR%\%BUILD_ARCH%\%BUILD_TYPE%\%PROJ_EXEC%.dll" "%INSTALL_FOLDER%\bin\" /i /d /y
if errorlevel 1 goto DLLInstallFailed
)
echo Installing %PROJ_EXEC%: Completed OK!!

REM echo Installing application Lib file into %INSTALL_FOLDER%\lib ....
REM xcopy "%PROJ_DIR%\%BUILD_TYPE%\%PROJ_EXEC%.lib" "%INSTALL_FOLDER%\lib\" /i /d /y
REM if errorlevel 1 goto LibInstallFailed
REM echo Installing %PROJ_EXEC%.lib: Completed OK!!

REM *** Copy the application TCL files into the Install Folder ***
echo Installing application TCL files into %INSTALL_FOLDER% ....
xcopy "%APP_TCLSRC%\*.tcl" "%INSTALL_FOLDER%\bin\" /i /d /y
if errorlevel 1 goto AppTCLFailed
echo Installing application TCL Files: Completed OK!!

REM *** Clean up the build directory by deleting the OBJ files ***
REM echo Deleting the %PROJ_NAME% build folder %PROJ_DIR%%PROJ_NAME% ....
REM rmdir %PROJ_DIR%%PROJ_NAME% /s /q

REM *** If there have been no errors so far, we are done ***
goto BuildEventOK

REM *** Error Messages for each stage of the post build process ***
:InputParamsFailed
echo POSTBUILD Script for %PROJ_NAME% FAILED..... Invalid number of input parameters!!!
exit 1
:ManifestFailed
echo POSTBUILD Script for %PROJ_NAME% FAILED..... Manifest not successfully embedded!!!
exit 1
:AppTCLFailed
echo POSTBUILD Script for %PROJ_NAME% FAILED..... Error copying application TCL Files into install folder!!!
exit 1
:DLLInstallFailed
echo POSTBUILD Script for %PROJ_NAME% FAILED..... Error copying %PROJ_EXEC%.dll into install folder!!!
exit 1
:LibInstallFailed
echo POSTBUILD Script for %PROJ_NAME% FAILED..... Error copying %PROJ_EXEC%.lib into install folder!!!
exit 1

:BuildEventOK
echo POSTBUILD Script for %PROJ_NAME% completed OK.....!!
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin