-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_dev.bat
49 lines (36 loc) · 1.55 KB
/
build_dev.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
47
48
49
@echo off
call clean.bat
echo Compiling Kernel...
IF NOT DEFINED FRUITON_KERNEL (
echo Enviroment variable FRUITON_KERNEL is not defined!
echo Please set its value to the abolute path of the folder containing Kernel Haxe sources.
echo You can set the enviroment variable by using the SETX command
echo e.g. SETX FRUITON_KERNEL C:\Users\Username\Documents\Fruiton\Kernel
pause
exit /b
)
SET client_dir="%CD%"
SET kernel_dest=%client_dir%\FruitonClient\Assets\Scripts\Kernel\Generated
SET unity_resources_folder=%client_dir%\FruitonClient\Assets\Resources
SET kernel_resources_folder=%unity_resources_folder%\Kernel
CD "%FRUITON_KERNEL%"
haxe --macro include('fruiton',true,['fruiton.fruitDb.models','fruiton.macro']) -D no-compilation -D no-root -cs %kernel_dest% -cp %FRUITON_KERNEL% fruiton.kernel.Kernel
xcopy /i /y /s "%FRUITON_KERNEL%"\resources %kernel_resources_folder%
CD %client_dir%
IF NOT DEFINED FRUITON_PROTOBUFS (
echo Enviroment variable FRUITON_PROTOBUFS is not defined!
echo Please set its value to the abolute path of the folder containing .proto files.
echo You can set the enviroment variable by using the SETX command
echo e.g. SETX FRUITON_PROTOBUFS C:\Users\Username\Documents\Fruiton\Protobufs
pause
exit /b
)
echo Compiling .proto files...
SET proto_dest=FruitonClient\Assets\Scripts\Protobufs
IF NOT EXIST %proto_dest% mkdir %proto_dest%
FOR %%p in (%FRUITON_PROTOBUFS%\*.proto) DO (
protoc --csharp_out=%proto_dest% --proto_path="%FRUITON_PROTOBUFS%" %%p
echo %%p compiled!
)
echo Done!
pause