File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ pub fn find_tool(target: &str, tool: &str) -> Option<Tool> {
65
65
return impl_:: find_msbuild ( target) ;
66
66
}
67
67
68
+ if tool. contains ( "devenv" ) {
69
+ return impl_:: find_devenv ( target) ;
70
+ }
71
+
68
72
// If VCINSTALLDIR is set, then someone's probably already run vcvars and we
69
73
// should just find whatever that indicates.
70
74
if env:: var_os ( "VCINSTALLDIR" ) . is_some ( ) {
@@ -622,6 +626,26 @@ mod impl_ {
622
626
}
623
627
}
624
628
629
+ pub fn find_devenv ( target : & str ) -> Option < Tool > {
630
+ find_devenv_vs15 ( & target)
631
+ }
632
+
633
+ fn find_devenv_vs15 ( target : & str ) -> Option < Tool > {
634
+ let key = r"SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7" ;
635
+ LOCAL_MACHINE
636
+ . open ( key. as_ref ( ) )
637
+ . ok ( )
638
+ . and_then ( |key| key. query_str ( "15.0" ) . ok ( ) )
639
+ . map ( |path| {
640
+ let path = PathBuf :: from ( path) . join ( r"Common7\IDE\devenv.exe" ) ;
641
+ let mut tool = Tool :: new ( path) ;
642
+ if target. contains ( "x86_64" ) {
643
+ tool. env . push ( ( "Platform" . into ( ) , "X64" . into ( ) ) ) ;
644
+ }
645
+ tool
646
+ } )
647
+ }
648
+
625
649
// see http://stackoverflow.com/questions/328017/path-to-msbuild
626
650
pub fn find_msbuild ( target : & str ) -> Option < Tool > {
627
651
// VS 15 (2017) changed how to locate msbuild
You can’t perform that action at this time.
0 commit comments