Skip to content

Commit

Permalink
Update build.py
Browse files Browse the repository at this point in the history
  • Loading branch information
UE4SS authored Oct 15, 2023
1 parent b382065 commit 4347383
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions tools/buildscripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,31 @@ def package_release(is_dev_release: bool):
main_zip_name = f'UE4SS_{version}'
staging_dir = staging_release

bin_dir = 'Output/ue4ss/bin'
ue4ss_dll_path = ''
ue4ss_pdb_path = ''
xinput1_3_dll_path = ''

scan_start_dir = '.'
if str(args.d) != 'None':
scan_start_dir = str(args.d)

for root, dirs, files in os.walk(scan_start_dir):
for file in files:
if file.lower() == "ue4ss.dll":
ue4ss_dll_path = os.path.join(root, file)
if file.lower() == "ue4ss.pdb":
ue4ss_pdb_path = os.path.join(root, file)
if file.lower() == "xinput1_3.dll":
xinput1_3_dll_path = os.path.join(root, file)

# main dll
shutil.copy(os.path.join(bin_dir, 'ue4ss.dll'), staging_dir)
shutil.copy(ue4ss_dll_path, staging_dir)

# proxy
shutil.copy(os.path.join(bin_dir, 'xinput1_3.dll'), staging_dir)
shutil.copy(xinput1_3_dll_path, staging_dir)

if is_dev_release:
shutil.copy(os.path.join(bin_dir, 'ue4ss.pdb'), staging_dir)
shutil.copy(ue4ss_pdb_path, staging_dir)
if os.path.exists(os.path.join(staging_dir, 'docs')):
shutil.copytree('docs', os.path.join(staging_dir, 'docs'))

Expand Down Expand Up @@ -198,6 +213,7 @@ def package_release(is_dev_release: bool):
subparsers = parser.add_subparsers(dest='command', required=True)
package_parser = subparsers.add_parser('package')
package_parser.add_argument('-e', action='store_true')
package_parser.add_argument('-d', action='store')
release_commit_parser = subparsers.add_parser('release_commit')
release_commit_parser.add_argument('username', nargs='?')
args = parser.parse_args()
Expand Down

0 comments on commit 4347383

Please sign in to comment.