Command Line Arguments

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
sspyrison
Newbie
Newbie
Posts: 4
Joined: Thu Mar 03, 2011 9:59 am

Command Line Arguments

Post by sspyrison »

I'm having a bit of trouble getting WinMerge to accept command line arguments, although it does seem to run nicely under wine. I am using Wine under Mac OSX. From selecting files manually within WinMerge, I can see that it uses a Z: drive letter to reference the OS filesystem.

I have tried this:

Code: Select all

open -a Wine "/Applications/WinXP/drive_c/Program Files/WinMerge/WinMergeU.exe Z:\Users\usera Z:\Users\userb"
and this:

Code: Select all

open -a Wine "/Applications/WinXP/drive_c/Program Files/WinMerge/WinMergeU.exe -- Z:\Users\usera Z:\Users\userb"
with no luck so far.

Can anyone offer some advice? I'm not a stranger to the command line, but I am new to wine.
James McKenzie

Command Line Arguments

Post by James McKenzie »

open -a Wine "/Applications/WinXP/drive_c/Program Files/WinMerge/WinMergeU.exe Z:\Users\usera Z:\Users\userb"
You don't need to use the open -a on the wine executable on MacOSX.

Also, you cannot use your WinXP directory to run programs from for
Wine. You need to install this program in the wine file structure.

Can you provide the command line you used to initalize Wine with?

If you mapped your Windows C: drive to be your Wine c: drive, you just
hosed up your Windows install and broke Wine.

The FAQ provides information on why not to do this and what you need
to do to recover from it.

James McKenzie
sspyrison
Newbie
Newbie
Posts: 4
Joined: Thu Mar 03, 2011 9:59 am

Wine Command Line Arguments

Post by sspyrison »

Hi,

I think my naming conventions might be causing some confusion. I created a prefix called WinXP using WineBottler. It's not a copy of a Windows installation.

I installed WinMerge within Wine, not by copying the binaries from a Windows box.

I'll try it again without the open -a, but I've tried it using many different permutations already and I don't recall that causing a difference in what I was seeing. WinMerge starts fine, I just can't get the command line arguments to pass to the Windows exe
James McKenzie

Command Line Arguments

Post by James McKenzie »

On Thu, Mar 3, 2011 at 8:41 AM, sspyrison <[email protected]> wrote:
Hi,

I think my naming conventions might be causing some confusion.  I created a prefix called WinXP using WineBottler.  It's not a copy of a Windows
installation.
Unfortunately, you're going to have to ask Mike for assistance with WineBottler.

How did you install Wine?
I installed WinMerge within Wine, not by copying the binaries from a Windows box.

I'll try it again without the open -a, but I've tried it using many different permutations already and I don't recall that causing a difference in what I was
seeing.  WinMerge starts fine, I just can't get the command line arguments to pass to the Windows exe.
Ok. From what you said I can recommend the following, which must be
run from terminal (Applications folder then Utilities):

Code: Select all


cd /Applications/WinXP/drive_c/Program\ Files/WinMerge
wine WinMergeU.exe "Z:\Users\usera Z:\Users\userb"

Is this how the program is run under Windows? I'm not assuming that
parameters to this program are passed like this.

James McKenzie
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: Command Line Arguments

Post by doh123 »

looks like your quoting the whole line as 1 argument instead of quoting each part separately.
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: Command Line Arguments

Post by doh123 »

doh123 wrote:looks like your quoting the whole line as 1 argument instead of quoting each part separately.
also... stupidly hit submit by mistake...

Wine.app might not be handling events correctly to pass that info along, you'd have to ask Mike.

If you want to make a port of the app with file associations in the finished one where you can just double click them in Finder and have the whole app start and open them... I have support for that in Wineskin. I focus on making finished apps work as much like a native app as I can... and file associations are working fine... I think I covered how to set it up right in the Manual. Its much nicer than having to launch in Terminal.
sspyrison
Newbie
Newbie
Posts: 4
Joined: Thu Mar 03, 2011 9:59 am

Thanks - Will Test

Post by sspyrison »

Ok, thanks to you both for your suggestions, and I apologize for asking something related to WineBottler in the forum - that was probably bad form on my part...

Nonetheless, you both gave me some excellent suggestions, and I'll take those into Terminal and see what I can come up with. If I do get this resolved I'll replay back so that we've got some record of it in the forum for anyone else that might be searching for similar advice.
sspyrison
Newbie
Newbie
Posts: 4
Joined: Thu Mar 03, 2011 9:59 am

Solution for WineBottler

Post by sspyrison »

Ok, sorry for cluttering up the winehq forum with a WineBottler question.

The startwine script is referenced in an FAQ on his wiki:

http://winebottler.kronenberg.org/trac/wiki/WineCmdLine

In the latest release, however, startwine or startwine.sh is nowhere to be found. Here's where I found the script, on Mike's blog:

http://mike.kronenberg.org/?p=359

I adapted it to my environment by changing a couple variables and some of the quoting, and it works fine. I can invoke it as such:

Code: Select all

startwine "/Applications/WinXP/drive_c/Program Files/WinMerge/WinMergeU.exe" "Z:\Users\usera" "Z:\Users\userb"
Hope this helps future googlers.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Solution for WineBottler

Post by vitamin »

sspyrison wrote:

Code: Select all

startwine "/Applications/WinXP/drive_c/Program Files/WinMerge/WinMergeU.exe" "Z:\Users\usera" "Z:\Users\userb"
Hope this helps future googlers.
Still wrong. You should double back slashed inside double quotes. Or use single quotes:

Code: Select all

"Z:\\Users\\usera"
Or

Code: Select all

'Z:\Users\usera'
Locked