[Wine] Re: call openoffice in linux from wine
fachamix
wineforum-user at winehq.org
Mon Nov 30 08:58:00 CST 2009
NOT SOLVED at all , its just half solved
I need to call abiword from a program compiled under windows, but executing it in linux using wine
but not only calling abiword, I need to send a parameter to it, to open random files generated by the program.
so I have the program:
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("testing");
printf("calling abiword from wine ....");
system("/bin/sh -c /usr/bin/abiword");
return 0;
}
I compiled, and run it under linux:
wine program.exe
and prints the text and opens abiword .... perfect.
Now I want to call abiword with a parameter... this parameter should be a file to open . so my C code of program.exe changes to:
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("probando ejecutable");
printf("llamando a ABIWORD desde wine ...");
system("/bin/sh -c /usr/bin/abiword file.txt");
return 0;
}
compiled and executed in linux:
wine program.exe
its just opening the abiword ,... but it does not open the file.
so I try to make and script in linux, so my program.exe could call a script qith a parameter.
script.run :
Code:
#!/bin/sh
echo "testing..."
/usr/bin/abiword $1
echo "end..."
read
exit
and now my program would be like this:
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;
}
no case, it just opens abiword without opening the file file.txt
if I try my script pure in linux using ./script.run file.txt .... it opens abiword with the file.txt in it.
I dont know what to do
More information about the wine-users
mailing list