1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571
|
#!/bin/bash
# Copyright (C) 2007-2011 PlayOnLinux Team
# Copyright (C) 2007-2011 Pâris Quentin
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# deprecated.lib
# --------------
#
# This lib contains PlayOnLinux's v3 old functions, so that the scripts can stay compatible
# Please do NOT use these functions anymore !
#############################
##### Old GUI functions #####
#############################
POL_SetupWindow_message_image ()
{
# Show a message with an image
# Now, it calls POL_SetupWindow_message
POL_Debug_Warning "Deprecated function!"
POL_SetupWindow_message "$@"
}
POL_SetupWindow_detect_exit ()
{
# Detect if "Cancel" button has been clicked in a Setup Window.
# If it's the case, the function kills the scripts
# In version 4, python automatically kills bash process, so this function has became useless
# Usage: POL_SetupWindow_detect_exit
POL_Debug_Warning "POL_SetupWindow_detect_exit is deprecated"
MESSAGE_BIS=$(cat "$REPERTOIRE/configurations/guis/$POL_SetupWindow_ID" | grep '^MSG_RECEIVED=')
if [ "$MESSAGE_BIS" = "MSG_RECEIVED=Cancel" ]
then
rm "$REPERTOIRE/configurations/guis/$POL_SetupWindow_ID"
exit
fi
}
POL_SetupWindow_games ()
{
# Show the list of programs installed.
# This function has been renamed to POL_SetupWindow_shorcuts_list
# Usage: POL_SetupWindow_shortucts_list
POL_Debug_Warning "Deprecated function"
POL_SetupWindow_shortcuts_list "$@"
}
POL_SetupWindow_install_wine ()
{
# This function installs a version of wine into playonlinux environement
# It has been renamed to POL_Wine_InstallVersion
# Usage: POL_SetupWindow_install_wine [VERSION]
POL_Debug_Warning "Function deprecated"
POL_Wine_InstallVersion "$@"
}
#########################################
##### Old prefix creation functions #####
#########################################
POL_SetupWindow_specialprefixcreate ()
{
# Create a prefix for very old version of wine
# It also rename program files directory and users directory to english names
# Can cause problems
# Usage: POL_SetupWindow_specialprefixcreate
POL_Debug_Warning "Very deprecated ! Use POL_Wine_PrefixCreate"
POL_SetupWindow_wait_next_signal "$(eval_gettext 'Please wait while the virtual drive is being created...')" "$TITLE"
wine wineprefixcreate
sleep 2
set_user_dir
set_programfile_dir
POL_SetupWindow_detect_exit
}
POL_SetupWindow_oldprefixcreate ()
{
# Create a prefix for very old version of wine
# Usage: POL_SetupWindow_oldprefixcreate
POL_Debug_Warning "Very deprecated ! Use POL_Wine_PrefixCreate"
POL_SetupWindow_wait_next_signal "$(eval_gettext 'Please wait while the virtual drive is being created...')" "$TITLE"
wine wineprefixcreate
POL_SetupWindow_detect_exit
}
POL_SetupWindow_prefixcreate ()
{
# Create a prefix (virtual drive)
# Renamed to POL_Wine_PrefixCreate
# Usage: POL_SetupWindow_prefixcreate
POL_Debug_Warning "Very deprecated ! Use POL_Wine_PrefixCreate"
POL_Wine_PrefixCreate "$@"
}
POL_SetupWindow_normalprefixcreate()
{
# Just create a prefix, without setting any version of wine and without detecting architecture
# May not work as expected
# Usage: POL_SetupWindow_normalprefixcreate
POL_Debug_Warning "Very deprecated ! Use POL_Wine_PrefixCreate"
sleep 1
POL_SetupWindow_wait_next_signal "$(eval_gettext 'Please wait while the virtual drive is being created...')" "$TITLE"
wine wineboot
}
select_prefixe ()
{
# Select a wineprefix
# Usage: select_prefixe "/path/to/prefix"
POL_Debug_Warning "Deprecated function ! Use POL_Wine_SelectPrefix"
export WINEPREFIX="$1"
export DOSPREFIX="$1" # For dosbox support
}
select_prefix ()
{
# Copy of select_prefixe
# Usage: select_prefix "/path/to/prefix"
select_prefixe "$@"
}
##############################
##### Old Wine functions #####
##############################
Set_GLSL ()
{
# Enable or disable GLSL support in the selected prefix
# This function is regrouped with others. Therefore, you should replace it by "POL_Wine_Direct3D UseGLSL"
# Usage: Set_GLSL (On|Off)
POL_Debug_Warning "Set_GLSL depracted, please use POL_Wine_Direct3D UseGLSL"
# On ou Off
if [ "$1" = "On" ] || [ "$1" == "enabled" ]
then
echo "[HKEY_CURRENT_USER\Software\Wine\Direct3D]" > "$REPERTOIRE/tmp/glsl.reg"
echo "\"UseGLSL\"=\"enabled\"" >> "$REPERTOIRE/tmp/glsl.reg"
wine regedit "$REPERTOIRE/tmp/glsl.reg"
rm -f "$REPERTOIRE/tmp/glsl.reg"
fi
if [ "$1" = "Off" ] || [ "$1" == "disabled" ]
then
echo "[HKEY_CURRENT_USER\Software\Wine\Direct3D]" > "$REPERTOIRE/tmp/glsl.reg"
echo "\"UseGLSL\"=\"disabled\"" >> "$REPERTOIRE/tmp/glsl.reg"
wine regedit "$REPERTOIRE/tmp/glsl.reg"
rm -f "$REPERTOIRE/tmp/glsl.reg"
fi
}
installer_wine_version ()
{
# Copy of POL_SetupWindow_install_wine
# Usage: POL_SetupWindow_install_wine [VERSION]
POL_SetupWindow_install_wine "$@"
}
Set_WineVersion_Assign ()
{
# Set a version of wine for a shortcut
# In POL 4, wine versions are no longer assigned to a shortcut,
# but they are assigned to a prefix.
# This function detects the prefix of the shortcut in the first argument to assign the good version
# Usage: Set_WineVersion_Assign [VERSION] [SHORTCUT]
prefixold="$WINEPREFIX"
POL_Debug_Warning "Function deprecated !"
export WINEPREFIX="$POL_USER_ROOT/wineprefix/$(POL_Shortcut_GetPrefix "$2")"
POL_Wine_SetVersionPrefix "$1"
export WINEPREFIX="$prefixold"
}
fonts_to_prefixe ()
{
# Install microsoft fonts to a prefix
# Replaced by POL_Wine_InstallFonts
# Usage: fonts_to_prefixe
POL_Wine_InstallFonts "$@"
}
fonts_to_prefix ()
{
# Install microsoft fonts to a prefix
# Replaced by POL_Wine_InstallFonts
# Usage: fonts_to_prefix
POL_Wine_InstallFonts "$@"
}
Use_WineVersion()
{
# Set the good wineversion in PATH
# No longuer needed, use POL_WINEVERSION variable before calling POL_Wine
# Usage: Use_WineVersion [VERSION]
POL_Debug_Warning "Function is deprecated. Use export WINEVERSION instead"
export POL_WINEVERSION="$1"
}
##########################################
##### Old shorcut creation functions #####
##########################################
POL_SetupWindow_make_shortcut()
{
# Make a shortcut into PlayOnLinux
# Use POL_Shortcut
# Usage: POL_SetupWindow_make_shortcut [Prefix name] [Program's directory] [Program's file] [POL Website icon] [Name of the sortcut] [Leave empty] [Argument]
POL_Debug_Warning "Deprecated function! Use POL_Shortcut"
creer_lanceur_base "$@"
if [ ! "$(POL_Config_Read NO_DESKTOP_ICON)" = "TRUE" ]
then
if [ "$POL_OS" = "Mac" ] # Ouai, la c'est complètement différent sous linux et sous mac
then
if [ "$5" = "" ]
then
POL_SetupWindow_AutoApp "$1" "$1"
else
POL_SetupWindow_AutoApp "$5" "$1"
fi
else
if [ -f "$REPERTOIRE/icones/full_size/$NOMICONE_" ]; then # L'icone existe...
iconPath="$REPERTOIRE/icones/full_size/$NOMICONE_"
else
iconPath="$PLAYONLINUX/etc/playonlinux.png"
fi
generer_icone "$iconPath" "$NOMICONE_" "$DESKTOP" "$PLAYONLINUX/playonlinux --run \"$NOMICONE_\"" "$NOMICONE_"
fi
fi
}
POL_SetupWindow_auto_shortcut()
{
# Make a shortcut into PlayOnLinux, easier using than POL_SetupWindow_make_shortcut
# Use POL_Shortcut
# Usage: POL_SetupWindow_make_shortcut [Prefix name] [Program's binary file] [Name of the sortcut] [POL Website icon] [Argument]
POL_Debug_Warning "POL_SetupWindow_auto_shortcut is deprecated"
Binaire="$2"
SpecialArg="$5"
if [ "$3" = "" ]
then
NOMICONE_="$1"
else
NOMICONE_="$3"
fi
mkdir -p "$REPERTOIRE/icones/32"
mkdir -p "$REPERTOIRE/icones/full_size"
ICON_WEB_NAME="$4"
ICON_OK=0
## On chope le dossier du binaire
cd "$REPERTOIRE/wineprefix/$1" || POL_SetupError "Prefixe $1 does not exists"
cd drive_c || POL_SetupError "drive_c folder does not exists"
binary_path=$(find ./ -iname "$Binaire" | tail -n 1)
binary_dir=$(dirname "$binary_path")
Binaire=$(basename "$binary_path")
[ "$binary_dir" = "" ] && POL_SetupError "Can't find $Binaire"
if [ -n "$ICON_WEB_NAME" ]; then
if [ ! "$OFFLINE" = "1" ]; then # On peut le télécharger...
$POL_WGET "$SITE/icones/$ICON_WEB_NAME" -O- > "$REPERTOIRE/icones/full_size/$NOMICONE_" || rm "$REPERTOIRE/icones/full_size/$NOMICONE_" # On prend l'icone full size
fi
if [ -f "$REPERTOIRE/icones/full_size/$NOMICONE_" ]; then
convert -resize 32 "$REPERTOIRE/icones/full_size/$NOMICONE_" "$REPERTOIRE/icones/32/$NOMICONE_" # On fabrique l'icone 32*32
ICON_OK=1
fi
elif [ "$ICON_OK" -ne 1 ]; then # Pas d'incone sur le web => Création à partir de l'exe...
echo "No internet icon..."
POL_ExtractIcon "$REPERTOIRE/wineprefix/$1/drive_c/$binary_dir/$Binaire" "$REPERTOIRE/icones/32/$NOMICONE_"
# On ne crée pas d'icone "full_size", parce que les résolutions des icones windows ne sont pas suffisantes tout le temps.
# Pour verifier la taille des icones, il faudrait utiliser "identify", mais ce programme n'est pas toujours fournis.
fi
## On génère le binaire
echo "#!/bin/bash" > "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "[ \"\$PLAYONLINUX\" = \"\" ] && exit 0" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "source \"\$PLAYONLINUX/lib/sources\"" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "export WINEPREFIX=\"$REPERTOIRE/wineprefix/$1\"" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "export WINEDEBUG=\"-all\"" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "cd \"$REPERTOIRE/wineprefix/$1/drive_c/$binary_dir\"" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "POL_Wine \"$Binaire\" $SpecialArg \$@" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
chmod +x "$REPERTOIRE/shortcuts/$NOMICONE_"
if [ ! "$(POL_Config_Read NO_DESKTOP_ICON)" = "TRUE" ]
then
if [ "$POL_OS" = "Mac" ]
then
POL_SetupWindow_AutoApp "$3" "$1"
else
if [ -f "$REPERTOIRE/icones/full_size/$NOMICONE_" ]; then # L'icone existe...
iconPath="$REPERTOIRE/icones/full_size/$NOMICONE_"
else
iconPath="$PLAYONLINUX/etc/playonlinux.png"
fi
generer_icone "$iconPath" "$NOMICONE_" "$DESKTOP" "$PLAYONLINUX/playonlinux --run \"$NOMICONE_\""
fi
fi
}
POL_SetupWindow_shortcut()
{
# Copy of POL_Shortcut
# Usage: POL_SetupWindow_shortcut [Program's binary file] [Name] [Icon] [Argument]
POL_Debug_Warning "POL_SetupWindow_shortcut is deprecated"
POL_Shortcut "$@"
}
POL_SetupError()
{
# Old error function. Replaced by debugging API
# Usage: command | POL_SetupError [Messagge]
POL_Debug_Warning "Deprecated function"
POL_SetupWindow_message "$1\n\nAborting." "Error"
POL_SetupWindow_Close
exit
}
creer_lanceur_base ()
{
# Needed for POL_SetupWindow_make_shortcut
# Usage: POL_SetupWindow_make_shortcut [Prefix name] [Program's directory] [Program's file] [POL Website icon] [Name of the sortcut] [Leave empty] [Argument]
# 1 = Wineprefix
# 2 = Repertoire
# 3 = Binaire
# 4 = Icone (png ou xpm)
# 5 = Nom de l'icône
# 6 = Ignoré (question de compatibilité avec les versions < 2.0)
# 7 = Eventuel argument
Binaire="$3"
SpecialArg="$7"
if [ "$5" = "" ]
then
NOMICONE_="$1"
else
NOMICONE_="$5"
fi
mkdir -p "$REPERTOIRE/icones/32"
mkdir -p "$REPERTOIRE/icones/full_size"
ICON_WEB_NAME="$4"
ICON_OK=0
# Création de l'icone.
# Cas 1 : le nom de l'icone est donné.
if [ -n "$ICON_WEB_NAME" ]; then
if [ ! "$OFFLINE" = "1" ]; then # On peut le télécharger...
$POL_WGET "$SITE/icones/$ICON_WEB_NAME" -O "$REPERTOIRE/icones/full_size/$NOMICONE_" # On prend l'icone full size
fi
if [ -f "$REPERTOIRE/icones/full_size/$NOMICONE_" ]; then
convert -resize 32 "$REPERTOIRE/icones/full_size/$NOMICONE_" "$REPERTOIRE/icones/32/$NOMICONE_" # On fabrique l'icone 32*32
ICON_OK=1
fi
elif [ "$ICON_OK" -ne 1 ]; then # Pas d'incone sur le web => Création à partir de l'exe...
echo "No iternet icon..."
mkdir -p "$REPERTOIRE/tmp/win32Icon"
wrestool -x "$REPERTOIRE/wineprefix/$1/drive_c/$2/$Binaire" -o "$REPERTOIRE/tmp/win32Icon" -t14
cd "$REPERTOIRE/tmp/win32Icon"
win32IconName=$(ls -S *.ico | head -n 1)
if [ -f "$win32IconName" ]; then # L'ico est créé
convert ICO:"$win32IconName" -resize 32 PNG:"$REPERTOIRE/icones/32/$NOMICONE_" # On fabrique l'icone 32*32
fi # Si non : icone play on linux.
rm -r "$REPERTOIRE/tmp/win32Icon"
# On ne crée pas d'icone "full_size", parce que les résolutions des icones windows ne sont pas suffisantes tout le temps.
# Pour verifier la taille des icones, il faudrait utiliser "identify", mais ce programme n'est pas toujours fournis.
fi
echo "#!/bin/bash" > "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "[ \"\$PLAYONLINUX\" = \"\" ] && exit 0" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "source \"\$PLAYONLINUX/lib/sources\"" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "export WINEPREFIX=\"$REPERTOIRE/wineprefix/$1\"" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "export WINEDEBUG=\"-all\"" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "cd \"$REPERTOIRE/wineprefix/$1/drive_c/$2\"" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
echo "POL_Wine \"$Binaire\" $SpecialArg \$@" >> "$REPERTOIRE/shortcuts/$NOMICONE_"
chmod +x "$REPERTOIRE/shortcuts/$NOMICONE_"
}
POL_SetupWindow_get_local_icon ()
{
# Get a local icon (.local folder) and assign it to a shortcut
POL_Debug_Warning "Deprecated function"
POL_GetLocalIcon "$@"
}
POL_SetupWindow_reboot ()
{
# Simulate windows reboot
# Usage: POL_SetupWindow_reboot
POL_SetupWindow_wait_next_signal "$(eval_gettext 'Please wait while $APPLICATION_TITLE is simulating a Windows reboot')" "Wine"
wine wineboot
POL_SetupWindow_detect_exit
}
read_prefixes()
{
# Get the list of prefixes
cd "$REPERTOIRE/wineprefix"
LIST_FILE=""
for file in *
do
if [ "$LIST_FILE" = "" ]
then
LIST_FILE="$file"
else
LIST_FILE+="~$file"
fi
done
echo $LIST_FILE
}
set_user_dir()
{
# Change directory name's to english one
cat << EOF > /tmp/pol_user.reg
REGEDIT4
[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer]
[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced]
[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders]
"AppData"="C:\\\\windows\\\\profiles\\\\$USER\\\\Application Data"
"Cache"="C:\\\\windows\\\\profiles\\\\$USER\\\\Local Settings\\\\Temporary Internet Files"
"Cookies"="C:\\\\windows\\\\profiles\\\\$USER\\\\Cookies"
"Desktop"="C:\\\\windows\\\\profiles\\\\$USER\\\\Desktop"
"Favorites"="C:\\\\windows\\\\profiles\\\\$USER\\\\Favorites"
"Fonts"="C:\\\\windows\\\\Fonts"
"History"="C:\\\\windows\\\\profiles\\\\$USER\\\\Local Settings\\\\History"
"Local AppData"="C:\\\\windows\\\\profiles\\\\$USER\\\\Local Settings\\\\Application Data"
"My Music"="C:\\\\windows\\\\profiles\\\\$USER\\\\My Music"
"My Pictures"="C:\\\\windows\\\\profiles\\\\$USER\\\\My Pictures"
"My Videos"="C:\\\\windows\\\\profiles\\\\$USER\\\\My Videos"
"NetHood"="C:\\\\windows\\\\profiles\\\\$USER\\\\Network Hood"
"Personal"="C:\\\\windows\\\\profiles\\\\$USER\\\\My documents"
"PrintHood"="C:\\\\windows\\\\profiles\\\\$USER\\\\Printing Hood"
"Programs"="C:\\\\windows\\\\profiles\\\\$USER\\\\Start Menu\\\\Programs"
"Recent"="C:\\\\windows\\\\profiles\\\\$USER\\\\Recent"
"SendTo"="C:\\\\windows\\\\profiles\\\\$USER\\\\SendTo"
"Start Menu"="C:\\\\windows\\\\profiles\\\\$USER\\\\Start Menu"
"StartUp"="C:\\\\windows\\\\profiles\\\\$USER\\\\Start Menu\\\\Programs\\\\StartUp"
"Templates"="C:\\\\windows\\\\profiles\\\\$USER\\\\Templates"
[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders]
"AppData"="%USERPROFILE%\\\\Application Data"
"Cache"="%USERPROFILE%\\\\Local Settings\\\\Temporary Internet Files"
"Cookies"="%USERPROFILE%\\\\Cookies"
"Desktop"="%USERPROFILE%\\\\Desktop"
"Favorites"="%USERPROFILE%\\\\Favorites"
"Fonts"="C:\\\\windows\\\\Fonts"
"History"="%USERPROFILE%\\\\Local Settings\\\\Historique"
"Local AppData"="%USERPROFILE%\\\\Local Settings\\\\Application Data"
"My Music"="%USERPROFILE%\\\\My Music"
"My Pictures"="%USERPROFILE%\\\\My Pictures"
"My Videos"="%USERPROFILE%\\\\My Videos"
"NetHood"="%USERPROFILE%\\\\Network Hood"
"Personal"="%USERPROFILE%\\\\My Documents"
"PrintHood"="%USERPROFILE%\\\\Printing hood"
"Programs"="%USERPROFILE%\\\\Start Menu\\\\Programs"
"Recent"="%USERPROFILE%\\\\Recent"
"SendTo"="%USERPROFILE%\\\\SendTo"
"Start Menu"="%USERPROFILE%\\\\Start Menu"
"StartUp"="%USERPROFILE%\\\\Start Menu\\\\Programs\\\\StartUp"
"Templates"="%USERPROFILE%\\\\Templates"
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer]
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop]
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\Namespace]
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\Namespace\\{450D8FBA-AD25-11D0-98A8-0800361B1103}]
@="My Documents"
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\Namespace\\{645FF040-5081-101B-9F08-00AA002F954E}]
@="Trash"
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\Namespace\\{9D20AAE8-0625-44B0-9CA7-71889C2254D9}]
@="/"
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer]
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\Namespace]
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\Namespace\\{21EC2020-3AEA-1069-A2DD-08002B30309D}]
@="Control Panel"
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders]
"Common AppData"="C:\\\\windows\\\\profiles\\\\All Users\\\\Application Data"
"Common Desktop"="C:\\\\windows\\\\profiles\\\\All Users\\\\Desktop"
"Common Documents"="C:\\\\windows\\\\profiles\\\\All Users\\\\Documents"
"Common Programs"="C:\\\\windows\\\\profiles\\\\All Users\\\\Start Menu\\\\Programs"
"Common Start Menu"="C:\\\\windows\\\\profiles\\\\All Users\\\\Start Menu"
"Common StartUp"="C:\\\\windows\\\\profiles\\\\All Users\\\\Start Menu\\\\Programs\\\\StartUp"
"Common Templates"="C:\\\\windows\\\\profiles\\\\All Users\\\\Templates"
"Favorites"="C:\\\\windows\\\\profiles\\\\All Users\\\\Favorites"
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders]
"Common AppData"="%ALLUSERSPROFILE%\\\\Application Data"
"Common Desktop"="%ALLUSERSPROFILE%\\\\Desktop"
"Common Documents"="%ALLUSERSPROFILE%\\\\Documents"
"Common Programs"="%ALLUSERSPROFILE%\\\\Start Menu\\\\Programs"
"Common Start Menu"="%ALLUSERSPROFILE%\\\\Start Menu"
"Common StartUp"="%ALLUSERSPROFILE%\\\\Start Menu\\\\Programs\\\\StartUp"
"Common Templates"="%ALLUSERSPROFILE%\\\\Templates"
"Favorites"="%ALLUSERSPROFILE%\\\\Favorites"
EOF
wine regedit /tmp/pol_user.reg
}
set_programfile_dir()
{
# Change directory's name to english one (program file)
#made by cendre, edited by tinou
#email:cendrev3v3@gmail.com
if [ ! "$WINEPREFIX" ]
then
export WINEPREFIX="$HOME/.wine"
fi
REG="$REPERTOIRE/tmp/reg.reg"
echo "$(eval_gettext "Setting Program Files var")"
rm -f "$REG"
cat <<EOF > "$REG"
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion]
"ProgramFilesDir"="C:\\\\Program Files"
EOF
wine regedit "$REG"
rm -f "$REG"
wine wineprefixcreate
#fi
#rm -rf $REG
}
|