Wine, commandline and calling process...
BlitzMax Forums/BlitzMax Programming/Wine, commandline and calling process...
| ||
I have a Windows executable, which, has been installed into Wines virtual thingy me bob, which is all installed on OSX (Snow kitty), the setup is this:- wine /Users/michaeldenathorn/.wine/drive_c/Ed/Ed.exe I would also like to pass some parameters in, which are filepaths and what not... Anyway, if there's no filepaths passed, and I call Ed.exe in a terminal window, with the above, I'm greeted to a nice little massage that says "You need a filepath too, spoon!" BUT If I call this from my [native] app (Note, no spaces), the exact same line, it borks, if I call it using system_, it says sh: wine: command not found, if I call it from freeprocess, it doesnt read anything in, here's the squishy freeprocess bit:- Local line:String Local Process:TProcess = CreateProcess(cmdstring, HideConsole) While Process.Status() PollSystem If Process.Pipe.ReadAvail() Then Local Line:String = Process.Pipe.ReadLine().Trim() If Line <> "" Then DebugLog Line + "~n" EndIf EndIf If Process.err.ReadAvail() Then Local Line:String = Process.err.ReadLine().Trim() If Line <> "" Then If Instr(Lower:String(Line), "error") DebugLog("~nOoops : " + Line + "~n") Process.Close() Return 0 Else DebugLog("Notice : " + Line + "~n") EndIf EndIf EndIf Wend Note, it doesnt output anything at all! Anyone help with this at all? Dabz Last edited 2012 Last edited 2012 |
| ||
Have you tried running wine /Users/michaeldenathorn/.wine/drive_c/Ed/Ed.exe from the Terminal yourself? I'd be willing to bet that Wine has not been correctly configured on your OS X installation, leading to it not executing properly. I'm not familiar with OS X, but on Windows I'd suggest making sure that the Wine binaries are in your PATH environment variable. If there's an equivalent on OS X, you should look at that. Apart from that, though, I'd say it's bad practice to code an application that depends on a correctly configured Wine installation, at least not if you're planning on widely distributing it. What is Ed.exe and why is it so vital? Can you not find an OS X equivalent for your OS X application, or perhaps recode it entirely in Blitz so you have a cross-compatible version? |
| ||
Have you tried running wine /Users/michaeldenathorn/.wine/drive_c/Ed/Ed.exe from the Terminal yourself? I'd be willing to bet that Wine has not been correctly configured on your OS X installation, leading to it not executing properly. and I call Ed.exe in a terminal window, with the above, I'm greeted to a nice little massage that says "You need a filepath too, spoon!" Fixed it anyway, the installation is fine, the code is fine, but, when calling like I am (Not in the terminal), you have to provide the full path to the wine binary, probably another security measure or something since Apple has wrapped the whole lot up in cotton wool nearly! Dabz |