Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
226 views
in Technique[技术] by (71.8m points)

Linux/Wine: windows app starts windows console command and waits when on windows does not wait on linux: how to fix?

I am successfully running a Windows program using Wine apart from one feature. The program can be set up to start pdflatex in a texlive distribution, and when it does it waits to see if the result is successful or not, and then copies/moves files. But on Linux I cannot arrange for it to wait for pdflatex to complete the way it does on Windows and so files are copied/moved prematurely and pdflatex fails to find them.

There's a dialog I can use to save an arbitrary command that will be executed when I push the pdflatex button in the app. I point this dialog at C:exlive2020inwin32pdflatex.exe on Windows and it works. I successfully put this command so as to run pdflatex using wine on Linux apart from the problem of not waiting.

Z:/usr/bin/gnome-terminal --wait -- /home/nonnull/bin/runlatex/runlatex.sh "%f"

By having the last command in runlatex.sh be exec /bin/bash the terminal remains open, so I can see all the output from pdflatex and know it is being run with the correct file which runlatex.sh has to figure out by converting the windows path passed to it into its actual path. pdflatex complains variously that a file it created right there and then doesn't exist during the run. And even though the terminal is open and so not done executing, the app complains that pdflatex did not complete correctly before even the output text from pdflatex has finished scrolling down the terminal.The behavior of the app doesn't change when I omit the exec command when the terminal closes immediately pdflatex is done.

What is going on with Wine that the command doesn't remain attached until it has finished running? And what can I do about it? Any suggestions for a command or mechanism that might bypass this difficulty? I'm up for writing a win32 program to mediate if that's what it would take.

question from:https://stackoverflow.com/questions/65877383/linux-wine-windows-app-starts-windows-console-command-and-waits-when-on-windows

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...