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
Alex@4428
     1
@ECHO OFF
Alex@4428
     2
PUSHD .
Alex@4428
     3
SET pwd=%cd%
Alex@4428
     4
CD %pwd%\sync
vb@3023
     5
Alex@4428
     6
IF NOT EXIST generated MKDIR generated
Thomas@3112
     7
Alex@4428
     8
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
Thomas@4169
     9
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
Alex@4428
    10
IF %ERRORLEVEL% NEQ 0 (
Alex@4428
    11
	POPD
Alex@4428
    12
	EXIT /B 1
Alex@4428
    13
	)
Alex@4428
    14
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
Thomas@4311
    15
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
Alex@4428
    16
IF %ERRORLEVEL% NEQ 0 (
Alex@4428
    17
	POPD
Alex@4428
    18
	EXIT /B 1
Alex@4428
    19
	)
Alex@4428
    20
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
Thomas@4311
    21
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
Alex@4428
    22
IF %ERRORLEVEL% NEQ 0 (
Alex@4428
    23
	POPD
Alex@4428
    24
	EXIT /B 1
Alex@4428
    25
	)
Alex@4428
    26
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
Thomas@4311
    27
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
Alex@4428
    28
IF %ERRORLEVEL% NEQ 0 (
Alex@4428
    29
	POPD
Alex@4428
    30
	EXIT /B 1
Alex@4428
    31
	)
Alex@4428
    32
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
Thomas@4311
    33
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
Alex@4428
    34
IF %ERRORLEVEL% NEQ 0 (
Alex@4428
    35
	POPD
Alex@4428
    36
	EXIT /B 1
Alex@4428
    37
	)
Alex@4428
    38
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
Thomas@4311
    39
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
Alex@4428
    40
IF %ERRORLEVEL% NEQ 0 (
Alex@4428
    41
	POPD
Alex@4428
    42
	EXIT /B 1
Alex@4428
    43
	)
Alex@4428
    44
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
Thomas@4169
    45
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
Alex@4428
    46
IF %ERRORLEVEL% NEQ 0 (
Alex@4428
    47
	POPD
Alex@4428
    48
	EXIT /B 1
Alex@4428
    49
	)
vb@3023
    50
vb@3023
    51
xcopy /y generated\*.asn1 ..\asn.1\
vb@3023
    52
xcopy /y generated\*.c ..\src\
vb@3023
    53
xcopy /y generated\*.h ..\src\
vb@3023
    54
Alex@4428
    55
CD %pwd%\asn.1
vb@3023
    56
Alex@4428
    57
DEL *.h
Alex@4428
    58
DEL *.c
vb@3024
    59
vb@3023
    60
..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keysync.asn1 sync.asn1
Alex@4428
    61
IF %ERRORLEVEL% NEQ 0 (
Alex@4428
    62
	POPD
Alex@4428
    63
	EXIT /B 1
Alex@4428
    64
	)
vb@4292
    65
..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keyreset.asn1 distribution.asn1
Alex@4428
    66
IF %ERRORLEVEL% NEQ 0 (
Alex@4428
    67
	POPD
Alex@4428
    68
	EXIT /B 1
Alex@4428
    69
	)
vb@3023
    70
Alex@4428
    71
DEL *-sample.c
vb@3024
    72
Alex@4428
    73
CD %pwd%\..
vb@4796
    74
RD /S/Q pEp
vb@4796
    75
MKDIR pEp
vb@4809
    76
XCOPY pEpEngine\src\*.h pEp\ /Y/F/I
vb@3056
    77
Alex@4428
    78
POPD