diff options
author | Sven Gothel <[email protected]> | 2022-06-02 18:09:55 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-06-02 18:09:55 +0200 |
commit | 0f28a5a22ca97ee3af23f7df4626a38597437aea (patch) | |
tree | a7c51d0277cd59454b2425f6d293c215cd9f83bb /java_fat | |
parent | 3ca93c844e03b89ef45dd7eaff0bf969e66563ad (diff) |
Java Binding 1/2 (Build clean, WIP) and minor alignments
Minor alignments
- Drop PacketInfo, return PackedHeader
- Type int -> string: payload_version, payload_version_parent
Diffstat (limited to 'java_fat')
-rw-r--r-- | java_fat/CMakeLists.txt | 66 | ||||
-rw-r--r-- | java_fat/manifest-fat.txt.in | 40 |
2 files changed, 106 insertions, 0 deletions
diff --git a/java_fat/CMakeLists.txt b/java_fat/CMakeLists.txt new file mode 100644 index 0000000..6647561 --- /dev/null +++ b/java_fat/CMakeLists.txt @@ -0,0 +1,66 @@ +# java/CMakeLists.txt + +# COMMAND ${CMAKE_COMMAND} +# -DOS_AND_ARCH=${OS_AND_ARCH} +# -Dos_and_arch_slash=${os_and_arch_slash} +# -Dos_and_arch_dot=${os_and_arch_dot} +# -D_jarfile=${CMAKE_CURRENT_BINARY_DIR}/jaulib_jni-natives-${OS_AND_ARCH}.jar +# -D_workdir=${CMAKE_CURRENT_BINARY_DIR} +# -D_module=jni +# -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/MakeNativeJar.cmake + +# set(cipherpack_jar_file ${CMAKE_CURRENT_BINARY_DIR}/cipherpack.jar CACHE FILEPATH "cipherpack jar file" FORCE) +set(cipherpack_fat_jar_file ${CMAKE_CURRENT_BINARY_DIR}/cipherpack-fat.jar CACHE FILEPATH "cipherpack fat jar file" FORCE) +set(cipherpack_java_src_file ${CMAKE_CURRENT_BINARY_DIR}/cipherpack-java-src.zip CACHE FILEPATH "cipherpack java source file" FORCE) + +add_custom_command (OUTPUT ${cipherpack_fat_jar_file} ${cipherpack_java_src_file} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} + -D_srcdir=${CMAKE_CURRENT_BINARY_DIR}/../src/cipherpack + -D_dstdir=${CMAKE_CURRENT_BINARY_DIR}/natives/${OS_AND_ARCH} + -D_srcbasename=${CMAKE_SHARED_LIBRARY_PREFIX}cipherpack${CMAKE_SHARED_LIBRARY_SUFFIX}.${cipherpack_VERSION_SHORT} + -D_dstbasename=${CMAKE_SHARED_LIBRARY_PREFIX}cipherpack${CMAKE_SHARED_LIBRARY_SUFFIX} + -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/FileCopyS2D.cmake + COMMAND ${CMAKE_COMMAND} + -D_srcdir=${CMAKE_CURRENT_BINARY_DIR}/../java/jni/cipherpack + -D_dstdir=${CMAKE_CURRENT_BINARY_DIR}/natives/${OS_AND_ARCH} + -D_srcbasename=${CMAKE_SHARED_LIBRARY_PREFIX}javacipherpack${CMAKE_SHARED_LIBRARY_SUFFIX}.${cipherpack_VERSION_SHORT} + -D_dstbasename=${CMAKE_SHARED_LIBRARY_PREFIX}javacipherpack${CMAKE_SHARED_LIBRARY_SUFFIX} + -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/FileCopyS2D.cmake + COMMAND ${CMAKE_COMMAND} + -D _dstdir:PATH='${CMAKE_CURRENT_BINARY_DIR}/temp' + -D _archives:FILEPATH="${jaulib_fat_jar_file}" + -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/ExtractArchiveList.cmake + + COMMAND ${CMAKE_COMMAND} + -D_srcdir=${CMAKE_CURRENT_BINARY_DIR}/../java/${CMAKE_FILES_DIRECTORY}/cipherpack_jar.dir/org + -D_dstdir=${CMAKE_CURRENT_BINARY_DIR}/temp + -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/DirCopy.cmake + + COMMAND ${JAR} + --create --file ${cipherpack_fat_jar_file} + --manifest ${CMAKE_CURRENT_BINARY_DIR}/manifest-fat.txt + -C ${CMAKE_CURRENT_BINARY_DIR}/temp/ jau + -C ${CMAKE_CURRENT_BINARY_DIR}/temp/ org + -C ${CMAKE_CURRENT_BINARY_DIR}/temp/ natives + -C ${CMAKE_CURRENT_BINARY_DIR}/ natives + + COMMAND ${JAR} + --create --file ${cipherpack_java_src_file} + --no-manifest + -C ${PROJECT_SOURCE_DIR}/java org + -C ${PROJECT_SOURCE_DIR}/jaulib/java_base org/jau/util/BasicTypes.java + DEPENDS jaulib_fat_jar cipherpack cipherpack_jar javacipherpack + COMMENT "producing cipherpack [fat] jar files and its java source zip" + VERBATIM + ) + +add_custom_target (cipherpack_fat_jar ALL + DEPENDS ${cipherpack_fat_jar_file} ${cipherpack_java_src_file} + ) + +add_dependencies(cipherpack_fat_jar jaulib_fat_jar cipherpack cipherpack_jar javacipherpack) + +install (FILES ${cipherpack_fat_jar_file} ${cipherpack_java_src_file} DESTINATION ${CMAKE_INSTALL_LIBDIR}/../lib/java) + + diff --git a/java_fat/manifest-fat.txt.in b/java_fat/manifest-fat.txt.in new file mode 100644 index 0000000..c021e9b --- /dev/null +++ b/java_fat/manifest-fat.txt.in @@ -0,0 +1,40 @@ +Manifest-Version: 1.0 +Bundle-Date: @BUILD_TSTAMP@ +Bundle-ManifestVersion: 2 +Bundle-Name: org.cipherpack +Bundle-SymbolicName: org.cipherpack +Bundle-Version: @cipherpack_VERSION_SHORT@ +Export-Package: org.cipherpack +Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.9))" +Package-Title: org.cipherpack +Package-Vendor: Gothel Software +Package-Version: @cipherpack_VERSION_SHORT@ +Specification-Title: Cipherpack Jaulib Fat +Specification-Vendor: Gothel Software +Specification-Version: @cipherpack_VERSION_API@ +Implementation-Title: Cipherpack Jaulib Fat +Implementation-Vendor: Gothel Software +Implementation-Version: @cipherpack_VERSION_LONG@ +Implementation-Commit: @cipherpack_VERSION_SHA1@ +Implementation-URL: http://www.jausoft.com/ +Extension-Name: org.cipherpack +Trusted-Library: true +Permissions: all-permissions +Application-Library-Allowable-Codebase: * +Main-Class: org.cipherpack.BTFactory + +Name: org/jau +Sealed: true + +Name: jau/util +Sealed: true + +Name: jau/sys +Sealed: true + +Name: jau/pkg +Sealed: true + +Name: org/cipherpack/ +Sealed: true + |