Skip to content

Commit

Permalink
Merge pull request #16 from tekgator/dev
Browse files Browse the repository at this point in the history
v1.3.1
  • Loading branch information
tekgator authored Sep 11, 2022
2 parents 2275ea4 + 90277a2 commit 16ce16c
Show file tree
Hide file tree
Showing 28 changed files with 150 additions and 272 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
## [Unreleased]


## [1.3.1] - 2022-11-09
### Fixed
- Activate parallel processing of installed games for Battle.net and Rockstar Games

### Deleted
- Remove "ExecutablePath" from ILauncher interface
- Remove "ExecutablePath" from IGame interface

### Changed
- "Executable" on ILauncher interface returns the executable including the path
- "Executable" on IGame interface returns the executable including the path


## [1.3.0] - 2022-11-09
### Added
- Add Rockstar Games plugin for interacting with Rockstar Games launcher and games
Expand Down
5 changes: 0 additions & 5 deletions GameLib.Core/IGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public interface IGame
/// <summary>
/// Executable name including the full Path
/// </summary>
public string ExecutablePath { get; }

/// <summary>
/// Just the executable name
/// </summary>
public string Executable { get; }

/// <summary>
Expand Down
6 changes: 0 additions & 6 deletions GameLib.Core/ILauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ public interface ILauncher
/// The executable including the path of the Launcher<br/>
/// <see langword="string.Empty"/> if not (properly) installed
/// </summary>
public string ExecutablePath { get; }

/// <summary>
/// The executable name of the Launcher<br/>
/// <see langword="string.Empty"/> if not (properly) installed
/// </summary>
public string Executable { get; }

/// <summary>
Expand Down
5 changes: 1 addition & 4 deletions GameLib.Demo/GameLib.Demo.Wpf/ViewModels/GameViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public void RefreshGameIsRunning()
OnPropertyChanged(nameof(SelectedGame));
}


[RelayCommand]
public static void RunGame(IGame? game)
{
Expand All @@ -114,9 +113,8 @@ public static void RunGame(IGame? game)
Process.Start(new ProcessStartInfo()
{
UseShellExecute = true,
FileName = game.ExecutablePath,
FileName = game.Executable,
WorkingDirectory = game.WorkingDir

});
}
catch { /* ignore */ }
Expand Down Expand Up @@ -173,5 +171,4 @@ public static void CopyToClipboard(string? text)

Clipboard.SetText(text);
}

}
7 changes: 3 additions & 4 deletions GameLib.Demo/GameLib.Demo.Wpf/ViewModels/LauncherViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public partial class LauncherViewModel : ViewModelBase
[ObservableProperty]
private string _isRunningLogo = CrossImagePath;


public LauncherViewModel(LauncherManager launcherManager)
{
LoadData(launcherManager);
Expand Down Expand Up @@ -111,7 +110,7 @@ public static void RunLauncher(ILauncher? launcher)
Process.Start(new ProcessStartInfo()
{
UseShellExecute = true,
FileName = launcher.ExecutablePath
FileName = launcher.Executable
});
}
catch { /* ignore */ }
Expand All @@ -122,8 +121,8 @@ public static void OpenPath(ILauncher? launcher)
{
switch (launcher)
{
case not null when !string.IsNullOrEmpty(launcher.ExecutablePath):
Process.Start("explorer.exe", $"/select,\"{launcher.ExecutablePath}\"");
case not null when !string.IsNullOrEmpty(launcher.Executable):
Process.Start("explorer.exe", $"/select,\"{launcher.Executable}\"");
break;

case not null when !string.IsNullOrEmpty(launcher.InstallDir):
Expand Down
59 changes: 14 additions & 45 deletions GameLib.Demo/GameLib.Demo.Wpf/Views/GameView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,18 +389,18 @@
</StackPanel>
<!--#endregion-->

<!--#region Executable path-->
<!--#region Executable-->
<TextBlock
Grid.Row="13"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Executable path: " />
Text="Executable: " />
<TextBox
Grid.Row="13"
Grid.Column="2"
VerticalAlignment="Center"
Text="{Binding SelectedGame.ExecutablePath, Mode=OneWay}" />
Text="{Binding SelectedGame.Executable, Mode=OneWay}" />
<StackPanel
Grid.Row="13"
Grid.Column="4"
Expand All @@ -409,7 +409,7 @@
Orientation="Horizontal">
<Button
Command="{Binding CopyToClipboardCommand}"
CommandParameter="{Binding SelectedGame.ExecutablePath}"
CommandParameter="{Binding SelectedGame.Executable}"
ToolTip="Copy to clipboard">
<Image
Width="20"
Expand All @@ -420,7 +420,7 @@
<Button
Margin="5,0,0,0"
Command="{Binding OpenPathCommand}"
CommandParameter="{Binding SelectedGame.ExecutablePath}"
CommandParameter="{Binding SelectedGame.Executable}"
ToolTip="Open in explorer">
<Image
Width="20"
Expand All @@ -441,51 +441,20 @@
</StackPanel>
<!--#endregion-->

<!--#region Executable name-->
<TextBlock
Grid.Row="15"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Executable: " />
<TextBox
Grid.Row="15"
Grid.Column="2"
VerticalAlignment="Center"
Text="{Binding SelectedGame.Executable, Mode=OneWay}" />
<StackPanel
Grid.Row="15"
Grid.Column="4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
Command="{Binding CopyToClipboardCommand}"
CommandParameter="{Binding SelectedGame.Executable}"
ToolTip="Copy to clipboard">
<Image
Width="20"
Height="20"
Margin="2"
Source="/Resources/copy-white.png" />
</Button>
</StackPanel>
<!--#endregion-->

<!--#region Working directory-->
<TextBlock
Grid.Row="17"
Grid.Row="15"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Working directory: " />
<TextBox
Grid.Row="17"
Grid.Row="15"
Grid.Column="2"
VerticalAlignment="Center"
Text="{Binding SelectedGame.WorkingDir, Mode=OneWay}" />
<StackPanel
Grid.Row="17"
Grid.Row="15"
Grid.Column="4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Expand Down Expand Up @@ -516,18 +485,18 @@

<!--#region Launch string-->
<TextBlock
Grid.Row="19"
Grid.Row="17"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Launch string: " />
<TextBox
Grid.Row="19"
Grid.Row="17"
Grid.Column="2"
VerticalAlignment="Center"
Text="{Binding SelectedGame.LaunchString, Mode=OneWay}" />
<StackPanel
Grid.Row="19"
Grid.Row="17"
Grid.Column="4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Expand Down Expand Up @@ -557,22 +526,22 @@

<!--#region IsRunning-->
<TextBlock
Grid.Row="21"
Grid.Row="19"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Is running: " />

<Image
Grid.Row="21"
Grid.Row="19"
Grid.Column="2"
Width="24"
Height="24"
HorizontalAlignment="Left"
Source="{Binding IsRunningLogo}" />

<StackPanel
Grid.Row="21"
Grid.Row="19"
Grid.Column="4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Expand Down
66 changes: 19 additions & 47 deletions GameLib.Demo/GameLib.Demo.Wpf/Views/LauncherView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@
Background="#373737"
Command="{Binding CopyToClipboardCommand}"
CommandParameter="{Binding SelectedLauncher.InstallDir}"
ToolTip="Copy to clipboard">
ToolTip="Copy to clipboard"
Visibility="{Binding SelectedLauncher.IsInstalled, Converter={StaticResource BooleanToVisibilityConverter}}">
<Image
Width="20"
Height="20"
Expand All @@ -304,7 +305,8 @@
Background="#373737"
Command="{Binding OpenPathCommand}"
CommandParameter="{Binding SelectedLauncher}"
ToolTip="Open in explorer">
ToolTip="Open in explorer"
Visibility="{Binding SelectedLauncher.IsInstalled, Converter={StaticResource BooleanToVisibilityConverter}}">
<Image
Width="20"
Height="20"
Expand All @@ -314,18 +316,18 @@
</StackPanel>
<!--#endregion-->

<!--#region Executable path-->
<!--#region Executable-->
<TextBlock
Grid.Row="9"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Executable path: " />
Text="Executable: " />
<TextBox
Grid.Row="9"
Grid.Column="2"
VerticalAlignment="Center"
Text="{Binding SelectedLauncher.ExecutablePath, Mode=OneWay}" />
Text="{Binding SelectedLauncher.Executable, Mode=OneWay}" />
<StackPanel
Grid.Row="9"
Grid.Column="4"
Expand All @@ -335,8 +337,9 @@
<Button
Background="#373737"
Command="{Binding CopyToClipboardCommand}"
CommandParameter="{Binding SelectedLauncher.ExecutablePath}"
ToolTip="Copy to clipboard">
CommandParameter="{Binding SelectedLauncher.Executable}"
ToolTip="Copy to clipboard"
Visibility="{Binding SelectedLauncher.IsInstalled, Converter={StaticResource BooleanToVisibilityConverter}}">
<Image
Width="20"
Height="20"
Expand All @@ -359,47 +362,15 @@
</StackPanel>
<!--#endregion-->

<!--#region Executable-->
<TextBlock
Grid.Row="11"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Executable: " />
<TextBox
Grid.Row="11"
Grid.Column="2"
VerticalAlignment="Center"
Text="{Binding SelectedLauncher.Executable, Mode=OneWay}" />
<StackPanel
Grid.Row="11"
Grid.Column="4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
Background="#373737"
Command="{Binding CopyToClipboardCommand}"
CommandParameter="{Binding SelectedLauncher.Executable}"
ToolTip="Copy to clipboard">
<Image
Width="20"
Height="20"
Margin="2"
Source="/Resources/copy-white.png" />
</Button>
</StackPanel>
<!--#endregion-->

<!--#region IsInstalled-->
<TextBlock
Grid.Row="13"
Grid.Row="11"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Is installed: " />
<Image
Grid.Row="13"
Grid.Row="11"
Grid.Column="2"
Width="24"
Height="24"
Expand All @@ -409,28 +380,29 @@

<!--#region IsRunning-->
<TextBlock
Grid.Row="15"
Grid.Row="13"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Is running: " />
<Image
Grid.Row="15"
Grid.Row="13"
Grid.Column="2"
Width="24"
Height="24"
HorizontalAlignment="Left"
Source="{Binding IsRunningLogo}" />
<StackPanel
Grid.Row="15"
Grid.Row="13"
Grid.Column="4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
Background="#373737"
Command="{Binding RefreshLauncherIsRunningCommand}"
ToolTip="Refresh">
ToolTip="Refresh"
Visibility="{Binding SelectedLauncher.IsInstalled, Converter={StaticResource BooleanToVisibilityConverter}}">
<Image
Width="20"
Height="20"
Expand All @@ -442,13 +414,13 @@

<!--#region Installed games-->
<TextBlock
Grid.Row="17"
Grid.Row="15"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="Installed games: " />
<TextBlock
Grid.Row="17"
Grid.Row="15"
Grid.Column="2"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Expand Down
Loading

0 comments on commit 16ce16c

Please sign in to comment.