Menu

#57 wineprefix in custom commands

Wrapper
closed
doh123
5
2011-09-16
2011-09-13
No

I wanted to use the native winepath command in the custom commands field but it seems that the WINEPREFIX variable is still not defined and so winepath does not work. Tested custom commands:

export MYPATH=$USER
# Result: MYPATH=<current os x user>

export MYPATH=$WINEPREFIX
# Result is empty: MYPATH=

# Custom Command using winepath (all in one line). Under Windows CONFIGPATH should contain a Path to the OS X current users Application Settings:
mkdir ~/Library/Application\ Support/MyApplication;
export CONFIGPATH=~/Library/Application\ Support/MyApplication/;
export CONFIGPATH=$(winepath -w "$CONFIGPATH");

# A possible workaround is to hardcode the path, but this doesn't work in other contests (when I need dynamic paths for example)
# workaround:
mkdir ~/Library/Application\ Support/MyApplication;
export CONFIG_PATH=z:\\Users\\$USER\\Library\\Application\ Support\\MyApplication\\;

# I also tried to use the WineskinStartupScript but any environment settings is discarded.

Discussion

  • doh123

    doh123 - 2011-09-16

    Well I'm not surprised... the custom commands run before anything else int he line for launching Wine, including before WINEPREFIX is set.

    SHould I re-order things so that all the variables are set and then custom commands are run? My first though was that if people set the wrong variables it can totally hose things since they can override the ones that need to be a certain way.... but of course they cannot access them either.

    So your trying to set an environment variable so it'll be passed on to the Windows app? Never knew oyu could do that :-)

    The startup script doesn't work for modifying anything on how Wine runs... its made for moving files around, or maybe editing a .ini file or something that could all stand on its own.

    I'll just have it set all the variables when launching before the Custom Commands are run... I guess that should fix it.

     
  • doh123

    doh123 - 2011-09-16
    • milestone: --> Wrapper
    • assigned_to: nobody --> doh123
     
  • doh123

    doh123 - 2011-09-16

    fixed in git

    author doh123 <doh123@doh123.com>
    Fri, 16 Sep 2011 21:25:04 +0000 (16:25 -0500)
    committer doh123 <doh123@doh123.com>
    Fri, 16 Sep 2011 21:25:04 +0000 (16:25 -0500)
    commit b4d43203411df1a2048f24dc4efb13705b5f792e
    tree 4d1997bf644e7a0177ca46f51b3390d35358582c
    parent 109ded6cb69b3639251d126a4daa35246bb00674
    3408816 re-order when Custom Commands launch so variables are set right

     
  • doh123

    doh123 - 2011-09-16
    • status: open --> closed
     

Log in to post a comment.