Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
4ra1n committed Jan 16, 2024
1 parent a43e782 commit 0d28dc4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
14 changes: 0 additions & 14 deletions native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,3 @@ else ()
)

endif ()

execute_process(
COMMAND python main.py
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE result
OUTPUT_VARIABLE output
)

if(result EQUAL 0)
message("BUILD FINISH")
else()
message("BUILD ERROR")
endif()

7 changes: 6 additions & 1 deletion native/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ def copy_dll_files(source_dir, target_dir):
for file in files:
if file.endswith(".dll"):
source_path = os.path.join(root, file)
target_path = os.path.join(target_dir, file)
target_file = file
if not file.startswith("lib"):
target_file = "lib" + file
target_path = os.path.join(target_dir, target_file)
shutil.copy(source_path, target_path)
print(f"copy: {source_path} -> {target_path}")

Expand Down Expand Up @@ -38,11 +41,13 @@ def process_so_files(directory):

# DO NOT USE DEBUG
source_directory = "build-release"
c_source_directory = "cmake-build-release"

target_directory = "target"

if sys.platform.startswith('win'):
copy_dll_files(source_directory, target_directory)
copy_dll_files(c_source_directory, target_directory)
else:
copy_so_files(source_directory, target_directory)
process_so_files(target_directory)
Binary file modified src/main/resources/libdecrypter.dll
Binary file not shown.
Binary file modified src/main/resources/libencryptor.dll
Binary file not shown.

0 comments on commit 0d28dc4

Please sign in to comment.