From 5effd044accc80d99e11749d45dcb76fe1c6b4af Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 8 Oct 2020 14:55:32 +0100 Subject: [PATCH 1/4] try/except ctypes.windll.user32.CalculatePopupWindowPosition As we can't rely on the is_wine check, use an exception for this. --- prefs.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/prefs.py b/prefs.py index 1ad2d71a..95612e6a 100644 --- a/prefs.py +++ b/prefs.py @@ -206,19 +206,28 @@ elif platform == 'win32': CalculatePopupWindowPosition = None if not is_wine: - CalculatePopupWindowPosition = ctypes.windll.user32.CalculatePopupWindowPosition - CalculatePopupWindowPosition.argtypes = [ - ctypes.POINTER(POINT), - ctypes.POINTER(SIZE), - UINT, - ctypes.POINTER(RECT), - ctypes.POINTER(RECT) - ] + try: + CalculatePopupWindowPosition = ctypes.windll.user32.CalculatePopupWindowPosition - GetParent = ctypes.windll.user32.GetParent - GetParent.argtypes = [HWND] - GetWindowRect = ctypes.windll.user32.GetWindowRect - GetWindowRect.argtypes = [HWND, ctypes.POINTER(RECT)] + except AttributeError as e: + logger.error( + 'win32 and not is_wine, but ctypes.windll.user32.CalculatePopupWindowPosition invalid', + exc_info=e + ) + + else: + CalculatePopupWindowPosition.argtypes = [ + ctypes.POINTER(POINT), + ctypes.POINTER(SIZE), + UINT, + ctypes.POINTER(RECT), + ctypes.POINTER(RECT) + ] + + GetParent = ctypes.windll.user32.GetParent + GetParent.argtypes = [HWND] + GetWindowRect = ctypes.windll.user32.GetWindowRect + GetWindowRect.argtypes = [HWND, ctypes.POINTER(RECT)] SHGetLocalizedName = ctypes.windll.shell32.SHGetLocalizedName SHGetLocalizedName.argtypes = [LPCWSTR, LPWSTR, UINT, ctypes.POINTER(ctypes.c_int)] From 187dee5f81062696f2792318796ee8c46e7e6eab Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 8 Oct 2020 15:23:47 +0100 Subject: [PATCH 2/4] Release 4.1.3 --- ChangeLog.md | 22 ++++++++++++++++++++++ config.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 7006a312..eedceac0 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,28 @@ This is the master changelog for Elite Dangerous Market Connector. Entries are in reverse chronological order (latest first). --- +Release 4.1.3 +=== + +* Revert to not setting `gdiScaling` in the application manifest. This should + fix [#734](https://github.com/EDCD/EDMarketConnector/issues/734) + and [#739](https://github.com/EDCD/EDMarketConnector/issues/739). + + A side effect will be that the radio buttons in Preferences > Appearance + for the Theme selection will once more be improperly sized under any UI + scaling. This is a Tcl/Tk bug which they have fixed in their code, but not + yet made a new release containing that fix. We'll have it fixed when Tcl/Tk + release a fixed version *and* Python releases a fixed version, that we use, + that includes the fixed libraries. + +* Wraps some ctypes code in a try/except in order to fix + [#737](https://github.com/EDCD/EDMarketConnector/issues/737). This should + benefit anyone running EDMC under any Wine version that doesn't set the + registry key we check for. + + **Note, however, that we recommend running EDMarketConnector natively from + source if using Linux**. + Release 4.1.2 === diff --git a/config.py b/config.py index 1f756baa..3dcdca95 100644 --- a/config.py +++ b/config.py @@ -13,7 +13,7 @@ appcmdname = 'EDMC' # appversion **MUST** follow Semantic Versioning rules: # # Major.Minor.Patch(-prerelease)(+buildmetadata) -appversion = '4.1.2' #-rc1+a872b5f' +appversion = '4.1.3' #-rc1+a872b5f' # For some things we want appversion without (possible) +build metadata appversion_nobuild = str(semantic_version.Version(appversion).truncate('prerelease')) copyright = u'© 2015-2019 Jonathan Harris, 2020 EDCD' From d7641d68586716883640592f7c480f937dbf4f75 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 8 Oct 2020 15:28:35 +0100 Subject: [PATCH 3/4] appcast 4.1.3 --- edmarketconnector.xml | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/edmarketconnector.xml b/edmarketconnector.xml index 924f5d0a..a8e751fc 100644 --- a/edmarketconnector.xml +++ b/edmarketconnector.xml @@ -168,11 +168,34 @@ - Release 4.1.1 + Release 4.1.3 body { font-family:"Segoe UI","Tahoma"; font-size: 75%; } h2 { font-family:"Segoe UI","Tahoma"; font-size: 105%; } +

Release 4.1.3

+
    +
  • +

    Revert to not setting gdiScaling in the application manifest. This should +fix #734 +and #739.

    +

    A side effect will be that the radio buttons in Preferences > Appearance +for the Theme selection will once more be improperly sized under any UI +scaling. This is a Tcl/Tk bug which they have fixed in their code, but not +yet made a new release containing that fix. We'll have it fixed when Tcl/Tk +release a fixed version and Python releases a fixed version, that we use, +that includes the fixed libraries.

    +
  • +
  • +

    Wraps some ctypes code in a try/except in order to fix +#737. This should +benefit anyone running EDMC under any Wine version that doesn't set the +registry key we check for.

    +

    Note, however, that we recommend running EDMarketConnector natively from +source if using Linux.

    +
  • +
+

Release 4.1.2

  • Minor fix to EDMC.py to revert broken logic trying to detect when there is @@ -793,11 +816,11 @@ If any of your plugins are listed in that section then they will need updating, ]]> From beed337c70308fad7bd4fc74c62500f46cfc1572 Mon Sep 17 00:00:00 2001 From: A_D Date: Mon, 5 Oct 2020 12:49:52 +0200 Subject: [PATCH 4/4] Create dependabot config file Dependabot will open PRs automatically for us to update dependencies, assuming they have no breaking changes. --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..586fb2d7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + target-branch: "develop" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "develop" + schedule: + interval: "daily"