Skip to content

Commit

Permalink
Move VS dev command prompt call to re_write_il.cmd
Browse files Browse the repository at this point in the history
Technically, this only needs to be run when specifically running this script.
  • Loading branch information
mellinoe committed Apr 27, 2016
1 parent 3b20e89 commit ea909fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 28 deletions.
14 changes: 0 additions & 14 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
@echo off
setlocal

:: Invoke VS Developer Command Prompt batch file.
:: This sets up some environment variables needed to use ILDasm and ILAsm.
if not defined VisualStudioVersion (
if defined VS140COMNTOOLS (
call "%VS140COMNTOOLS%\VsDevCmd.bat"
goto :Build
)

echo Error: build.cmd requires Visual Studio 2015.
exit /b 1
)

:Build
powershell -NoProfile %~dp0scripts\build.ps1 %*
14 changes: 0 additions & 14 deletions package.cmd
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
@echo off
setlocal

:: Invoke VS Developer Command Prompt batch file.
:: This sets up some environment variables needed to use ILDasm and ILAsm.
if not defined VisualStudioVersion (
if defined VS140COMNTOOLS (
call "%VS140COMNTOOLS%\VsDevCmd.bat"
goto :Package
)

echo Error: package.cmd requires Visual Studio 2015.
exit /b 1
)

:Package
powershell -NoProfile %~dp0scripts\package.ps1 %*
17 changes: 17 additions & 0 deletions src/System.Slices/re_write_il.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
@echo off
setlocal

:: Invoke VS Developer Command Prompt batch file.
:: This sets up some environment variables needed to use ILDasm and ILAsm.
if not defined VisualStudioVersion (
if defined VS140COMNTOOLS (
call "%VS140COMNTOOLS%\VsDevCmd.bat"
goto :Rewrite
)

echo Error: re_write_il.cmd requires Visual Studio 2015.
exit /b 1
)

:Rewrite
@echo on
tools\ildasm.exe /caverbal /linenum /out:%1\system.slices.beforerewrite.il /nobar %2
tools\ILSub\ILSub.exe %1\system.slices.beforerewrite.il %1\system.slices.rewritten.il
tools\ilasm.exe /quiet /pdb /dll /out:%2 /nologo %1\system.slices.rewritten.il

0 comments on commit ea909fe

Please sign in to comment.