-
Notifications
You must be signed in to change notification settings - Fork 89
/
Reg-bins-VS2013.cmd
71 lines (50 loc) · 2.38 KB
/
Reg-bins-VS2013.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@echo off
set NemerleRoot=%~dp0.
set NemerleInstall=%ProgramFiles%\Nemerle\Net-4.0
IF NOT "%PROCESSOR_ARCHITECTURE%" == "x86" goto b64
IF NOT "%PROCESSOR_ARCHITEW6432%" == "" goto b64
set NGen="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ngen.exe"
goto b32
:b64
"%NemerleRoot%\ExternalDependences\junction.exe" "%ProgramW6432%\Nemerle" "%ProgramFiles(x86)%\Nemerle"
:skipJunction
set NGen="%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe"
:b32
set errors=no
goto skip
:err_check
set errors=yes
IF %1 == 0 set errors=no
exit /b %1
:skip
@echo NemerleInstall=%NemerleInstall%
@echo NGen=%NGen%
md "%NemerleInstall%"
%NGen% uninstall "%NemerleInstall%\Nemerle.dll"
%NGen% uninstall "%NemerleInstall%\Nemerle.Compiler.dll"
%NGen% uninstall "%NemerleInstall%\Nemerle.Macros.dll"
%NGen% uninstall "%NemerleInstall%\Nemerle.MSBuild.Tasks.dll"
%NGen% uninstall "%NemerleInstall%\ncc.exe"
@echo errorlevel=%errorlevel%
@echo --------------------------- Update registry ---------------------------
set NemerleMSBuildTargets=%NemerleInstall%\Nemerle.MSBuild.targets
@echo Add NemerleTarget=%NemerleMSBuildTargets%
@echo into HKLM\SOFTWARE\Microsoft\VisualStudio\12.0\MSBuild\SafeImports
reg.exe add HKLM\SOFTWARE\Microsoft\VisualStudio\12.0\MSBuild\SafeImports /v NemerleTarget /d "%NemerleInstall%\Nemerle.MSBuild.targets" /f
@echo into HKCU\Software\Microsoft\VisualStudio\12.0\Configuration\MSBuild\SafeImports
reg.exe add HKCU\Software\Microsoft\VisualStudio\12.0\Configuration\MSBuild\SafeImports /v NemerleTarget /d "%NemerleInstall%\Nemerle.MSBuild.targets" /f
@echo into HKCU\Software\Microsoft\VisualStudio\12.0Exp\Configuration\MSBuild\SafeImports
reg.exe add HKCU\Software\Microsoft\VisualStudio\12.0Exp\Configuration\MSBuild\SafeImports /v NemerleTarget /d "%NemerleInstall%\Nemerle.MSBuild.targets" /f
@echo --------------------------- Registry updated ---------------------------
%NGen% install "%NemerleInstall%\Nemerle.dll"
%NGen% install "%NemerleInstall%\Nemerle.Compiler.dll"
%NGen% install "%NemerleInstall%\Nemerle.Macros.dll"
%NGen% install "%NemerleInstall%\Nemerle.MSBuild.Tasks.dll"
%NGen% install "%NemerleInstall%\ncc.exe"
"%VS120COMNTOOLS%\..\IDE\VSIXInstaller.exe" /q "%NemerleInstall%\Nemerle.VisualStudio.vsix"
IF NOT "%NoPause%"=="true" pause
exit /b 0
:strong_fail
exit /b 1
:Error
call :strong_fail