All Projects → pleiszenburg → zugbruecke

pleiszenburg / zugbruecke

Licence: LGPL-2.1 license
Calling routines in Windows DLLs from Python scripts running under Linux, MacOS or BSD

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to zugbruecke

Photoshopcclinux
Photoshop CC v19 installer for Gnu/Linux
Stars: ✭ 2,894 (+3429.27%)
Mutual labels:  wine
nix-gaming
Gaming on Nix
Stars: ✭ 142 (+73.17%)
Mutual labels:  wine
gtasa-savegame-editor
GUI tool to edit GTA San Andreas savegames.
Stars: ✭ 56 (-31.71%)
Mutual labels:  wine
Protontricks
A simple wrapper that does winetricks things for Proton enabled games, requires Winetricks.
Stars: ✭ 182 (+121.95%)
Mutual labels:  wine
Winepak
Flatpak-ing Microsoft Windows applications with Wine
Stars: ✭ 242 (+195.12%)
Mutual labels:  wine
AreWeAntiCheatYet
A comprehensive and crowd-sourced list of games using anti-cheats and their compatibility with GNU/Linux or Wine.
Stars: ✭ 289 (+252.44%)
Mutual labels:  wine
Wine Builds
Wine builds (Vanilla, Staging, TkG and Proton)
Stars: ✭ 145 (+76.83%)
Mutual labels:  wine
cemu-linux
Play with Cemu on Linux (with high performance)
Stars: ✭ 120 (+46.34%)
Mutual labels:  wine
wine-launcher
Wine Launcher - Running Windows games under Linux
Stars: ✭ 249 (+203.66%)
Mutual labels:  wine
awesome-gnu-linux-gaming
A curated list of awesome GNU/Linux tips & tricks, games, tools, and resources - Mirrored from: https://gitlab.com/linuxcafefederation/awesome-gnu-linux-gaming.git
Stars: ✭ 135 (+64.63%)
Mutual labels:  wine
Steamforwarder
steam_api.dll implementation for wine. Your windows games now can interact with your linux steam! (This repo mirrors https://gitlab.com/xomachine/SteamForwarder)
Stars: ✭ 190 (+131.71%)
Mutual labels:  wine
Dxup
A d3d9 and d3d10 to d3d11 translation layer.
Stars: ✭ 231 (+181.71%)
Mutual labels:  wine
northstar-dedicated
Docker image for the Northstar dedicated server.
Stars: ✭ 89 (+8.54%)
Mutual labels:  wine
Wine Nine Standalone
Build Gallium Nine support on top of an existing WINE installation
Stars: ✭ 170 (+107.32%)
Mutual labels:  wine
notepad-plus-plus
Unofficial snap repo for notepad-plus-plus snap
Stars: ✭ 51 (-37.8%)
Mutual labels:  wine
Bottles
🌠 Easily manage 🍷prefix in a new way! (Run Windows software and games on Linux)
Stars: ✭ 147 (+79.27%)
Mutual labels:  wine
nine
Gallium Nine Standalone
Stars: ✭ 50 (-39.02%)
Mutual labels:  wine
deepin-wine-qq-arch
Tencent QQ on Deepin Wine5(com.qq.im.deepin) For Archlinux
Stars: ✭ 274 (+234.15%)
Mutual labels:  wine
compact-wine
No description or website provided.
Stars: ✭ 87 (+6.1%)
Mutual labels:  wine
arcfutil
A Python module designed for processing Arcaea related files(.aff chart, songlist, etc.) / 为处理Arcaea相关文件(谱面,songlist,etc.)设计的Python模块。
Stars: ✭ 20 (-75.61%)
Mutual labels:  python-module

zugbruecke

zugbruecke

Calling routines in Windows DLLs from Python scripts running under Linux, MacOS or BSD

/ˈt͡suːkˌbʁʏkə/ (German, noun, feminine: drawbridge)

build_master docs_master license status pypi_version pypi_versions chat mailing_list

Synopsis

zugbruecke is an EXPERIMENTAL Python package (currently in development status 3/alpha). It allows to call routines in Windows DLLs from Python code running on Unices / Unix-like systems such as Linux, MacOS or BSD. zugbruecke is designed as a drop-in replacement for Python's standard library's ctypes module. zugbruecke is built on top of Wine. A stand-alone Windows Python interpreter launched in the background is used to execute the called DLL routines. Communication between the Unix-side and the Windows/Wine-side is based on Python's build-in multiprocessing connection capability. zugbruecke has (limited) support for pointers, struct types and call-back functions. zugbruecke comes with extensive logging features allowing to debug problems associated with both itself and with Wine. zugbruecke is written using Python 3 syntax and primarily targets the CPython implementation of Python.

About Wine (from winehq.org): Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, MacOS and BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop.

This project is NEITHER associated NOR affiliated in any way or form with the Wine project.

Prerequisites

type prerequisite version
user CPython 3.x (tested with 3.{7,8,9,10})
user Wine >= 6.x (tested with regular & staging) - expected to be in the user's PATH
developer mingw cross-compiler For building DLLs against which examples and tests can be run. Latest stable release.

Installation

branch status installation documentation
master (release) build_master pip install zugbruecke docs_master
develop build_develop pip install git+https://github.com/pleiszenburg/zugbruecke.git@develop docs_develop

After installing the package with pip, you may choose to manually initialize the Wine Python environment by running wenv init. If you choose not to do this, zugbruecke will take care of it during its first use.

Example

Start an interactive Python session on your favorite Unix(-like) operating system and try the following:

import zugbruecke.ctypes as ctypes
dll_pow = ctypes.cdll.msvcrt.pow
dll_pow.argtypes = (ctypes.c_double, ctypes.c_double)
dll_pow.restype = ctypes.c_double
print(f'You should expect "1024.0" to show up here: "{dll_pow(2.0, 10.0):.1f}".')

You have just witnessed msvcrt.dll, Microsoft's C standard library (or Wine's implementation of it), in action on Unix.

Interested in more?

A lot of code, which was written with ctypes' cdll, windll or oledll in mind and which runs under Windows, should run just fine with zugbruecke on Unix (assuming it does not use Windows features not supported by Wine). For more complex calls, memory synchronization is potentially necessary.

Speed

zugbruecke performs reasonably well given its complexity with less than 0.2 µs overhead per call in average on modern hardware. It is not (yet) optimized for speed. Check the latest benchmarks for more details.

Security

zugbruecke is notoriously insecure. Never, ever, run it with root / super users privileges! Do not use it where security matters! For details, check the section on security in the documentation.

Need help?

See section on Getting Help on zugbruecke's documentation.

Bugs & Issues

See section on Bugs and Issues on zugbruecke's documentation.

Miscellaneous

For production environments

DO NOT run this code (as-is) in production environments unless you feel that you really know what you are doing (or unless you are absolutely desperate)! Being experimental in nature and of alpha quality, it is prone to fail in a number of unpredictable ways, some of which might not be obvious or might not even show any (intermediately) recognizable symptoms at all! You might end up with plain wrong, nonsensical results without noticing it! Verify and cross-check your results!

zugbruecke is using semantic versioning. Breaking changes are indicated by increasing the second version number, the minor version. Going for example from 0.0.x to 0.1.y or going from 0.1.x to 0.2.y therefore indicates a breaking change. For as long as zugbruecke has development status "alpha", please expect more breaking changes to come.

If you are relying on zugbruecke in one way or another, please consider monitoring the project: its repository on Github, its mailing list and its chatroom.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].