build-windows/generate_code.cmd
branchsync
changeset 4428 d93b2e27ed9a
parent 4311 d86602e53471
child 4796 2f9d08b152dc
child 4797 0e4297742adf
     1.1 --- a/build-windows/generate_code.cmd	Thu Feb 20 17:17:57 2020 +0100
     1.2 +++ b/build-windows/generate_code.cmd	Fri Feb 21 10:29:13 2020 +0100
     1.3 @@ -1,32 +1,76 @@
     1.4 -pushd .
     1.5 -set pwd=%cd%
     1.6 -cd %pwd%\sync
     1.7 +@ECHO OFF
     1.8 +PUSHD .
     1.9 +SET pwd=%cd%
    1.10 +CD %pwd%\sync
    1.11  
    1.12 -if not exist generated mkdir generated
    1.13 +IF NOT EXIST generated MKDIR generated
    1.14  
    1.15 +ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
    1.16  py "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
    1.17 +IF %ERRORLEVEL% NEQ 0 (
    1.18 +	POPD
    1.19 +	EXIT /B 1
    1.20 +	)
    1.21 +ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
    1.22  py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
    1.23 +IF %ERRORLEVEL% NEQ 0 (
    1.24 +	POPD
    1.25 +	EXIT /B 1
    1.26 +	)
    1.27 +ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
    1.28  py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
    1.29 +IF %ERRORLEVEL% NEQ 0 (
    1.30 +	POPD
    1.31 +	EXIT /B 1
    1.32 +	)
    1.33 +ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
    1.34  py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
    1.35 +IF %ERRORLEVEL% NEQ 0 (
    1.36 +	POPD
    1.37 +	EXIT /B 1
    1.38 +	)
    1.39 +ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
    1.40  py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
    1.41 +IF %ERRORLEVEL% NEQ 0 (
    1.42 +	POPD
    1.43 +	EXIT /B 1
    1.44 +	)
    1.45 +ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
    1.46  py "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
    1.47 +IF %ERRORLEVEL% NEQ 0 (
    1.48 +	POPD
    1.49 +	EXIT /B 1
    1.50 +	)
    1.51 +ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
    1.52  py "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
    1.53 +IF %ERRORLEVEL% NEQ 0 (
    1.54 +	POPD
    1.55 +	EXIT /B 1
    1.56 +	)
    1.57  
    1.58  xcopy /y generated\*.asn1 ..\asn.1\
    1.59  xcopy /y generated\*.c ..\src\
    1.60  xcopy /y generated\*.h ..\src\
    1.61  
    1.62 -cd %pwd%\asn.1
    1.63 +CD %pwd%\asn.1
    1.64  
    1.65 -del *.h
    1.66 -del *.c
    1.67 +DEL *.h
    1.68 +DEL *.c
    1.69  
    1.70  ..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keysync.asn1 sync.asn1
    1.71 +IF %ERRORLEVEL% NEQ 0 (
    1.72 +	POPD
    1.73 +	EXIT /B 1
    1.74 +	)
    1.75  ..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keyreset.asn1 distribution.asn1
    1.76 +IF %ERRORLEVEL% NEQ 0 (
    1.77 +	POPD
    1.78 +	EXIT /B 1
    1.79 +	)
    1.80  
    1.81 -del *-sample.c
    1.82 +DEL *-sample.c
    1.83  
    1.84 -cd %pwd%\..
    1.85 -if not exist pEp mklink /d pEp pEpEngine\src
    1.86 +CD %pwd%\..
    1.87 +IF NOT EXIST pEp mklink /d pEp pEpEngine\src
    1.88  
    1.89 -popd
    1.90 +POPD