[Bug 46751] New: Allow starting native binaries
https://bugs.winehq.org/show_bug.cgi?id=46751 Bug ID: 46751 Summary: Allow starting native binaries Product: Wine Version: unspecified Hardware: x86 OS: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: kolan_n(a)mail.ru Sometimes apps use CLI apps, and these CLI apps have a version native for the OS and a compatible command line interface. It would be nice to allow Windows apps to call them. An example of such an app is git. Of course paths in arguments and env variables should be rewritten automatically. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 Zebediah Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12(a)gmail.com --- Comment #1 from Zebediah Figura <z.figura12(a)gmail.com> --- (In reply to KOLANICH from comment #0)
Of course paths in arguments and env variables should be rewritten automatically.
That's harder than you think. How do you know what's a path? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 --- Comment #2 from KOLANICH <kolan_n(a)mail.ru> --- OK. Another idea: [intercept syscalls](https://github.com/pmem/syscall_intercept), making the called process understand Windows paths with respect to the prefix. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 --- Comment #3 from KOLANICH <kolan_n(a)mail.ru> --- Both methods are incomplete. 1. detecting path will fail on something like -m.\a\b 2. intercepting syscalls will fail if the binary checks path syntax -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 --- Comment #4 from KOLANICH <kolan_n(a)mail.ru> --- 3. Manually writing a spec of program CLI is an option too, but not a good one: it have to be updated. The solution may be creating a geteric spec: specifying common conventions in the CLI like (-a a and --arg=a) vs -arg a vs -arga for most args, using arg-specific ones only if strictly necessary. A spec may be a JSON file like { "binary":"/usr/bin/git", "import":["./common.json"], "types":{ "gitArgType": here is a (G)LR grammar for an arg with something marking which piece is path }, "spec": here is a (G)LR grammar for args, using the types from types and imported specs } The rewriter processes imports and constructs the spec, then it finds the positions of the stuff which is a path and replaces them with the rewritten paths All the three methods should he used in combination. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de --- Comment #5 from Fabian Maurer <dark.shadow4(a)web.de> --- Windows programs under wine can already call linux programs, you just need to give them the right path. What exactly is thew problem here? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 joaopa <jeremielapuree(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree(a)yahoo.fr --- Comment #6 from joaopa <jeremielapuree(a)yahoo.fr> ---
Windows programs under wine can already call linux programs, you just need to give them the right path
How do you do that? I did not find any wiki in winehq site explaining the way to achieve this. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 --- Comment #7 from Fabian Maurer <dark.shadow4(a)web.de> --- Just execute them like normal binaries, e.g. start z:\bin\bash -c "echo hello > x.txt" -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 --- Comment #8 from KOLANICH <kolan_n(a)mail.ru> ---
Just execute them like normal binaries,
We still need the rewriting engine allowing applications to call native binaries with arbitrary parameters. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 --- Comment #9 from Fabian Maurer <dark.shadow4(a)web.de> --- Applications can already call native binaries with arbitrary parameters. And what is a "rewriting engine"? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 --- Comment #10 from Ken Thomases <ken(a)codeweavers.com> --- If you want arguments rewritten, write a native wrapper script to invoke the native app and arrange for Wine to invoke that wrapper script. Writing the wrapper script is an exercise for the reader and outside of the scope of Wine. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46751 --- Comment #11 from KOLANICH <kolan_n(a)mail.ru> ---
And what is a "rewriting engine"?
Mostly the ones transforming paths passed via cli arguments and env variables.
If you want arguments rewritten, write a native wrapper script to invoke the native app and arrange for Wine to invoke that wrapper script.
Wrapper scripts is not an universal approch. They require user actions. The proposed approach requires to write several generic profiles (can be shipped with wine), and most of apps should work out of the box without any actions done by users. No wrapper scripts, just wine itself. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org