@ECHO off CLS ECHO Author: Fraser Chapman ECHO Email: fraser.chapman@gmail.com ECHO Url: http://code.google.com/p/winforms-geplugin-control-library ECHO *** Interop.GEPlugin.dll make file. *** ECHO *** fraser.chapman@gmail.com *** REM *** plugin parameters *** SET ax=plugin_ax.dll SET path=C:\Program Files\Google\Google Earth Plugin\ie REM *** tlbimp parameters *** SET tlbimp="C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\Tlbimp.exe" SET namespace=/namespace:GEPlugin SET assembly=Interop.GEPlugin.dll SET out=/out:%assembly% SET machine=/machine:X86 SET verbose=/verbose REM *** check if the plugin path exists *** IF NOT EXIST "%path%" GOTO NOTINSTALLED REM *** try to find the latest plugin *** CD /d "%path%" FOR /f "tokens=*" %%a in ('dir /b /od 2^>NUL') do set latest=%%a IF "%latest%"=="" GOTO NOTFOUND SET plugin="%path%\%latest%\%ax%" REM *** build into the same directory as this file *** CD /d %0\.. REM *** remove any existing assembly *** IF EXIST "%assembly%" DEL /F /Q %assembly% REM *** build the assembly *** %tlbimp% %out% %namespace% %machine% %verbose% %plugin% GOTO FINISHED :NOTINSTALLED ECHO ERROR! The path: "%path%" does not seem to exist. GOTO END :NOTFOUND ECHO ERROR! Could not find the plugin folder: GOTO END :FINISHED ECHO Finished! GOTO END :END REM EOF