zoukankan      html  css  js  c++  java
  • Build_Release.bat

    Build_Release.bat

     1 @echo off
     2 pushd "%~dp0"
     3 set tag=Release
     4 set PATH="C:Program Files (x86)MSBuild14.0Bin";"C:Program Files (x86)MSBuild14.0Binamd64";"%windir%Microsoft.NETFramework64v4.0.30319";%PATH%
     5 set msbuild=msbuild.exe /p:Configuration=%tag%;BuildProjectReferences=false
     6 set pathBin=..Output%tag%
     7 set path1=..SrcFolder1
     8 set path2=..SrcFolder2
     9 set buildlog=%~n0.log
    10 
    11 set input=
    12 set /p input="Start msbuild all (%tag%) ? [Y/n]: "
    13 if "%input%"=="" goto :buildAll
    14 if /i "%input%"=="Y" goto :buildAll
    15 if /i "%input%"=="Yes" goto :buildAll
    16 goto :runPrompt
    17 
    18 :buildAll
    19 if exist %buildlog% del %buildlog%
    20 call :buildProj %path1% Proj1
    21 call :buildProj %path1% Proj2
    22 call :buildProj %path2% AnotherProj
    23 
    24 :runPrompt
    25 echo.
    26 set input=
    27 set /p input="Start Foo.exe? [Y/n]: "
    28 if "%input%"=="" goto :runFoo
    29 if /i "%input%"=="Y" goto :runFoo
    30 if /i "%input%"=="Yes" goto :runFoo
    31 goto :end
    32 
    33 :runFoo
    34 call :run %pathBin% Foo.exe
    35 goto :end
    36 
    37 :run
    38 cd /d %1
    39 start "" %2
    40 goto :eof
    41 
    42 :buildProj
    43 set desc=msbuild %2...
    44 title %desc%
    45 echo %desc%
    46 echo ---------------------------------------->>%buildlog%
    47 echo %desc%>>%buildlog%
    48 echo ---------------------------------------->>%buildlog%
    49 %msbuild% %1%2%2.csproj >>%buildlog%
    50 if ERRORLEVEL 1 echo ERROR!
    51 goto :eof
    52 
    53 :end
    54 popd

    Build_Debug.bat

    @echo off
    pushd "%~dp0"
    set tag=Debug
    set PATH="C:Program Files (x86)MSBuild14.0Bin";"C:Program Files (x86)MSBuild14.0Binamd64";"%windir%Microsoft.NETFramework64v4.0.30319";%PATH%
    set msbuild=msbuild.exe /p:Configuration=%tag%;BuildProjectReferences=false
    set pathBin=..Output%tag%
    set path1=..SrcFolder1
    set path2=..SrcFolder2
    set buildlog=%~n0.log
    
    set input=
    set /p input="Start msbuild all (%tag%) ? [Y/n]: "
    if "%input%"=="" goto :buildAll
    if /i "%input%"=="Y" goto :buildAll
    if /i "%input%"=="Yes" goto :buildAll
    goto :runPrompt
    
    :buildAll
    if exist %buildlog% del %buildlog%
    call :buildProj %path1% Proj1
    call :buildProj %path1% Proj2
    call :buildProj %path2% AnotherProj
    
    :runPrompt
    echo.
    set input=
    set /p input="Start Foo.exe? [Y/n]: "
    if "%input%"=="" goto :runFoo
    if /i "%input%"=="Y" goto :runFoo
    if /i "%input%"=="Yes" goto :runFoo
    goto :end
    
    :runFoo
    call :run %pathBin% Foo.exe
    goto :end
    
    :run
    cd /d %1
    start "" %2
    goto :eof
    
    :buildProj
    set desc=msbuild %2...
    title %desc%
    echo %desc%
    echo ---------------------------------------->>%buildlog%
    echo %desc%>>%buildlog%
    echo ---------------------------------------->>%buildlog%
    %msbuild% %1%2%2.csproj >>%buildlog%
    if ERRORLEVEL 1 echo ERROR!
    goto :eof
    
    :end
    popd

    Build_Clean.bat

     1 @echo off
     2 pushd "%~dp0"
     3 set msbuild="%windir%Microsoft.NETFramework64v4.0.30319msbuild.exe" /nologo /t:clean
     4 set sln=..SrcSlnsFoo.sln
     5 set /p input="Start msbuild clean? [Y/n]: "
     6 if "%input%"=="" goto :clean
     7 if /i "%input%"=="Y" goto :clean
     8 if /i "%input%"=="Yes" goto :clean
     9 goto :end
    10 :clean
    11 %msbuild% %sln%
    12 IF %ERRORLEVEL% NEQ 0 PAUSE
    13 :end
    14 popd
  • 相关阅读:
    [转贴]彻底解决 CrystalReports 登录失败问题。
    [资源]《就说》——《大学自习室》作者郝雨又一力作,继续那种搞笑的说唱
    [推荐]一个用来给控件做提示的JS脚本,鼠标移到控件上时出现提示,离开时消失!
    [原创]一个公告栏的源码(利用marquee作的)
    [转帖]DataGrid显示双层表头,即可实现合并单元格问题
    [转贴]15句让女生爱你一生的情话
    [疑问]您没有调试该服务器的权限。验证您是服务器上"Debuger Users"组的成员。
    [转帖]九个不可不占的便宜
    [转贴]秘芨(男孩子为了终身幸福,最好背下来哦)
    [转贴]也许放弃也是一种爱!++++++++觉得这篇文章写得不错
  • 原文地址:https://www.cnblogs.com/Bob-wei/p/7244363.html
Copyright © 2011-2022 走看看