Re: call openoffice in linux from wine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux