Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 0d2f8ae2 authored by w-v's avatar w-v
Browse files

add libraries requirements for windows

parent 4653ab24
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ SET "SIPDIR=%BUILDDIR%\sip-4.19.3" ...@@ -7,7 +7,7 @@ SET "SIPDIR=%BUILDDIR%\sip-4.19.3"
SET "SIPINSTALLDIR=%BUILDDIR%\sipinstall" SET "SIPINSTALLDIR=%BUILDDIR%\sipinstall"
SET "vs_buildtoolsexe=%BUILDDIR%\vs_buildtools.exe" SET "vs_buildtoolsexe=%BUILDDIR%\vs_buildtools.exe"
SET "FBXSDKDIR=%BUILDDIR%\fbxsdk" SET "FBXSDKDIR=%BUILDDIR%\fbxsdk"
SET "FBXSDKPYTHONDIR=%BUILDDIR%\fbxsdkpy" SET "FBXSDKPYTHONDIR=%BUILDDIR%\fbxpy"
:: PYTHONVERSION=$(python -c [...]) #lol :: PYTHONVERSION=$(python -c [...]) #lol
for /f %%i in ('python -c "import sys; print(''.join(sys.version.split(' ')[0].split('.')[:2]))"') do set PYTHONVERSION=%%i for /f %%i in ('python -c "import sys; print(''.join(sys.version.split(' ')[0].split('.')[:2]))"') do set PYTHONVERSION=%%i
SET "FBXDIR=%CURRENTDIR%\fbxsdkpy-cp%PYTHONVERSION%-win_x64" SET "FBXDIR=%CURRENTDIR%\fbxsdkpy-cp%PYTHONVERSION%-win_x64"
...@@ -22,7 +22,7 @@ echo "Download and install Visual Studio Build Tools (nmake, MSVC, link, etc.)" ...@@ -22,7 +22,7 @@ echo "Download and install Visual Studio Build Tools (nmake, MSVC, link, etc.)"
curl -L -o %vs_buildtoolsexe% https://aka.ms/vs/16/release/vs_buildtools.exe curl -L -o %vs_buildtoolsexe% https://aka.ms/vs/16/release/vs_buildtools.exe
%vs_buildtoolsexe% --quiet --wait --norestart --nocache --installPath "%BUILDTOOLSDIR%" --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Windows81SDK --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK|| IF "%ERRORLEVEL%"=="3010" EXIT 0 %vs_buildtoolsexe% --quiet --wait --norestart --nocache --installPath "%BUILDTOOLSDIR%" --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Windows81SDK --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK.18362 || IF "%ERRORLEVEL%"=="3010" EXIT 0
echo "Load environment variables to use Build Tools from this script" echo "Load environment variables to use Build Tools from this script"
...@@ -33,22 +33,12 @@ for /F "tokens=1,2 delims=;" %%i in (reqs_win.txt) do ( ...@@ -33,22 +33,12 @@ for /F "tokens=1,2 delims=;" %%i in (reqs_win.txt) do (
"%BUILDDIR%\%%i.exe" /S /D=%BUILDDIR%\%%i "%BUILDDIR%\%%i.exe" /S /D=%BUILDDIR%\%%i
) )
::curl -L -O "https://gitlab.inria.fr/radili/fbxsdk_python/uploads/12002ae82d20e4d6b60107dacb5abe4b/sip-4.19.3.tar.gz" curl -L -o "%BUILDDIR%\patch.py" "https://raw.githubusercontent.com/techtonik/python-patch/master/patch.py"
python "%BUILDDIR%\patch.py" patch
tar xvf sip-4.19.3.tar.gz -C "%BUILDDIR%" sip-wheel --verbose
cd "%BUILDDIR%"\sip-*
python "configure.py" -b "%SIPINSTALLDIR%" -d "%SIPINSTALLDIR%" -e "%SIPINSTALLDIR%" --pyidir="%SIPINSTALLDIR%" --sip-module="fbxsip"
nmake
nmake install
cd %CURRENTDIR%
copy "PythonBindings.py" "%FBXSDKPYTHONDIR%\PythonBindings.py"
SET "FBXSDK_ROOT=%FBXSDKDIR%"
SET "SIP_ROOT=%SIPDIR%"
python "%FBXSDKPYTHONDIR%"\PythonBindings.py Python3_x64
copy "%FBXSDKPYTHONDIR%\build\Distrib\site-packages\fbx\*" "%FBXDIR%"
copy "%SIPINSTALLDIR%\fbxsip.pyd" "%FBXDIR%"
%vs_buildtoolsexe% uninstall --quiet --wait --norestart --nocache --installPath "%BUILDTOOLSDIR%" --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Windows81SDK --remove Microsoft.VisualStudio.Workload.VCTools --remove Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --remove Microsoft.VisualStudio.Component.Windows10SDK || IF "%ERRORLEVEL%"=="3010" EXIT 0 %vs_buildtoolsexe% uninstall --quiet --wait --norestart --nocache --installPath "%BUILDTOOLSDIR%" --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Windows81SDK --remove Microsoft.VisualStudio.Workload.VCTools --remove Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --remove Microsoft.VisualStudio.Component.Windows10SDK || IF "%ERRORLEVEL%"=="3010" EXIT 0
popd popd
pause pause
# Specify sip v5 as the build system for the package. # Specify sip v5 as the build system for the package.
[build-system] [build-system]
requires = ["sip >=5, <6", "auditwheel"] requires = ["sip >=5, <6"]
build-backend = "sipbuild.api" build-backend = "sipbuild.api"
# Specify the PEP 566 metadata for the project. # Specify the PEP 566 metadata for the project.
...@@ -12,10 +12,12 @@ version = "2020.1" ...@@ -12,10 +12,12 @@ version = "2020.1"
[tool.sip.bindings.fbx_module] [tool.sip.bindings.fbx_module]
headers = ["fbxsdk.h"] headers = ["fbxsdk.h"]
include-dirs = ["build/fbxsdk/include"] include-dirs = ["build/fbxsdk/include"]
libraries = ["fbxsdk"] # python 3.7 3.8 3.9
library-dirs = ["build/fbxsdk/lib/gcc/x64/release"] libraries = ["libfbxsdk-md", "zlib-md", "libxml2-md", "Advapi32", "Wininet"]
# python 3.6
# libraries = ["libfbxsdk-mt", "zlib-mt", "libxml2-mt", "Advapi32", "Wininet"]
library-dirs = ["build/fbxsdk/lib/vs2017/x64/release"]
[tool.sip.project] [tool.sip.project]
sip-files-dir = "build/fbxpy/sip" sip-files-dir = "build/fbxpy/sip"
wheel-includes = ["build/fbxpy/common/FbxCommon.py"] wheel-includes = ["build/fbxpy/common/FbxCommon.py"]
minimum-glibc-version = "2.17"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment