-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
51 lines (40 loc) · 2.05 KB
/
Copy pathsetup.bat
File metadata and controls
51 lines (40 loc) · 2.05 KB
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
@echo off
setlocal enabledelayedexpansion
IF DEFINED APPVEYOR echo Setup recognised AppVeyor
IF NOT DEFINED bob_root (
echo Error bob_root not defined
exit /b 1
)
IF NOT DEFINED bob_project_root (
echo Error bob_project_root not defined
exit /b 1
)
IF NOT DEFINED bob_download_cache_dir (
echo Error bob_download_cache_dir not defined
exit /b 1
)
IF NOT DEFINED bob_third_party_dir set bob_third_party_dir=%bob_root%\thirdparty
rem Install 7z
set bob_7z_dir=%bob_third_party_dir%\7-Zip\7z2201-x64
IF NOT EXIST %bob_download_cache_dir%\7z2201-x64.msi curl -L --show-error https://www.7-zip.org/a/7z2201-x64.msi -o %bob_download_cache_dir%\7z2201-x64.msi
IF NOT EXIST %bob_third_party_dir%\7z2201-x64\Files\7-Zip\7z.exe (
msiexec /a %bob_download_cache_dir%\7z2201-x64.msi /qn TARGETDIR=%bob_root%\temp_7zextract\
if not !ERRORLEVEL! == 0 (
echo 7z msiexec failed !ERRORLEVEL!
echo msiexec /a %bob_download_cache_dir%\7z2201-x64.msi /qn TARGETDIR=%bob_root%\temp_7zextract\
exit /B !ERRORLEVEL!
)
if not exist %bob_7z_dir% (
mkdir %bob_7z_dir%\
)
xcopy /I /Q /Y /E "%bob_root%\temp_7zextract\" "%bob_7z_dir%\" > nul
del /s /q "%bob_root%\temp_7zextract\" > nul
rmdir /s /q "%bob_root%\temp_7zextract\" > nul
)
rem Download Python
IF NOT EXIST %bob_download_cache_dir%\python-3.11.1-embed-amd64.zip curl -L https://www.python.org/ftp/python/3.11.1/python-3.11.1-embed-amd64.zip -o %bob_download_cache_dir%\python-3.11.1-embed-amd64.zip
rem Extract Python
IF NOT EXIST %bob_third_party_dir%\python\python-3.11.1\ %bob_7z_dir%\Files\7-Zip\7z.exe x -y %bob_download_cache_dir%\python-3.11.1-embed-amd64.zip -o%bob_third_party_dir%\python\python-3.11.1\
set bob_python_dir=%bob_third_party_dir%\python\python-3.11.1
%bob_python_dir%/python %bob_root%/toolchain/python/setup_generate_solution.py --bob-root-directory "%bob_root%\" --bob-project-root-directory "%bob_project_root%\" --bob-thirdparty-directory "%bob_third_party_dir%" --bob-download-cache-directory "%bob_download_cache_dir%" %*
endlocal