forked from mia/Aegisub
Add a stub class for Windows.. whoever fills this in should take over the license.
Originally committed to SVN as r3612.
This commit is contained in:
parent
41f39f65d7
commit
0cecf3c598
4 changed files with 137 additions and 3 deletions
|
@ -28,6 +28,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "include/platform.h"
|
#include "include/platform.h"
|
||||||
|
#include "platform_windows.h"
|
||||||
#include "platform_unix.h"
|
#include "platform_unix.h"
|
||||||
#include "platform_unix_bsd.h"
|
#include "platform_unix_bsd.h"
|
||||||
#include "platform_unix_linux.h"
|
#include "platform_unix_linux.h"
|
||||||
|
@ -45,7 +46,9 @@ extern "C" {
|
||||||
|
|
||||||
/// @brief Constructor.
|
/// @brief Constructor.
|
||||||
Platform* Platform::GetPlatform() {
|
Platform* Platform::GetPlatform() {
|
||||||
#ifdef __UNIX__
|
#if defined(__WINDOWS__)
|
||||||
|
Platform *p = new PlatformWindows;
|
||||||
|
#elif defined(__UNIX__)
|
||||||
# if defined(__FREEBSD__)
|
# if defined(__FREEBSD__)
|
||||||
Platform *p = new PlatformUnixBSD;
|
Platform *p = new PlatformUnixBSD;
|
||||||
# elif defined(__LINUX__)
|
# elif defined(__LINUX__)
|
||||||
|
|
84
aegisub/reporter/platform_windows.cpp
Normal file
84
aegisub/reporter/platform_windows.cpp
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
// Copyright (c) 2009, Amar Takhar <verm@aegisub.org>
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, and distribute this software for any
|
||||||
|
// purpose with or without fee is hereby granted, provided that the above
|
||||||
|
// copyright notice and this permission notice appear in all copies.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
//
|
||||||
|
// $Id: platform_unix.cpp 3592 2009-09-27 04:15:41Z greg $
|
||||||
|
|
||||||
|
/// @file platform_unix.cpp
|
||||||
|
/// @brief Unix Platform extension.
|
||||||
|
/// @ingroup unix
|
||||||
|
|
||||||
|
#ifndef R_PRECOMP
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <wx/app.h>
|
||||||
|
#include <wx/apptrait.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "include/platform.h"
|
||||||
|
#include "platform_windows.h"
|
||||||
|
|
||||||
|
wxString PlatformWindows::OSVersion() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString PlatformWindows::DesktopEnvironment() {
|
||||||
|
return wxTheApp->GetTraits()->GetDesktopEnvironment();
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString PlatformWindows::CPUId() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::CPUSpeed() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::CPUCores() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::CPUCount() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::CPUFeatures() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::CPUFeatures2() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::Memory() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::ServicePack() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::GraphicsVersion() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::DShowFilters() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::AntiVirus() {
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wxString PlatformWindows::Firewall() {
|
||||||
|
return "";
|
||||||
|
};
|
47
aegisub/reporter/platform_windows.h
Normal file
47
aegisub/reporter/platform_windows.h
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
// Copyright (c) 2009, Amar Takhar <verm@aegisub.org>
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, and distribute this software for any
|
||||||
|
// purpose with or without fee is hereby granted, provided that the above
|
||||||
|
// copyright notice and this permission notice appear in all copies.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
//
|
||||||
|
// $Id: platform_unix.h 3592 2009-09-27 04:15:41Z greg $
|
||||||
|
|
||||||
|
/// @file platform_unix.h
|
||||||
|
/// @see platform_unix.cpp
|
||||||
|
/// @ingroup unix
|
||||||
|
|
||||||
|
class Platform;
|
||||||
|
|
||||||
|
/// @brief General Unix functions.
|
||||||
|
class PlatformWindows : public Platform {
|
||||||
|
public:
|
||||||
|
PlatformWindows() {};
|
||||||
|
virtual ~PlatformWindows() {};
|
||||||
|
wxString OSVersion();
|
||||||
|
wxString DesktopEnvironment();
|
||||||
|
|
||||||
|
// Hardware
|
||||||
|
virtual wxString CPUId();
|
||||||
|
virtual wxString CPUSpeed();
|
||||||
|
virtual wxString CPUCores();
|
||||||
|
virtual wxString CPUCount();
|
||||||
|
virtual wxString CPUFeatures();
|
||||||
|
virtual wxString CPUFeatures2();
|
||||||
|
virtual wxString Memory();
|
||||||
|
|
||||||
|
// Windows Specific
|
||||||
|
virtual wxString ServicePack();
|
||||||
|
virtual wxString GraphicsVersion();
|
||||||
|
virtual wxString DShowFilters();
|
||||||
|
virtual wxString AntiVirus();
|
||||||
|
virtual wxString Firewall();
|
||||||
|
virtual wxString DLLVersions();
|
||||||
|
};
|
|
@ -111,8 +111,8 @@ Report::XMLReport Report::ReportCreate() {
|
||||||
Add(doc.windows, "sp", p->ServicePack());
|
Add(doc.windows, "sp", p->ServicePack());
|
||||||
Add(doc.windows, "graphicsver", p->DriverGraphicsVersion());
|
Add(doc.windows, "graphicsver", p->DriverGraphicsVersion());
|
||||||
Add(doc.windows, "dshowfilter", p->DirectShowFilters());
|
Add(doc.windows, "dshowfilter", p->DirectShowFilters());
|
||||||
//Add(doc.windows, "antivirus", p->());
|
Add(doc.windows, "antivirus", p->AntiVirus());
|
||||||
//Add(doc.windows, "firewall", p->());
|
Add(doc.windows, "firewall", p->Firewall());
|
||||||
Add(doc.windows, "dll", p->DLLVersions());
|
Add(doc.windows, "dll", p->DLLVersions());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue