Results 1 to 12 of 12
  1. #1
    How to find the path to wine program files?

    Member Since
    Dec 20, 2012
    Posts
    12
    How to find the path to wine program files?
    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?

  2. #2
    How to find the path to wine program files?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,395
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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
    Writing a Quality Post

  3. #3
    How to find the path to wine program files?

    Member Since
    Dec 20, 2012
    Posts
    12
    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:

    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.

  4. #4
    How to find the path to wine program files?
    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,184
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    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.

  5. #5
    How to find the path to wine program files?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,395
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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
    Writing a Quality Post

  6. #6
    How to find the path to wine program files?

    Member Since
    Dec 20, 2012
    Posts
    12
    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".

  7. #7
    How to find the path to wine program files?
    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,184
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    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.

  8. #8
    How to find the path to wine program files?

    Member Since
    Dec 20, 2012
    Posts
    12
    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.

  9. #9
    How to find the path to wine program files?

    Member Since
    Dec 20, 2012
    Posts
    12
    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.

  10. #10
    How to find the path to wine program files?

    Member Since
    Dec 20, 2012
    Posts
    12
    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!

  11. #11
    How to find the path to wine program files?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,395
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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
    Writing a Quality Post

  12. #12
    How to find the path to wine program files?

    Member Since
    Oct 27, 2014
    Posts
    1
    An alternative approach
    I know this is an old thread, but I needed the same feature.
    As an alternative solution, I used the advice from this page to find the directory in finder, but then dragged it to the side-bar.
    This provides a quick link from Finder (as opposed to the desktop) to all of the Windows applications (Program Files). I could have chosen a single program to drag there instead (e.g. WinSCP).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 12-21-2012, 01:23 PM
  2. Path to find Photos
    By tjzstar in forum OS X - Apps and Games
    Replies: 3
    Last Post: 03-15-2012, 02:33 PM
  3. Does anyone know if I can get jtag files off my Mac with Wine
    By macuser1232 in forum Running Windows (or anything else) on your Mac
    Replies: 8
    Last Post: 08-30-2011, 10:54 PM
  4. Installation Files Path
    By Wheelz in forum Switcher Hangout
    Replies: 0
    Last Post: 12-27-2010, 08:50 PM
  5. does crossover uses its own wine or the wine of winehq.org
    By Sushant_mac in forum Running Windows (or anything else) on your Mac
    Replies: 5
    Last Post: 07-05-2009, 11:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •