rem **************************************** rem Local variables section rem **************************************** setlocal set projectDir=%~s2 set targetPath=%~s3 set targetDir=%~dps3 set targetName=%~n3 set targetExt=%~x3 set teamProject=%~4 @echo %projectDir% @echo %targetPath% @echo %targetDir% @echo %targetName% @echo %targetExt% @echo %teamProject% set basedir=%~dps0 set rootDir=%basedir%..\Root\ set tools=%basedir%build\tools\ set inetDir=%basedir%..\Root\web\ set wmDir=%basedir%..\Root\wm\ set svcDir=%basedir%..\Root\svc\ set roboOptions=/NFL /NDL /NP /NJH /A-:R set roboDir=%basedir% set linkerPath=%basedir%..\Root\Libraries\ set packagesRepository=%linkerPath%nuget.repository\Matrix42\ set packages=%basedir%nuget.packages\ set outPackages=%basedir%_packages\ set supportedCultures=EN DE FR ES NL PL PT IT SET project=%projectDir% IF %project:~-1%==\ SET project=%project:~0,-1% rem **************************************** rem Pre build event section rem **************************************** if %1==/pre ( rem Start resource convertion if .hresx file exists rem if exist "%projectDir%Resources.hresx" ( "%rootDir%bin\ResConverter.exe" -resx "%projectDir%Resources.hresx" "%projectDir%Resources.resx" if errorlevel 1 goto EndError) if not "%~5"=="/skipVersionCopy" ( rem Copy AssemblyInfoProduct.cs to the project directory rem if exist "%projectDir%AssemblyInfoProduct.cs" ( attrib -R "%projectDir%AssemblyInfoProduct.cs" ) if exist "%baseDir%AssemblyInfoProduct.cs" ( copy "%baseDir%AssemblyInfoProduct.cs" "%projectDir%AssemblyInfoProduct.cs" ) ) if exist "%basedir%Build\Analysis\Matrix42.ruleset" ( copy "%baseDir%Build\Analysis\Matrix42.ruleset" "%projectDir%Matrix42.ruleset" ) rem Call project's PreBuild.cmd file if exists rem if exist "%projectDir%PreBuild.cmd" ( call "%projectDir%PreBuild.cmd" if errorlevel 1 goto EndError) goto EndOK ) rem **************************************** rem Post build event section rem **************************************** if %1==/post ( rem Start building sattelite assemblies if .hresx file exists rem if exist "%projectDir%Resources.hresx" ( "%rootDir%bin\ResConverter.exe" -build "%targetPath%" "%projectDir%..\Resources" "%teamProject%" "%project%" "%basedir%..\Root" if errorlevel 1 goto EndError) rem Call project's PostBuild.cmd file if exists rem if exist "%projectDir%PostBuild.cmd" ( call "%projectDir%PostBuild.cmd" if errorlevel 1 goto EndError) goto EndOK ) echo Invalid argument switch. Possible values are: "/pre" or "/post" goto EndError :EndError exit 1 :EndOK exit 0