From 52de5a8e8de7a5e7b4518ab11a8de45e01bc9f34 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 23 Jun 2021 15:15:36 +0200 Subject: [PATCH] Adjust Windows build files and add necessary includes --- build-windows/generate_code.cmd | 42 +++++++++++++------------ build-windows/pEpEngine.vcxproj | 19 ++++++----- build-windows/pEpEngine.vcxproj.filters | 21 +++++++++---- src/group.h | 3 +- 4 files changed, 48 insertions(+), 37 deletions(-) diff --git a/build-windows/generate_code.cmd b/build-windows/generate_code.cmd index 0f8d3156..a1bc1adb 100644 --- a/build-windows/generate_code.cmd +++ b/build-windows/generate_code.cmd @@ -16,43 +16,45 @@ IF NOT EXIST "%ProgramData%\pEp" "MKDIR %ProgramData%\pEp" DEL "%ProgramData%\pEp\system.db" MOVE system.db "%ProgramData%\pEp\system.db" -:: Generate code in ...\pEpEngine\sync -CD ..\sync +:: Generate code in ...\pEpEngine\codegen +CD ..\codegen :: Make sure YML2 is installed PY -m pip install --upgrade pip PY -m pip install wheel PY -m pip install yml2 +SET YML2PROC="%yml2_directory%\yml2proc" + :: Generate the Sync code IF NOT EXIST generated MKDIR generated -ECHO PY -m yml2.yml2proc -E utf-8 -y gen_actions.ysl2 sync.fsm -PY -m yml2.yml2proc -E utf-8 -y gen_actions.ysl2 sync.fsm +ECHO PY %YML2PROC% -E utf-8 -y gen_actions.ysl2 sync.fsm +ECHO define actfile = "./sync.act"; | PY %YML2PROC% - gen_actions.ysl2 | PY %YML2PROC% -X - sync.fsm -o sync.act.gen IF %ERRORLEVEL% NEQ 0 GOTO end -ECHO PY -m yml2.yml2proc -E utf-8 -y gen_codec.ysl2 distribution.fsm -PY -m yml2.yml2proc -E utf-8 -y gen_codec.ysl2 distribution.fsm +ECHO PY %YML2PROC% -E utf-8 -y gen_codec.ysl2 distribution.fsm +PY %YML2PROC% -E utf-8 -y gen_codec.ysl2 distribution.fsm IF %ERRORLEVEL% NEQ 0 GOTO end -ECHO PY -m yml2.yml2proc -E utf-8 -y gen_codec.ysl2 sync.fsm -PY -m yml2.yml2proc -E utf-8 -y gen_codec.ysl2 sync.fsm +ECHO PY %YML2PROC% -E utf-8 -y gen_codec.ysl2 sync.fsm +PY %YML2PROC% -E utf-8 -y gen_codec.ysl2 sync.fsm IF %ERRORLEVEL% NEQ 0 GOTO end -ECHO PY -m yml2.yml2proc -E utf-8 -y gen_messages.ysl2 sync.fsm -PY -m yml2.yml2proc -E utf-8 -y gen_messages.ysl2 sync.fsm +ECHO PY %YML2PROC% -E utf-8 -y gen_messages.ysl2 sync.fsm +PY %YML2PROC% -E utf-8 -y gen_messages.ysl2 sync.fsm IF %ERRORLEVEL% NEQ 0 GOTO end -ECHO PY -m yml2.yml2proc -E utf-8 -y gen_messages.ysl2 distribution.fsm -PY -m yml2.yml2proc -E utf-8 -y gen_messages.ysl2 distribution.fsm +ECHO PY %YML2PROC% -E utf-8 -y gen_messages.ysl2 distribution.fsm +PY %YML2PROC% -E utf-8 -y gen_messages.ysl2 distribution.fsm IF %ERRORLEVEL% NEQ 0 GOTO end -ECHO PY -m yml2.yml2proc -E utf-8 -y gen_message_func.ysl2 sync.fsm -PY -m yml2.yml2proc -E utf-8 -y gen_message_func.ysl2 sync.fsm +ECHO PY %YML2PROC% -E utf-8 -y gen_message_func.ysl2 sync.fsm +PY %YML2PROC% -E utf-8 -y gen_message_func.ysl2 sync.fsm IF %ERRORLEVEL% NEQ 0 GOTO end -ECHO PY -m yml2.yml2proc -E utf-8 -y gen_statemachine.ysl2 sync.fsm -PY -m yml2.yml2proc -E utf-8 -y gen_statemachine.ysl2 sync.fsm +ECHO PY %YML2PROC% -E utf-8 -y gen_statemachine.ysl2 sync.fsm +PY %YML2PROC% -E utf-8 -y gen_statemachine.ysl2 sync.fsm IF %ERRORLEVEL% NEQ 0 GOTO end XCOPY /y generated\*.asn1 ..\asn.1\ @@ -64,10 +66,10 @@ CD %engine_directory%\asn.1 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 +..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keysync.asn1 sync.asn1 trustsync.asn1 groupsync.asn1 managedgroup.asn1 keyreset.asn1 distribution.asn1 exploration.asn1 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 +..\..\Tools\asn1c\bin\asn1c -S ../../Tools/asn1c/share/asn1c -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keyreset.asn1 distribution.asn1 managedgroup.asn1 exploration.asn1 IF %ERRORLEVEL% NEQ 0 GOTO end DEL *-sample.c @@ -75,8 +77,8 @@ DEL *-sample.c CD %engine_directory%\.. MKDIR pEp XCOPY pEpEngine\src\*.h pEp\ /Y/F/I -XCOPY libpEpAdapter\*.hh pEp\ /Y/F/I -XCOPY libpEpAdapter\*.hxx pEp\ /Y/F/I +XCOPY libpEpAdapter\src\*.hh pEp\ /Y/F/I +XCOPY libpEpAdapter\src\*.hxx pEp\ /Y/F/I :end diff --git a/build-windows/pEpEngine.vcxproj b/build-windows/pEpEngine.vcxproj index acb09a86..de1ba30a 100644 --- a/build-windows/pEpEngine.vcxproj +++ b/build-windows/pEpEngine.vcxproj @@ -89,10 +89,8 @@ cargo build --manifest-path="$(SolutionDir)sequoia\Cargo.toml" - - xcopy "$(SolutionDir)sequoia\target\debug\sequoia_openpgp_ffi.dll" "$(TargetDir)" /Y - xcopy "$(SolutionDir)sequoia\target\debug\sq.exe" "$(TargetDir)" /Y - + xcopy "$(SolutionDir)sequoia\target\debug\sequoia_openpgp_ffi.dll" "$(TargetDir)" /Y + xcopy "$(SolutionDir)sequoia\target\debug\sq.exe" "$(TargetDir)" /Y @@ -124,22 +122,22 @@ cargo build --manifest-path="$(SolutionDir)sequoia\Cargo.toml" --release - - xcopy "$(SolutionDir)sequoia\target\release\sequoia_openpgp_ffi.dll" "$(TargetDir)" /Y - xcopy "$(SolutionDir)sequoia\target\release\sq.exe" "$(TargetDir)" /Y - + xcopy "$(SolutionDir)sequoia\target\release\sequoia_openpgp_ffi.dll" "$(TargetDir)" /Y + xcopy "$(SolutionDir)sequoia\target\release\sq.exe" "$(TargetDir)" /Y - + + + @@ -171,13 +169,13 @@ + - @@ -185,6 +183,7 @@ + diff --git a/build-windows/pEpEngine.vcxproj.filters b/build-windows/pEpEngine.vcxproj.filters index 4ecc8075..5c21586f 100644 --- a/build-windows/pEpEngine.vcxproj.filters +++ b/build-windows/pEpEngine.vcxproj.filters @@ -63,9 +63,6 @@ Quelldateien - - Quelldateien - Quelldateien @@ -135,6 +132,18 @@ Quelldateien + + Quelldateien + + + Quelldateien + + + Quelldateien + + + Quelldateien + @@ -200,9 +209,6 @@ Headerdateien - - Headerdateien - Headerdateien @@ -293,6 +299,9 @@ Headerdateien + + Headerdateien + diff --git a/src/group.h b/src/group.h index a8493260..81767faa 100644 --- a/src/group.h +++ b/src/group.h @@ -3,7 +3,8 @@ // This file is under GNU General Public License 3.0 // see LICENSE.txt - +#include "platform.h" +#include "dynamic_api.h" #include "message_api.h" #ifdef __cplusplus