From 68657f06b342b2f13975264e060703be631d054d Mon Sep 17 00:00:00 2001 From: ADILI Robin <robin.adili@inria.fr> Date: Mon, 14 Sep 2020 12:12:36 +0200 Subject: [PATCH] working build.bat --- build.bat | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/build.bat b/build.bat index 0352009..fd17fdc 100644 --- a/build.bat +++ b/build.bat @@ -7,39 +7,39 @@ SET "SIPINSTALLDIR=%BUILDDIR%\sipinstall" SET "vs_buildtoolsexe=%TEMP%\vs_buildtools.exe" SET "FBXSDKDIR=%BUILDDIR%\fbxsdk" SET "FBXSDKPYTHONDIR=%BUILDDIR%\fbxsdkpy" +SET "FBXDIR=%CURRENTDIR%\fbx" mkdir "%BUILDDIR%" mkdir "%BUILDTOOLSDIR%" mkdir "%SIPINSTALLDIR%" mkdir "%FBXSDKDIR%" mkdir "%FBXSDKPYTHONDIR%" +mkdir "%FBXDIR%" echo "Download and install Visual Studio Build Tools (nmake, MSVC, link, etc.)" -::Invoke-WebRequest https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile %vs_buildtoolsexe% -::curl -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 || IF "%ERRORLEVEL%"=="3010" EXIT 0 echo "Load environment variables to use Build Tools from this script" call %VCVARSBAT% for /F "tokens=1,2 delims=;" %%i in (reqs_win.txt) do ( - SET "INSTALLEXE=%BUILDDIR%\%%i.exe" - SET "INSTALLDIR=%BUILDDIR%\%%i" - echo "%INSTALLEXE%" - echo "%INSTALLDIR%" - echo "Downloading %%j to %%i" - ::curl -L -o "%INSTALLEXE%" %%j - ::%INSTALLEXE% /S /D=%INSTALLDIR% + curl -L -o "%BUILDDIR%\%%i.exe" %%j + "%BUILDDIR%\%%i.exe" /S /D=%BUILDDIR%\%%i ) - -::tar xvf sip-4.19.3.tar.gz -C "%BUILDDIR%" -::cd "%BUILDDIR%"\sip-* -::python "configure.py" -b "%SIPINSTALLDIR%" -d "%SIPINSTALLDIR%" -e "%SIPINSTALLDIR%" --pyidir="%SIPINSTALLDIR%" -::nmake -::nmake install -::cd %CURRENTDIR% - - +tar xvf sip-4.19.3.tar.gz -C "%BUILDDIR%" +cd "%BUILDDIR%"\sip-* +python "configure.py" -b "%SIPINSTALLDIR%" -d "%SIPINSTALLDIR%" -e "%SIPINSTALLDIR%" --pyidir="%SIPINSTALLDIR%" +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%\sip.pyd" "%FBXDIR%" \ No newline at end of file -- GitLab