Add old vs2015 tweaks to premake article

master
kts of kettek (Urami) 2017-08-15 14:12:31 -07:00
parent 1a305f7549
commit 017fe82013
3 changed files with 11 additions and 6 deletions

View File

@ -83,23 +83,26 @@ Visual Studio 2013:
Now you can open your project file generated in *build/vs2013/* and build/run it.
### From The Command-line: `vsbuild`
![Running vsbuild in Cygwin](cygwin_vsbuild.png)
### From The Command-line with cygwin/babun: `vsbuild`
[![Running vsbuild in Cygwin/babun](use-premake-and-start-winning/premake_vsbuild.gif)](use-premake-and-start-winning/premake_vsbuild.gif)
However, if you're like me, you might prefer being able to use the terminal to
build and run your project as well.
Using this method **requires** you to select the "Programming Languages -> Visual C++ -> Common Tools for Visual C++ 2015" option during the install of Visual Studio -- this is what provides the *vcvarsall.bat* file.
[![Visual Studio required install option](use-premake-and-start-winning/vs2015_install.png)](use-premake-and-start-winning/vs2015_install.png)
My solution was to create two scripts to be executed: a shell script that
executes a batch file.
executes a batch file and the batch file itself.
The wrapper shell script is simple enough:
#!/bin/bash
cmd /c C:/Users/kts/.local/bin/vsbuild.bat "$@"
The batch is also fairly simple, but you may have to adjust it if you're not using
Visual Studio 2013:
The batch is also fairly simple, but you will have to adjust it to use the appropriate Visual Studio directory:
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
msbuild %*
Now instead of opening the project file with VS, you can simply navigate to the
@ -115,6 +118,8 @@ Note: There are some issues with how stdout is handled from within mintty/cygwin
* Compile: `vsbuild`
* Clean: `vsbuild /t:clean`
I have tested this with *Visual Studio 2013* and *Visual Studio 2015 CE*
### The Mac Build
Mac OS X also has multiple options, but here we are using XCode4 due to an older
laptop:

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB