Browse Source

Some improvements to generation script on Windows

ENGINE-872
Thomas 11 months ago
parent
commit
620b579ef4
2 changed files with 30 additions and 38 deletions
  1. +28
    -36
      build-windows/generate_code.cmd
  2. +2
    -2
      build-windows/libpEpasn1/libpEpasn1.vcxproj

+ 28
- 36
build-windows/generate_code.cmd View File

@ -1,58 +1,46 @@
@ECHO OFF
PUSHD .
SET pwd=%cd%
CD %pwd%\sync
:: The script is located in ...\pEpEngine\build-windows\
SET current_directory=%~dp0
SET engine_directory=%current_directory:~0,-14%
ECHO %engine_directory%
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
IF %ERRORLEVEL% NEQ 0 (
POPD
EXIT /B 1
)
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
IF %ERRORLEVEL% NEQ 0 (
POPD
EXIT /B 1
)
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
IF %ERRORLEVEL% NEQ 0 (
POPD
EXIT /B 1
)
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
IF %ERRORLEVEL% NEQ 0 (
POPD
EXIT /B 1
)
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
IF %ERRORLEVEL% NEQ 0 (
POPD
EXIT /B 1
)
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
IF %ERRORLEVEL% NEQ 0 (
POPD
EXIT /B 1
)
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
IF %ERRORLEVEL% NEQ 0 (
POPD
EXIT /B 1
)
IF %ERRORLEVEL% NEQ 0 GOTO end
xcopy /y generated\*.asn1 ..\asn.1\
xcopy /y generated\*.c ..\src\
xcopy /y generated\*.h ..\src\
XCOPY /y generated\*.asn1 ..\asn.1\
XCOPY /y generated\*.c ..\src\
XCOPY /y generated\*.h ..\src\
CD %pwd%\asn.1
CD %engine_directory%\asn.1
DEL *.h
DEL *.c
@ -70,9 +58,13 @@ IF %ERRORLEVEL% NEQ 0 (
DEL *-sample.c
CD %pwd%\..
CD %engine_directory%\..
RD /S/Q pEp
MKDIR pEp
XCOPY pEpEngine\src\*.h pEp\ /Y/F/I
:end
POPD
IF %ERRORLEVEL% NEQ 0 EXIT /B 1

+ 2
- 2
build-windows/libpEpasn1/libpEpasn1.vcxproj View File

@ -61,7 +61,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<PreBuildEvent>
<Command>IF EXIST ".\Debug\libpEpasn1.tlog\unsuccessfulbuild" CD..\.. &amp;&amp; CALL .\build-windows\generate_code.cmd</Command>
<Command>IF EXIST ".\Debug\libpEpasn1.tlog\unsuccessfulbuild" CALL ..\generate_code.cmd</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -81,7 +81,7 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>IF EXIST ".\Release\libpEpasn1.tlog\unsuccessfulbuild" CD..\.. &amp;&amp; CALL .\build-windows\generate_code.cmd</Command>
<Command>IF EXIST ".\Release\libpEpasn1.tlog\unsuccessfulbuild" CALL ..\generate_code.cmd</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>


Loading…
Cancel
Save