Adding VS2015 support.
This commit is contained in:
parent
de9b6bdc8f
commit
71fab4bbb7
|
@ -9,7 +9,7 @@ video drivers for your card.
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
* Windows 8 or 8.1
|
* Windows 8 or 8.1
|
||||||
* Visual Studio 2013
|
* Visual Studio 2013+
|
||||||
* [Python 2.7](http://www.python.org/download/releases/2.7.6/)
|
* [Python 2.7](http://www.python.org/download/releases/2.7.6/)
|
||||||
* If you are on Windows 8, you will also need the [Windows 8.1 SDK](http://msdn.microsoft.com/en-us/windows/desktop/bg162891)
|
* If you are on Windows 8, you will also need the [Windows 8.1 SDK](http://msdn.microsoft.com/en-us/windows/desktop/bg162891)
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ line usage.
|
||||||
|
|
||||||
#### Debugging
|
#### Debugging
|
||||||
|
|
||||||
VS behaves oddly with the debug paths. Open the xenia-run project properties
|
VS behaves oddly with the debug paths. Open the xenia project properties
|
||||||
and set the 'Command' to `$(SolutionDir)$(TargetPath)` and the
|
and set the 'Command' to `$(SolutionDir)$(TargetPath)` and the
|
||||||
'Working Directory' to `$(SolutionDir)..\..`. You can specify flags and
|
'Working Directory' to `$(SolutionDir)..\..`. You can specify flags and
|
||||||
the file to run in the 'Command Arguments' field (or use `--flagfile=flags.txt`).
|
the file to run in the 'Command Arguments' field (or use `--flagfile=flags.txt`).
|
||||||
|
@ -32,7 +32,7 @@ the file to run in the 'Command Arguments' field (or use `--flagfile=flags.txt`)
|
||||||
|
|
||||||
#### Debugging
|
#### Debugging
|
||||||
|
|
||||||
Choose `Product > Scheme > Edit Scheme`. For xenia-run, alloy-sandbox, and the
|
Choose `Product > Scheme > Edit Scheme`. For xenia, alloy-sandbox, and the
|
||||||
other executables select the Run action on the left and set
|
other executables select the Run action on the left and set
|
||||||
`Options > Working Directory` to your root xenia/ git path.
|
`Options > Working Directory` to your root xenia/ git path.
|
||||||
|
|
||||||
|
@ -109,14 +109,8 @@ switching between the debug and release variants with `--debug`.
|
||||||
To make life easier you can use `--flagfile=myflags.txt` to specify all
|
To make life easier you can use `--flagfile=myflags.txt` to specify all
|
||||||
arguments, including using `--target=my.xex` to pick an executable.
|
arguments, including using `--target=my.xex` to pick an executable.
|
||||||
|
|
||||||
### xenia-info
|
### xenia
|
||||||
|
|
||||||
Dumps information about a xex file.
|
|
||||||
|
|
||||||
./bin/xenia-info some.xex
|
|
||||||
|
|
||||||
### xenia-run
|
|
||||||
|
|
||||||
Runs a xex.
|
Runs a xex.
|
||||||
|
|
||||||
./bin/xenia-run some.xex
|
./bin/xenia some.xex
|
||||||
|
|
|
@ -85,7 +85,7 @@ int Win32Window::Initialize(const std::wstring& title, uint32_t width,
|
||||||
DWORD window_ex_style = WS_EX_APPWINDOW;
|
DWORD window_ex_style = WS_EX_APPWINDOW;
|
||||||
RECT rc = {
|
RECT rc = {
|
||||||
0, 0,
|
0, 0,
|
||||||
width, height
|
static_cast<LONG>(width), static_cast<LONG>(height)
|
||||||
};
|
};
|
||||||
AdjustWindowRect(&rc, WS_OVERLAPPEDWINDOW, FALSE);
|
AdjustWindowRect(&rc, WS_OVERLAPPEDWINDOW, FALSE);
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ bool Win32Window::set_cursor_visible(bool value) {
|
||||||
bool Win32Window::SetSize(uint32_t width, uint32_t height) {
|
bool Win32Window::SetSize(uint32_t width, uint32_t height) {
|
||||||
RECT rc = {
|
RECT rc = {
|
||||||
0, 0,
|
0, 0,
|
||||||
width, height
|
static_cast<LONG>(width), static_cast<LONG>(height)
|
||||||
};
|
};
|
||||||
AdjustWindowRect(&rc, WS_OVERLAPPEDWINDOW, FALSE);
|
AdjustWindowRect(&rc, WS_OVERLAPPEDWINDOW, FALSE);
|
||||||
// TODO(benvanik): center?
|
// TODO(benvanik): center?
|
||||||
|
|
|
@ -35,8 +35,8 @@ def main():
|
||||||
# Grab Visual Studio version and execute shell to set up environment.
|
# Grab Visual Studio version and execute shell to set up environment.
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
vs_version = import_vs_environment()
|
vs_version = import_vs_environment()
|
||||||
if not vs_version == 2013:
|
if vs_version != 2013 and vs_version != 2015:
|
||||||
print('ERROR: Visual Studio 2013 not found!')
|
print('ERROR: Visual Studio 2013 or 2015 not found!')
|
||||||
print('Ensure you have the VS120COMNTOOLS environment variable!')
|
print('Ensure you have the VS120COMNTOOLS environment variable!')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
return
|
return
|
||||||
|
@ -75,7 +75,10 @@ def import_vs_environment():
|
||||||
"""
|
"""
|
||||||
version = 0
|
version = 0
|
||||||
tools_path = ''
|
tools_path = ''
|
||||||
if 'VS120COMNTOOLS' in os.environ:
|
if 'VS140COMNTOOLS' in os.environ:
|
||||||
|
version = 2015
|
||||||
|
tools_path = os.environ['VS140COMNTOOLS']
|
||||||
|
elif 'VS120COMNTOOLS' in os.environ:
|
||||||
version = 2013
|
version = 2013
|
||||||
tools_path = os.environ['VS120COMNTOOLS']
|
tools_path = os.environ['VS120COMNTOOLS']
|
||||||
elif 'VS110COMNTOOLS' in os.environ:
|
elif 'VS110COMNTOOLS' in os.environ:
|
||||||
|
@ -349,7 +352,7 @@ def run_gyp(format):
|
||||||
'--toplevel-dir=.',
|
'--toplevel-dir=.',
|
||||||
'--generator-output=build/xenia/',
|
'--generator-output=build/xenia/',
|
||||||
# Set the VS version.
|
# Set the VS version.
|
||||||
'-G msvs_version=%s' % (os.environ.get('VSVERSION', 2013)),
|
'-G msvs_version=%s' % (os.environ.get('VSVERSION', 2015)),
|
||||||
#'-D windows_sdk_dir=%s' % (os.environ['WINDOWSSDKDIR']),
|
#'-D windows_sdk_dir=%s' % (os.environ['WINDOWSSDKDIR']),
|
||||||
'-D windows_sdk_dir="C:\\Program Files (x86)\\Windows Kits\\8.1"',
|
'-D windows_sdk_dir="C:\\Program Files (x86)\\Windows Kits\\8.1"',
|
||||||
'xenia.gyp',
|
'xenia.gyp',
|
||||||
|
|
Loading…
Reference in New Issue