build-windows/generate_code.cmd
author Roker <roker@pep-project.org>
Wed, 16 Sep 2020 18:14:33 +0200
changeset 5065 d6d23b414a93
parent 4809 c84a4b9c3c14
permissions -rw-r--r--
also "install" libpEpEngine.a into $PREFIX/lib
     1 @ECHO OFF
     2 PUSHD .
     3 SET pwd=%cd%
     4 CD %pwd%\sync
     5 
     6 IF NOT EXIST generated MKDIR generated
     7 
     8 ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
     9 py "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
    10 IF %ERRORLEVEL% NEQ 0 (
    11 	POPD
    12 	EXIT /B 1
    13 	)
    14 ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
    15 py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
    16 IF %ERRORLEVEL% NEQ 0 (
    17 	POPD
    18 	EXIT /B 1
    19 	)
    20 ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
    21 py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
    22 IF %ERRORLEVEL% NEQ 0 (
    23 	POPD
    24 	EXIT /B 1
    25 	)
    26 ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
    27 py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
    28 IF %ERRORLEVEL% NEQ 0 (
    29 	POPD
    30 	EXIT /B 1
    31 	)
    32 ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
    33 py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
    34 IF %ERRORLEVEL% NEQ 0 (
    35 	POPD
    36 	EXIT /B 1
    37 	)
    38 ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
    39 py "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
    40 IF %ERRORLEVEL% NEQ 0 (
    41 	POPD
    42 	EXIT /B 1
    43 	)
    44 ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
    45 py "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
    46 IF %ERRORLEVEL% NEQ 0 (
    47 	POPD
    48 	EXIT /B 1
    49 	)
    50 
    51 xcopy /y generated\*.asn1 ..\asn.1\
    52 xcopy /y generated\*.c ..\src\
    53 xcopy /y generated\*.h ..\src\
    54 
    55 CD %pwd%\asn.1
    56 
    57 DEL *.h
    58 DEL *.c
    59 
    60 ..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keysync.asn1 sync.asn1
    61 IF %ERRORLEVEL% NEQ 0 (
    62 	POPD
    63 	EXIT /B 1
    64 	)
    65 ..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keyreset.asn1 distribution.asn1
    66 IF %ERRORLEVEL% NEQ 0 (
    67 	POPD
    68 	EXIT /B 1
    69 	)
    70 
    71 DEL *-sample.c
    72 
    73 CD %pwd%\..
    74 RD /S/Q pEp
    75 MKDIR pEp
    76 XCOPY pEpEngine\src\*.h pEp\ /Y/F/I
    77 
    78 POPD