Skip to content

Please add support for x86 systems#8

Open
moth1995 wants to merge 53 commits into
pmgagne:masterfrom
Eliav2:master
Open

Please add support for x86 systems#8
moth1995 wants to merge 53 commits into
pmgagne:masterfrom
Eliav2:master

Conversation

@moth1995

@moth1995 moth1995 commented Sep 2, 2022

Copy link
Copy Markdown

I know its an old topic, but we need support for x86 system, it would be really useful if you can provide a solution, i saw the binary files from the tkdnd project and tried to replace the ones that are located in the x64 folder but couldnt compile properly, i have this error when i try to run your example

`
py test.py
Traceback (most recent call last):
File "C:\Users\marco\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tkinterdnd2\TkinterDnD.py", line 53, in _require
TkdndVersion = tkroot.tk.call('package', 'require', 'tkdnd')
_tkinter.TclError: couldn't load library "C:\Users\marco\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tkinterdnd2\tkdnd\win64/libtkdnd2.9.2.dll": Bad exe format. Possibly a 32/64-bit mismatch.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "test.py", line 5, in
root = TkinterDnD.Tk() # notice - use this instead of tk.Tk()
File "C:\Users\marco\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tkinterdnd2\TkinterDnD.py", line 285, in init
self.TkdndVersion = _require(self)
File "C:\Users\marco\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tkinterdnd2\TkinterDnD.py", line 55, in _require
raise RuntimeError('Unable to load tkdnd library.')
RuntimeError: Unable to load tkdnd library.

C:\Users\marco\Documents\Visual Studio Code\Skin_Boot_Assigner>

`

thanks a lot

Eliav2 and others added 30 commits June 5, 2021 19:50
Linking to the fork itself minimizes confusion for PyPI users.
Tix was depreciated in Python 3.6 and removed in Python3.13.
In the original code, it would default to importing Tix and if it could not, it would attempt to import tix from tkinter. Instead, we just load tkinter. Further, we no longer create a TixTk class as it is no longer needed.
Tix has been unsupported for 10 years.
Update comments to remove mention of Tix. Tix has not been updated in 10 years and is removed in python3.13.
Reverting ReadMe temporarily for the purpose of a pull request. Couldn't find a quick better way.
Exclude unused platform-specific tkdnd files in pyinstaller hook
This includes some enhancements mentioned in other repositories. Includes all binaries recently built by main Tkdnd project. Includes ARM binaries from "tkinterdnd-universal"
Including win86 support since these binaries are still built by the TkDnd maintainer.
Previous change failed to account for new directories and new directory changes. This resolves the problem.
Accidentally omitted a comma.
On Windows, `platform.machine()` returns the identifier of the
*host* architecture, which does not necessarily match the
architecture of the running python process - for example, when
running x86 python under x64 Windows, or when running either
x86 or x64 python under arm64 Windows.

This causes `tkinterdnd2` to pick up incorrect OS-specific
directory (`win-x64` in the former, `win-arm64` in the latter
case), which in turn results in library load error due to
incompatible DLL architecture.

Instead, the architecture of the running process should be
obtained from the `PROCESSOR_ARCHITECTURE` environment variable,
which is automatically set by Windows / WOW subsystem.
Fix architecture detection on Windows
Squiblydoo and others added 23 commits February 28, 2025 06:49
Updated Win x86
Win 64
Linux x86_x64

Need to update MacOS, MacOS ARM, Windows ARM, Linux ARM, if possible.
Updated to work on macOS 26 Tahoe (or maybe fixes another bug, either way it works now). From: https://github.com/petasis/tkdnd/releases/tag/tkdnd-release-test-v2.9.5
UPDATE macOS arm64 tkdnd binary
These build adds an explicit means of adding TkinterDnd to an existing TK window and maintains backwards compatibility with the previous implied import.
- Replace 2.9.x binaries with 2.10.0 across all platforms
- Add Tcl 9 binary directories for Linux x64, Linux arm64,
  Windows x64, and Windows x86 (suffixed -tcl9)
- Detect Tcl major version at runtime and load the correct
  binary directory automatically
- Bump package version to 0.6.0
- Update setup.py and hook-tkinterdnd2.py to include new dirs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- .github/workflows/load-test.yml: 5-job matrix covering Linux x64 (Tcl 8),
  Windows x64 (Tcl 8 + Tcl 9), macOS x64 (Tcl 8), macOS arm64 (Tcl 9);
  Linux uses xvfb-run for the virtual display
- tests/test_tkinterdnd2.py: replace stale version assertion with adaptive tests
  that verify the binary loads, the correct platform directory is chosen, and
  Tcl 8/9 routing works correctly at runtime
- test_dnd.py: interactive test with a drop zone and drag source for manual
  end-to-end verification
- .gitignore: exclude /virt local virtualenv directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove macos-13 (macOS x64) job — runner no longer available
- macOS arm64: actions/setup-python's pre-built Python links against Tcl 8
  regardless of Python version; switch to Homebrew Python 3.13, which
  depends on Homebrew's tcl-tk (Tcl 9), so the osx-arm64 binary loads correctly
- Split OS-specific steps explicitly so each platform uses the right python/pip

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Homebrew Python enforces externally-managed-environment; add
--break-system-packages so pip can install into it from CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use python-tk@3.13 which bundles _tkinter linked against Homebrew's
  Tcl 9; the runner has python@3.14 pre-installed so python3 resolved
  to 3.14 (no _tkinter) rather than 3.13
- Use python3.13 explicitly in all macOS steps to avoid version ambiguity

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add TkDND 2.10.0 binaries with Tcl 8 and Tcl 9 support
…uild

Updates linux-x64(-tcl9), linux-arm64(-tcl9), win-x64(-tcl9), win-x86(-tcl9),
and win-arm64 from TkDND 2.10.0 to 2.10.1, bringing in fixes for a GTK3
file-drop interop bug, a BadWindow crash on X11 drops, a Windows long-path
truncation bug, an X11 pointer-grab break on virtual desktop switches, and
intermittent drop failures on Wayland/XWayland.

Also splits osx-arm64 into a real Tcl 8.6 build and a new osx-arm64-tcl9
folder. TkDND's macOS CI previously had no Tcl 8.6 build for arm64 at all,
so osx-arm64 was silently serving a Tcl 9-linked binary to everyone,
including Tcl 8.6 Python installs (the common case on Apple Silicon Macs),
where it would fail to load. osx-arm64 is now genuinely Tcl 8.6, with Tcl 9
runtimes falling back to osx-arm64-tcl9 per TkinterDnD.py's existing
version-detection logic.

win-arm64 stays Tcl 9-linked (TkDND has no Tcl 8.6 Windows ARM64 build) and
osx-x64 stays on its old 2.9.4 binary (no macOS x64 build exists in TkDND's
CI at all) -- both documented gaps, not regressions from this change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
test_expected_version hardcoded the exact TkDND version string per
platform, so it broke on every version bump for reasons unrelated to
whether the binary actually works. test_version_is_set already covers
the thing that matters (a version was loaded at all).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Update bundled TkDND binaries to 2.10.1, add real Tcl 8.6 osx-arm64 b…
test_dnd.py and test_dnd_widgets.py are interactive manual test beds
(each ends in a bare root.mainloop(), never exiting) that got swept
into tests/ during a recent cleanup. unittest discover matches any
test*.py file and imports it to look for TestCase classes, so
importing either one blocked the whole run forever with no job
timeout to stop it. Move both to demos/, alongside the other
demo_*.py scripts, so discovery only sees the real TestCase in
tests/test_tkinterdnd2.py.

Also add a concurrency group to load-test.yml so pushing a branch and
then opening a PR from it doesn't fire two redundant full runs of the
same commit.
Update TkDND Linux binaries
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.

7 participants