Skip to content

Conversation

@jetelain
Copy link
Owner

@jetelain jetelain commented May 17, 2025

Tasks:

  • Use custom location to mount the project drive
  • Use custom location for all core logic
  • Add user interface to set the location

@jetelain jetelain self-assigned this May 17, 2025
@jetelain jetelain requested a review from Copilot May 17, 2025 07:50
Copy link
Contributor

Copilot AI left a 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 WorkspaceSettings to Arma3ToolsHelper in both initialization and commit paths.
  • Update CreateProjectDrive methods to call GetProjectDrivePath(this) for custom base paths.
  • Extend Arma3ToolsHelper to 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 use ProcessStartInfo to pass the arguments correctly.
var processs = Process.Start(Path.Combine(path, @"WorkDrive\\WorkDrive.exe"), args);

GameRealisticMap.Arma3/Arma3ToolsHelper.cs:33

  • [nitpick] The variable name processs has an extra 's' and may cause confusion; consider renaming it to process or proc.
var processs = Process.Start(Path.Combine(path, @"WorkDrive\\WorkDrive.exe"), args);

GameRealisticMap.Arma3/Arma3ToolsHelper.cs:237

  • New behavior in GetProjectDrivePath, GetCustomProjectDriveMappedPath, and EnsureProjectDrive should be covered by unit tests to ensure custom and default paths resolve as expected.
public static string GetProjectDrivePath(WorkspaceSettings? settings = null)

@jetelain jetelain added enhancement New feature or request GRM Studio User Interface GRM Arma3 Arma 3 specific generator labels May 17, 2025
@jetelain jetelain requested a review from Copilot May 17, 2025 09:17
Copy link
Contributor

Copilot AI left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request GRM Arma3 Arma 3 specific generator GRM Studio User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

despite using setup with arma3tools; the microsoft build failed to register the changes and thus threw this error.

2 participants