@@ -162,7 +162,7 @@ def wix_component(elem, path, identifier=None):
162162 if os .path .isdir (fullpath ):
163163 continue
164164 source = fullpath .replace (repo_root , "$(var.ProjectDir)\\ ..\\ ..\\ .." )
165- file_elem = make_file_elem (component , file_identifier (fullpath ), source )
165+ make_file_elem (component , file_identifier (fullpath ), source )
166166
167167"""
168168Recursively generates a flat, unnested list of Component elements
@@ -196,6 +196,7 @@ def wix_components(elem, paths, include_subdirs=True):
196196stage_root = os .path .join (build_root , "Releasex64" , "stage" )
197197include_root = os .path .join (stage_root , "include" )
198198lib_root = os .path .join (stage_root , "lib" )
199+ license_root = os .path .join (stage_root , "licenses" )
199200
200201# -----
201202# ----- Directory tree Fragment.
@@ -214,6 +215,7 @@ def wix_components(elem, paths, include_subdirs=True):
214215wix_directory (branch_sdk_install_folder , include_root )
215216
216217lib_folder = make_directory_elem (branch_sdk_install_folder , "LIBFOLDER" , "lib" )
218+ license_folder = make_directory_elem (branch_sdk_install_folder , "LICENSEFOLDER" , "licenses" )
217219x64_lib_folder = make_directory_elem (lib_folder , "X64LIBFOLDER" , "x64" )
218220x86_lib_folder = make_directory_elem (lib_folder , "X86LIBFOLDER" , "x86" )
219221make_directory_elem (x64_lib_folder , "X64DEBUGLIBFOLDER" , "Debug" )
@@ -228,6 +230,9 @@ def wix_components(elem, paths, include_subdirs=True):
228230
229231cg_fragment = SubElement (root , "Fragment" )
230232branch_headers = SubElement (cg_fragment , "ComponentGroup" , {"Id" : "BranchHeaders" })
233+ branch_license = make_component_elem (branch_headers , "BranchLicense" , "LICENSEFOLDER" )
234+ make_file_elem (branch_license , "BranchLicense" , "$(var.ProjectDir)\\ ..\\ ..\\ ..\\ LICENSE" , "LICENSE.txt" )
235+
231236third_party_headers = SubElement (cg_fragment , "ComponentGroup" , {"Id" : "ThirdPartyHeaders" })
232237branch_libraries_x64 = SubElement (cg_fragment , "ComponentGroup" , {"Id" : "BranchLibrariesX64" })
233238third_party_libraries_x64 = SubElement (cg_fragment , "ComponentGroup" , {"Id" : "ThirdPartyLibrariesX64" })
@@ -240,6 +245,10 @@ def wix_components(elem, paths, include_subdirs=True):
240245wix_components (third_party_headers , [os .path .join (include_root , p ) for p in ["Poco" , "openssl" ]])
241246# zlib headers are directly in the include_root. Don't include subdirs.
242247wix_components (third_party_headers , include_root , False )
248+ third_party_licenses = make_component_elem (third_party_headers , "ThirdPartyLicenses" , "LICENSEFOLDER" )
249+ make_file_elem (third_party_licenses , "PocoLicense" , os .path .join (license_root , "LICENSE-Poco.txt" ))
250+ make_file_elem (third_party_licenses , "OpenSSLLicense" , os .path .join (license_root , "LICENSE-OpenSSL.txt" ))
251+ make_file_elem (third_party_licenses , "ZlibLicense" , os .path .join (license_root , "LICENSE-zlib.txt" ))
243252
244253# The BranchIO.lib sits in the same lib folder with the third-party libs. This
245254# is as it should be, to avoid making devs pass multiple library paths at
0 commit comments