From 4f983e4b902fc48340f63f04b6356ba91c7ad256 Mon Sep 17 00:00:00 2001 From: Phil Martin Date: Thu, 14 Jul 2022 10:47:04 +1000 Subject: [PATCH 1/4] Changes for VS2022 to build intersect.exe --- .../GLOOP/include/gloop/image/radiance.hpp | 11 ++ external/GLOOP/include/gloop/model/stream.hpp | 9 ++ external/GLOOP/src/model/ply_format.cpp | 9 ++ include/carve/polyhedron_impl.hpp | 1 + include/carve/vcpp_config.h | 9 ++ lib/mesh.cpp | 3 + win32/Carve.sln | 83 +++++------- win32/carvelib/carvelib.vcxproj | 127 ++++++++++++++++++ win32/fileformats/fileformats.vcxproj | 92 +++++++++++++ win32/fileformats/fileformats.vcxproj.filters | 36 +++++ win32/glew/glew.vcxproj | 84 ++++++++++++ win32/gloop/gloop.vcxproj | 95 +++++++++++++ win32/gloop/gloop.vcxproj.filters | 30 +++++ win32/glui/glui.vcxproj | 125 +++++++++++++++++ win32/intersect/intersect.vcxproj | 107 +++++++++++++++ win32/texture_example/texture_example.vcxproj | 106 +++++++++++++++ win32/view/view.vcxproj | 114 ++++++++++++++++ 17 files changed, 989 insertions(+), 52 deletions(-) create mode 100644 win32/carvelib/carvelib.vcxproj create mode 100644 win32/fileformats/fileformats.vcxproj create mode 100644 win32/fileformats/fileformats.vcxproj.filters create mode 100644 win32/glew/glew.vcxproj create mode 100644 win32/gloop/gloop.vcxproj create mode 100644 win32/gloop/gloop.vcxproj.filters create mode 100644 win32/glui/glui.vcxproj create mode 100644 win32/intersect/intersect.vcxproj create mode 100644 win32/texture_example/texture_example.vcxproj create mode 100644 win32/view/view.vcxproj diff --git a/external/GLOOP/include/gloop/image/radiance.hpp b/external/GLOOP/include/gloop/image/radiance.hpp index 932aab7..727e12a 100644 --- a/external/GLOOP/include/gloop/image/radiance.hpp +++ b/external/GLOOP/include/gloop/image/radiance.hpp @@ -30,6 +30,14 @@ #pragma once #if (defined WIN32) || (defined _WIN32) + +// These definitions are already provided by Visual Studio 2022 +#if (defined _MSC_VER) && _MSC_VER >= 1930 + +#include + +#else + typedef char int8_t; typedef short int16_t; typedef long int32_t; @@ -37,6 +45,9 @@ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned long uint32_t; + +#endif + #else #include #endif diff --git a/external/GLOOP/include/gloop/model/stream.hpp b/external/GLOOP/include/gloop/model/stream.hpp index 723dc60..0f76f8a 100644 --- a/external/GLOOP/include/gloop/model/stream.hpp +++ b/external/GLOOP/include/gloop/model/stream.hpp @@ -34,6 +34,13 @@ #ifdef WIN32 +// These definitions are already provided by Visual Studio 2022 +#if (defined _MSC_VER) && _MSC_VER >= 1930 + +#include + +#else + typedef char int8_t; typedef short int16_t; typedef long int32_t; @@ -42,6 +49,8 @@ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned long uint32_t; +#endif + #else #include diff --git a/external/GLOOP/src/model/ply_format.cpp b/external/GLOOP/src/model/ply_format.cpp index 178ed31..900c6ea 100644 --- a/external/GLOOP/src/model/ply_format.cpp +++ b/external/GLOOP/src/model/ply_format.cpp @@ -36,6 +36,13 @@ #ifdef WIN32 +#if (defined _MSC_VER) && _MSC_VER >= 1930 + +#include +#include + +#else + typedef char int8_t; typedef short int16_t; typedef long int32_t; @@ -44,6 +51,8 @@ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned long uint32_t; +#endif + #else #include diff --git a/include/carve/polyhedron_impl.hpp b/include/carve/polyhedron_impl.hpp index 3d0b2cd..2aab9de 100644 --- a/include/carve/polyhedron_impl.hpp +++ b/include/carve/polyhedron_impl.hpp @@ -28,6 +28,7 @@ #include #include +#include namespace carve { namespace poly { diff --git a/include/carve/vcpp_config.h b/include/carve/vcpp_config.h index d80d987..b1ffe65 100644 --- a/include/carve/vcpp_config.h +++ b/include/carve/vcpp_config.h @@ -9,6 +9,15 @@ #include +// These definitions are already provided by Visual Studio 2022 +#if (defined _MSC_VER) && _MSC_VER >= 1930 + +#else + static inline double round(double value) { return (value >= 0) ? floor(value + 0.5) : ceil(value - 0.5); } + +#endif + +typedef int ssize_t; diff --git a/lib/mesh.cpp b/lib/mesh.cpp index cd3dab3..7e7c9df 100644 --- a/lib/mesh.cpp +++ b/lib/mesh.cpp @@ -32,6 +32,9 @@ #include +#include +#include + namespace { inline double CALC_X(const carve::geom::plane<3>& p, double y, double z) { return -(p.d + p.N.y * y + p.N.z * z) / p.N.x; diff --git a/win32/Carve.sln b/win32/Carve.sln index 5fcbf87..ba151f1 100644 --- a/win32/Carve.sln +++ b/win32/Carve.sln @@ -1,47 +1,23 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "carvelib", "carvelib\carvelib.vcproj", "{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}" - ProjectSection(ProjectDependencies) = postProject - {B74F9D7B-8A9D-45A0-8D09-973D01314D80} = {B74F9D7B-8A9D-45A0-8D09-973D01314D80} - {A50234C1-A40D-4782-81CB-9D4549DC9474} = {A50234C1-A40D-4782-81CB-9D4549DC9474} - EndProjectSection +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32616.157 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "carvelib", "carvelib\carvelib.vcxproj", "{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gloop", "gloop\gloop.vcproj", "{A50234C1-A40D-4782-81CB-9D4549DC9474}" - ProjectSection(ProjectDependencies) = postProject - {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} = {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fileformats", "fileformats\fileformats.vcxproj", "{B74F9D7B-8A9D-45A0-8D09-973D01314D80}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intersect", "intersect\intersect.vcproj", "{FD8895D6-8EE2-4E37-8E76-A642FA1422C1}" - ProjectSection(ProjectDependencies) = postProject - {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} = {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} - {A50234C1-A40D-4782-81CB-9D4549DC9474} = {A50234C1-A40D-4782-81CB-9D4549DC9474} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "texture_example", "texture_example\texture_example.vcxproj", "{9633062D-3A3A-4997-8754-8A21CD5A354C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "view", "view\view.vcproj", "{2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}" - ProjectSection(ProjectDependencies) = postProject - {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4} = {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4} - {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} = {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} - {A50234C1-A40D-4782-81CB-9D4549DC9474} = {A50234C1-A40D-4782-81CB-9D4549DC9474} - {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} = {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew", "glew\glew.vcxproj", "{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew", "glew\glew.vcproj", "{00B985EA-A5CD-4F24-8B62-5DC87CD4D080}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gloop", "gloop\gloop.vcxproj", "{A50234C1-A40D-4782-81CB-9D4549DC9474}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glui32", "glui\glui.vcproj", "{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}" - ProjectSection(ProjectDependencies) = postProject - {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} = {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glui32", "glui\glui.vcxproj", "{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "texture_example", "texture_example\texture_example.vcproj", "{9633062D-3A3A-4997-8754-8A21CD5A354C}" - ProjectSection(ProjectDependencies) = postProject - {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4} = {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4} - {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} = {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} - {A50234C1-A40D-4782-81CB-9D4549DC9474} = {A50234C1-A40D-4782-81CB-9D4549DC9474} - {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} = {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intersect", "intersect\intersect.vcxproj", "{FD8895D6-8EE2-4E37-8E76-A642FA1422C1}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fileformats", "fileformats\fileformats.vcproj", "{B74F9D7B-8A9D-45A0-8D09-973D01314D80}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "view", "view\view.vcxproj", "{2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -53,10 +29,26 @@ Global {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}.Debug|Win32.Build.0 = Debug|Win32 {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}.Release|Win32.ActiveCfg = Release|Win32 {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}.Release|Win32.Build.0 = Release|Win32 + {B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Debug|Win32.ActiveCfg = Debug|Win32 + {B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Debug|Win32.Build.0 = Debug|Win32 + {B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Release|Win32.ActiveCfg = Release|Win32 + {B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Release|Win32.Build.0 = Release|Win32 + {9633062D-3A3A-4997-8754-8A21CD5A354C}.Debug|Win32.ActiveCfg = Debug|Win32 + {9633062D-3A3A-4997-8754-8A21CD5A354C}.Debug|Win32.Build.0 = Debug|Win32 + {9633062D-3A3A-4997-8754-8A21CD5A354C}.Release|Win32.ActiveCfg = Release|Win32 + {9633062D-3A3A-4997-8754-8A21CD5A354C}.Release|Win32.Build.0 = Release|Win32 + {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Debug|Win32.ActiveCfg = Debug|Win32 + {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Debug|Win32.Build.0 = Debug|Win32 + {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Release|Win32.ActiveCfg = Release|Win32 + {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Release|Win32.Build.0 = Release|Win32 {A50234C1-A40D-4782-81CB-9D4549DC9474}.Debug|Win32.ActiveCfg = Debug|Win32 {A50234C1-A40D-4782-81CB-9D4549DC9474}.Debug|Win32.Build.0 = Debug|Win32 {A50234C1-A40D-4782-81CB-9D4549DC9474}.Release|Win32.ActiveCfg = Release|Win32 {A50234C1-A40D-4782-81CB-9D4549DC9474}.Release|Win32.Build.0 = Release|Win32 + {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Debug|Win32.ActiveCfg = Debug|Win32 + {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Debug|Win32.Build.0 = Debug|Win32 + {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Release|Win32.ActiveCfg = Release|Win32 + {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Release|Win32.Build.0 = Release|Win32 {FD8895D6-8EE2-4E37-8E76-A642FA1422C1}.Debug|Win32.ActiveCfg = Debug|Win32 {FD8895D6-8EE2-4E37-8E76-A642FA1422C1}.Debug|Win32.Build.0 = Debug|Win32 {FD8895D6-8EE2-4E37-8E76-A642FA1422C1}.Release|Win32.ActiveCfg = Release|Win32 @@ -65,24 +57,11 @@ Global {2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}.Debug|Win32.Build.0 = Debug|Win32 {2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}.Release|Win32.ActiveCfg = Release|Win32 {2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}.Release|Win32.Build.0 = Release|Win32 - {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Debug|Win32.ActiveCfg = Debug|Win32 - {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Debug|Win32.Build.0 = Debug|Win32 - {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Release|Win32.ActiveCfg = Release|Win32 - {00B985EA-A5CD-4F24-8B62-5DC87CD4D080}.Release|Win32.Build.0 = Release|Win32 - {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Debug|Win32.ActiveCfg = Debug|Win32 - {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Debug|Win32.Build.0 = Debug|Win32 - {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Release|Win32.ActiveCfg = Release|Win32 - {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}.Release|Win32.Build.0 = Release|Win32 - {9633062D-3A3A-4997-8754-8A21CD5A354C}.Debug|Win32.ActiveCfg = Debug|Win32 - {9633062D-3A3A-4997-8754-8A21CD5A354C}.Debug|Win32.Build.0 = Debug|Win32 - {9633062D-3A3A-4997-8754-8A21CD5A354C}.Release|Win32.ActiveCfg = Release|Win32 - {9633062D-3A3A-4997-8754-8A21CD5A354C}.Release|Win32.Build.0 = Release|Win32 - {B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Debug|Win32.ActiveCfg = Debug|Win32 - {B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Debug|Win32.Build.0 = Debug|Win32 - {B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Release|Win32.ActiveCfg = Release|Win32 - {B74F9D7B-8A9D-45A0-8D09-973D01314D80}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {74050F9A-8D08-4A20-978A-DEECBCD4AB9A} + EndGlobalSection EndGlobal diff --git a/win32/carvelib/carvelib.vcxproj b/win32/carvelib/carvelib.vcxproj new file mode 100644 index 0000000..3ca7840 --- /dev/null +++ b/win32/carvelib/carvelib.vcxproj @@ -0,0 +1,127 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} + carvelib + Win32Proj + + + + StaticLibrary + v143 + Unicode + true + + + StaticLibrary + v143 + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>17.0.32505.173 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + ../../include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;NOMINMAX;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + fileformats.lib;%(AdditionalDependencies) + $(OutDir);%(AdditionalLibraryDirectories) + + + + + MaxSpeed + true + ../../include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;NOMINMAX;%(PreprocessorDefinitions) + MultiThreadedDLL + false + true + + Level3 + ProgramDatabase + + + fileformats.lib;%(AdditionalDependencies) + $(OutDir);%(AdditionalLibraryDirectories) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win32/fileformats/fileformats.vcxproj b/win32/fileformats/fileformats.vcxproj new file mode 100644 index 0000000..cda314e --- /dev/null +++ b/win32/fileformats/fileformats.vcxproj @@ -0,0 +1,92 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + {B74F9D7B-8A9D-45A0-8D09-973D01314D80} + fileformats + Win32Proj + + + + StaticLibrary + v143 + Unicode + true + + + StaticLibrary + v143 + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>17.0.32505.173 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + ../../include;../../external/gloop/include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;NOMINMAX;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + + + MaxSpeed + true + ../../include;../../external/gloop/include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;NOMINMAX;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win32/fileformats/fileformats.vcxproj.filters b/win32/fileformats/fileformats.vcxproj.filters new file mode 100644 index 0000000..633e45a --- /dev/null +++ b/win32/fileformats/fileformats.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + + + + \ No newline at end of file diff --git a/win32/glew/glew.vcxproj b/win32/glew/glew.vcxproj new file mode 100644 index 0000000..750820b --- /dev/null +++ b/win32/glew/glew.vcxproj @@ -0,0 +1,84 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} + glew + Win32Proj + + + + StaticLibrary + v143 + Unicode + true + + + StaticLibrary + v143 + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>17.0.32505.173 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + ../../external/glew/include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;GLEW_STATIC;GLEW_BUILD;NOMINMAX;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + + + MaxSpeed + true + ../../external/glew/include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;GLEW_STATIC;GLEW_BUILD;NOMINMAX;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + + + + + + + \ No newline at end of file diff --git a/win32/gloop/gloop.vcxproj b/win32/gloop/gloop.vcxproj new file mode 100644 index 0000000..4dc7933 --- /dev/null +++ b/win32/gloop/gloop.vcxproj @@ -0,0 +1,95 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + {A50234C1-A40D-4782-81CB-9D4549DC9474} + gloop + Win32Proj + + + + StaticLibrary + v143 + Unicode + true + + + StaticLibrary + v143 + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>17.0.32505.173 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + ../../external/gloop/include;../../external/glew/include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + + + MaxSpeed + true + ../../external/gloop/include;../../external/glew/include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win32/gloop/gloop.vcxproj.filters b/win32/gloop/gloop.vcxproj.filters new file mode 100644 index 0000000..dd2afca --- /dev/null +++ b/win32/gloop/gloop.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {0d5aea50-0ec0-43c1-b723-0632810d0f0b} + + + + + model + + + model + + + model + + + model + + + + + + + + + + + \ No newline at end of file diff --git a/win32/glui/glui.vcxproj b/win32/glui/glui.vcxproj new file mode 100644 index 0000000..14f4ab5 --- /dev/null +++ b/win32/glui/glui.vcxproj @@ -0,0 +1,125 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + glui32 + {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4} + glui + Win32Proj + + + + StaticLibrary + v143 + Unicode + true + + + StaticLibrary + v143 + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>17.0.32505.173 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + ../../external/glui/include;../../external/glew/include;$(GLUT_DIR);%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;GLUI_USE_STATIC_LIB;GLUI_NO_LIB_PRAGMA;NOMINMAX;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + + + MaxSpeed + true + ../../external/glui/include;../../external/glew/include;$(GLUT_DIR);%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;GLUI_USE_STATIC_LIB;GLUI_NO_LIB_PRAGMA;NOMINMAX;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win32/intersect/intersect.vcxproj b/win32/intersect/intersect.vcxproj new file mode 100644 index 0000000..863df36 --- /dev/null +++ b/win32/intersect/intersect.vcxproj @@ -0,0 +1,107 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + {FD8895D6-8EE2-4E37-8E76-A642FA1422C1} + intersect + Win32Proj + + + + Application + v143 + Unicode + true + + + Application + v143 + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>17.0.32505.173 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + + Disabled + ../../include;../../common;../../external/gloop/include;../../external/glew/include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;NOMINMAX;DISABLE_GLU_TRIANGULATOR;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + carvelib.lib;gloop.lib;glu32.lib;fileformats.lib;%(AdditionalDependencies) + ../Debug;%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + + + MaxSpeed + true + ../../include;../../common;../../external/gloop/include;../../external/glew/include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;NOMINMAX;DISABLE_GLU_TRIANGULATOR;%(PreprocessorDefinitions) + MultiThreadedDLL + false + true + + Level3 + ProgramDatabase + + + carvelib.lib;gloop.lib;glu32.lib;fileformats.lib;%(AdditionalDependencies) + ../Release;%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + + + + + + + + + + + \ No newline at end of file diff --git a/win32/texture_example/texture_example.vcxproj b/win32/texture_example/texture_example.vcxproj new file mode 100644 index 0000000..8ec675d --- /dev/null +++ b/win32/texture_example/texture_example.vcxproj @@ -0,0 +1,106 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + {9633062D-3A3A-4997-8754-8A21CD5A354C} + texture_example + + + + Application + v143 + MultiByte + true + + + Application + v143 + MultiByte + + + + + + + + + + + + + <_ProjectFileVersion>17.0.32505.173 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + + Disabled + ../../include;../../common;../../external/gloop/include;../../external/glew/include;../../external/glui/include;$(GLUT_DIR);%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;NOMINMAX;_USE_MATH_DEFINES;GLUI_USE_STATIC_LIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level3 + EditAndContinue + + + gloop.lib;glew.lib;opengl32.lib;glu32.lib;carvelib.lib;glut32.lib;%(AdditionalDependencies) + $(OutDir);$(GLUT_DIR);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + + + MaxSpeed + true + ../../include;../../common;../../external/gloop/include;../../external/glew/include;../../external/glui/include;$(GLUT_DIR);%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;NOMINMAX;_USE_MATH_DEFINES;GLUI_USE_STATIC_LIB;%(PreprocessorDefinitions) + MultiThreadedDLL + false + true + Level3 + ProgramDatabase + + + gloop.lib;glew.lib;opengl32.lib;glu32.lib;carvelib.lib;glut32.lib;%(AdditionalDependencies) + $(OutDir);$(GLUT_DIR);%(AdditionalLibraryDirectories) + true + true + true + MachineX86 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win32/view/view.vcxproj b/win32/view/view.vcxproj new file mode 100644 index 0000000..27277fa --- /dev/null +++ b/win32/view/view.vcxproj @@ -0,0 +1,114 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + {2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1} + view + Win32Proj + + + + Application + v143 + Unicode + true + + + Application + v143 + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>17.0.32505.173 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + + Disabled + ../../include;../../common;../../external/gloop/include;../../external/glew/include;../../external/glui/include;$(GLUT_DIR);%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;NOMINMAX;_USE_MATH_DEFINES;GLUI_USE_STATIC_LIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + gloop.lib;glew.lib;opengl32.lib;glu32.lib;carvelib.lib;glut32.lib;%(AdditionalDependencies) + ../Debug;$(GLUT_DIR);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + + + MaxSpeed + true + ../../include;../../common;../../external/gloop/include;../../external/glew/include;../../external/glui/include;$(GLUT_DIR);%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;NOMINMAX;_USE_MATH_DEFINES;GLUI_USE_STATIC_LIB;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + gloop.lib;glew.lib;opengl32.lib;glu32.lib;carvelib.lib;glut32.lib;%(AdditionalDependencies) + ../Release;$(GLUT_DIR);%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 1a1de145109b2ddfeac6e63f22c9680b482b8d10 Mon Sep 17 00:00:00 2001 From: Phil Martin Date: Thu, 14 Jul 2022 10:47:26 +1000 Subject: [PATCH 2/4] A git ignore file copied from .hgignore, with some visual studio files added. --- .gitignore | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ca25ec --- /dev/null +++ b/.gitignore @@ -0,0 +1,85 @@ + +.vs/ +Debug/ +Release/ + +*.vcxproj.user + +UpgradeLog*.htm + +# backup files, etc. + +*~ +*.sw? + +# autotools generated + +aclocal.m4 +autom4te.cache/output.0 +autom4te.cache/output.1 +autom4te.cache/requests +autom4te.cache/traces.0 +autom4te.cache/traces.1 +config.log +config.status +configure +include/carve/config.h +include/carve/stamp-h2 +include/carve_config.h +include/carve_config.h.in +include/stamp-h1 +libtool + +# cmake generated + +CMakeFiles + +# debug info + +*.dSYM + +# regression test results + +regression/*/test_* + +# produced by compilation + +*.la +*.o +*.lo +*.Plo +*.a +*.Po +*.dylib +*.so +Makefile.in +Makefile + +.libs +.deps + +# generated executables + +src/convert +src/custom_collector +src/cutgraph +src/intersect +src/problem +src/test_aabb +src/test_aabb_tri +src/test_csg_interpolate +src/test_eigen +src/test_geom +src/test_hole_incorporate +src/test_interpolate +src/test_intersect +src/test_rescale +src/test_slice +src/test_slice_classify +src/test_spacetree +src/test_triangulate +src/tetrahedron +src/texture_example +src/triangulate +src/view + From 6cca9bed55975dbac615854bc87675065f610964 Mon Sep 17 00:00:00 2001 From: Phil Martin Date: Thu, 21 Jul 2022 14:21:58 +1000 Subject: [PATCH 3/4] Changes so Carve compiles on Visual Studio 2019 --- external/GLOOP/include/gloop/image/radiance.hpp | 2 +- external/GLOOP/include/gloop/model/stream.hpp | 2 +- external/GLOOP/src/model/ply_format.cpp | 2 +- include/carve/vcpp_config.h | 2 +- win32/carvelib/carvelib.vcxproj | 3 ++- win32/fileformats/fileformats.vcxproj | 3 ++- win32/glew/glew.vcxproj | 3 ++- win32/gloop/gloop.vcxproj | 3 ++- win32/glui/glui.vcxproj | 3 ++- win32/intersect/intersect.vcxproj | 3 ++- win32/texture_example/texture_example.vcxproj | 3 ++- win32/view/view.vcxproj | 3 ++- 12 files changed, 20 insertions(+), 12 deletions(-) diff --git a/external/GLOOP/include/gloop/image/radiance.hpp b/external/GLOOP/include/gloop/image/radiance.hpp index 727e12a..ba5f7ec 100644 --- a/external/GLOOP/include/gloop/image/radiance.hpp +++ b/external/GLOOP/include/gloop/image/radiance.hpp @@ -32,7 +32,7 @@ #if (defined WIN32) || (defined _WIN32) // These definitions are already provided by Visual Studio 2022 -#if (defined _MSC_VER) && _MSC_VER >= 1930 +#if (defined _MSC_VER) && _MSC_VER >= 1929 #include diff --git a/external/GLOOP/include/gloop/model/stream.hpp b/external/GLOOP/include/gloop/model/stream.hpp index 0f76f8a..c732d93 100644 --- a/external/GLOOP/include/gloop/model/stream.hpp +++ b/external/GLOOP/include/gloop/model/stream.hpp @@ -35,7 +35,7 @@ #ifdef WIN32 // These definitions are already provided by Visual Studio 2022 -#if (defined _MSC_VER) && _MSC_VER >= 1930 +#if (defined _MSC_VER) && _MSC_VER >= 1929 #include diff --git a/external/GLOOP/src/model/ply_format.cpp b/external/GLOOP/src/model/ply_format.cpp index 900c6ea..b35f714 100644 --- a/external/GLOOP/src/model/ply_format.cpp +++ b/external/GLOOP/src/model/ply_format.cpp @@ -36,7 +36,7 @@ #ifdef WIN32 -#if (defined _MSC_VER) && _MSC_VER >= 1930 +#if (defined _MSC_VER) && _MSC_VER >= 1929 #include #include diff --git a/include/carve/vcpp_config.h b/include/carve/vcpp_config.h index b1ffe65..6802215 100644 --- a/include/carve/vcpp_config.h +++ b/include/carve/vcpp_config.h @@ -10,7 +10,7 @@ #include // These definitions are already provided by Visual Studio 2022 -#if (defined _MSC_VER) && _MSC_VER >= 1930 +#if (defined _MSC_VER) && _MSC_VER >= 1929 #else diff --git a/win32/carvelib/carvelib.vcxproj b/win32/carvelib/carvelib.vcxproj index 3ca7840..e28825f 100644 --- a/win32/carvelib/carvelib.vcxproj +++ b/win32/carvelib/carvelib.vcxproj @@ -15,6 +15,7 @@ {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} carvelib Win32Proj + 10.0 @@ -25,7 +26,7 @@ StaticLibrary - v143 + v142 Unicode diff --git a/win32/fileformats/fileformats.vcxproj b/win32/fileformats/fileformats.vcxproj index cda314e..d86cb74 100644 --- a/win32/fileformats/fileformats.vcxproj +++ b/win32/fileformats/fileformats.vcxproj @@ -15,6 +15,7 @@ {B74F9D7B-8A9D-45A0-8D09-973D01314D80} fileformats Win32Proj + 10.0 @@ -25,7 +26,7 @@ StaticLibrary - v143 + v142 Unicode diff --git a/win32/glew/glew.vcxproj b/win32/glew/glew.vcxproj index 750820b..562ce86 100644 --- a/win32/glew/glew.vcxproj +++ b/win32/glew/glew.vcxproj @@ -15,6 +15,7 @@ {00B985EA-A5CD-4F24-8B62-5DC87CD4D080} glew Win32Proj + 10.0 @@ -25,7 +26,7 @@ StaticLibrary - v143 + v142 Unicode diff --git a/win32/gloop/gloop.vcxproj b/win32/gloop/gloop.vcxproj index 4dc7933..43cb659 100644 --- a/win32/gloop/gloop.vcxproj +++ b/win32/gloop/gloop.vcxproj @@ -15,6 +15,7 @@ {A50234C1-A40D-4782-81CB-9D4549DC9474} gloop Win32Proj + 10.0 @@ -25,7 +26,7 @@ StaticLibrary - v143 + v142 Unicode diff --git a/win32/glui/glui.vcxproj b/win32/glui/glui.vcxproj index 14f4ab5..e4912b6 100644 --- a/win32/glui/glui.vcxproj +++ b/win32/glui/glui.vcxproj @@ -16,6 +16,7 @@ {63A9D017-1F43-4F1E-8C04-56F8EAABBFC4} glui Win32Proj + 10.0 @@ -26,7 +27,7 @@ StaticLibrary - v143 + v142 Unicode diff --git a/win32/intersect/intersect.vcxproj b/win32/intersect/intersect.vcxproj index 863df36..5e68363 100644 --- a/win32/intersect/intersect.vcxproj +++ b/win32/intersect/intersect.vcxproj @@ -15,6 +15,7 @@ {FD8895D6-8EE2-4E37-8E76-A642FA1422C1} intersect Win32Proj + 10.0 @@ -25,7 +26,7 @@ Application - v143 + v142 Unicode diff --git a/win32/texture_example/texture_example.vcxproj b/win32/texture_example/texture_example.vcxproj index 8ec675d..c45e617 100644 --- a/win32/texture_example/texture_example.vcxproj +++ b/win32/texture_example/texture_example.vcxproj @@ -14,6 +14,7 @@ 17.0 {9633062D-3A3A-4997-8754-8A21CD5A354C} texture_example + 10.0 @@ -24,7 +25,7 @@ Application - v143 + v142 MultiByte diff --git a/win32/view/view.vcxproj b/win32/view/view.vcxproj index 27277fa..b0843e8 100644 --- a/win32/view/view.vcxproj +++ b/win32/view/view.vcxproj @@ -15,6 +15,7 @@ {2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1} view Win32Proj + 10.0 @@ -25,7 +26,7 @@ Application - v143 + v142 Unicode From a2a5b1dc6fee9c7c1c926c38881b19add5109c66 Mon Sep 17 00:00:00 2001 From: Phil Martin Date: Tue, 26 Jul 2022 09:22:36 +1000 Subject: [PATCH 4/4] Changes to allow for building in vs2019, as well as some dependencies. --- win32/Carve.sln | 9 +++++++-- win32/carvelib/carvelib.vcxproj | 2 +- win32/fileformats/fileformats.vcxproj | 2 +- win32/glew/glew.vcxproj | 2 +- win32/gloop/gloop.vcxproj | 2 +- win32/intersect/intersect.vcxproj | 2 +- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/win32/Carve.sln b/win32/Carve.sln index ba151f1..f44df88 100644 --- a/win32/Carve.sln +++ b/win32/Carve.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.2.32616.157 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31729.503 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "carvelib", "carvelib\carvelib.vcxproj", "{21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B}" EndProject @@ -16,6 +16,11 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glui32", "glui\glui.vcxproj", "{63A9D017-1F43-4F1E-8C04-56F8EAABBFC4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intersect", "intersect\intersect.vcxproj", "{FD8895D6-8EE2-4E37-8E76-A642FA1422C1}" + ProjectSection(ProjectDependencies) = postProject + {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} = {21F77D6E-3E33-4EB0-8BC6-C0C86C7EE45B} + {B74F9D7B-8A9D-45A0-8D09-973D01314D80} = {B74F9D7B-8A9D-45A0-8D09-973D01314D80} + {A50234C1-A40D-4782-81CB-9D4549DC9474} = {A50234C1-A40D-4782-81CB-9D4549DC9474} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "view", "view\view.vcxproj", "{2DCBE71A-A29A-4FE7-A23C-AFA762DF13E1}" EndProject diff --git a/win32/carvelib/carvelib.vcxproj b/win32/carvelib/carvelib.vcxproj index e28825f..2e6a147 100644 --- a/win32/carvelib/carvelib.vcxproj +++ b/win32/carvelib/carvelib.vcxproj @@ -20,7 +20,7 @@ StaticLibrary - v143 + v142 Unicode true diff --git a/win32/fileformats/fileformats.vcxproj b/win32/fileformats/fileformats.vcxproj index d86cb74..1d41dbe 100644 --- a/win32/fileformats/fileformats.vcxproj +++ b/win32/fileformats/fileformats.vcxproj @@ -20,7 +20,7 @@ StaticLibrary - v143 + v142 Unicode true diff --git a/win32/glew/glew.vcxproj b/win32/glew/glew.vcxproj index 562ce86..f493064 100644 --- a/win32/glew/glew.vcxproj +++ b/win32/glew/glew.vcxproj @@ -20,7 +20,7 @@ StaticLibrary - v143 + v142 Unicode true diff --git a/win32/gloop/gloop.vcxproj b/win32/gloop/gloop.vcxproj index 43cb659..032b83d 100644 --- a/win32/gloop/gloop.vcxproj +++ b/win32/gloop/gloop.vcxproj @@ -20,7 +20,7 @@ StaticLibrary - v143 + v142 Unicode true diff --git a/win32/intersect/intersect.vcxproj b/win32/intersect/intersect.vcxproj index 5e68363..27d7396 100644 --- a/win32/intersect/intersect.vcxproj +++ b/win32/intersect/intersect.vcxproj @@ -20,7 +20,7 @@ Application - v143 + v142 Unicode true