Browse Source

Add ExtraLaunchArguments to packages

pull/5/head
Ionite 1 year ago
parent
commit
4bf50870f3
No known key found for this signature in database
  1. 2
      StabilityMatrix/Models/Packages/BasePackage.cs
  2. 2
      StabilityMatrix/Models/Packages/VladAutomatic.cs
  3. 2
      StabilityMatrix/ViewModels/LaunchViewModel.cs

2
StabilityMatrix/Models/Packages/BasePackage.cs

@ -23,6 +23,8 @@ public abstract class BasePackage
public abstract Task<IEnumerable<GithubRelease>> GetReleaseTags();
public abstract List<LaunchOptionDefinition> LaunchOptions { get; }
public virtual string? ExtraLaunchArguments { get; set; } = null;
public abstract Task<string> GetLatestVersion();
public abstract Task<IEnumerable<PackageVersion>> GetAllVersions(bool isReleaseMode = true);
public abstract Task<IEnumerable<GithubCommit>> GetAllCommits(string branch, int page = 1, int perPage = 10);

2
StabilityMatrix/Models/Packages/VladAutomatic.cs

@ -41,6 +41,8 @@ public class VladAutomatic : BaseGitPackage
}
};
public override string ExtraLaunchArguments => "--skip-git";
public override Task<string> GetLatestVersion() => Task.FromResult("master");
public override async Task<IEnumerable<PackageVersion>> GetAllVersions(bool isReleaseMode = true)

2
StabilityMatrix/ViewModels/LaunchViewModel.cs

@ -118,6 +118,8 @@ public partial class LaunchViewModel : ObservableObject
// Load user launch args from settings and convert to string
var userArgs = settingsManager.GetLaunchArgs(SelectedPackage.Id);
var userArgsString = string.Join(" ", userArgs.Select(opt => opt.ToArgString()));
// Join with extras, if any
userArgsString = string.Join(" ", userArgsString, basePackage.ExtraLaunchArguments);
await basePackage.RunPackage(packagePath, userArgsString);
runningPackage = basePackage;
SetProcessRunning(true);

Loading…
Cancel
Save