File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ import os .path
2
+ import subprocess
3
+
4
+ from script_config import BuildConfig
5
+
6
+
7
+ def run (config : BuildConfig ):
8
+ header_directories = [
9
+ os .path .join (config .LDK_C_BINDINGS_DIRECTORY , 'include' ),
10
+ os .path .join (config .LDK_C_BINDINGS_BASE , 'ldk-net' ),
11
+ ]
12
+
13
+ header_destination_directory = os .path .realpath (os .path .join (os .path .dirname (__file__ ), '../../xcode/LDKFramework/headers' ))
14
+ os .makedirs (header_destination_directory , exist_ok = True )
15
+
16
+ for current_directory in header_directories :
17
+ for current_file in os .listdir (current_directory ):
18
+
19
+ is_relevant_file = current_file .endswith ('.h' ) or current_file .endswith ('.c' )
20
+ if not is_relevant_file :
21
+ continue
22
+
23
+ current_path = os .path .join (current_directory , current_file )
24
+ if not os .path .isfile (current_path ):
25
+ continue
26
+
27
+ subprocess .check_call (['cp' , current_path , header_destination_directory ])
28
+
29
+
30
+ if __name__ == '__main__' :
31
+ config = BuildConfig .parse (allow_ldk_argument = True )
32
+ run (config )
You can’t perform that action at this time.
0 commit comments