Browse Source
Reviewed-on: https://gitea.pep.foundation/pEp.foundation/pEpJNIAdapter/pulls/14JNI-172

7 changed files with 275 additions and 1 deletions
@ -0,0 +1,52 @@ |
|||
SET current_directory=%~dp0 |
|||
SET dist_directory=%current_directory:~0,-15%\dist |
|||
SET build_directory=%current_directory:~0,-15%\build |
|||
SET marker_dir=%build_directory%\marker |
|||
SET exceptions_directory=%current_directory:~0,-15%\src\java\foundation\pEp\jniadapter\exceptions |
|||
SET java_build_root=%build_directory%\java |
|||
SET java_pkg_basename=foundation\pEp\jniadapter |
|||
|
|||
:: Create directories as necessary |
|||
MKDIR %marker_dir% |
|||
MKDIR %exceptions_directory% |
|||
|
|||
:: Generate Status files |
|||
SH ..\utils\gen_status_codes.sh ..\..\pEp\pEpEngine.h |
|||
MV passphrase_status_list.yml2 ..\src\codegen\ |
|||
MV status_list.yml2 ..\src\codegen\ |
|||
|
|||
:: Generate YML2 code |
|||
PUSHD .. |
|||
CD src |
|||
CD codegen |
|||
|
|||
PY -m yml2.yml2proc -E utf-8 -y gen_java_Engine.ysl2 pEp.yml2 |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
PY -m yml2.yml2proc -E utf-8 -y gen_java_Message.ysl2 pEp.yml2 |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
PY -m yml2.yml2proc -E utf-8 -y gen_cpp_Engine.ysl2 pEp.yml2 |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
PY -m yml2.yml2proc -E utf-8 -y gen_cpp_Message.ysl2 pEp.yml2 |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
PY -m yml2.yml2proc -E utf-8 -y gen_throw_pEp_exception.ysl2 pEp.yml2 |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
|
|||
:: Compile the Java part |
|||
CD .. |
|||
CD java |
|||
|
|||
javac -encoding UTF-8 -d "%java_build_root%" -h ..\cxx %java_pkg_basename%\*.java |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
javac -encoding UTF-8 -d "%java_build_root%" %java_pkg_basename%\*.java |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
javac -encoding UTF-8 -d "%java_build_root%" %java_pkg_basename%\exceptions\*.java |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
javac -encoding UTF-8 -d "%java_build_root%" %java_pkg_basename%\interfaces\*.java |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
|
|||
"C:\Program Files\Java\jdk-16\bin\jar" -cvf "%java_build_root%\pEp.jar" -C "%java_build_root%" foundation |
|||
IF %ERRORLEVEL% NEQ 0 GOTO end |
|||
|
|||
:end |
|||
POPD |
|||
EXIT /B %ERRORLEVEL% |
@ -0,0 +1,139 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<ItemGroup Label="ProjectConfigurations"> |
|||
<ProjectConfiguration Include="Debug|Win32"> |
|||
<Configuration>Debug</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="Release|Win32"> |
|||
<Configuration>Release</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ClCompile Include="..\src\cxx\basic_api.cc" /> |
|||
<ClCompile Include="..\src\cxx\foundation_pEp_jniadapter_AbstractEngine.cc" /> |
|||
<ClCompile Include="..\src\cxx\foundation_pEp_jniadapter_Engine.cc" /> |
|||
<ClCompile Include="..\src\cxx\foundation_pEp_jniadapter_Message.cc" /> |
|||
<ClCompile Include="..\src\cxx\foundation_pEp_jniadapter__Blob.cc" /> |
|||
<ClCompile Include="..\src\cxx\get_header.cc" /> |
|||
<ClCompile Include="..\src\cxx\identity_api.cc" /> |
|||
<ClCompile Include="..\src\cxx\jniutils.cc" /> |
|||
<ClCompile Include="..\src\cxx\throw_pEp_exception.cc" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter_AbstractEngine.h" /> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter_Engine.h" /> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter_Identity.h" /> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter_Message.h" /> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter__Blob.h" /> |
|||
<ClInclude Include="..\src\cxx\jniutils.hh" /> |
|||
<ClInclude Include="..\src\cxx\passphrase_callback.hh" /> |
|||
<ClInclude Include="..\src\cxx\passphrase_callback.hxx" /> |
|||
<ClInclude Include="..\src\cxx\throw_pEp_exception.hh" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\libpEpAdapter\build-windows\libpEpAdapter.vcxproj"> |
|||
<Project>{ec44fec9-2f3a-4a0c-b60e-0f22aa43ef58}</Project> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\..\pEpEngine\build-windows\pEpEngine.vcxproj"> |
|||
<Project>{146e69f8-e1da-456a-b048-6dd29d9acf6b}</Project> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<PropertyGroup Label="Globals"> |
|||
<VCProjectVersion>16.0</VCProjectVersion> |
|||
<Keyword>Win32Proj</Keyword> |
|||
<ProjectGuid>{2a1167be-f438-4e08-b32e-25f130d97c33}</ProjectGuid> |
|||
<RootNamespace>pEpJNIAdapter</RootNamespace> |
|||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> |
|||
</PropertyGroup> |
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
|||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|||
<UseDebugLibraries>true</UseDebugLibraries> |
|||
<PlatformToolset>v142</PlatformToolset> |
|||
<CharacterSet>Unicode</CharacterSet> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
|||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|||
<UseDebugLibraries>false</UseDebugLibraries> |
|||
<PlatformToolset>v142</PlatformToolset> |
|||
<WholeProgramOptimization>true</WholeProgramOptimization> |
|||
<CharacterSet>Unicode</CharacterSet> |
|||
</PropertyGroup> |
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
|||
<ImportGroup Label="ExtensionSettings"> |
|||
</ImportGroup> |
|||
<ImportGroup Label="Shared"> |
|||
</ImportGroup> |
|||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|||
</ImportGroup> |
|||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|||
</ImportGroup> |
|||
<PropertyGroup Label="UserMacros" /> |
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|||
<LinkIncremental>true</LinkIncremental> |
|||
<LibraryPath>$(ProjectDir)..\..\pEpForWindowsAdapterSolution\Debug\;$(LibraryPath)</LibraryPath> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|||
<LinkIncremental>false</LinkIncremental> |
|||
</PropertyGroup> |
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|||
<ClCompile> |
|||
<WarningLevel>Level3</WarningLevel> |
|||
<SDLCheck>true</SDLCheck> |
|||
<PreprocessorDefinitions>__LP64__;WIN32;_DEBUG;PEPJNIADAPTER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|||
<ConformanceMode>true</ConformanceMode> |
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|||
<PrecompiledHeaderFile> |
|||
</PrecompiledHeaderFile> |
|||
<AdditionalIncludeDirectories>C:\Program Files\Java\jdk-16\include\win32;C:\Program Files\Java\jdk-16\include;$(ProjectDir)..\..\</AdditionalIncludeDirectories> |
|||
</ClCompile> |
|||
<Link> |
|||
<SubSystem>Windows</SubSystem> |
|||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|||
<EnableUAC>false</EnableUAC> |
|||
</Link> |
|||
<PreBuildEvent> |
|||
<Command>IF NOT EXIST "..\build" CALL generate_code.cmd</Command> |
|||
</PreBuildEvent> |
|||
<PostBuildEvent> |
|||
<Command>CP "..\build\java\pEp.jar" "$(SolutionDir)\$(Configuration)"</Command> |
|||
</PostBuildEvent> |
|||
</ItemDefinitionGroup> |
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|||
<ClCompile> |
|||
<WarningLevel>Level3</WarningLevel> |
|||
<FunctionLevelLinking>true</FunctionLevelLinking> |
|||
<IntrinsicFunctions>true</IntrinsicFunctions> |
|||
<SDLCheck>true</SDLCheck> |
|||
<PreprocessorDefinitions>__LP64__;WIN32;NDEBUG;PEPJNIADAPTER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|||
<ConformanceMode>true</ConformanceMode> |
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|||
<PrecompiledHeaderFile> |
|||
</PrecompiledHeaderFile> |
|||
<AdditionalIncludeDirectories>C:\Program Files\Java\jdk-16\include\win32;C:\Program Files\Java\jdk-16\include;$(ProjectDir)..\..\</AdditionalIncludeDirectories> |
|||
</ClCompile> |
|||
<Link> |
|||
<SubSystem>Windows</SubSystem> |
|||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
|||
<OptimizeReferences>true</OptimizeReferences> |
|||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|||
<EnableUAC>false</EnableUAC> |
|||
</Link> |
|||
<PreBuildEvent> |
|||
<Command>IF NOT EXIST "..\build" CALL generate_code.cmd</Command> |
|||
</PreBuildEvent> |
|||
<PostBuildEvent> |
|||
<Command>CP "..\build\java\pEp.jar" "$(SolutionDir)\$(Configuration)"</Command> |
|||
</PostBuildEvent> |
|||
</ItemDefinitionGroup> |
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
|||
<ImportGroup Label="ExtensionTargets"> |
|||
</ImportGroup> |
|||
<Target Name="CustomClean" BeforeTargets="Clean"> |
|||
<RemoveDir Directories="..\build" /> |
|||
</Target> |
|||
</Project> |
@ -0,0 +1,75 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<ItemGroup> |
|||
<Filter Include="Source Files"> |
|||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> |
|||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions> |
|||
</Filter> |
|||
<Filter Include="Header Files"> |
|||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> |
|||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions> |
|||
</Filter> |
|||
<Filter Include="Resource Files"> |
|||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> |
|||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> |
|||
</Filter> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ClCompile Include="..\src\cxx\basic_api.cc"> |
|||
<Filter>Source Files</Filter> |
|||
</ClCompile> |
|||
<ClCompile Include="..\src\cxx\foundation_pEp_jniadapter__Blob.cc"> |
|||
<Filter>Source Files</Filter> |
|||
</ClCompile> |
|||
<ClCompile Include="..\src\cxx\foundation_pEp_jniadapter_AbstractEngine.cc"> |
|||
<Filter>Source Files</Filter> |
|||
</ClCompile> |
|||
<ClCompile Include="..\src\cxx\foundation_pEp_jniadapter_Engine.cc"> |
|||
<Filter>Source Files</Filter> |
|||
</ClCompile> |
|||
<ClCompile Include="..\src\cxx\foundation_pEp_jniadapter_Message.cc"> |
|||
<Filter>Source Files</Filter> |
|||
</ClCompile> |
|||
<ClCompile Include="..\src\cxx\get_header.cc"> |
|||
<Filter>Source Files</Filter> |
|||
</ClCompile> |
|||
<ClCompile Include="..\src\cxx\identity_api.cc"> |
|||
<Filter>Source Files</Filter> |
|||
</ClCompile> |
|||
<ClCompile Include="..\src\cxx\jniutils.cc"> |
|||
<Filter>Source Files</Filter> |
|||
</ClCompile> |
|||
<ClCompile Include="..\src\cxx\throw_pEp_exception.cc"> |
|||
<Filter>Source Files</Filter> |
|||
</ClCompile> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ClInclude Include="..\src\cxx\jniutils.hh"> |
|||
<Filter>Header Files</Filter> |
|||
</ClInclude> |
|||
<ClInclude Include="..\src\cxx\passphrase_callback.hh"> |
|||
<Filter>Header Files</Filter> |
|||
</ClInclude> |
|||
<ClInclude Include="..\src\cxx\passphrase_callback.hxx"> |
|||
<Filter>Header Files</Filter> |
|||
</ClInclude> |
|||
<ClInclude Include="..\src\cxx\throw_pEp_exception.hh"> |
|||
<Filter>Header Files</Filter> |
|||
</ClInclude> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter__Blob.h"> |
|||
<Filter>Header Files</Filter> |
|||
</ClInclude> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter_AbstractEngine.h"> |
|||
<Filter>Header Files</Filter> |
|||
</ClInclude> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter_Engine.h"> |
|||
<Filter>Header Files</Filter> |
|||
</ClInclude> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter_Identity.h"> |
|||
<Filter>Header Files</Filter> |
|||
</ClInclude> |
|||
<ClInclude Include="..\src\cxx\foundation_pEp_jniadapter_Message.h"> |
|||
<Filter>Header Files</Filter> |
|||
</ClInclude> |
|||
</ItemGroup> |
|||
</Project> |
Loading…
Reference in new issue