build-windows/generate_code.cmd
author Volker Birk <vb@pep.foundation>
Wed, 01 Jul 2020 00:08:13 +0200
changeset 4798 1d204770f9ea
parent 4797 0e4297742adf
parent 4796 2f9d08b152dc
child 4799 08b54026b55c
permissions -rw-r--r--
merging
     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\
    77 XCOPY libpEpAdapter\*.hh pEp\
    78 XCOPY libpEpAdapter\*.hxx pEp\
    79 XCOPY libpEpAdapter\*.hh pEp
    80 XCOPY libpEpAdapter\*.hxx pEp
    81 
    82 POPD