Browse Source

Adjust Windows build files and add necessary includes

Release_3.1
Thomas 4 months ago
parent
commit
52de5a8e8d
4 changed files with 48 additions and 37 deletions
  1. +22
    -20
      build-windows/generate_code.cmd
  2. +9
    -10
      build-windows/pEpEngine.vcxproj
  3. +15
    -6
      build-windows/pEpEngine.vcxproj.filters
  4. +2
    -1
      src/group.h

+ 22
- 20
build-windows/generate_code.cmd View File

@ -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


+ 9
- 10
build-windows/pEpEngine.vcxproj View File

@ -89,10 +89,8 @@
<Command>cargo build --manifest-path="$(SolutionDir)sequoia\Cargo.toml"</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>
xcopy "$(SolutionDir)sequoia\target\debug\sequoia_openpgp_ffi.dll" "$(TargetDir)" /Y
xcopy "$(SolutionDir)sequoia\target\debug\sq.exe" "$(TargetDir)" /Y
</Command>
<Command>xcopy "$(SolutionDir)sequoia\target\debug\sequoia_openpgp_ffi.dll" "$(TargetDir)" /Y</Command>
<Command>xcopy "$(SolutionDir)sequoia\target\debug\sq.exe" "$(TargetDir)" /Y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -124,22 +122,22 @@
<Command>cargo build --manifest-path="$(SolutionDir)sequoia\Cargo.toml" --release</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>
xcopy "$(SolutionDir)sequoia\target\release\sequoia_openpgp_ffi.dll" "$(TargetDir)" /Y
xcopy "$(SolutionDir)sequoia\target\release\sq.exe" "$(TargetDir)" /Y
</Command>
<Command>xcopy "$(SolutionDir)sequoia\target\release\sequoia_openpgp_ffi.dll" "$(TargetDir)" /Y</Command>
<Command>xcopy "$(SolutionDir)sequoia\target\release\sq.exe" "$(TargetDir)" /Y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\aux_mime_msg.c" />
<ClCompile Include="..\src\base64.c" />
<ClCompile Include="..\src\baseprotocol.c" />
<ClCompile Include="..\src\blacklist.c" />
<ClCompile Include="..\src\bloblist.c" />
<ClCompile Include="..\src\cryptotech.c" />
<ClCompile Include="..\src\distribution_codec.c" />
<ClCompile Include="..\src\email.c" />
<ClCompile Include="..\src\engine_sql.c" />
<ClCompile Include="..\src\etpan_mime.c" />
<ClCompile Include="..\src\group.c" />
<ClCompile Include="..\src\GroupSync_fsm.c" />
<ClCompile Include="..\src\growing_buf.c" />
<ClCompile Include="..\src\identity_list.c" />
<ClCompile Include="..\src\internal_format.c" />
@ -171,13 +169,13 @@
<ClCompile Include="..\src\timestamp.c" />
<ClCompile Include="..\src\transport.c" />
<ClCompile Include="..\src\trans_auto.c" />
<ClCompile Include="..\src\TrustSync_fsm.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\asn1_helper.h" />
<ClInclude Include="..\src\aux_mime_msg.h" />
<ClInclude Include="..\src\base64.h" />
<ClInclude Include="..\src\baseprotocol.h" />
<ClInclude Include="..\src\blacklist.h" />
<ClInclude Include="..\src\bloblist.h" />
<ClInclude Include="..\src\cryptotech.h" />
<ClInclude Include="..\src\distribution_codec.h" />
@ -185,6 +183,7 @@
<ClInclude Include="..\src\email.h" />
<ClInclude Include="..\src\etpan_mime.h" />
<ClInclude Include="..\src\fsm_common.h" />
<ClInclude Include="..\src\group.h" />
<ClInclude Include="..\src\growing_buf.h" />
<ClInclude Include="..\src\identity_list.h" />
<ClInclude Include="..\src\internal_format.h" />


+ 15
- 6
build-windows/pEpEngine.vcxproj.filters View File

@ -63,9 +63,6 @@
<ClCompile Include="..\src\mime.c">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="..\src\blacklist.c">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="..\src\map_asn1.c">
<Filter>Quelldateien</Filter>
</ClCompile>
@ -135,6 +132,18 @@
<ClCompile Include="..\src\security_checks.c">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="..\src\engine_sql.c">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="..\src\group.c">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="..\src\TrustSync_fsm.c">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="..\src\GroupSync_fsm.c">
<Filter>Quelldateien</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\keymanagement.h">
@ -200,9 +209,6 @@
<ClInclude Include="..\src\platform.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="..\src\blacklist.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="..\src\map_asn1.h">
<Filter>Headerdateien</Filter>
</ClInclude>
@ -293,6 +299,9 @@
<ClInclude Include="..\src\status_to_string.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="..\src\group.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="..\LICENSE.txt" />


+ 2
- 1
src/group.h View File

@ -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


Loading…
Cancel
Save