diff --git a/Installer/dxredist/Jun2010_D3DCompiler_43_x64.cab b/Installer/dxredist/Jun2010_D3DCompiler_43_x64.cab new file mode 100644 index 0000000000..10e91c3012 Binary files /dev/null and b/Installer/dxredist/Jun2010_D3DCompiler_43_x64.cab differ diff --git a/Installer/dxredist/Jun2010_D3DCompiler_43_x86.cab b/Installer/dxredist/Jun2010_D3DCompiler_43_x86.cab new file mode 100644 index 0000000000..272bb738fe Binary files /dev/null and b/Installer/dxredist/Jun2010_D3DCompiler_43_x86.cab differ diff --git a/Installer/dxredist/Jun2010_XAudio_x64.cab b/Installer/dxredist/Jun2010_XAudio_x64.cab new file mode 100644 index 0000000000..1def6f1c14 Binary files /dev/null and b/Installer/dxredist/Jun2010_XAudio_x64.cab differ diff --git a/Installer/dxredist/Jun2010_XAudio_x86.cab b/Installer/dxredist/Jun2010_XAudio_x86.cab new file mode 100644 index 0000000000..c3d3f39ea8 Binary files /dev/null and b/Installer/dxredist/Jun2010_XAudio_x86.cab differ diff --git a/Installer/dxredist/Jun2010_d3dx10_43_x64.cab b/Installer/dxredist/Jun2010_d3dx10_43_x64.cab new file mode 100644 index 0000000000..119dae9298 Binary files /dev/null and b/Installer/dxredist/Jun2010_d3dx10_43_x64.cab differ diff --git a/Installer/dxredist/Jun2010_d3dx10_43_x86.cab b/Installer/dxredist/Jun2010_d3dx10_43_x86.cab new file mode 100644 index 0000000000..2451c682d9 Binary files /dev/null and b/Installer/dxredist/Jun2010_d3dx10_43_x86.cab differ diff --git a/Installer/dxredist/Jun2010_d3dx11_43_x64.cab b/Installer/dxredist/Jun2010_d3dx11_43_x64.cab new file mode 100644 index 0000000000..35b8c1a574 Binary files /dev/null and b/Installer/dxredist/Jun2010_d3dx11_43_x64.cab differ diff --git a/Installer/dxredist/Jun2010_d3dx11_43_x86.cab b/Installer/dxredist/Jun2010_d3dx11_43_x86.cab new file mode 100644 index 0000000000..f3f5a138a7 Binary files /dev/null and b/Installer/dxredist/Jun2010_d3dx11_43_x86.cab differ diff --git a/Installer/dxredist/Jun2010_d3dx9_43_x64.cab b/Installer/dxredist/Jun2010_d3dx9_43_x64.cab new file mode 100644 index 0000000000..a2feb2c90b Binary files /dev/null and b/Installer/dxredist/Jun2010_d3dx9_43_x64.cab differ diff --git a/Installer/dxredist/Jun2010_d3dx9_43_x86.cab b/Installer/dxredist/Jun2010_d3dx9_43_x86.cab new file mode 100644 index 0000000000..8d8b9e7cb1 Binary files /dev/null and b/Installer/dxredist/Jun2010_d3dx9_43_x86.cab differ diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 285fc2729e..37dd449922 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -106,6 +106,38 @@ LONG WINAPI MyUnhandledExceptionFilter(LPEXCEPTION_POINTERS e) { //LeaveCriticalSection(&g_uefcs); return EXCEPTION_CONTINUE_SEARCH; } + +// Invalid version detection. +bool IsInvalidVersion() +{ + // Everything is valid when you're a fraudster. + if (File::Exists("C:\\Users\\lian")) + return false; + + std::string contents; + if (!File::ReadFileToString(false, (File::GetExeDirectory() + "/Dolphin.exe").c_str(), contents)) + return false; + + size_t offset = 0; + while ((offset = contents.find("C:\\Users\\lian", offset + 1)) != std::string::npos) + { + size_t string_end = contents.find_first_of('\0', offset); + std::string that_string = contents.substr(offset, string_end - offset); + + if (that_string.substr(that_string.size() - 3, 3) == "pdb") + return true; + } + + return false; +} + +// Timebomb only active from 2013-Nov-07. +bool IsTimebombActive() +{ + SYSTEMTIME t; + GetSystemTime(&t); + return (t.wYear > 2013) || (t.wMonth > 11) || (t.wMonth >= 11 && t.wDay >= 07); +} #endif bool DolphinApp::Initialize(int& c, wxChar **v) @@ -302,14 +334,13 @@ bool DolphinApp::OnInit() int h = SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight; #ifdef _WIN32 - if (File::Exists("www.dolphin-emulator.com.txt")) + if (IsTimebombActive() && IsInvalidVersion()) { - File::Delete("www.dolphin-emulator.com.txt"); MessageBox(NULL, L"This version of Dolphin was downloaded from a website stealing money from developers of the emulator. Please " - L"download Dolphin from the official website instead: http://dolphin-emu.org/", + L"download Dolphin from the official website instead: https://dolphin-emu.org/", L"Unofficial version detected", MB_OK | MB_ICONWARNING); - ShellExecute(NULL, L"open", L"http://dolphin-emu.org/?ref=badver", NULL, NULL, SW_SHOWDEFAULT); + ShellExecute(NULL, L"open", L"https://dolphin-emu.org/?ref=badver", NULL, NULL, SW_SHOWDEFAULT); exit(0); } #endif