build-windows/generate_code.cmd
author Volker Birk <vb@pep.foundation>
Tue, 30 Jun 2020 23:59:56 +0200
changeset 4797 0e4297742adf
parent 4428 d93b2e27ed9a
child 4798 1d204770f9ea
permissions -rw-r--r--
MKLINK cannot work any more, XCOPY needed
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@4797
    74
REM mklink will not work any more. VB.
vb@4797
    75
REM IF NOT EXIST pEp mklink /d pEp pEpEngine\src
vb@4797
    76
RD /S/Q pEp
vb@4797
    77
MD pEp
vb@4797
    78
XCOPY pEpEngine\src\*.h pEp
vb@4797
    79
XCOPY libpEpAdapter\*.hh pEp
vb@4797
    80
XCOPY libpEpAdapter\*.hxx pEp
vb@3056
    81
Alex@4428
    82
POPD