Browse Source

Make yml2 path relative in Windows build script

ENGINE-872
Thomas 11 months ago
parent
commit
1b58b737d5
1 changed files with 26 additions and 25 deletions
  1. +26
    -25
      build-windows/generate_code.cmd

+ 26
- 25
build-windows/generate_code.cmd View File

@ -1,39 +1,45 @@
@ECHO OFF
:: The script is located in ...\pEpEngine\build-windows\
:: The script is located in ...\pEpForWindowsAdapterSolution\pEpEngine\build-windows\
SET current_directory=%~dp0
:: Engine directory is ...\pEpForWindowsAdapterSolution\pEpEngine\
SET engine_directory=%current_directory:~0,-14%
ECHO %engine_directory%
:: YML2 directory is ...\pEpForWindowsAdapterSolution\yml2\
SET yml2_directory=%engine_directory:~0,-11%\yml2
:: Generate code in ...\pEpEngine\sync
PUSHD %engine_directory%\sync
IF NOT EXIST generated MKDIR generated
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
ECHO py "%yml2_directory%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
py "%yml2_directory%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
IF %ERRORLEVEL% NEQ 0 GOTO end
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
ECHO py "%yml2_directory%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
py "%yml2_directory%\yml2proc" -E utf-8 -y gen_codec.ysl2 distribution.fsm
IF %ERRORLEVEL% NEQ 0 GOTO end
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
ECHO py "%yml2_directory%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
py "%yml2_directory%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
IF %ERRORLEVEL% NEQ 0 GOTO end
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
ECHO py "%yml2_directory%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
py "%yml2_directory%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
IF %ERRORLEVEL% NEQ 0 GOTO end
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
ECHO py "%yml2_directory%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
py "%yml2_directory%\yml2proc" -E utf-8 -y gen_messages.ysl2 distribution.fsm
IF %ERRORLEVEL% NEQ 0 GOTO end
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
ECHO py "%yml2_directory%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
py "%yml2_directory%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
IF %ERRORLEVEL% NEQ 0 GOTO end
ECHO py "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
py "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
ECHO py "%yml2_directory%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
py "%yml2_directory%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
IF %ERRORLEVEL% NEQ 0 GOTO end
XCOPY /y generated\*.asn1 ..\asn.1\
@ -46,15 +52,10 @@ DEL *.h
DEL *.c
..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keysync.asn1 sync.asn1
IF %ERRORLEVEL% NEQ 0 (
POPD
EXIT /B 1
)
IF %ERRORLEVEL% NEQ 0 GOTO end
..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keyreset.asn1 distribution.asn1
IF %ERRORLEVEL% NEQ 0 (
POPD
EXIT /B 1
)
IF %ERRORLEVEL% NEQ 0 GOTO end
DEL *-sample.c
@ -67,4 +68,4 @@ XCOPY pEpEngine\src\*.h pEp\ /Y/F/I
:end
POPD
IF %ERRORLEVEL% NEQ 0 EXIT /B 1
EXIT /B %ERRORLEVEL%

Loading…
Cancel
Save