-
Notifications
You must be signed in to change notification settings - Fork 9
Allow custom location for project drive data #299
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Enables specifying a custom location for the project drive by flowing workspace settings into the drive helper and updating path resolution logic.
- Propagate
WorkspaceSettingstoArma3ToolsHelperin both initialization and commit paths. - Update
CreateProjectDrivemethods to callGetProjectDrivePath(this)for custom base paths. - Extend
Arma3ToolsHelperto accept settings, read custom drive paths, and build process arguments dynamically.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| GameRealisticMap.Studio/Modules/Arma3Data/Arma3DataModule.cs | Set Arma3ToolsHelper.WorkspaceSettings = settings when committing and initializing settings. |
| GameRealisticMap.Arma3/IO/WorkspaceSettings.cs | Changed CreateProjectDrive and CreateProjectDriveStandalone to call GetProjectDrivePath(this). |
| GameRealisticMap.Arma3/Arma3ToolsHelper.cs | Added WorkspaceSettings property, overload of GetProjectDrivePath, and helper methods; refactored EnsureProjectDrive argument handling. |
Comments suppressed due to low confidence (3)
GameRealisticMap.Arma3/Arma3ToolsHelper.cs:33
- Process.Start does not have an overload that accepts a List for arguments; you should join the list into a single string (e.g.
string.Join(" ", args)) or useProcessStartInfoto pass the arguments correctly.
var processs = Process.Start(Path.Combine(path, @"WorkDrive\\WorkDrive.exe"), args);
GameRealisticMap.Arma3/Arma3ToolsHelper.cs:33
- [nitpick] The variable name
processshas an extra 's' and may cause confusion; consider renaming it toprocessorproc.
var processs = Process.Start(Path.Combine(path, @"WorkDrive\\WorkDrive.exe"), args);
GameRealisticMap.Arma3/Arma3ToolsHelper.cs:237
- New behavior in
GetProjectDrivePath,GetCustomProjectDriveMappedPath, andEnsureProjectDriveshould be covered by unit tests to ensure custom and default paths resolve as expected.
public static string GetProjectDrivePath(WorkspaceSettings? settings = null)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces support for specifying a custom base path for the project drive across the UI and core logic.
- Adds a TextBox in the settings view for users to input a custom project drive location
- Updates the settings view-model to apply the custom path asynchronously
- Extends the data module and helper classes to persist and use the custom path, plus new tests for project-drive resolution
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Arma3DataSettingsView.xaml | Added TextBox for custom location and reorganized PBO options |
| Arma3DataSettingsViewModel.cs | Switched to ISettingsEditorAsync, bound ProjectDriveBasePath |
| IArma3DataModule.cs | Introduced SetProjectDriveBasePath async and ProjectDriveBasePath |
| Arma3DataModule.cs | Implemented async setter, updated settings commit and reload |
| Arma3DataModuleMock.cs | Added interface members but currently throw NotImplementedException |
| WorkspaceSettings.cs | Updated CreateProjectDrive calls to use helper path resolution |
| Arma3ToolsHelper.cs | Added WorkspaceSettings store, custom path logic, and EnsureProjectDrive args |
| Arma3ToolsHelperTest.cs | New tests covering custom and default path resolution |
Comments suppressed due to low confidence (1)
GameRealisticMap.Arma3.Test/Arma3ToolsHelperTest.cs:1
- Consider adding a test for the scenario where a "P:" drive exists (Directory.Exists("P:")) to validate that built-in drive detection behaves correctly when both local and custom paths are available.
// new tests for GetProjectDrivePath
Tasks: