andsim

Untitled

Apr 22nd, 2012
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. @ECHO OFF
  2.  
  3. echo ====================================
  4. echo ==== AURORA ========================
  5. echo ====================================
  6. echo.
  7.  
  8. rem ## Default Visual Studio choice (2008, 2010)
  9. set vstudio=2010
  10.  
  11. rem ## Default .NET Framework (3_5, 4_0 (Unsupported on VS2008))
  12. set framework=3_5
  13.  
  14. rem ## Default architecture (86 (for 32bit), 64, AnyCPU)
  15. set bits=AnyCPU
  16.  
  17. rem ## Default "configuration" choice ((r)elease, (d)ebug)
  18. set configuration=release
  19.  
  20. rem ## Default "run compile batch" choice (y(es),n(o))
  21. set compile_at_end=y
  22.  
  23. echo I will now ask you three questions regarding your build.
  24. echo However, if you wish to build for:
  25. echo Visual Studio %vstudio%
  26. echo .NET Framework %framework%
  27. echo %bits%x Architecture
  28. if %compile_at_end%==y echo And you would like to compile straight
  29. after prebuild...
  30. echo.
  31. echo Simply tap [ENTER] four times.
  32. echo.
  33. echo Note that you can change these defaults by opening this
  34. echo batch file in a text editor.
  35. echo.
  36.  
  37. :vstudio
  38. set /p vstudio="Choose your Visual Studio version (2008, 2010) [%vstudio%]: "
  39. if %vstudio%==2008 goto framework
  40. if %vstudio%==2010 goto framework
  41. echo "%vstudio%" isn't a valid choice!
  42. goto vstudio
  43.  
  44. :framework
  45. set /p framework="Choose your .NET framework (3_5, 4_0 (Unsupported on VS2008)) [%framework%]: "
  46. if %framework%==3_5 goto bits
  47. if %framework%==4_0 goto frameworkcheck
  48. echo "%framework%" isn't a valid choice!
  49. goto framework
  50.  
  51. :frameworkcheck
  52. if %vstudio%==2008 goto frameworkerror
  53. goto bits
  54.  
  55. :frameworkerror
  56. echo Sorry! Visual Studio 2008 only supports 3_5.
  57. goto framework
  58.  
  59. :bits
  60. set /p bits="Choose your architecture (AnyCPU, x86, x64) [%bits%]: "
  61. if %bits%==86 goto configuration
  62. if %bits%==x86 goto configuration
  63. if %bits%==64 goto configuration
  64. if %bits%==x64 goto configuration
  65. if %bits%==AnyCPU goto configuration
  66. echo "%bits%" isn't a valid choice!
  67. goto bits
  68.  
  69. :configuration
  70. set /p configuration="Choose your configuration ((r)elease or
  71. (d)ebug)? [%configuration%]: "
  72. if %configuration%==r goto final
  73. if %configuration%==d goto final
  74. if %configuration%==release goto final
  75. if %configuration%==debug goto final
  76. echo "%configuration%" isn't a valid choice!
  77. goto configuration
  78.  
  79. :final
  80. echo.
  81. echo.
  82.  
  83. if exist Compile.*.bat (
  84. echo Deleting previous compile batch file...
  85. echo.
  86. del Compile.*.bat
  87. )
  88.  
  89. echo Calling Prebuild for target %vstudio% with framework %framework%...
  90. bin\Prebuild.exe /target vs%vstudio% /targetframework v%framework%
  91.  
  92. echo.
  93. echo Creating compile batch file for your convinence...
  94. if %framework%==3_5 set fpath=C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild
  95. if %framework%==4_0 set
  96. fpath=C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild
  97. if %bits%==64 (
  98. set args=/p:Platform=x64
  99. set bits=x64
  100. )
  101. if %bits%==86 (
  102. set args=/p:Platform=x86
  103. set bits=x86
  104. )
  105. if %bits%==x64 set args=/p:Platform=x64
  106. if %bits%==x86 set args=/p:Platform=x86
  107. if %configuration%==r (
  108. set cfg=/p:Configuration=Release
  109. set configuration=release
  110. )
  111. if %configuration%==d (
  112. set cfg=/p:Configuration=Debug
  113. set configuration=debug
  114. )
  115. if %configuration%==release set cfg=/p:Configuration=Release
  116. if %configuration%==debug set cfg=/p:Configuration=Debug
  117. set filename=Compile.VS%vstudio%.net%framework%.%bits%.%configuration%.bat
  118.  
  119. echo %fpath% Aurora.sln %args% %cfg% > %filename% /p:DefineConstants=ISWIN
  120.  
  121. echo.
  122. set /p compile_at_end="Done, %filename% created. Compile now? (y,n)
  123. [%compile_at_end%]"
  124. if %compile_at_end%==y (
  125. %filename%
  126. pause
  127. )
Advertisement
Add Comment
Please, Sign In to add comment