Browse Source

Update Windows build

pull/6/head
Thomas 4 years ago
parent
commit
7d2fff8083
  1. 1
      .gitignore
  2. 2
      build-windows/add_windows_libraries.py
  3. 31
      build-windows/pEpPythonAdapter.sln
  4. 17
      build-windows/pEpPythonAdapter.vcxproj
  5. 10
      make.mak
  6. 2
      setup.py

1
.gitignore

@ -24,6 +24,7 @@ build-windows/Release/
build-windows/packages/ build-windows/packages/
build-windows/.vs/ build-windows/.vs/
build-windows/pEpPythonAdapter.vcxproj.* build-windows/pEpPythonAdapter.vcxproj.*
.vscode/
launch.json launch.json
settings.json settings.json
# Default ignored files # Default ignored files

2
build-windows/add_windows_libraries.py

@ -67,7 +67,7 @@ def get_pEp_install_location(debug=False):
def get_boost_directories(): def get_boost_directories():
"""Gets the location of the boost libraries""" """Gets the location of the boost libraries"""
for dir in [f.path for f in os.scandir(join(os.getcwd(), 'build-windows', 'packages')) if f.is_dir()]: for dir in [f.path for f in os.scandir(join(dirname(os.getcwd()), 'packages')) if f.is_dir()]:
if 'boost.' in dir or 'boost_python' in dir or 'boost_locale' in dir: if 'boost.' in dir or 'boost_python' in dir or 'boost_locale' in dir:
yield join(dir, 'lib', 'native') yield join(dir, 'lib', 'native')

31
build-windows/pEpPythonAdapter.sln

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31005.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pEpPythonAdapter", "pEpPythonAdapter.vcxproj", "{F7D4314B-C7BA-4117-9AE7-AC5C1492153D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F7D4314B-C7BA-4117-9AE7-AC5C1492153D}.Debug|x64.ActiveCfg = Debug|x64
{F7D4314B-C7BA-4117-9AE7-AC5C1492153D}.Debug|x64.Build.0 = Debug|x64
{F7D4314B-C7BA-4117-9AE7-AC5C1492153D}.Debug|x86.ActiveCfg = Debug|Win32
{F7D4314B-C7BA-4117-9AE7-AC5C1492153D}.Debug|x86.Build.0 = Debug|Win32
{F7D4314B-C7BA-4117-9AE7-AC5C1492153D}.Release|x64.ActiveCfg = Release|x64
{F7D4314B-C7BA-4117-9AE7-AC5C1492153D}.Release|x64.Build.0 = Release|x64
{F7D4314B-C7BA-4117-9AE7-AC5C1492153D}.Release|x86.ActiveCfg = Release|Win32
{F7D4314B-C7BA-4117-9AE7-AC5C1492153D}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B63BC9BA-EF76-4FB4-9126-29CBFAD9092C}
EndGlobalSection
EndGlobal

17
build-windows/pEpPythonAdapter.vcxproj

@ -95,18 +95,23 @@
<None Include="..\setup.py" /> <None Include="..\setup.py" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\pEpEngine\build-windows\pEpEngine.vcxproj">
<Project>{146e69f8-e1da-456a-b048-6dd29d9acf6b}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
<Import Project="packages\boost.1.72.0.0\build\boost.targets" Condition="Exists('packages\boost.1.72.0.0\build\boost.targets')" /> <Import Project="..\..\packages\boost.1.72.0.0\build\boost.targets" Condition="Exists('..\..\packages\boost.1.72.0.0\build\boost.targets')" />
<Import Project="packages\boost_locale-vc142.1.72.0.0\build\boost_locale-vc142.targets" Condition="Exists('packages\boost_locale-vc142.1.72.0.0\build\boost_locale-vc142.targets')" /> <Import Project="..\..\packages\boost_locale-vc142.1.72.0.0\build\boost_locale-vc142.targets" Condition="Exists('..\..\packages\boost_locale-vc142.1.72.0.0\build\boost_locale-vc142.targets')" />
<Import Project="packages\boost_python38-vc142.1.72.0.0\build\boost_python38-vc142.targets" Condition="Exists('packages\boost_python38-vc142.1.72.0.0\build\boost_python38-vc142.targets')" /> <Import Project="..\..\packages\boost_python38-vc142.1.72.0.0\build\boost_python38-vc142.targets" Condition="Exists('..\..\packages\boost_python38-vc142.1.72.0.0\build\boost_python38-vc142.targets')" />
</ImportGroup> </ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('packages\boost.1.72.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\boost.1.72.0.0\build\boost.targets'))" /> <Error Condition="!Exists('..\..\packages\boost.1.72.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\boost.1.72.0.0\build\boost.targets'))" />
<Error Condition="!Exists('packages\boost_locale-vc142.1.72.0.0\build\boost_locale-vc142.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\boost_locale-vc142.1.72.0.0\build\boost_locale-vc142.targets'))" /> <Error Condition="!Exists('..\..\packages\boost_locale-vc142.1.72.0.0\build\boost_locale-vc142.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\boost_locale-vc142.1.72.0.0\build\boost_locale-vc142.targets'))" />
<Error Condition="!Exists('packages\boost_python38-vc142.1.72.0.0\build\boost_python38-vc142.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\boost_python38-vc142.1.72.0.0\build\boost_python38-vc142.targets'))" /> <Error Condition="!Exists('..\..\packages\boost_python38-vc142.1.72.0.0\build\boost_python38-vc142.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\boost_python38-vc142.1.72.0.0\build\boost_python38-vc142.targets'))" />
</Target> </Target>
</Project> </Project>

10
make.mak

@ -1,6 +1,6 @@
# build dirs # build dirs
BUILD_DIR = $(ProjectDir)..\build BUILD_DIR = build
DIST_DIR = $(ProjectDir)..\dist DIST_DIR = dist
# create wheel and egg package in dist # create wheel and egg package in dist
dist: dist-whl dist-egg dist: dist-whl dist-egg
@ -31,11 +31,13 @@ release: clean
CD.. CD..
PY -3.8-32 setup.py build_ext PY -3.8-32 setup.py build_ext
PY -3.8-32 setup.py bdist_wheel PY -3.8-32 setup.py bdist_wheel
PY -3.8-32 build-windows/add_windows_libraries.py PY -3.8-32 build-windows\add_windows_libraries.py
COPY dist\pEp* ..\Release\
#debug build #debug build
debug: clean debug: clean
CD.. CD..
PY -3.8-32 setup.py build_ext --debug PY -3.8-32 setup.py build_ext --debug
PY -3.8-32 setup.py bdist_wheel PY -3.8-32 setup.py bdist_wheel
PY -3.8-32 build-windows/add_windows_libraries.py --debug PY -3.8-32 build-windows\add_windows_libraries.py --debug
COPY dist\pEp* ..\Debug\

2
setup.py

@ -60,7 +60,7 @@ class BuildExtCommand(build_ext):
return ret return ret
def windowsGetBoostDirs(self): def windowsGetBoostDirs(self):
for dir in [f.path for f in os.scandir(join(os.getcwd(), 'build-windows', 'packages')) if f.is_dir()]: for dir in [f.path for f in os.scandir(join(os.path.dirname(os.getcwd()), 'packages')) if f.is_dir()]:
if 'boost.' in dir or 'boost_python' in dir or 'boost_locale' in dir: if 'boost.' in dir or 'boost_python' in dir or 'boost_locale' in dir:
yield join(dir, 'lib', 'native'), join(dir, 'lib', 'native', 'include') yield join(dir, 'lib', 'native'), join(dir, 'lib', 'native', 'include')

Loading…
Cancel
Save