forked from plugdata-team/plugdata-heavy-toolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
46 lines (33 loc) · 1.86 KB
/
build.bat
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
mkdir "Heavy"
:: Expand minGW environment, for command line utilities and compilation utilities
powershell -Command "Invoke-WebRequest -Uri https://github.com/plugdata-team/plugdata-heavy-toolchain/releases/download/minGW_package/minGW.zip -OutFile minGW.zip"
powershell -Command "Expand-Archive minGW.zip -Force -DestinationPath .\Heavy"
mkdir .\Heavy\usr\etc\linkers
copy resources\heavy-static.a Heavy\usr\lib\heavy-static.a
copy resources\daisy_makefile Heavy\usr\etc\daisy_makefile
copy .\resources\*.lds .\Heavy\usr\etc\linkers
copy .\resources\simple.json .\Heavy\usr\etc\simple.json
copy .\resources\terrarium.json .\Heavy\usr\etc\terrarium.json
copy .\resources\versio.json .\Heavy\usr\etc\versio.json
copy .\resources\hothouse.json .\Heavy\usr\etc\hothouse.json
xcopy /E /H /C /I resources\usb_driver Heavy\usr\etc\usb_driver
del /S /Q ".\Heavy\usr\arm-none-eabi\lib\arm"
:: Pre-build libdaisy
cd libdaisy
echo ../Heavy/usr/bin/make.exe GCC_PATH=../Heavy/usr/bin> build.sh
..\Heavy\usr\bin\bash.exe --login build.sh
cd ..
xcopy /E /H /C /I libdaisy Heavy\usr\lib\libdaisy
xcopy /E /H /C /I dpf Heavy\usr\lib\dpf
:: Package heavy using pyinstaller
python -m ensurepip
python -m pip install hvcc\.
python -m pip install pyinstaller
FOR /F "tokens=*" %%g IN ('python -m site --user-site') do (SET PYTHON_SITE=%%g)
python resources\run_pyinstaller.py -n Heavy --noconfirm --windowed --paths %PYTHON_SITE% .\hvcc\hvcc\__init__.py --collect-data json2daisy --add-data=".\hvcc\hvcc\generators;.\generators" --add-data=".\hvcc\hvcc\core;.\hvcc\core" --add-data=".\hvcc\hvcc\generators;.\hvcc\generators" --add-data=".\hvcc\hvcc\interpreters;.\hvcc\interpreters"
copy .\dist\Heavy\json2daisy\resources\component_defs.json .\dist\Heavy\json2daisy\resources\seed.json
move .\dist\Heavy .\Heavy\usr\bin\
del /s /q .\dist\*
del /s /q .\build\*
del /s /q .\__init__.spec
cp VERSION Heavy\VERSION