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

Auto-adjust LauncherPath in Duality solution template to match executable name #848

Closed
ilexp opened this issue Jun 18, 2020 · 3 comments · Fixed by #852
Closed

Auto-adjust LauncherPath in Duality solution template to match executable name #848

ilexp opened this issue Jun 18, 2020 · 3 comments · Fixed by #852
Labels
DevTool Area: Development tools and environment Task ToDo that's neither a Bug, nor a Feature Usability Related to API and UI usability
Milestone

Comments

@ilexp
Copy link
Member

ilexp commented Jun 18, 2020

Summary

As mentioned in this comment from PR #840, related to issue #847, the Duality solution template renames the launcher executable to match the project name. However, this leaves the editor without working run, debug and profile buttons. This should be fixed by providing an auto-adjusted EditorUserData.xml in the solution template.

Analysis

  • There already is an embedded default EditorUserData.xml in the editor executable. This should remain where it is, as it will jump in when users delete the file, or not add it to version control in the first place.
  • It can serve as a basis to copy-paste from when adding a default user data file to the solution template, with a LauncherPath item that can be auto-renamed by dotnet new. This would solve the issue.
    • However, this won't help in cases where editor user data isn't added to version control, which actually matches with recommendations, especially in team projects.
  • An alternative solution would be to allow the editor to locate the launcher itself.
    • The launcher path getter would probably be a good place to provide a fallback in case the current path doesn't exist or is otherwise invalid.
    • Search all .exe files in the project / working directory (non-recursive) and pick the first one that...
      • ...isn't the editor executable that is currently running.
      • ...is named after the project?
      • ...is a valid .NET Assembly?
      • ...references Duality.dll?
    • It should be avoided to actually load the assembly, since that might have unforeseen consequences.
@ilexp ilexp added Task ToDo that's neither a Bug, nor a Feature Usability Related to API and UI usability DevTool Area: Development tools and environment labels Jun 18, 2020
@ilexp ilexp added this to the 4.0 milestone Jun 18, 2020
@Barsonax
Copy link
Member

Barsonax commented Jun 18, 2020

We can also add a EditorAppData.xml that has to be added to source control and which can contain settings that are not only for the current user such as this path. We should avoid creating another works on my machine situation.

@ilexp
Copy link
Member Author

ilexp commented Jun 18, 2020

That would also be an option! And slightly increase scope of the issue, but we might have good use for that kind of data storage in the long run.

However, I'd propose to call it ProjectSettings.xml instead, as (in my head at least) it states its purpose more clearly and draws a useful parallel to what people know from Unity.

@Barsonax
Copy link
Member

That would also be an option! And slightly increase scope of the issue, but we might have good use for that kind of data storage in the long run.

Yeah but I think its worth it as like you said there are good use cases for that kind of data storage

However, I'd propose to call it ProjectSettings.xml instead, as (in my head at least) it states its purpose more clearly and draws a useful parallel to what people know from Unity.

Sounds good

@Barsonax Barsonax linked a pull request Jun 25, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevTool Area: Development tools and environment Task ToDo that's neither a Bug, nor a Feature Usability Related to API and UI usability
Development

Successfully merging a pull request may close this issue.

2 participants