Code Monkey home page Code Monkey logo

visualstudiostandalone's Introduction

MSVC Standalone

Create a portable Visual Studio distribution from your current installation.

Why?

Installing Visual Studio takes time, requires explicit user interaction and is very hard to automate. By bundling the compiler with your source, you can remove the need of requiring stateful installations of software on computers you wish to build. This process is often called "vendorization".

It can be useful for many cases, one major of them being CI. Your CI sytem now doesn't require any special treatment, since your build can run on any clean Windows installation.

Another case is in development of big systems, for example game engines. If all you need for building your engine is inside your repository, creating reproducible builds becomes a lot easier. You want to upgrade your toolchain from VS 2015 to 2017? No problem, your whole studio does not have to reinstall everything on their computers, it's only required to update the binaries in your repository.

What?

The vs2017.bat script will find your Visual Studio 2017 installation and copy all the required files to use just the compiler and libraries to the first argument specified. This folder can now be used and included wherever you like.

Usage

Simply open a shell (cmd.exe) and execute the vs2017.bat script.

It takes a single argument, which is the target directory where to create the portable distribution.

$ .\vs2017.bat portableVS

Configuration

Currently the distribution excludes all HostX86 files, since there is a clear advantage of using the x64 compiler as opposed to the x86, if you still would like to use it, you can go into the vs2017.bat script and uncomment the section creating the x86 distribution.

TODO

  • Add VS2015 script
  • Add tests

Contribution

All contributions welcome!

License

Licensed under the MIT License.

Copyright (c) 2017 Arvid Gerstmann

visualstudiostandalone's People

Contributors

leandros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

visualstudiostandalone's Issues

Enable support for MFC/ATL libraries

The script copies the base utilities and libraries of VS, but MFC/ATL libraries are not copied, when they are installed. It would be great to have also them in the bundle

What to do now ?

C:\Users\Administrator\Desktop\Visual_Studio>tree
Folder PATH listing for volume Games
Volume serial number is 0000006F A687:83CB
C:.
└───14.25.28610
    ├───bin
    │   └───HostX64
    │       ├───x64
    │       │   └───1033
    │       └───x86
    │           └───1033
    ├───include
    │   ├───cliext
    │   ├───CodeAnalysis
    │   ├───cvt
    │   ├───experimental
    │   ├───Manifest
    │   └───msclr
    │       └───com
    └───lib
        ├───x64
        └───x86

@Leandros Sir,
I done making it portable,
No errors came,
Now where do I find visual studio binary ?

Cant execute vs2017.bat

Hi can someone help ? After executing vs2017.bat shell say = is not recognized as an international......
And i cant find vs2017.bat in installation folder.
Thanks

Stripping options

Thanks for publishing this script! I think it'll be helpful to folks.

I suggest there be options for stripping down the distribution. Here's some really low-hanging fruit:

rd /s /q lib\onecore lib\x86\store lib\x64\store
del lib\x86\msvcurt*.* lib\x86\libconc*.* lib\x64\msvcurt*.* lib\x64\libconc*.*

This reduces the distribution size on my system from 781 MB to 231 MB (and compresses to 22 MB).

It removes things that I don't think most (if any) game developers will use like the Universal Runtime, Windows Store and ConcRT libraries.

Default to x64 toolchain

Defaulting to the x64-hosted toolchain (vs the current x86) is IMHO the right choice given the amount of large C++ codebases out there, with massive header-heavy libraries (and the obj/PDB dedup that entails) and link-time optimization that gobbles up memory. It's also pretty common for applications to get a ~10% performance boost on x64 due to the extra registers available despite the extra memory/cache pressure from 64-bit pointers, though I can't say I've tested if x64-hosted MSVC indeed compiles faster--I think the strongest argument for making it the default is simply that it's going to support more codebases out of the box.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.