Skip to content

Commit

Permalink
Merge pull request #7 from Jeshibu/main
Browse files Browse the repository at this point in the history
  • Loading branch information
azuravian authored Oct 9, 2022
2 parents 0e46da5 + bf0be83 commit f0c6e67
Show file tree
Hide file tree
Showing 65 changed files with 35 additions and 108,975 deletions.
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

#Ignore thumbnails created by Windows
Thumbs.db
#Ignore files built by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
.vs/
#Nuget packages folder
packages/
Binary file removed .vs/InstallButtonEdit/v16/.suo
Binary file not shown.
34 changes: 3 additions & 31 deletions InstallButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,34 +47,10 @@ public override UserControl GetSettingsView(bool firstRunSettings)
return new InstallButtonSettingsView();
}

/*public override IEnumerable<TopPanelItem> GetTopPanelItems()
{
api = new IPlayniteAPI api
;
return new List<TopPanelItem>()
{
new TopPanelItem
{
Icon = new TextBlock
{
Text = "\uEF04",
FontSize = 22,
FontFamily = ResourceProvider.GetResource("FontIcoFont") as FontFamily
},
Title = "Install Game",
Activated = () =>
{
GameInstaller( game);
}
}
};
}*/

public override IEnumerable<InstallController> GetInstallActions(GetInstallActionsArgs args)
{
string PluginIdTest = new string(args.Game.PluginId.ToString().Take(8).ToArray());
if (PluginIdTest != "00000000")
if (args.Game.PluginId != Guid.Empty)
{
yield break;
}
Expand All @@ -85,7 +61,6 @@ public override IEnumerable<InstallController> GetInstallActions(GetInstallActio

public void GameSelect(Game selectedGame)
{
string gameInstallDir = API.Instance.ExpandGameVariables(selectedGame, selectedGame.InstallDirectory);
string gameExe = API.Instance.Dialogs.SelectFile("Game Executable|*.exe").Replace(selectedGame.Name, "{Name}");

if (!String.IsNullOrEmpty(gameExe))
Expand Down Expand Up @@ -148,19 +123,16 @@ public void GameInstaller(Game game)

string gameImagePath = null;
string gameInstallArgs = null;
string gameInstallDir = API.Instance.ExpandGameVariables(selectedGame, selectedGame.InstallDirectory);
List<GameAction> gameActions = null;
List<string> driveList = new List<string>();
List<string> driveList2 = new List<string>();
string command = null;
string setupFile = null;
string driveLetter = null;

if (settings.Settings.UseActions)
{
try
{
gameActions = selectedGame.GameActions.ToList();
List<GameAction> gameActions = selectedGame.GameActions.ToList();
try
{
foreach (GameAction g in gameActions)
Expand Down Expand Up @@ -247,7 +219,7 @@ public void GameInstaller(Game game)
API.Instance.Dialogs.ShowErrorMessage("The file/folder specified in the installation path does not exist.", "Invalid Path");
return;
}
setupFile = Path.Combine(gameImagePath, "setup.exe");
string setupFile = Path.Combine(gameImagePath, "setup.exe");
if (File.Exists(setupFile))
{
command = setupFile;
Expand Down
79 changes: 0 additions & 79 deletions InstallButton.csproj

This file was deleted.

Binary file removed bin/Debug/InstallButton.dll
Binary file not shown.
Binary file removed bin/Debug/InstallButton.pdb
Binary file not shown.
Binary file removed bin/Debug/Newtonsoft.Json.dll
Binary file not shown.
Loading

0 comments on commit f0c6e67

Please sign in to comment.