Skip to content

Commit 16ce16c

Browse files
authored
Merge pull request #16 from tekgator/dev
v1.3.1
2 parents 2275ea4 + 90277a2 commit 16ce16c

File tree

28 files changed

+150
-272
lines changed

28 files changed

+150
-272
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
44
## [Unreleased]
55

66

7+
## [1.3.1] - 2022-11-09
8+
### Fixed
9+
- Activate parallel processing of installed games for Battle.net and Rockstar Games
10+
11+
### Deleted
12+
- Remove "ExecutablePath" from ILauncher interface
13+
- Remove "ExecutablePath" from IGame interface
14+
15+
### Changed
16+
- "Executable" on ILauncher interface returns the executable including the path
17+
- "Executable" on IGame interface returns the executable including the path
18+
19+
720
## [1.3.0] - 2022-11-09
821
### Added
922
- Add Rockstar Games plugin for interacting with Rockstar Games launcher and games

GameLib.Core/IGame.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ public interface IGame
2727
/// <summary>
2828
/// Executable name including the full Path
2929
/// </summary>
30-
public string ExecutablePath { get; }
31-
32-
/// <summary>
33-
/// Just the executable name
34-
/// </summary>
3530
public string Executable { get; }
3631

3732
/// <summary>

GameLib.Core/ILauncher.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ public interface ILauncher
4646
/// The executable including the path of the Launcher<br/>
4747
/// <see langword="string.Empty"/> if not (properly) installed
4848
/// </summary>
49-
public string ExecutablePath { get; }
50-
51-
/// <summary>
52-
/// The executable name of the Launcher<br/>
53-
/// <see langword="string.Empty"/> if not (properly) installed
54-
/// </summary>
5549
public string Executable { get; }
5650

5751
/// <summary>

GameLib.Demo/GameLib.Demo.Wpf/ViewModels/GameViewModel.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public void RefreshGameIsRunning()
9494
OnPropertyChanged(nameof(SelectedGame));
9595
}
9696

97-
9897
[RelayCommand]
9998
public static void RunGame(IGame? game)
10099
{
@@ -114,9 +113,8 @@ public static void RunGame(IGame? game)
114113
Process.Start(new ProcessStartInfo()
115114
{
116115
UseShellExecute = true,
117-
FileName = game.ExecutablePath,
116+
FileName = game.Executable,
118117
WorkingDirectory = game.WorkingDir
119-
120118
});
121119
}
122120
catch { /* ignore */ }
@@ -173,5 +171,4 @@ public static void CopyToClipboard(string? text)
173171

174172
Clipboard.SetText(text);
175173
}
176-
177174
}

GameLib.Demo/GameLib.Demo.Wpf/ViewModels/LauncherViewModel.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public partial class LauncherViewModel : ViewModelBase
3636
[ObservableProperty]
3737
private string _isRunningLogo = CrossImagePath;
3838

39-
4039
public LauncherViewModel(LauncherManager launcherManager)
4140
{
4241
LoadData(launcherManager);
@@ -111,7 +110,7 @@ public static void RunLauncher(ILauncher? launcher)
111110
Process.Start(new ProcessStartInfo()
112111
{
113112
UseShellExecute = true,
114-
FileName = launcher.ExecutablePath
113+
FileName = launcher.Executable
115114
});
116115
}
117116
catch { /* ignore */ }
@@ -122,8 +121,8 @@ public static void OpenPath(ILauncher? launcher)
122121
{
123122
switch (launcher)
124123
{
125-
case not null when !string.IsNullOrEmpty(launcher.ExecutablePath):
126-
Process.Start("explorer.exe", $"/select,\"{launcher.ExecutablePath}\"");
124+
case not null when !string.IsNullOrEmpty(launcher.Executable):
125+
Process.Start("explorer.exe", $"/select,\"{launcher.Executable}\"");
127126
break;
128127

129128
case not null when !string.IsNullOrEmpty(launcher.InstallDir):

GameLib.Demo/GameLib.Demo.Wpf/Views/GameView.xaml

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -389,18 +389,18 @@
389389
</StackPanel>
390390
<!--#endregion-->
391391

392-
<!--#region Executable path-->
392+
<!--#region Executable-->
393393
<TextBlock
394394
Grid.Row="13"
395395
Grid.Column="0"
396396
HorizontalAlignment="Right"
397397
VerticalAlignment="Center"
398-
Text="Executable path: " />
398+
Text="Executable: " />
399399
<TextBox
400400
Grid.Row="13"
401401
Grid.Column="2"
402402
VerticalAlignment="Center"
403-
Text="{Binding SelectedGame.ExecutablePath, Mode=OneWay}" />
403+
Text="{Binding SelectedGame.Executable, Mode=OneWay}" />
404404
<StackPanel
405405
Grid.Row="13"
406406
Grid.Column="4"
@@ -409,7 +409,7 @@
409409
Orientation="Horizontal">
410410
<Button
411411
Command="{Binding CopyToClipboardCommand}"
412-
CommandParameter="{Binding SelectedGame.ExecutablePath}"
412+
CommandParameter="{Binding SelectedGame.Executable}"
413413
ToolTip="Copy to clipboard">
414414
<Image
415415
Width="20"
@@ -420,7 +420,7 @@
420420
<Button
421421
Margin="5,0,0,0"
422422
Command="{Binding OpenPathCommand}"
423-
CommandParameter="{Binding SelectedGame.ExecutablePath}"
423+
CommandParameter="{Binding SelectedGame.Executable}"
424424
ToolTip="Open in explorer">
425425
<Image
426426
Width="20"
@@ -441,51 +441,20 @@
441441
</StackPanel>
442442
<!--#endregion-->
443443

444-
<!--#region Executable name-->
445-
<TextBlock
446-
Grid.Row="15"
447-
Grid.Column="0"
448-
HorizontalAlignment="Right"
449-
VerticalAlignment="Center"
450-
Text="Executable: " />
451-
<TextBox
452-
Grid.Row="15"
453-
Grid.Column="2"
454-
VerticalAlignment="Center"
455-
Text="{Binding SelectedGame.Executable, Mode=OneWay}" />
456-
<StackPanel
457-
Grid.Row="15"
458-
Grid.Column="4"
459-
HorizontalAlignment="Left"
460-
VerticalAlignment="Center"
461-
Orientation="Horizontal">
462-
<Button
463-
Command="{Binding CopyToClipboardCommand}"
464-
CommandParameter="{Binding SelectedGame.Executable}"
465-
ToolTip="Copy to clipboard">
466-
<Image
467-
Width="20"
468-
Height="20"
469-
Margin="2"
470-
Source="/Resources/copy-white.png" />
471-
</Button>
472-
</StackPanel>
473-
<!--#endregion-->
474-
475444
<!--#region Working directory-->
476445
<TextBlock
477-
Grid.Row="17"
446+
Grid.Row="15"
478447
Grid.Column="0"
479448
HorizontalAlignment="Right"
480449
VerticalAlignment="Center"
481450
Text="Working directory: " />
482451
<TextBox
483-
Grid.Row="17"
452+
Grid.Row="15"
484453
Grid.Column="2"
485454
VerticalAlignment="Center"
486455
Text="{Binding SelectedGame.WorkingDir, Mode=OneWay}" />
487456
<StackPanel
488-
Grid.Row="17"
457+
Grid.Row="15"
489458
Grid.Column="4"
490459
HorizontalAlignment="Left"
491460
VerticalAlignment="Center"
@@ -516,18 +485,18 @@
516485

517486
<!--#region Launch string-->
518487
<TextBlock
519-
Grid.Row="19"
488+
Grid.Row="17"
520489
Grid.Column="0"
521490
HorizontalAlignment="Right"
522491
VerticalAlignment="Center"
523492
Text="Launch string: " />
524493
<TextBox
525-
Grid.Row="19"
494+
Grid.Row="17"
526495
Grid.Column="2"
527496
VerticalAlignment="Center"
528497
Text="{Binding SelectedGame.LaunchString, Mode=OneWay}" />
529498
<StackPanel
530-
Grid.Row="19"
499+
Grid.Row="17"
531500
Grid.Column="4"
532501
HorizontalAlignment="Left"
533502
VerticalAlignment="Center"
@@ -557,22 +526,22 @@
557526

558527
<!--#region IsRunning-->
559528
<TextBlock
560-
Grid.Row="21"
529+
Grid.Row="19"
561530
Grid.Column="0"
562531
HorizontalAlignment="Right"
563532
VerticalAlignment="Center"
564533
Text="Is running: " />
565534

566535
<Image
567-
Grid.Row="21"
536+
Grid.Row="19"
568537
Grid.Column="2"
569538
Width="24"
570539
Height="24"
571540
HorizontalAlignment="Left"
572541
Source="{Binding IsRunningLogo}" />
573542

574543
<StackPanel
575-
Grid.Row="21"
544+
Grid.Row="19"
576545
Grid.Column="4"
577546
HorizontalAlignment="Left"
578547
VerticalAlignment="Center"

GameLib.Demo/GameLib.Demo.Wpf/Views/LauncherView.xaml

Lines changed: 19 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@
292292
Background="#373737"
293293
Command="{Binding CopyToClipboardCommand}"
294294
CommandParameter="{Binding SelectedLauncher.InstallDir}"
295-
ToolTip="Copy to clipboard">
295+
ToolTip="Copy to clipboard"
296+
Visibility="{Binding SelectedLauncher.IsInstalled, Converter={StaticResource BooleanToVisibilityConverter}}">
296297
<Image
297298
Width="20"
298299
Height="20"
@@ -304,7 +305,8 @@
304305
Background="#373737"
305306
Command="{Binding OpenPathCommand}"
306307
CommandParameter="{Binding SelectedLauncher}"
307-
ToolTip="Open in explorer">
308+
ToolTip="Open in explorer"
309+
Visibility="{Binding SelectedLauncher.IsInstalled, Converter={StaticResource BooleanToVisibilityConverter}}">
308310
<Image
309311
Width="20"
310312
Height="20"
@@ -314,18 +316,18 @@
314316
</StackPanel>
315317
<!--#endregion-->
316318

317-
<!--#region Executable path-->
319+
<!--#region Executable-->
318320
<TextBlock
319321
Grid.Row="9"
320322
Grid.Column="0"
321323
HorizontalAlignment="Right"
322324
VerticalAlignment="Center"
323-
Text="Executable path: " />
325+
Text="Executable: " />
324326
<TextBox
325327
Grid.Row="9"
326328
Grid.Column="2"
327329
VerticalAlignment="Center"
328-
Text="{Binding SelectedLauncher.ExecutablePath, Mode=OneWay}" />
330+
Text="{Binding SelectedLauncher.Executable, Mode=OneWay}" />
329331
<StackPanel
330332
Grid.Row="9"
331333
Grid.Column="4"
@@ -335,8 +337,9 @@
335337
<Button
336338
Background="#373737"
337339
Command="{Binding CopyToClipboardCommand}"
338-
CommandParameter="{Binding SelectedLauncher.ExecutablePath}"
339-
ToolTip="Copy to clipboard">
340+
CommandParameter="{Binding SelectedLauncher.Executable}"
341+
ToolTip="Copy to clipboard"
342+
Visibility="{Binding SelectedLauncher.IsInstalled, Converter={StaticResource BooleanToVisibilityConverter}}">
340343
<Image
341344
Width="20"
342345
Height="20"
@@ -359,47 +362,15 @@
359362
</StackPanel>
360363
<!--#endregion-->
361364

362-
<!--#region Executable-->
363-
<TextBlock
364-
Grid.Row="11"
365-
Grid.Column="0"
366-
HorizontalAlignment="Right"
367-
VerticalAlignment="Center"
368-
Text="Executable: " />
369-
<TextBox
370-
Grid.Row="11"
371-
Grid.Column="2"
372-
VerticalAlignment="Center"
373-
Text="{Binding SelectedLauncher.Executable, Mode=OneWay}" />
374-
<StackPanel
375-
Grid.Row="11"
376-
Grid.Column="4"
377-
HorizontalAlignment="Left"
378-
VerticalAlignment="Center"
379-
Orientation="Horizontal">
380-
<Button
381-
Background="#373737"
382-
Command="{Binding CopyToClipboardCommand}"
383-
CommandParameter="{Binding SelectedLauncher.Executable}"
384-
ToolTip="Copy to clipboard">
385-
<Image
386-
Width="20"
387-
Height="20"
388-
Margin="2"
389-
Source="/Resources/copy-white.png" />
390-
</Button>
391-
</StackPanel>
392-
<!--#endregion-->
393-
394365
<!--#region IsInstalled-->
395366
<TextBlock
396-
Grid.Row="13"
367+
Grid.Row="11"
397368
Grid.Column="0"
398369
HorizontalAlignment="Right"
399370
VerticalAlignment="Center"
400371
Text="Is installed: " />
401372
<Image
402-
Grid.Row="13"
373+
Grid.Row="11"
403374
Grid.Column="2"
404375
Width="24"
405376
Height="24"
@@ -409,28 +380,29 @@
409380

410381
<!--#region IsRunning-->
411382
<TextBlock
412-
Grid.Row="15"
383+
Grid.Row="13"
413384
Grid.Column="0"
414385
HorizontalAlignment="Right"
415386
VerticalAlignment="Center"
416387
Text="Is running: " />
417388
<Image
418-
Grid.Row="15"
389+
Grid.Row="13"
419390
Grid.Column="2"
420391
Width="24"
421392
Height="24"
422393
HorizontalAlignment="Left"
423394
Source="{Binding IsRunningLogo}" />
424395
<StackPanel
425-
Grid.Row="15"
396+
Grid.Row="13"
426397
Grid.Column="4"
427398
HorizontalAlignment="Left"
428399
VerticalAlignment="Center"
429400
Orientation="Horizontal">
430401
<Button
431402
Background="#373737"
432403
Command="{Binding RefreshLauncherIsRunningCommand}"
433-
ToolTip="Refresh">
404+
ToolTip="Refresh"
405+
Visibility="{Binding SelectedLauncher.IsInstalled, Converter={StaticResource BooleanToVisibilityConverter}}">
434406
<Image
435407
Width="20"
436408
Height="20"
@@ -442,13 +414,13 @@
442414

443415
<!--#region Installed games-->
444416
<TextBlock
445-
Grid.Row="17"
417+
Grid.Row="15"
446418
Grid.Column="0"
447419
HorizontalAlignment="Right"
448420
VerticalAlignment="Center"
449421
Text="Installed games: " />
450422
<TextBlock
451-
Grid.Row="17"
423+
Grid.Row="15"
452424
Grid.Column="2"
453425
HorizontalAlignment="Left"
454426
VerticalAlignment="Center"

0 commit comments

Comments
 (0)