From a32f54126b8e4f3f1d48228fd60bcade3af6949f Mon Sep 17 00:00:00 2001 From: Johann Muszynski Date: Tue, 28 Mar 2017 21:45:29 +0300 Subject: [PATCH] Add Visual Studio 2017 solution --- .gitignore | 6 +- util/libuv.py | 11 +- util/vs2017/README.md | 3 + util/vs2017/lib/wren_lib.vcxproj | 187 ++++++++++++++++++ util/vs2017/lib/wren_lib.vcxproj.filters | 75 ++++++++ util/vs2017/wren.sln | 36 ++++ util/vs2017/wren/wren.vcxproj | 234 +++++++++++++++++++++++ util/vs2017/wren/wren.vcxproj.filters | 129 +++++++++++++ 8 files changed, 676 insertions(+), 5 deletions(-) create mode 100644 util/vs2017/README.md create mode 100644 util/vs2017/lib/wren_lib.vcxproj create mode 100644 util/vs2017/lib/wren_lib.vcxproj.filters create mode 100644 util/vs2017/wren.sln create mode 100644 util/vs2017/wren/wren.vcxproj create mode 100644 util/vs2017/wren/wren.vcxproj.filters diff --git a/.gitignore b/.gitignore index 316ac38a..5c293461 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,9 @@ /wren # Intermediate files. -/build -/deps +build/ +deps/ +obj/ /.sass-cache *.pyc @@ -24,6 +25,7 @@ xcuserdata/ !wren_lib/ # Visual Studio cache files. +.vs/ ipch/ *.aps *.ncb diff --git a/util/libuv.py b/util/libuv.py index b2f23a8b..719652d7 100755 --- a/util/libuv.py +++ b/util/libuv.py @@ -113,8 +113,13 @@ def build_libuv_linux(arch): run(["make", "-C", "out", "BUILDTYPE=Release"], cwd=LIB_UV_DIR) -def build_libuv_windows(): - run(["cmd", "/c", "vcbuild.bat", "release"], cwd=LIB_UV_DIR) +def build_libuv_windows(arch): + args = ["cmd", "/c", "vcbuild.bat", "release"] + if arch == "-32": + args.append("x86") + elif arch == "-64": + args.append("x64") + run(args, cwd=LIB_UV_DIR) def build_libuv(arch, out): @@ -123,7 +128,7 @@ def build_libuv(arch, out): elif platform.system() == "Linux": build_libuv_linux(arch) elif platform.system() == "Windows": - build_libuv_windows() + build_libuv_windows(arch) else: print("Unsupported platform: " + platform.system()) sys.exit(1) diff --git a/util/vs2017/README.md b/util/vs2017/README.md new file mode 100644 index 00000000..77eac2f3 --- /dev/null +++ b/util/vs2017/README.md @@ -0,0 +1,3 @@ +# Building on windows + +Building the `wren` project requires python2 to available in the path as `python`, in order to download and build the libuv dependency. The download and build of libuv is done as a pre-build step by the solution. diff --git a/util/vs2017/lib/wren_lib.vcxproj b/util/vs2017/lib/wren_lib.vcxproj new file mode 100644 index 00000000..824b1265 --- /dev/null +++ b/util/vs2017/lib/wren_lib.vcxproj @@ -0,0 +1,187 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D7CC5189-C399-AC94-ECB2-9A3CD8DEE122} + true + Win32Proj + wren_lib + + + + StaticLibrary + true + Unicode + v141 + + + StaticLibrary + true + Unicode + v141 + + + StaticLibrary + false + Unicode + v141 + + + StaticLibrary + false + Unicode + v141 + + + + + + + + + + + + + + + + + + + ..\..\..\lib\ + obj\Win32\Debug\ + wren_static_d + .lib + + + ..\..\..\lib\ + obj\x64\Debug\ + wren_static_d + .lib + + + ..\..\..\lib\ + obj\Win32\Release\ + wren_static + .lib + + + ..\..\..\lib\ + obj\x64\Release\ + wren_static + .lib + + + + NotUsing + Level3 + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\..\src\include;..\..\..\src\vm;..\..\..\src\optional;%(AdditionalIncludeDirectories) + EditAndContinue + Disabled + CompileAsC + + + Windows + true + + + + + NotUsing + Level3 + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\..\src\include;..\..\..\src\vm;..\..\..\src\optional;%(AdditionalIncludeDirectories) + EditAndContinue + Disabled + CompileAsC + + + Windows + true + + + + + NotUsing + Level3 + NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\..\src\include;..\..\..\src\vm;..\..\..\src\optional;%(AdditionalIncludeDirectories) + Full + true + true + false + true + CompileAsC + + + Windows + true + true + + + + + NotUsing + Level3 + NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\..\src\include;..\..\..\src\vm;..\..\..\src\optional;%(AdditionalIncludeDirectories) + Full + true + true + false + true + CompileAsC + + + Windows + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/util/vs2017/lib/wren_lib.vcxproj.filters b/util/vs2017/lib/wren_lib.vcxproj.filters new file mode 100644 index 00000000..cec85853 --- /dev/null +++ b/util/vs2017/lib/wren_lib.vcxproj.filters @@ -0,0 +1,75 @@ + + + + + {CB60FAAF-B72D-55BB-E046-4363CC728A49} + + + {E8795900-D405-880B-3DB4-880B295F880B} + + + + + optional + + + optional + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + + + optional + + + optional + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + \ No newline at end of file diff --git a/util/vs2017/wren.sln b/util/vs2017/wren.sln new file mode 100644 index 00000000..c4e81304 --- /dev/null +++ b/util/vs2017/wren.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wren", "wren\wren.vcxproj", "{0143A07C-ED79-A10D-9666-8710827C1D0F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wren_lib", "lib\wren_lib.vcxproj", "{D7CC5189-C399-AC94-ECB2-9A3CD8DEE122}" +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 + {0143A07C-ED79-A10D-9666-8710827C1D0F}.Debug|Win32.ActiveCfg = Debug|Win32 + {0143A07C-ED79-A10D-9666-8710827C1D0F}.Debug|Win32.Build.0 = Debug|Win32 + {0143A07C-ED79-A10D-9666-8710827C1D0F}.Debug|x64.ActiveCfg = Debug|x64 + {0143A07C-ED79-A10D-9666-8710827C1D0F}.Debug|x64.Build.0 = Debug|x64 + {0143A07C-ED79-A10D-9666-8710827C1D0F}.Release|Win32.ActiveCfg = Release|Win32 + {0143A07C-ED79-A10D-9666-8710827C1D0F}.Release|Win32.Build.0 = Release|Win32 + {0143A07C-ED79-A10D-9666-8710827C1D0F}.Release|x64.ActiveCfg = Release|x64 + {0143A07C-ED79-A10D-9666-8710827C1D0F}.Release|x64.Build.0 = Release|x64 + {D7CC5189-C399-AC94-ECB2-9A3CD8DEE122}.Debug|Win32.ActiveCfg = Debug|Win32 + {D7CC5189-C399-AC94-ECB2-9A3CD8DEE122}.Debug|Win32.Build.0 = Debug|Win32 + {D7CC5189-C399-AC94-ECB2-9A3CD8DEE122}.Debug|x64.ActiveCfg = Debug|x64 + {D7CC5189-C399-AC94-ECB2-9A3CD8DEE122}.Debug|x64.Build.0 = Debug|x64 + {D7CC5189-C399-AC94-ECB2-9A3CD8DEE122}.Release|Win32.ActiveCfg = Release|Win32 + {D7CC5189-C399-AC94-ECB2-9A3CD8DEE122}.Release|Win32.Build.0 = Release|Win32 + {D7CC5189-C399-AC94-ECB2-9A3CD8DEE122}.Release|x64.ActiveCfg = Release|x64 + {D7CC5189-C399-AC94-ECB2-9A3CD8DEE122}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/util/vs2017/wren/wren.vcxproj b/util/vs2017/wren/wren.vcxproj new file mode 100644 index 00000000..e8bd3d79 --- /dev/null +++ b/util/vs2017/wren/wren.vcxproj @@ -0,0 +1,234 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0143A07C-ED79-A10D-9666-8710827C1D0F} + true + Win32Proj + wren + + + + Application + true + Unicode + v141 + + + Application + true + Unicode + v141 + + + Application + false + Unicode + v141 + + + Application + false + Unicode + v141 + + + + + + + + + + + + + + + + + + + true + ..\..\..\bin\ + obj\Win32\Debug\ + wren_d + .exe + + + true + ..\..\..\bin\ + obj\x64\Debug\ + wren_d + .exe + + + false + ..\..\..\bin\ + obj\Win32\Release\ + wren + .exe + + + false + ..\..\..\bin\ + obj\x64\Release\ + wren + .exe + + + + NotUsing + Level3 + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\..\src\include;..\..\..\src\vm;..\..\..\src\optional;..\..\..\src\module;..\..\..\src\cli;deps\libuv\include;%(AdditionalIncludeDirectories) + EditAndContinue + Disabled + CompileAsC + + + Console + true + libuv.lib;userenv.lib;advapi32.lib;iphlpapi.lib;psapi.lib;shell32.lib;ws2_32.lib;%(AdditionalDependencies) + deps\libuv\Release\lib;%(AdditionalLibraryDirectories) + mainCRTStartup + + + python ../../libuv.py download +python ../../libuv.py build -32 + + + + + NotUsing + Level3 + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\..\src\include;..\..\..\src\vm;..\..\..\src\optional;..\..\..\src\module;..\..\..\src\cli;deps\libuv\include;%(AdditionalIncludeDirectories) + EditAndContinue + Disabled + CompileAsC + + + Console + true + libuv.lib;userenv.lib;advapi32.lib;iphlpapi.lib;psapi.lib;shell32.lib;ws2_32.lib;%(AdditionalDependencies) + deps\libuv\Release\lib;%(AdditionalLibraryDirectories) + mainCRTStartup + + + python ../../libuv.py download +python ../../libuv.py build -64 + + + + + NotUsing + Level3 + NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\..\src\include;..\..\..\src\vm;..\..\..\src\optional;..\..\..\src\module;..\..\..\src\cli;deps\libuv\include;%(AdditionalIncludeDirectories) + Full + true + true + false + true + CompileAsC + + + Console + true + true + libuv.lib;userenv.lib;advapi32.lib;iphlpapi.lib;psapi.lib;shell32.lib;ws2_32.lib;%(AdditionalDependencies) + deps\libuv\Release\lib;%(AdditionalLibraryDirectories) + mainCRTStartup + + + python ../../libuv.py download +python ../../libuv.py build -32 + + + + + NotUsing + Level3 + NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\..\src\include;..\..\..\src\vm;..\..\..\src\optional;..\..\..\src\module;..\..\..\src\cli;deps\libuv\include;%(AdditionalIncludeDirectories) + Full + true + true + false + true + CompileAsC + + + Console + true + true + libuv.lib;userenv.lib;advapi32.lib;iphlpapi.lib;psapi.lib;shell32.lib;ws2_32.lib;%(AdditionalDependencies) + deps\libuv\Release\lib;%(AdditionalLibraryDirectories) + mainCRTStartup + + + python ../../libuv.py download +python ../../libuv.py build -64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/util/vs2017/wren/wren.vcxproj.filters b/util/vs2017/wren/wren.vcxproj.filters new file mode 100644 index 00000000..c963c93d --- /dev/null +++ b/util/vs2017/wren/wren.vcxproj.filters @@ -0,0 +1,129 @@ + + + + + {5D66880B-C96F-887C-52EB-9E7CBEF3937C} + + + {89AF369E-F58E-B539-FEA6-40106A051C9B} + + + {2BC7320E-1769-5DE4-0024-7138EC64E434} + + + {CB60FAAF-B72D-55BB-E046-4363CC728A49} + + + {E8795900-D405-880B-3DB4-880B295F880B} + + + + + cli + + + cli + + + include + + + module + + + module + + + module + + + module + + + optional + + + optional + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + + + cli + + + cli + + + cli + + + module + + + module + + + module + + + module + + + module + + + optional + + + optional + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + vm + + + \ No newline at end of file