Skip to content

Commit

Permalink
Update nimp/base_commands/package.py
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Desveaux <[email protected]>
  • Loading branch information
phisko and tdesveaux authored Jan 24, 2024
1 parent d071ba6 commit 9f29193
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions nimp/base_commands/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,18 +372,16 @@ def _setup_default_config_file(config_file):
variant_configuration_directory = f'{project_directory}/Config/Variants/{env.variant}'
if not os.path.exists(variant_configuration_directory):
raise FileNotFoundError(f"Variant not found : {variant_configuration_directory}")
if env.unreal_version >= 5.3:
# necessary for shader debug info in case no defaultEngine is present
_setup_default_config_file(f'{variant_configuration_directory}/DefaultEngine.ini')
_setup_default_config_file(f'{variant_configuration_directory}/DefaultGame.ini')
Package.write_project_revisions(env, variant_configuration_directory)
else:
logging.info(f'configuring variant {env.variant} in : {active_configuration_directory}')
configuration_directory = variant_configuration_directory
if not env.unreal_version >= 5.3:
logging.info('configuring variant %s in : %s', env.variant, active_configuration_directory)
shutil.copytree(variant_configuration_directory, active_configuration_directory, copy_function=shutil.copyfile)
# necessary for shader debug info in case no defaultEngine is present
_setup_default_config_file(f'{active_configuration_directory}/DefaultEngine.ini')
_setup_default_config_file(f'{active_configuration_directory}/DefaultGame.ini')
Package.write_project_revisions(env, active_configuration_directory)
configuration_directory = active_configuration_directory

# necessary for shader debug info in case no defaultEngine is present
_setup_default_config_file(f'{configuration_directory}/DefaultEngine.ini')
_setup_default_config_file(f'{configuration_directory}/DefaultGame.ini')
Package.write_project_revisions(env, configuration_directory)
if env.unreal_platform == 'PS5':
# UE only supports a single TitleConfiguration.json describing builds of the same package.
# To have DLCs in their own packages, we need to select the variant's one by copying it
Expand Down

0 comments on commit 9f29193

Please sign in to comment.