build-windows/generate_code.cmd
author Alex Sualdea
Fri, 21 Feb 2020 10:29:13 +0100
branchsync
changeset 4428 d93b2e27ed9a
parent 4311 d86602e53471
child 4796 2f9d08b152dc
child 4797 0e4297742adf
permissions -rw-r--r--
Added error checking to windows compile script
     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 IF NOT EXIST pEp mklink /d pEp pEpEngine\src
    75 
    76 POPD