https://github.com/mtwilliams/visual_studio
Inspect Visual Studio installs and generate Visual Studio project files with Ruby.
https://github.com/mtwilliams/visual_studio
gem ruby visual-studio windows
Last synced: about 1 year ago
JSON representation
Inspect Visual Studio installs and generate Visual Studio project files with Ruby.
- Host: GitHub
- URL: https://github.com/mtwilliams/visual_studio
- Owner: mtwilliams
- Created: 2015-09-06T01:57:35.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-05T19:56:34.000Z (almost 9 years ago)
- Last Synced: 2025-03-29T04:16:34.638Z (about 1 year ago)
- Topics: gem, ruby, visual-studio, windows
- Language: Ruby
- Homepage:
- Size: 24.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Visual Studio
[](https://rubygems.org/gems/visual_studio)
[](https://travis-ci.org/mtwilliams/visual_studio)
[](https://codeclimate.com/github/mtwilliams/visual_studio)
[](https://gemnasium.com/mtwilliams/visual_studio)
This will (hopefully) become the de-facto gem for inspecting Visual Studio installs and generating Visual Studio project files. It was created for [Ryb](https://github.com/mtwilliams/ryb), a project file generator similar to Premake.
Documentation is on the back-burner, so for now:
```Ruby
VisualStudio.available?
VisualStudio.installed?
=> true
VisualStudio.available? 'vs2015'
VisualStudio.installed? 'vs2015'
=> true
VisualStudio.latest
VisualStudio.install
=> # ...>
VisualStudio.install 'vs2015'
VisualStudio.find 'vs2015'
VisualStudio.find_by(name: 'vs2015')
VisualStudio.find_by_name 'vs2015'
VisualStudio.find_by(version: 'vs2015')
VisualStudio.find_by_version '14.0'
=> # ...>
vs = VisualStudio.latest
vs.name
=> "vs2015"
vs.name.pretty
=> "vs2015"
vs.version
=> "14.0"
vs.root
=> "C:/Program Files (x86)/Microsoft Visual Studio 14.0"
vs.suite[:c_and_cpp]
vs.products[:c_and_cpp]
=> # ...>
vs.suite[:csharp]
vs.products[:csharp]
=> # ...>
vc = vs.products[:c_and_cpp]
vc.name
=> "VC"
vc.name.pretty
=> "Microsoft Visual C/C++"
vc.version
=> "14.0"
vc.root
=> "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC"
vc.paths.includes
=> {:x86 => ..., :x86_64 => ...}
vc.paths.libraries
=> {:x86 => ..., :x86_64 => ...}
vc.sdks
=> {:windows => ...}
vc.platforms
=> [:windows]
vc.architectures
=> [:x86, :x86_64]
vc.supports? :windows
=> true
vc.supports? :arm
=> false
env = vc.environment target: {platform: :windows,
arch: :x86_64},
base: ENV
=> {"PATH" => "...", ...}
```