Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package: use CustomConfig instead of DNEConfigVariant #95

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

phisko
Copy link
Contributor

@phisko phisko commented Jan 9, 2024

No description provided.

@@ -224,7 +224,10 @@ def run(self, env):


if env.variant:
variant_configuration_directory = package_configuration.configuration_directory + '/Variants/Active'
if env.unreal_version >= 5.3:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of duplication this check, we could have a bool with a clear name?
Something like has_ue_custom_config = env.unreal_version >= 5.3?

So if we postpone this to 5.4 or under some other condition, we can simply change one line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 2c55941

nimp/base_commands/package.py Outdated Show resolved Hide resolved
nimp/base_commands/package.py Outdated Show resolved Hide resolved
if env.variant:
cook_command += [ f'-CustomConfig={env.variant}' ]
else:
cook_command += [ '-DNEConfigVariant' ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the if env.variant should be applied here as well? @jasugun thoughts ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag loads the active variant folder in any case.
Since we're using nimp it's always properly setup (there should be nothing if not --variant has been passed).

Copy link
Contributor

@jasugun jasugun Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I guess it doesn't hurt to add the if env.variant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 2c55941

# 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)
Copy link
Contributor

@jasugun jasugun Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the DneVariant flow:

  • We copy the variant to an avtive variant folder, that will get all the edits in write_project_revisions
  • This works because the active variant folder is not perforced in any case.

In the CustomConfig flow:

  • We're working with a perfoced custom folder right? In this case I think the edits won't work out of the box (it might have worked because you tested stuff in your monorepo with no files locked by perforce).
  • You might want it peforce edit/revert wrap the file in that case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we'd have the custom config folders on Perforce. I was thinking we'd have them on Git, like we do for variants currently

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package are create Perforce side, after a sync from Git to Perforce, so the context of this command is a Perforce client

Package.write_project_revisions(env, active_configuration_directory)
_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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the DNEVariant workflow, we're editing an active folder that's not perforced.
The CustomConfig folder will be perforced I think, so we'll need to perfroce edit/revert wrap before editing in this case.

More generally, beware that we're not editing something from the CustomConfig folder somewhere else in the packaging code without the perforce wrap.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate of #95 (comment)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants