Skip to content

Commit

Permalink
Merge pull request #115 from BrandonPotter/feature/RemoveLibgdiplus
Browse files Browse the repository at this point in the history
Removed handling of missing libgdiplus
  • Loading branch information
ahwm authored May 6, 2022
2 parents f7a3413 + bcd0d7b commit a5ea07c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 35 deletions.
15 changes: 0 additions & 15 deletions Google.Authenticator/MissingDependencyException.cs

This file was deleted.

16 changes: 0 additions & 16 deletions Google.Authenticator/TwoFactorAuthenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,6 @@ private static string GenerateQrCodeUrl(int qrPixelsPerModule, string provisionU
}

}
catch (TypeInitializationException e)
{
if (e.InnerException != null
&& e.InnerException.GetType() == typeof(DllNotFoundException)
&& e.InnerException.Message.Contains("libgdiplus"))
{
throw new MissingDependencyException(
"It looks like libgdiplus has not been installed - see" +
" https://github.com/codebude/QRCoder/issues/227",
e);
}
else
{
throw;
}
}
catch (System.Runtime.InteropServices.ExternalException e)
{
if (e.Message.Contains("GDI+") && qrPixelsPerModule > 10)
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ bool result = tfa.ValidateTwoFactorPIN(key, txtCode.Text)

## Updates

### 3.0.0-beta1
Removed support for legacy .Net Framework. Lowest supported versions are now netstandard2.0 and .Net 4.6.2.
All use of System.Drawing has been removed. In 2.5, only Net 6.0 avoided System.Drawing.
### 3.0.0-beta
- Removed support for legacy .Net Framework. Lowest supported versions are now netstandard2.0 and .Net 4.6.2.
- All use of System.Drawing has been removed. In 2.5, only Net 6.0 avoided System.Drawing.
- Linux installations no longer need to ensure `libgdiplus` is installed as it is no longer used.

### 2.5.0
Now runs on .Net 6.0.
Expand All @@ -50,4 +51,4 @@ Technically the QR Coder library we rely on still does not fully support .Net 6.
* Don't use the secret key and `ManualEntryKey` interchangeably. `ManualEntryKey` is used to enter into the authenticator app when scanning a QR code is impossible and is derived from the secret key ([discussion example](https://github.com/BrandonPotter/GoogleAuthenticator/issues/54))
# Notes
On linux, you need to ensure `libgdiplus` is installed if you want to generate QR Codes. See [https://github.com/codebude/QRCoder/issues/227](https://github.com/codebude/QRCoder/issues/227).
*With versions prior to 3.0*, on linux, you need to ensure `libgdiplus` is installed if you want to generate QR Codes. See [https://github.com/codebude/QRCoder/issues/227](https://github.com/codebude/QRCoder/issues/227).

0 comments on commit a5ea07c

Please sign in to comment.