summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/msvc/build_clean.bat12
-rw-r--r--build/msvc/build_env.bat16
-rw-r--r--build/msvc/build_matlab.bat14
-rw-r--r--build/msvc/build_python27.bat28
-rw-r--r--build/msvc/build_python35.bat27
-rw-r--r--build/msvc/build_release.bat145
-rw-r--r--build/msvc/build_setup.bat37
7 files changed, 279 insertions, 0 deletions
diff --git a/build/msvc/build_clean.bat b/build/msvc/build_clean.bat
new file mode 100644
index 0000000..4525529
--- /dev/null
+++ b/build/msvc/build_clean.bat
@@ -0,0 +1,12 @@
+@echo off
+
+set MATLAB_ROOT=C:\Program Files\MATLAB\R2015a
+
+call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
+
+cd %~dp0
+cd ..\..
+
+msbuild astra_vc14.sln /p:Configuration=Release_CUDA /p:Platform=x64 /t:clean
+
+pause
diff --git a/build/msvc/build_env.bat b/build/msvc/build_env.bat
new file mode 100644
index 0000000..458209a
--- /dev/null
+++ b/build/msvc/build_env.bat
@@ -0,0 +1,16 @@
+set B_WP27=2.7.10.3
+set B_WP35=3.5.2.3
+set B_WINPYTHON27=D:\wjp\WinPython-64bit-%B_WP27%
+set B_WINPYTHON35=D:\wjp\WinPython-64bit-%B_WP35%
+set B_MATLAB_ROOT=C:\Program Files\MATLAB\R2015a
+set B_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
+set B_BV=1_62
+set B_BOOST=D:\wjp\boost_%B_BV%_0
+
+set B_VCREDIST=D:\wjp\vs2015u3_redist\vc_redist.x64.exe
+
+set B_README_WP27=C:\WinPython-64bit-%B_WP27%\python-%B_WP27:~0,-2%.amd64\Lib\site-packages
+set B_README_WP35=C:\WinPython-64bit-%B_WP35%\python-%B_WP35:~0,-2%.amd64\Lib\site-packages
+
+set B_RELEASE_TAG=v1.7.1
+set B_RELEASE=1.7.1beta
diff --git a/build/msvc/build_matlab.bat b/build/msvc/build_matlab.bat
new file mode 100644
index 0000000..7a2ef79
--- /dev/null
+++ b/build/msvc/build_matlab.bat
@@ -0,0 +1,14 @@
+@echo off
+
+call "%~dp0build_env.bat"
+
+call "%B_VC%\vcvars64.bat"
+
+cd /D %~dp0
+cd ..\..
+
+set MATLAB_ROOT=%B_MATLAB_ROOT%
+
+msbuild astra_vc14.sln /p:Configuration=Release_CUDA /p:Platform=x64
+
+pause
diff --git a/build/msvc/build_python27.bat b/build/msvc/build_python27.bat
new file mode 100644
index 0000000..a9495f0
--- /dev/null
+++ b/build/msvc/build_python27.bat
@@ -0,0 +1,28 @@
+@echo off
+
+cd /D %~dp0
+cd ..\..
+set R=%CD%
+
+call "%~dp0build_env.bat"
+
+call "%B_WINPYTHON27%\scripts\env.bat"
+call "%B_VC%\vcvars64.bat"
+
+cd /D %R%
+
+msbuild astra_vc14.sln /p:Configuration=Release_CUDA /p:Platform=x64 /t:astra_vc14
+
+cd python
+
+rd /s /q build
+rd /s /q "%WINPYDIR%\lib\site-packages\astra"
+
+set VS90COMNTOOLS=%VS140COMNTOOLS%
+set CL=/DASTRA_CUDA /DASTRA_PYTHON /EHsc
+set INCLUDE=%R%\include;%R%\lib\include;%CUDA_PATH%\include
+copy ..\bin\x64\Release_CUDA\AstraCuda64.lib astra.lib
+python builder.py build_ext --compiler=msvc install
+copy ..\bin\x64\Release_CUDA\AstraCuda64.dll "%WINPYDIR%\lib\site-packages\astra"
+
+pause
diff --git a/build/msvc/build_python35.bat b/build/msvc/build_python35.bat
new file mode 100644
index 0000000..72c6ec4
--- /dev/null
+++ b/build/msvc/build_python35.bat
@@ -0,0 +1,27 @@
+@echo off
+
+cd /D %~dp0
+cd ..\..
+set R=%CD%
+
+call "%~dp0build_env.bat"
+
+call "%B_WINPYTHON35%\scripts\env.bat"
+call "%B_VC%\vcvars64.bat"
+
+cd /D %R%
+
+msbuild astra_vc14.sln /p:Configuration=Release_CUDA /p:Platform=x64 /t:astra_vc14
+
+cd python
+
+rd /s /q build
+rd /s /q "%WINPYDIR%\lib\site-packages\astra"
+
+set CL=/DASTRA_CUDA /DASTRA_PYTHON
+set INCLUDE=%R%\include;%R%\lib\include;%CUDA_PATH%\include
+copy ..\bin\x64\Release_CUDA\AstraCuda64.lib astra.lib
+python builder.py build_ext --compiler=msvc install
+copy ..\bin\x64\Release_CUDA\AstraCuda64.dll "%WINPYDIR%\lib\site-packages\astra"
+
+pause
diff --git a/build/msvc/build_release.bat b/build/msvc/build_release.bat
new file mode 100644
index 0000000..87bfb28
--- /dev/null
+++ b/build/msvc/build_release.bat
@@ -0,0 +1,145 @@
+@echo off
+
+cd /D %~dp0
+cd ..\..
+
+set R=%CD%
+
+call "%~dp0build_env.bat"
+
+rd /s /q release
+
+mkdir release
+cd release
+mkdir src
+mkdir matlab
+mkdir python27
+mkdir python35
+
+cd src
+git clone https://github.com/astra-toolbox/astra-toolbox astra-%B_RELEASE%
+cd astra-%B_RELEASE%
+git checkout %B_RELEASE_TAG%
+rd /s /q .git
+
+pause
+
+cd %R%\release\matlab
+mkdir astra-%B_RELEASE%
+cd astra-%B_RELEASE%
+xcopy /e /i %R%\samples\matlab samples
+xcopy /e /i %R%\matlab\algorithms algorithms
+xcopy /e /i %R%\matlab\tools tools
+copy %R%\NEWS.txt .
+copy %R%\README.txt .
+copy %R%\COPYING COPYING.txt
+
+copy %B_VCREDIST% .
+
+mkdir mex
+copy %R%\bin\x64\Release_CUDA\*.mexw64 mex
+copy %R%\bin\x64\Release_CUDA\AstraCuda64.dll mex
+copy %R%\bin\x64\Release_CUDA\AstraCuda64.lib mex
+copy "%CUDA_PATH%\bin\cudart64_80.dll" mex
+copy "%CUDA_PATH%\bin\cufft64_80.dll" mex
+
+pause
+
+rem -------------------------------------------------------------------
+
+cd %R%\release\python27
+mkdir astra-%B_RELEASE%
+cd astra-%B_RELEASE%
+xcopy /e /i %R%\samples\python samples
+copy %R%\NEWS.txt .
+copy %R%\COPYING COPYING.txt
+
+copy %B_VCREDIST% .
+
+mkdir astra
+call "%B_WINPYTHON27%\scripts\env.bat"
+copy %WINPYDIR%\lib\site-packages\astra\*.* astra
+copy %R%\bin\x64\Release_CUDA\AstraCuda64.lib astra
+copy "%CUDA_PATH%\bin\cudart64_80.dll" astra
+copy "%CUDA_PATH%\bin\cufft64_80.dll" astra
+
+(
+echo -----------------------------------------------------------------------
+echo This file is part of the ASTRA Toolbox
+echo.
+echo Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+echo 2014-2016, CWI, Amsterdam
+echo http://visielab.uantwerpen.be/ and http://www.cwi.nl/
+echo License: Open Source under GPLv3
+echo Contact: astra@uantwerpen.be
+echo Website: http://www.astra-toolbox.com/
+echo -----------------------------------------------------------------------
+echo.
+echo.
+echo This directory contains pre-built Python modules for the ASTRA Toolbox.
+echo.
+echo It has been built with WinPython-64bit-%B_WP27%.
+echo.
+echo To use it, move the astra\ directory to your existing site-packages directory.
+echo Its exact location depends on your Python installation, but should look
+echo similar to %B_README_WP27% .
+echo.
+echo Sample code can be found in the samples\ directory.
+) > README.txt
+
+pause
+
+rem -------------------------------------------------------------------
+
+cd %R%\release\python35
+mkdir astra-%B_RELEASE%
+cd astra-%B_RELEASE%
+xcopy /e /i %R%\samples\python samples
+copy %R%\NEWS.txt .
+copy %R%\COPYING COPYING.txt
+
+copy %B_VCREDIST% .
+
+mkdir astra
+call "%B_WINPYTHON35%\scripts\env.bat"
+copy %WINPYDIR%\lib\site-packages\astra\*.* astra
+copy %R%\bin\x64\Release_CUDA\AstraCuda64.lib astra
+copy "%CUDA_PATH%\bin\cudart64_80.dll" astra
+copy "%CUDA_PATH%\bin\cufft64_80.dll" astra
+
+(
+echo -----------------------------------------------------------------------
+echo This file is part of the ASTRA Toolbox
+echo.
+echo Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+echo 2014-2016, CWI, Amsterdam
+echo http://visielab.uantwerpen.be/ and http://www.cwi.nl/
+echo License: Open Source under GPLv3
+echo Contact: astra@uantwerpen.be
+echo Website: http://www.astra-toolbox.com/
+echo -----------------------------------------------------------------------
+echo.
+echo.
+echo This directory contains pre-built Python modules for the ASTRA Toolbox.
+echo.
+echo It has been built with WinPython-64bit-%B_WP35%.
+echo.
+echo To use it, move the astra\ directory to your existing site-packages directory.
+echo Its exact location depends on your Python installation, but should look
+echo similar to %B_README_WP35% .
+echo.
+echo Sample code can be found in the samples\ directory.
+) > README.txt
+
+pause
+
+cd %R%\release\matlab
+python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%-matlab-win-x64', 'zip', 'astra-%B_RELEASE%')"
+cd %R%\release\python27
+python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%-python27-win-x64', 'zip', 'astra-%B_RELEASE%')"
+cd %R%\release\python35
+python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%-python35-win-x64', 'zip', 'astra-%B_RELEASE%')"
+cd %R%\release\src
+python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%', 'zip', 'astra-%B_RELEASE%')"
+
+pause
diff --git a/build/msvc/build_setup.bat b/build/msvc/build_setup.bat
new file mode 100644
index 0000000..4314386
--- /dev/null
+++ b/build/msvc/build_setup.bat
@@ -0,0 +1,37 @@
+@echo off
+
+call "%~dp0build_env.bat"
+
+cd /D %~dp0
+cd ..\..
+set R=%CD%
+
+rd /s /q "%R%\lib\x64"
+rd /s /q "%R%\lib\include\boost"
+rd /s /q "%R%\bin\x64\Release_CUDA"
+
+cd /D "%B_BOOST%\lib64-msvc-14.0"
+
+mkdir "%R%\lib\x64"
+mkdir "%R%\bin\x64\Release_CUDA"
+
+copy boost_unit_test_framework-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy boost_unit_test_framework-vc140-mt-gd-%B_BV%.lib %R%\lib\x64
+
+copy libboost_chrono-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_chrono-vc140-mt-gd-%B_BV%.lib %R%\lib\x64
+
+copy libboost_date_time-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_date_time-vc140-mt-gd-%B_BV%.lib %R%\lib\x64
+
+copy libboost_system-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_system-vc140-mt-gd-%B_BV%.lib %R%\lib\x64
+
+copy libboost_thread-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_thread-vc140-mt-gd-%B_BV%.lib %R%\lib\x64
+
+cd %B_BOOST%
+
+xcopy /i /e /q boost "%R%\lib\include\boost"
+
+pause