mirror of https://github.com/stella-emu/stella.git
Updated Win32 project for Visual Studio 2005. I don't know if it will
still work with VC.net 2003, but since SDL 1.2.12 needs VS 2005, we're kind of stuck with it. Activated console build mode by default, since it's nice to see cout/cerr debugging info on the command line (and is better than compiling under MinGW anyway). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1336 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
ea790eda33
commit
42757f85ca
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FSNodeWin32.cxx,v 1.9 2007-01-01 18:04:55 stephena Exp $
|
// $Id: FSNodeWin32.cxx,v 1.10 2007-08-04 20:32:54 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -74,15 +74,15 @@ static const char* lastPathComponent(const string& str)
|
||||||
return cur + 1;
|
return cur + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
static string validatePath(const string& p)
|
static string validatePath(const string& p)
|
||||||
{
|
{
|
||||||
string path = p;
|
string path = p;
|
||||||
if(p.size() < 2 || p[1] != ':')
|
if(p.size() < 2 || p[1] != ':')
|
||||||
path = "c:";
|
path = "c:";
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
char* WindowsFilesystemNode::toAscii(TCHAR* x)
|
char* WindowsFilesystemNode::toAscii(TCHAR* x)
|
||||||
|
@ -257,41 +257,41 @@ AbstractFilesystemNode* WindowsFilesystemNode::parent() const
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool AbstractFilesystemNode::fileExists(const string& path)
|
bool AbstractFilesystemNode::fileExists(const string& path)
|
||||||
{
|
{
|
||||||
WIN32_FILE_ATTRIBUTE_DATA attr;
|
WIN32_FILE_ATTRIBUTE_DATA attr;
|
||||||
BOOL b = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &attr);
|
BOOL b = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &attr);
|
||||||
|
|
||||||
return ((b != 0) && !(attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY));
|
return ((b != 0) && !(attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY));
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool AbstractFilesystemNode::dirExists(const string& path)
|
bool AbstractFilesystemNode::dirExists(const string& path)
|
||||||
{
|
{
|
||||||
WIN32_FILE_ATTRIBUTE_DATA attr;
|
WIN32_FILE_ATTRIBUTE_DATA attr;
|
||||||
BOOL b = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &attr);
|
BOOL b = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &attr);
|
||||||
|
|
||||||
return ((b != 0) && (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY));
|
return ((b != 0) && (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY));
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool AbstractFilesystemNode::makeDir(const string& path)
|
bool AbstractFilesystemNode::makeDir(const string& path)
|
||||||
{
|
{
|
||||||
return CreateDirectory(path.c_str(), NULL) != 0;
|
return CreateDirectory(path.c_str(), NULL) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
string AbstractFilesystemNode::modTime(const string& path)
|
string AbstractFilesystemNode::modTime(const string& path)
|
||||||
{
|
{
|
||||||
WIN32_FILE_ATTRIBUTE_DATA attr;
|
WIN32_FILE_ATTRIBUTE_DATA attr;
|
||||||
BOOL b = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &attr);
|
BOOL b = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &attr);
|
||||||
|
|
||||||
if(b == 0)
|
if(b == 0)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
ostringstream buf;
|
ostringstream buf;
|
||||||
buf << attr.ftLastWriteTime.dwHighDateTime << attr.ftLastWriteTime.dwLowDateTime;
|
buf << attr.ftLastWriteTime.dwHighDateTime << attr.ftLastWriteTime.dwLowDateTime;
|
||||||
|
|
||||||
return buf.str();
|
return buf.str();
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: OSystemWin32.cxx,v 1.19 2007-07-31 00:45:28 stephena Exp $
|
// $Id: OSystemWin32.cxx,v 1.20 2007-08-04 20:32:54 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -24,15 +24,15 @@
|
||||||
#include "OSystem.hxx"
|
#include "OSystem.hxx"
|
||||||
#include "OSystemWin32.hxx"
|
#include "OSystemWin32.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Each derived class is responsible for calling the following methods
|
Each derived class is responsible for calling the following methods
|
||||||
in its constructor:
|
in its constructor:
|
||||||
|
|
||||||
setBaseDir()
|
setBaseDir()
|
||||||
setConfigFile()
|
setConfigFile()
|
||||||
|
|
||||||
See OSystem.hxx for a further explanation
|
See OSystem.hxx for a further explanation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
OSystemWin32::OSystemWin32()
|
OSystemWin32::OSystemWin32()
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
|
# Visual Studio 2005
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stella", "Stella.vcproj", "{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stella", "Stella.vcproj", "{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfiguration) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug = Debug
|
Debug|Win32 = Debug|Win32
|
||||||
Release = Release
|
Release|Win32 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfiguration) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}.Debug.ActiveCfg = Debug|Win32
|
{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}.Debug.Build.0 = Debug|Win32
|
{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}.Release.ActiveCfg = Release|Win32
|
{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}.Release.Build.0 = Release|Win32
|
{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
EndGlobalSection
|
HideSolutionNode = FALSE
|
||||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue