From 0c368e3a1f2e08a52ef5a5f46dea1df6bbf8a688 Mon Sep 17 00:00:00 2001 From: pentarctagon Date: Tue, 31 Dec 2019 17:28:05 -0600 Subject: [PATCH] Remove WindowsTimeout.cpp and related. This is no longer needed, as the WML unit tests are now handled by the python script. --- projectfiles/VC14/WindowsTimeout.cpp | 58 -------- projectfiles/VC14/WindowsTimeout.vcxproj | 96 ------------- projectfiles/VC14/wesnoth.sln | 10 -- projectfiles/VC14/wesnoth.vcxproj | 4 - projectfiles/VC16/WindowsTimeout.cpp | 58 -------- projectfiles/VC16/WindowsTimeout.vcxproj | 163 ----------------------- projectfiles/VC16/wesnoth.sln | 11 -- projectfiles/VC16/wesnoth.vcxproj | 4 - 8 files changed, 404 deletions(-) delete mode 100644 projectfiles/VC14/WindowsTimeout.cpp delete mode 100644 projectfiles/VC14/WindowsTimeout.vcxproj delete mode 100644 projectfiles/VC16/WindowsTimeout.cpp delete mode 100644 projectfiles/VC16/WindowsTimeout.vcxproj diff --git a/projectfiles/VC14/WindowsTimeout.cpp b/projectfiles/VC14/WindowsTimeout.cpp deleted file mode 100644 index a9e3d879329..00000000000 --- a/projectfiles/VC14/WindowsTimeout.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2014 by Sebastian Koelle - Part of the Battle for Wesnoth Project https://www.wesnoth.org/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY. - - See the COPYING file for more details. -*/ - -/** - * @file - * Execute another executable: - * - wait for the process to quit, then pass through the error code - * - terminate it after a timeout of "t" microseconds, then return 2 - */ - -#if _WIN32_WINNT < 0x0602 //Windows version before Win8 - #define WIN32_LEAN_AND_MEAN - #include -#else - #include -#endif -#include -#include - -int main(int argc, char* argv[]) { - - if (argc != 3) { - std::cout << "WindowsTimeout: Error USAGE1: " << argv[0] << " \"command [--options]\" t"; - return -1; - } - - PROCESS_INFORMATION pi; - STARTUPINFO info = { sizeof(info) }; - HANDLE hStdErr = GetStdHandle(STD_ERROR_HANDLE); - info.hStdError = hStdErr; - - if (!CreateProcess(NULL, argv[1], NULL, NULL, TRUE, 0, NULL, NULL, &info, &pi)) - return -1; - - DWORD dwExitCode; - if (::WaitForSingleObject(pi.hProcess, atoi(argv[2])) == WAIT_OBJECT_0) { - GetExitCodeProcess(pi.hProcess, &dwExitCode); - } - else { - TerminateProcess(pi.hProcess, 2); - dwExitCode = 2; - } - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - CloseHandle(hStdErr); - return dwExitCode; -} diff --git a/projectfiles/VC14/WindowsTimeout.vcxproj b/projectfiles/VC14/WindowsTimeout.vcxproj deleted file mode 100644 index d38ca390d2d..00000000000 --- a/projectfiles/VC14/WindowsTimeout.vcxproj +++ /dev/null @@ -1,96 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C} - wesnoth - Win32Proj - - - - Application - v140 - MultiByte - true - - - Application - v140 - MultiByte - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - - - $(SolutionDir)\..\..\ - $(Configuration)\$(ProjectName)\ - true - - - $(SolutionDir)\..\..\ - $(Configuration)\$(ProjectName)\ - - - - Disabled - false - UninitializedLocalUsageCheck - MultiThreadedDebugDLL - Level4 - EditAndContinue - true - - - /SAFESEH:NO %(AdditionalOptions) - $(OutDir)WindowsTimeout.exe - DebugFastLink - $(IntDir)$(TargetName).pdb - Console - MachineX86 - - - - - MaxSpeed - true - MultiThreadedDLL - true - Level3 - ProgramDatabase - - - false - Console - true - true - MachineX86 - UseLinkTimeCodeGeneration - $(OutDir)WindowsTimeout.exe - - - - - - - - - \ No newline at end of file diff --git a/projectfiles/VC14/wesnoth.sln b/projectfiles/VC14/wesnoth.sln index d4d16dde7fe..e3a94c675f8 100644 --- a/projectfiles/VC14/wesnoth.sln +++ b/projectfiles/VC14/wesnoth.sln @@ -10,8 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wesnothlib", "wesnothlib.vc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "liblua.vcxproj", "{01AE7104-A4B1-428E-BA7C-460FE656AE5C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsTimeout", "WindowsTimeout.vcxproj", "{06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "campaignd", "campaignd.vcxproj", "{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}" EndProject Global @@ -59,14 +57,6 @@ Global {01AE7104-A4B1-428E-BA7C-460FE656AE5C}.ReleaseDEBUG|Win32.Build.0 = ReleaseDEBUG|Win32 {01AE7104-A4B1-428E-BA7C-460FE656AE5C}.Test_Debug|Win32.ActiveCfg = Debug|Win32 {01AE7104-A4B1-428E-BA7C-460FE656AE5C}.Test_Release|Win32.ActiveCfg = Release|Win32 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Debug|Win32.ActiveCfg = Debug|Win32 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Debug|Win32.Build.0 = Debug|Win32 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Release|Win32.ActiveCfg = Release|Win32 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Release|Win32.Build.0 = Release|Win32 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.ReleaseDEBUG|Win32.ActiveCfg = Debug|Win32 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.ReleaseDEBUG|Win32.Build.0 = Debug|Win32 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Test_Debug|Win32.ActiveCfg = Debug|Win32 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Test_Release|Win32.ActiveCfg = Release|Win32 {DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Debug|Win32.ActiveCfg = Debug|Win32 {DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Debug|Win32.Build.0 = Debug|Win32 {DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/projectfiles/VC14/wesnoth.vcxproj b/projectfiles/VC14/wesnoth.vcxproj index ad5de8f6500..5923856ebfc 100644 --- a/projectfiles/VC14/wesnoth.vcxproj +++ b/projectfiles/VC14/wesnoth.vcxproj @@ -4114,10 +4114,6 @@ {4a16638b-127b-4ae8-8e0b-4b211b96f976} false - - {06cddad5-8638-46f0-88f5-1b458b7fbe0c} - false - diff --git a/projectfiles/VC16/WindowsTimeout.cpp b/projectfiles/VC16/WindowsTimeout.cpp deleted file mode 100644 index a9e3d879329..00000000000 --- a/projectfiles/VC16/WindowsTimeout.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2014 by Sebastian Koelle - Part of the Battle for Wesnoth Project https://www.wesnoth.org/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY. - - See the COPYING file for more details. -*/ - -/** - * @file - * Execute another executable: - * - wait for the process to quit, then pass through the error code - * - terminate it after a timeout of "t" microseconds, then return 2 - */ - -#if _WIN32_WINNT < 0x0602 //Windows version before Win8 - #define WIN32_LEAN_AND_MEAN - #include -#else - #include -#endif -#include -#include - -int main(int argc, char* argv[]) { - - if (argc != 3) { - std::cout << "WindowsTimeout: Error USAGE1: " << argv[0] << " \"command [--options]\" t"; - return -1; - } - - PROCESS_INFORMATION pi; - STARTUPINFO info = { sizeof(info) }; - HANDLE hStdErr = GetStdHandle(STD_ERROR_HANDLE); - info.hStdError = hStdErr; - - if (!CreateProcess(NULL, argv[1], NULL, NULL, TRUE, 0, NULL, NULL, &info, &pi)) - return -1; - - DWORD dwExitCode; - if (::WaitForSingleObject(pi.hProcess, atoi(argv[2])) == WAIT_OBJECT_0) { - GetExitCodeProcess(pi.hProcess, &dwExitCode); - } - else { - TerminateProcess(pi.hProcess, 2); - dwExitCode = 2; - } - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - CloseHandle(hStdErr); - return dwExitCode; -} diff --git a/projectfiles/VC16/WindowsTimeout.vcxproj b/projectfiles/VC16/WindowsTimeout.vcxproj deleted file mode 100644 index 3bd92fd1dad..00000000000 --- a/projectfiles/VC16/WindowsTimeout.vcxproj +++ /dev/null @@ -1,163 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C} - wesnoth - Win32Proj - 10.0 - - - - Application - v142 - MultiByte - true - - - Application - v142 - MultiByte - true - - - Application - v142 - MultiByte - - - Application - v142 - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - - - true - $(SolutionDir)\..\..\ - $(Configuration)\$(ProjectName)\ - - - true - - - $(SolutionDir)\..\..\ - $(Configuration)\$(ProjectName)\ - - - - Disabled - false - UninitializedLocalUsageCheck - MultiThreadedDebugDLL - Level4 - ProgramDatabase - true - stdcpp17 - /utf-8 /Zc:__cplusplus %(AdditionalOptions) - - - /SAFESEH:NO %(AdditionalOptions) - $(OutDir)WindowsTimeout.exe - true - $(IntDir)$(TargetName).pdb - Console - - - - - Disabled - false - UninitializedLocalUsageCheck - MultiThreadedDebugDLL - Level4 - ProgramDatabase - true - - - /SAFESEH:NO %(AdditionalOptions) - $(OutDir)WindowsTimeout.exe - true - $(IntDir)$(TargetName).pdb - Console - - - - - MaxSpeed - true - MultiThreadedDLL - true - Level3 - ProgramDatabase - stdcpp17 - /utf-8 /Zc:__cplusplus %(AdditionalOptions) - - - false - Console - true - true - UseLinkTimeCodeGeneration - $(OutDir)WindowsTimeout.exe - - - - - MaxSpeed - true - MultiThreadedDLL - true - Level3 - ProgramDatabase - - - false - Console - true - true - UseLinkTimeCodeGeneration - $(OutDir)WindowsTimeout.exe - - - - - - - - - \ No newline at end of file diff --git a/projectfiles/VC16/wesnoth.sln b/projectfiles/VC16/wesnoth.sln index dd324604375..a86ef50ff81 100644 --- a/projectfiles/VC16/wesnoth.sln +++ b/projectfiles/VC16/wesnoth.sln @@ -10,8 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wesnothlib", "wesnothlib.vc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "liblua.vcxproj", "{01AE7104-A4B1-428E-BA7C-460FE656AE5C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsTimeout", "WindowsTimeout.vcxproj", "{06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "campaignd", "campaignd.vcxproj", "{DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}" EndProject Global @@ -59,15 +57,6 @@ Global {01AE7104-A4B1-428E-BA7C-460FE656AE5C}.Test_Debug|Win64.Build.0 = Debug|x64 {01AE7104-A4B1-428E-BA7C-460FE656AE5C}.Test_Release|Win64.ActiveCfg = Release|x64 {01AE7104-A4B1-428E-BA7C-460FE656AE5C}.Test_Release|Win64.Build.0 = Release|x64 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Debug|Win64.ActiveCfg = Debug|x64 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Release|Win64.ActiveCfg = Release|x64 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Release|Win64.Build.0 = Release|x64 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.ReleaseDEBUG|Win64.ActiveCfg = Release|x64 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.ReleaseDEBUG|Win64.Build.0 = Release|x64 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Test_Debug|Win64.ActiveCfg = Debug|x64 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Test_Debug|Win64.Build.0 = Debug|x64 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Test_Release|Win64.ActiveCfg = Release|x64 - {06CDDAD5-8638-46F0-88F5-1B458B7FBE0C}.Test_Release|Win64.Build.0 = Release|x64 {DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Debug|Win64.ActiveCfg = Debug|x64 {DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Release|Win64.ActiveCfg = Release|x64 {DEACBC05-182F-4D9B-A31C-B9A9098DFAAD}.Release|Win64.Build.0 = Release|x64 diff --git a/projectfiles/VC16/wesnoth.vcxproj b/projectfiles/VC16/wesnoth.vcxproj index d23a95e7523..ca449493c67 100644 --- a/projectfiles/VC16/wesnoth.vcxproj +++ b/projectfiles/VC16/wesnoth.vcxproj @@ -4148,10 +4148,6 @@ {4a16638b-127b-4ae8-8e0b-4b211b96f976} false - - {06cddad5-8638-46f0-88f5-1b458b7fbe0c} - false -