Skip to content

Commit

Permalink
Changed: Only auto-deploy ASI if on MS Store
Browse files Browse the repository at this point in the history
People are having issues uninstalling Reloaded. I don't want to invest into doing uninstall, so this is easier.
  • Loading branch information
Sewer56 committed Mar 17, 2024
1 parent da366b8 commit 4db23dd
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,20 @@ static string GetProductName(string exePath)
}

// Try to auto deploy ASI Loader.
var deployer = new AsiLoaderDeployer(new PathTuple<ApplicationConfig>(applicationConfigFile, config));
if (deployer.CanDeploy())
if (isMsStore)
{
deployer.DeployAsiLoader(out var loaderPath, out var bootstrapperPath);
DeployAsiLoaderCommand.PrintDeployedAsiLoaderInfo(loaderPath!, bootstrapperPath);
config.DontInject = true;
}
else
{
// For GamePass, we can't dll inject, so we need to throw error to user screen.
if (isMsStore)
var deployer = new AsiLoaderDeployer(new PathTuple<ApplicationConfig>(applicationConfigFile, config));
if (deployer.CanDeploy())
{
deployer.DeployAsiLoader(out var loaderPath, out var bootstrapperPath);
DeployAsiLoaderCommand.PrintDeployedAsiLoaderInfo(loaderPath!, bootstrapperPath);
config.DontInject = true;
}
else
{
// For GamePass, we can't dll inject, so we need to throw error to user screen.
Actions.DisplayMessagebox.Invoke(Resources.AsiLoaderDialogTitle.Get(), Resources.AsiLoaderGamePassAutoInstallFail.Get());
}
}

// Write file to disk.
Expand Down

0 comments on commit 4db23dd

Please sign in to comment.