-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.bat
More file actions
68 lines (53 loc) · 2.53 KB
/
build.bat
File metadata and controls
68 lines (53 loc) · 2.53 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
mkdir "Heavy"
:: Expand minGW environment, for command line utilities and compilation utilities
powershell -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/plugdata-team/plugdata-heavy-toolchain/releases/download/minGW_package/minGW.zip -OutFile minGW.zip"
powershell -Command "$ProgressPreference = 'SilentlyContinue'; 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
:: Cleanup
rd /S /Q "doc"
rd /S /Q "tests"
rd /S /Q "Drivers\CMSIS_5\CMSIS_Review_Meeting_2020.pdf"
rd /S /Q "Drivers\CMSIS_5\CMSIS\DSP"
rd /S /Q "Drivers\CMSIS_5\CMSIS\DoxyGen"
rd /S /Q "Drivers\CMSIS_5\CMSIS\NN"
rd /S /Q "Drivers\CMSIS_5\CMSIS\RTOS2"
rd /S /Q "Drivers\CMSIS_5\CMSIS\RTOS"
rd /S /Q "Drivers\CMSIS-DSP"
cd ..
:: Pre-build Owl libs
cd OwlProgram
echo ../Heavy/usr/bin/make.exe libs PLATFORM=OWL2 TOOLROOT=../Heavy/usr/bin/ > build.sh
..\Heavy\usr\bin\bash.exe --login build.sh
cd ..
:: Copy all libs to toolchain
xcopy /E /H /C /I libdaisy Heavy\usr\lib\libdaisy
xcopy /E /H /C /I OwlProgram Heavy\usr\lib\OwlProgram
xcopy /E /H /C /I dpf Heavy\usr\lib\dpf
xcopy /E /H /C /I dpf-widgets Heavy\usr\lib\dpf-widgets
:: Download OWL FirmwareSender from CI
powershell -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://github.com/Wasted-Audio/FirmwareSender_plugdata/releases/download/plugdata/FirmwareSender-windows.zip -OutFile FirmwareSender.zip"
powershell -Command "$ProgressPreference = 'SilentlyContinue'; Expand-Archive FirmwareSender.zip -Force -DestinationPath .\Heavy\usr\lib\OwlProgram\Tools"
:: Package heavy using pyinstaller
python -m ensurepip
python -m pip install poetry poetry-pyinstaller-plugin pyinstaller
cd hvcc
pip install -e .
poetry build
cd ..
mkdir .\Heavy\usr\bin\Heavy\
move .\hvcc\dist\pyinstaller\win_amd64\Heavy.exe .\Heavy\usr\bin\Heavy\
cp VERSION Heavy\VERSION
move Heavy Toolchain