Estas Aqui > Les forums > Your creations. > Program Files behaviours sv ru pl en fr

Foros

Program Files behaviours

Nuevo tema 
Autor Respuestas
Aymeric P. Miercoles 14 Octubre 2009 a las 8:07 - [Citar]
Admin

Admin
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

Editado por: Salvatos



Don't think because I answered once, I will answer again.
NSLW Miercoles 14 Octubre 2009 a las 10:20 - [Citar]
Membre

Membre

Citation de MulX:

With this one you use the Program Files directory created by wine. But if you want to force the Program Files to be Program Files you need to use
select_prefix "$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_specialprefixcreate


I don't get it. Why would anyone like to force Program Files to be Program Files and not e.g Archivos de programa? I think it may be confusing for not advanced user to get accustomed to Program Files if all the time he used Archivos de programa in MS Windows.

BTW. Good that you clarified that and made other scriptors aware of that.

Editado por: NSLW

Aymeric P. Domingo 1 Noviembre 2009 a las 23:11 - [Citar]
Admin

Admin
Indeed using Program Files instead of Archivos de programa can confuse some basic user but if a day you need to force Program Files to be Program Files you can ^^.


As a say and explain in the first post: don't read the program files name for the default Wine prefix !!!
I don't have the time to check all script, so correct your own script, or report the script !


Don't think because I answered once, I will answer again.
NSLW Lunes 2 Noviembre 2009 a las 8:52 - [Citar]
Membre

Membre
Ok. I will be correcting this but it'll take some time.

Editado por: NSLW

Quentin PÂRIS Domingo 28 Febrero 2010 a las 11:31 - [Citar]
Admin

Admin
Updated : Please use

PROGRAMFILES="Program Files" 
POL_LoadVar_PROGRAMFILES

Il n'y a rien à voir ici