[Wine] call openoffice in linux from wine

Gert van den Berg wine-users at mohag.net
Mon Nov 30 11:52:27 CST 2009


On Mon, Nov 30, 2009 at 17:10, fachamix <wineforum-user at winehq.org> wrote:
> Code:
> #include <stdio.h>
> #include <stdlib.h>
>
> int main()
> {
>    printf("probando ejecutable");
>    printf("llamando a ABIWORD desde wine ...");
>    system("/bin/sh -c \"/script.run file.txt\"");
>    return 0;
> }
>
> works perfectly
>
any reason why its necessary to involve a shell?

Just a note: You might want to use http://wiki.winehq.org/winepath if
paths get involved...

In perl what would be: (emulating backtick is something I haven't
figured out in C)
my $filename = `winepath "file.txt"`; # this would be where to put the
windows path
system('/usr/bin/abiword',($filename)); # the multi-parameter form
doesn't have quoting issues...

(Standard system does not seem to support it, but one of exec &
friends might...)

Gert



More information about the wine-users mailing list