After some discussion between scriptors, I decided to post this to explain how to use the right Program Files directory.
Indeed the directory name depends on the system's locale.
So if you want to be sure that you're using the right path in your script, you need to know exactly which path Wine uses.
You can use this code
#fetching PROGRAMFILES environmental variable (by NSLW)
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
But don't read the program files name for the default Wine prefix!
What I mean is that if the default Wine prefix was created with an old release of Wine, you can't be sure that the current Wine release uses the same behavior for their prefix.
And it is possible that there is no default prefix (a user that never runs something directly with Wine, but always through a tool like PoL).
So use this code:
select_prefix "$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_prefixcreate
#fetching PROGRAMFILES environmental variable (by NSLW)
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
With this you use the Program Files directory created by Wine.
But if you want to force Program Files to be "Program Files", you need to use (it's not recommended behavior):
select_prefix "$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_specialprefixcreate
or (I think, no time to test and be sure), you can do this:
select_prefix "$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_prefixcreate
set_programfile_dir
wineboot
Edité par Salvatos
Former member.