From dee4c9827c6cf59f27aa012f7f8d0ac734a86930 Mon Sep 17 00:00:00 2001 From: ShawnCZek Date: Mon, 22 Apr 2024 22:42:42 +0200 Subject: [PATCH 1/2] Fix solution build for VS2022. * Remove the x64 configuration from the solution as Core and ConverterPIX do not currently support it. cityhash and zlib libraries keep this configuration, possibly useful for the x64 support in the future. * Update the platform toolset to v143 (VS2022). * Target Windows 10.* in builds. * Enable the multiprocessor compilation for the Core project to improve its build time. --- src/ConverterPIX.sln | 125 +++++++++++++---------------- src/Core.vcxproj | 12 +-- src/cmd/ConverterPIX.vcxproj | 10 +-- src/libs/cityhash/cityhash.vcxproj | 14 ++-- src/libs/zlib/zlib.vcxproj | 14 ++-- 5 files changed, 81 insertions(+), 94 deletions(-) diff --git a/src/ConverterPIX.sln b/src/ConverterPIX.sln index 9091d73..3a9aa19 100644 --- a/src/ConverterPIX.sln +++ b/src/ConverterPIX.sln @@ -1,70 +1,55 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "libs\zlib\zlib.vcxproj", "{33134F61-C1AD-4B6F-9CEA-503A9F140C52}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "Core.vcxproj", "{7AF227E8-E1B1-4364-A66F-3752D1B23713}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConverterPIX", "cmd\ConverterPIX.vcxproj", "{8ACF1ABB-2B42-492B-A403-BD98A61FC110}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI ConverterPIX", "gui\GUIConverterPIX.vcxproj", "{07E5351D-840D-48D6-B242-D4C4501DFF2E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cityhash", "libs\cityhash\cityhash.vcxproj", "{75A85A1A-359C-4C0F-9440-024C62F43C50}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{D86FC0C4-1146-4480-BD0D-E1764B35C39E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|Win32.ActiveCfg = Debug|Win32 - {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|Win32.Build.0 = Debug|Win32 - {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|x64.ActiveCfg = Debug|x64 - {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|x64.Build.0 = Debug|x64 - {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|Win32.ActiveCfg = Release|Win32 - {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|Win32.Build.0 = Release|Win32 - {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|x64.ActiveCfg = Release|x64 - {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|x64.Build.0 = Release|x64 - {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Debug|Win32.ActiveCfg = Debug|Win32 - {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Debug|Win32.Build.0 = Debug|Win32 - {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Debug|x64.ActiveCfg = Debug|Win32 - {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Release|Win32.ActiveCfg = Release|Win32 - {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Release|Win32.Build.0 = Release|Win32 - {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Release|x64.ActiveCfg = Release|Win32 - {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Debug|Win32.ActiveCfg = Debug|Win32 - {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Debug|Win32.Build.0 = Debug|Win32 - {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Debug|x64.ActiveCfg = Debug|Win32 - {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Release|Win32.ActiveCfg = Release|Win32 - {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Release|Win32.Build.0 = Release|Win32 - {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Release|x64.ActiveCfg = Release|Win32 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Debug|Win32.Build.0 = Debug|Win32 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Debug|x64.ActiveCfg = Debug|x64 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Debug|x64.Build.0 = Debug|x64 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Release|Win32.ActiveCfg = Release|Win32 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Release|Win32.Build.0 = Release|Win32 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Release|x64.ActiveCfg = Release|x64 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Release|x64.Build.0 = Release|x64 - {75A85A1A-359C-4C0F-9440-024C62F43C50}.Debug|Win32.ActiveCfg = Debug|Win32 - {75A85A1A-359C-4C0F-9440-024C62F43C50}.Debug|Win32.Build.0 = Debug|Win32 - {75A85A1A-359C-4C0F-9440-024C62F43C50}.Debug|x64.ActiveCfg = Debug|x64 - {75A85A1A-359C-4C0F-9440-024C62F43C50}.Debug|x64.Build.0 = Debug|x64 - {75A85A1A-359C-4C0F-9440-024C62F43C50}.Release|Win32.ActiveCfg = Release|Win32 - {75A85A1A-359C-4C0F-9440-024C62F43C50}.Release|Win32.Build.0 = Release|Win32 - {75A85A1A-359C-4C0F-9440-024C62F43C50}.Release|x64.ActiveCfg = Release|x64 - {75A85A1A-359C-4C0F-9440-024C62F43C50}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {33134F61-C1AD-4B6F-9CEA-503A9F140C52} = {D86FC0C4-1146-4480-BD0D-E1764B35C39E} - {75A85A1A-359C-4C0F-9440-024C62F43C50} = {D86FC0C4-1146-4480-BD0D-E1764B35C39E} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34723.18 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "libs\zlib\zlib.vcxproj", "{33134F61-C1AD-4B6F-9CEA-503A9F140C52}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "Core.vcxproj", "{7AF227E8-E1B1-4364-A66F-3752D1B23713}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConverterPIX", "cmd\ConverterPIX.vcxproj", "{8ACF1ABB-2B42-492B-A403-BD98A61FC110}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI ConverterPIX", "gui\GUIConverterPIX.vcxproj", "{07E5351D-840D-48D6-B242-D4C4501DFF2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cityhash", "libs\cityhash\cityhash.vcxproj", "{75A85A1A-359C-4C0F-9440-024C62F43C50}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{D86FC0C4-1146-4480-BD0D-E1764B35C39E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|Win32.ActiveCfg = Debug|Win32 + {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|Win32.Build.0 = Debug|Win32 + {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|Win32.ActiveCfg = Release|Win32 + {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|Win32.Build.0 = Release|Win32 + {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Debug|Win32.ActiveCfg = Debug|Win32 + {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Debug|Win32.Build.0 = Debug|Win32 + {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Release|Win32.ActiveCfg = Release|Win32 + {7AF227E8-E1B1-4364-A66F-3752D1B23713}.Release|Win32.Build.0 = Release|Win32 + {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Debug|Win32.ActiveCfg = Debug|Win32 + {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Debug|Win32.Build.0 = Debug|Win32 + {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Release|Win32.ActiveCfg = Release|Win32 + {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Release|Win32.Build.0 = Release|Win32 + {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Debug|Win32.ActiveCfg = Debug|Win32 + {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Debug|Win32.Build.0 = Debug|Win32 + {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Release|Win32.ActiveCfg = Release|Win32 + {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Release|Win32.Build.0 = Release|Win32 + {75A85A1A-359C-4C0F-9440-024C62F43C50}.Debug|Win32.ActiveCfg = Debug|Win32 + {75A85A1A-359C-4C0F-9440-024C62F43C50}.Debug|Win32.Build.0 = Debug|Win32 + {75A85A1A-359C-4C0F-9440-024C62F43C50}.Release|Win32.ActiveCfg = Release|Win32 + {75A85A1A-359C-4C0F-9440-024C62F43C50}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {33134F61-C1AD-4B6F-9CEA-503A9F140C52} = {D86FC0C4-1146-4480-BD0D-E1764B35C39E} + {75A85A1A-359C-4C0F-9440-024C62F43C50} = {D86FC0C4-1146-4480-BD0D-E1764B35C39E} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ED05F301-0B4A-45C0-8BA6-3B48B47D37BD} + EndGlobalSection +EndGlobal diff --git a/src/Core.vcxproj b/src/Core.vcxproj index 6f49cf4..0fdf319 100644 --- a/src/Core.vcxproj +++ b/src/Core.vcxproj @@ -133,20 +133,20 @@ {7AF227E8-E1B1-4364-A66F-3752D1B23713} Win32Proj Core - 8.1 + 10.0 StaticLibrary true - v141_xp + v143 NotSet false StaticLibrary false - v141_xp + v143 true NotSet @@ -164,12 +164,12 @@ ..\bin\win_x86\ - ..\obj\release\win_x86\$(ProjectName)\ + ..\obj\$(Configuration)\win_x86\$(ProjectName)\ core ..\bin\win_x86\ - ..\obj\release\win_x86\$(ProjectName)\ + ..\obj\$(Configuration)\win_x86\$(ProjectName)\ core_d @@ -184,6 +184,7 @@ MultiThreadedDebug 4996;%(DisableSpecificWarnings) stdcpp17 + true Windows @@ -203,6 +204,7 @@ 4996;%(DisableSpecificWarnings) prerequisites.h stdcpp17 + true Windows diff --git a/src/cmd/ConverterPIX.vcxproj b/src/cmd/ConverterPIX.vcxproj index 018072b..7ad4ab8 100644 --- a/src/cmd/ConverterPIX.vcxproj +++ b/src/cmd/ConverterPIX.vcxproj @@ -13,19 +13,19 @@ {8ACF1ABB-2B42-492B-A403-BD98A61FC110} ConverterPIX - 8.1 + 10.0 Application true - v141_xp + v143 NotSet Application false - v141_xp + v143 true NotSet @@ -42,11 +42,11 @@ ..\..\bin\win_x86\ converter_pix_d - ..\..\obj\release\win_x86\$(ProjectName)\ + ..\..\obj\$(Configuration)\win_x86\$(ProjectName)\ ..\..\bin\win_x86\ - ..\..\obj\release\win_x86\$(ProjectName)\ + ..\..\obj\$(Configuration)\win_x86\$(ProjectName)\ converter_pix $(ProjectDir)/;$(IncludePath) diff --git a/src/libs/cityhash/cityhash.vcxproj b/src/libs/cityhash/cityhash.vcxproj index 9449b7e..21cdcca 100644 --- a/src/libs/cityhash/cityhash.vcxproj +++ b/src/libs/cityhash/cityhash.vcxproj @@ -22,32 +22,32 @@ {75A85A1A-359C-4C0F-9440-024C62F43C50} Win32Proj cityhash - 7.0 + 10.0 StaticLibrary true - v141_xp + v143 NotSet StaticLibrary false - v141_xp + v143 true NotSet StaticLibrary true - v140 + v143 Unicode StaticLibrary false - v140 + v143 true Unicode @@ -70,12 +70,12 @@ - $(SolutionDir)..\bin\libs\$(ProjectName)\$(PlatformName)\ + $(SolutionDir)..\bin\libs\$(PlatformName)\$(Configuration)\ $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)_$(PlatformName)\ $(ProjectName) - $(SolutionDir)..\bin\libs\$(ProjectName)\$(PlatformName)\ + $(SolutionDir)..\bin\libs\$(PlatformName)\$(Configuration)\ $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)_$(PlatformName)\ $(ProjectName)_d diff --git a/src/libs/zlib/zlib.vcxproj b/src/libs/zlib/zlib.vcxproj index 7e6d5e9..cbb16d2 100644 --- a/src/libs/zlib/zlib.vcxproj +++ b/src/libs/zlib/zlib.vcxproj @@ -22,31 +22,31 @@ zlib {33134F61-C1AD-4B6F-9CEA-503A9F140C52} ZLib - 7.0 + 10.0 StaticLibrary - v141_xp + v143 false NotSet false StaticLibrary - v141_xp + v143 false MultiByte StaticLibrary - v140_xp + v143 false MultiByte StaticLibrary - v140_xp + v143 false MultiByte @@ -74,7 +74,7 @@ <_ProjectFileVersion>12.0.21005.1 - $(SolutionDir)..\bin\libs\$(ProjectName)\$(PlatformName)\ + $(SolutionDir)..\bin\libs\$(PlatformName)\$(Configuration)\ $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)_$(PlatformName)\ $(ProjectName)_d @@ -84,7 +84,7 @@ $(ProjectName)_debug - $(SolutionDir)..\bin\libs\$(ProjectName)\$(PlatformName)\ + $(SolutionDir)..\bin\libs\$(PlatformName)\$(Configuration)\ $(SolutionDir)..\obj\$(ProjectName)\$(Configuration)_$(PlatformName)\ From b075650b0a3b320c2bf90efccff270ef8d9365a0 Mon Sep 17 00:00:00 2001 From: ShawnCZek Date: Mon, 22 Apr 2024 22:50:21 +0200 Subject: [PATCH 2/2] Remove the GUI project. This project does not serve any purpose and is only confusing at this moment. --- src/ConverterPIX.sln | 6 - src/gui/GUIConverterPIX.vcxproj | 180 ------------------------ src/gui/GUIConverterPIX.vcxproj.filters | 26 ---- src/gui/GUIConverterPIX.vcxproj.user | 4 - src/gui/_maingui.cpp | 57 -------- src/gui/converter.cpp | 116 --------------- src/gui/converter.h | 46 ------ 7 files changed, 435 deletions(-) delete mode 100644 src/gui/GUIConverterPIX.vcxproj delete mode 100644 src/gui/GUIConverterPIX.vcxproj.filters delete mode 100644 src/gui/GUIConverterPIX.vcxproj.user delete mode 100644 src/gui/_maingui.cpp delete mode 100644 src/gui/converter.cpp delete mode 100644 src/gui/converter.h diff --git a/src/ConverterPIX.sln b/src/ConverterPIX.sln index 3a9aa19..00779d3 100644 --- a/src/ConverterPIX.sln +++ b/src/ConverterPIX.sln @@ -9,8 +9,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "Core.vcxproj", "{7A EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConverterPIX", "cmd\ConverterPIX.vcxproj", "{8ACF1ABB-2B42-492B-A403-BD98A61FC110}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI ConverterPIX", "gui\GUIConverterPIX.vcxproj", "{07E5351D-840D-48D6-B242-D4C4501DFF2E}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cityhash", "libs\cityhash\cityhash.vcxproj", "{75A85A1A-359C-4C0F-9440-024C62F43C50}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{D86FC0C4-1146-4480-BD0D-E1764B35C39E}" @@ -33,10 +31,6 @@ Global {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Debug|Win32.Build.0 = Debug|Win32 {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Release|Win32.ActiveCfg = Release|Win32 {8ACF1ABB-2B42-492B-A403-BD98A61FC110}.Release|Win32.Build.0 = Release|Win32 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Debug|Win32.Build.0 = Debug|Win32 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Release|Win32.ActiveCfg = Release|Win32 - {07E5351D-840D-48D6-B242-D4C4501DFF2E}.Release|Win32.Build.0 = Release|Win32 {75A85A1A-359C-4C0F-9440-024C62F43C50}.Debug|Win32.ActiveCfg = Debug|Win32 {75A85A1A-359C-4C0F-9440-024C62F43C50}.Debug|Win32.Build.0 = Debug|Win32 {75A85A1A-359C-4C0F-9440-024C62F43C50}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/src/gui/GUIConverterPIX.vcxproj b/src/gui/GUIConverterPIX.vcxproj deleted file mode 100644 index de0b4ce..0000000 --- a/src/gui/GUIConverterPIX.vcxproj +++ /dev/null @@ -1,180 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - {7af227e8-e1b1-4364-a66f-3752d1b23713} - - - {33134f61-c1ad-4b6f-9cea-503a9f140c52} - - - - {07E5351D-840D-48D6-B242-D4C4501DFF2E} - Win32Proj - GUIConverterPIX - 8.1 - GUI ConverterPIX - - - - Application - true - v141_xp - NotSet - - - Application - false - v141_xp - true - NotSet - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - ..\..\bin\win_x86\ - ..\..\obj\release\win_x86\$(ProjectName)\ - gui_converter_pix_d - - - true - - - false - ..\..\bin\win_x86\ - ..\..\obj\release\win_x86\$(ProjectName)\ - gui_converter_pix - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - ./;../libs;../libs/glm;../libs/fmt/include;../;%(AdditionalIncludeDirectories) - stdcpp17 - MultiThreadedDebug - - - Windows - true - - - - - - - Level3 - Disabled - _DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - - - Windows - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreaded - ./;../libs;../libs/glm;../libs/fmt/include;../;%(AdditionalIncludeDirectories) - 4996; - stdcpp17 - - - Windows - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/src/gui/GUIConverterPIX.vcxproj.filters b/src/gui/GUIConverterPIX.vcxproj.filters deleted file mode 100644 index 558a3a2..0000000 --- a/src/gui/GUIConverterPIX.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - - - Source Files - - - \ No newline at end of file diff --git a/src/gui/GUIConverterPIX.vcxproj.user b/src/gui/GUIConverterPIX.vcxproj.user deleted file mode 100644 index abe8dd8..0000000 --- a/src/gui/GUIConverterPIX.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/gui/_maingui.cpp b/src/gui/_maingui.cpp deleted file mode 100644 index 792d811..0000000 --- a/src/gui/_maingui.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/****************************************************************************** - * - * Project: ConverterPIX @ GUI Application - * File: /gui/_maingui.cpp - * - * _____ _ _____ _______ __ - * / ____| | | | __ \_ _\ \ / / - * | | ___ _ ____ _____ _ __| |_ ___ _ __| |__) || | \ V / - * | | / _ \| '_ \ \ / / _ \ '__| __/ _ \ '__| ___/ | | > < - * | |___| (_) | | | \ V / __/ | | || __/ | | | _| |_ / . \ - * \_____\___/|_| |_|\_/ \___|_| \__\___|_| |_| |_____/_/ \_\ - * - * - * Copyright (C) 2017 Michal Wojtowicz. - * All rights reserved. - * - * This software is ditributed WITHOUT ANY WARRANTY; without even - * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the copyright file for more information. - * - *****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#ifdef _WIN32 - -int CALLBACK WinMain( - _In_ HINSTANCE hInstance, - _In_ HINSTANCE hPrevInstance, - _In_ LPSTR lpCmdLine, - _In_ int nCmdShow -) -{ - Converter converter; - if (converter.Init()) - { - converter.Run(); - } - return converter.Destroy() ? 0 : 1; -} - -#endif - -/* eof */ diff --git a/src/gui/converter.cpp b/src/gui/converter.cpp deleted file mode 100644 index bbc0b59..0000000 --- a/src/gui/converter.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/****************************************************************************** - * - * Project: ConverterPIX @ GUI Application - * File: /gui/converter.cpp - * - * _____ _ _____ _______ __ - * / ____| | | | __ \_ _\ \ / / - * | | ___ _ ____ _____ _ __| |_ ___ _ __| |__) || | \ V / - * | | / _ \| '_ \ \ / / _ \ '__| __/ _ \ '__| ___/ | | > < - * | |___| (_) | | | \ V / __/ | | || __/ | | | _| |_ / . \ - * \_____\___/|_| |_|\_/ \___|_| \__\___|_| |_| |_____/_/ \_\ - * - * - * Copyright (C) 2017 Michal Wojtowicz. - * All rights reserved. - * - * This software is ditributed WITHOUT ANY WARRANTY; without even - * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the copyright file for more information. - * - *****************************************************************************/ - -#include - -#include "converter.h" - -Converter::Converter() -{ -} - -Converter::~Converter() -{ -} - -bool Converter::Init() -{ - WNDCLASSEX wcex; - wcex.cbSize = sizeof(WNDCLASSEX); - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = ::WndProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = GetModuleHandle(NULL); - wcex.hIcon = 0; // LoadIconA(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_APPLICATION)); - wcex.hCursor = 0;// LoadCursorA(NULL, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - wcex.lpszMenuName = NULL; - wcex.lpszClassName = "converter_pix"; - wcex.hIconSm = 0;// LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_APPLICATION)); - - if (!RegisterClassExA(&wcex)) - { - MessageBoxA(NULL, "Call to RegisterClassEx failed!", "Win32 Guided Tour", NULL); - return false; - } - - m_window = CreateWindowA( - "converter_pix", - "Converter PIX", - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, - 500, 100, - NULL, - NULL, - GetModuleHandleA(NULL), - NULL - ); - - if (!m_window) - { - MessageBoxA(NULL, "Call to CreateWindow failed!", "Win32 Guided Tour", NULL); - return false; - } - - SetWindowLongA(m_window, GWL_USERDATA, (LONG)this); - - ShowWindow(m_window, TRUE); - UpdateWindow(m_window); - return true; -} - -bool Converter::Destroy() -{ - return true; -} - -void Converter::Run() -{ - MSG message; - while (GetMessageA(&message, m_window, 0, 0)) - { - TranslateMessage(&message); - DispatchMessageA(&message); - } -} - -LRESULT Converter::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) - { - case WM_PAINT: - break; - case WM_DESTROY: - PostQuitMessage(0); - break; - } - return DefWindowProc(hWnd, message, wParam, lParam); -} - -LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - const auto _this = reinterpret_cast(GetWindowLong(hWnd, GWL_USERDATA)); - return _this ? _this->WndProc(hWnd, message, wParam, lParam) : 0; -} - -/* eof */ diff --git a/src/gui/converter.h b/src/gui/converter.h deleted file mode 100644 index 8580ad3..0000000 --- a/src/gui/converter.h +++ /dev/null @@ -1,46 +0,0 @@ -/****************************************************************************** - * - * Project: ConverterPIX @ GUI Application - * File: /gui/converter.h - * - * _____ _ _____ _______ __ - * / ____| | | | __ \_ _\ \ / / - * | | ___ _ ____ _____ _ __| |_ ___ _ __| |__) || | \ V / - * | | / _ \| '_ \ \ / / _ \ '__| __/ _ \ '__| ___/ | | > < - * | |___| (_) | | | \ V / __/ | | || __/ | | | _| |_ / . \ - * \_____\___/|_| |_|\_/ \___|_| \__\___|_| |_| |_____/_/ \_\ - * - * - * Copyright (C) 2017 Michal Wojtowicz. - * All rights reserved. - * - * This software is ditributed WITHOUT ANY WARRANTY; without even - * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the copyright file for more information. - * - *****************************************************************************/ - -#pragma once - -#include - -class Converter : public ExplicitSingleton -{ -private: - HWND m_window; - -public: - Converter(); - ~Converter(); - - bool Init(); - bool Destroy(); - - void Run(); - - LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); -}; - -LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); - -/* eof */