Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Add API for getting libgdiplus version #84

Merged
merged 2 commits into from
Sep 21, 2017

Conversation

akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Sep 20, 2017

/cc @qmfrederik for feedback

This would simply return the libgdiplus version (e.g. 5.6) as a string. It could be used like this:

[DllImport("gdiplus")]
extern static string GetLibgdiplusVersion ();

Version LibgdiplusVersion {
    get {
        try {
            return new Version (GetLibgdiplusVersion ());
        } catch (EntryPointNotFoundException) {
            return null;  // in case of older libgdiplus or Windows GDI+
       }
   }
}

not sure if the string version is the best option or we should return major+minor as an int? or some other counter?

@qmfrederik
Copy link
Contributor

@akoeplinger LGTM. Returing a string seems to be the most straightforward solution, let's keep it simple :)

@qmfrederik
Copy link
Contributor

As a side note - now that libgdiplus is living its renaissance :), it would make sense to get the distros to package updated versions of libgdiplus. Is there any kind of process to get that kicked off, or do you just need to contact the individual packages/maintainers directly?

@akoeplinger akoeplinger force-pushed the libgdiplus-version-api branch from 9afe8e2 to b7a23a9 Compare September 21, 2017 11:36
VERSION in config.h is only written by autoconf which isn't invoked
on VS builds. Added a similar logic like on the Mono repo where
we read the version out of configure.ac.
@akoeplinger akoeplinger force-pushed the libgdiplus-version-api branch from b7a23a9 to 44b2521 Compare September 21, 2017 11:37
@akoeplinger akoeplinger merged commit f4dc03b into mono:master Sep 21, 2017
@akoeplinger akoeplinger deleted the libgdiplus-version-api branch September 21, 2017 12:05
@akoeplinger
Copy link
Member Author

Is there any kind of process to get that kicked off, or do you just need to contact the individual packages/maintainers directly?

@qmfrederik yeah, though one of our engineers is the packager for most of these distros ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants