New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Switcher Hangout The place for switchers to discuss their new machines, and how to work with OS X. General support can be had here for newbie stuff, like "How do I restart my new iMac?" :)

How to find the path to wine program files?


Post Reply New Thread Subscribe

 
Thread Tools
swarup

 
Member Since: Dec 20, 2012
Posts: 12
swarup is on a distinguished road

swarup is offline
I have installed a program via wine, and am trying to put an icon for it in the doc. I found instructions for how to do it-- I need to make a script for launching the program and put that script in the doc. Here is the script I need to make via AppleScript Editor

Code:
tell application "Terminal"
    do script "/opt/local/bin/wine ~/.wine/drive_c/Program\\ Files/$PATH_TO_PROGRAM.exe"
end tell
But in the above code I need to need to replace $PATH_TO_PROGRAM with the path from the Program Files directory to your program executable. I have spent the last hour googling about finding hidden files and system files in mac, and although I activated those options I still can't find the "c-drive" which wine has made, along with the program files located there. I just need to find the pathway to the .exe file to put it into the above code. What is the way to do this in mac?
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,622
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
In Finder, push Shift-Command-G and enter the following:
Code:
~/.wine/drive_c/
Navigate from there to find the name of the relevant folder.

Remember, when using directory names in that Applescript, you need to replace spaces with "\ " (without the quotes and the space).

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks
swarup

 
Member Since: Dec 20, 2012
Posts: 12
swarup is on a distinguished road

swarup is offline
I got the pathway by the directions you have given. Here is the pathway to the .exe file:

Code:
/Users/[username]/.wine/drive_c/Program\ Files/Electronic\ Edition\ 7.5/Windows/Search/EE7Search.exe
On that basis here is the code that I made:

Code:
tell application "Terminal"
    do script "/opt/local/bin/wine ~/.wine/drive_c/Program\\ Files/Electronic\Edition\7.5/Windows/Search/EE7Search.exe"
end tell
When I click "compile", get the error:

Quote:
Syntax Error: Expected """ but found unknown token.
Together with the above error note, it highlights the "E" of "Edition". I had removed the space before the word "Edition", as per what I understood from you. But when the error came, then I tried placing a space between the "\" and the "E". But with the space there I still get the same error, just the highlight comes at the space itself.

What is wrong with my syntax?

Other than that I know the pathway is proper, because when I click directly on that .exe file in Finder, it opens the program.
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,318
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
Spaces in paths are just annoying..you want to use a single '\' and follow that with a space to escape it and get the space..

During the installation of the application, if you had the option to set the path of the installation, delete this installation, re-install and choose to use "program_files/Electronic_Edition_7.5" instead of the directories with spaces..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,622
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Replace:
Code:
/opt/local/bin/wine ~/.wine/drive_c/Program\\ Files/Electronic\Edition\7.5/Windows/Search/EE7Search.exe
with:
Code:
/opt/local/bin/wine ~/.wine/drive_c/Program\ Files/Electronic\ Edition\ 7.5/Windows/Search/EE7Search.exe

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks
swarup

 
Member Since: Dec 20, 2012
Posts: 12
swarup is on a distinguished road

swarup is offline
Vansmith, I implemented the change you indicated-- but am still getting the syntax error. Here is the current code:

Code:
tell application "Terminal"
    do script "/opt/local/bin/wine ~/.wine/drive_c/Program\ Files/Electronic\ Edition\ 7.5/Windows/Search/EE7Search.exe"
end tell
The same syntax error is coming as I mentioned above, and now the highlight is appearing at the space before the word "Files".
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,318
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
Open a terminal and enter the string "/opt/local/bin/wine ~/.wine/drive_c/Program\ Files/Electronic\ Edition\ 7.5/Windows/Search/EE7Search.exe" without the double quotes and see if it works..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
swarup

 
Member Since: Dec 20, 2012
Posts: 12
swarup is on a distinguished road

swarup is offline
Quote:
Originally Posted by Raz0rEdge View Post
Open a terminal and enter the string "/opt/local/bin/wine ~/.wine/drive_c/Program\ Files/Electronic\ Edition\ 7.5/Windows/Search/EE7Search.exe" without the double quotes and see if it works..
Yes, it works. When pasted into a terminal window, it will boot up the program.

But when I put that very code into the Applescript and click "compile", it gives a syntax error. And I need the Applescript in order to create an icon for the doc.
QUOTE Thanks
swarup

 
Member Since: Dec 20, 2012
Posts: 12
swarup is on a distinguished road

swarup is offline
If my post #8 just above has a solution, that will be wonderful and I will be most happy to execute that.

If no one knows how the Applescript can be made to work when there are spaces in the pathway, i.e. if the spaces are indeed the problem here, then please instruct me how to uninstall the wine program which I have installed. During its installation there is indeed the option to set the path of the installation. So in the absence of a solution to my post#8 above, I will delete this installation, re-install and choose to use "program_files/Electronic_Edition_7.5" instead of the directories with spaces.
QUOTE Thanks
swarup

 
Member Since: Dec 20, 2012
Posts: 12
swarup is on a distinguished road

swarup is offline
Sorry to bump this thread, but I need a solution...

If someone knows how to get the Applescript to work with the existing spaces in the pathway, please let me know. Otherwise, if someone can let me know how to uninstall this application from within wine, then please let me know. Then I can reinstall it, and take the spaces out of the pathway. Either one will allow me to solve this. Thanks!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,622
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Quote:
Originally Posted by swarup View Post
Yes, it works. When pasted into a terminal window, it will boot up the program.

But when I put that very code into the Applescript and click "compile", it gives a syntax error. And I need the Applescript in order to create an icon for the doc.
What syntax error? If the line works outside of the Apple script editor, I'm going to guess that you simply pasted it wrong.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks

Post Reply New Thread Subscribe


« not working imac 24/2.8/2x1g | External Hard Drive Does Not Recognise On PowerBook g4 »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Can't find my files, please help. #1 Jack Straw Switcher Hangout 5 09-11-2012 09:10 AM
how to find out and delete these files? Tdub77 OS X - Operating System 2 06-12-2012 11:43 PM
How to import .MTS files into iMovie that have been archived baz201 Movies and Video 1 01-12-2012 07:49 PM
find command won't list keynote files Straitsfan OS X - Operating System 1 05-13-2011 08:59 AM
Where do you find the serial number in the actual Final Cut pro program? jordy2324 Movies and Video 2 03-17-2010 08:24 PM

All times are GMT -4. The time now is 07:04 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?