@echo off

echo Installing to %COINDIR%

if not "%COINDIR%"=="" goto coindirset
echo The COINDIR environment variable must be set to point to a directory
echo to be able to perform the installation procedure.
exit
:coindirset
if exist %COINDIR%\*.* goto coindirexists
echo The COINDIR environment variable must point to an existing directory
echo to be able to perform the installation procedure.
exit
:coindirexists

pushd %COINDIR%

REM **********************************************************************
REM * Create include\Inventor\cve directories

if exist include\*.* goto includeexists
echo mkdir %COINDIR%\include
mkdir include
:includeexists
chdir include

if exist Inventor\*.* goto inventorexists
echo mkdir %COINDIR%\include\Inventor
mkdir Inventor
:inventorexists
chdir Inventor

if exist cve\*.* goto cveexists
echo mkdir %COINDIR%\include\Inventor\cve
mkdir cve
:cveexists
cd ..\..

popd

REM **********************************************************************
REM * Copy files

echo Installing cve header files...
copy ..\..\include\Inventor\cve\*.* %COINDIR%\include\Inventor\cve\ >nul:

REM **********************************************************************
REM * Call original script

call install-dll-release.bat
