summaryrefslogtreecommitdiffstats
path: root/build/msvc/build_release.bat
blob: 9e204d7476605d205cda5e638fd87245caa466a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@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 -b %B_RELEASE_TAG% https://github.com/astra-toolbox/astra-toolbox astra-%B_RELEASE%
cd astra-%B_RELEASE%
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@astra-toolbox.com
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@astra-toolbox.com
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
python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%-matlab-win-x64', 'zip', 'matlab')"
python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%-python27-win-x64', 'zip', 'python27')"
python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%-python35-win-x64', 'zip', 'python35')"
python -c "import shutil; shutil.make_archive('astra-%B_RELEASE%', 'zip', 'src')"

pause