frank
17th August 2005, 12:29
PgcEdit prefers as localized folders "Application Data" and "Program Files".
But they don't exist in foreign Windows versions, then Pgcedit stores configuration into the root of user home folder without any warning.
All things are working well until you install any program which creates the english named folders. Then you will lose your whole configuration! PgcEdit now searches in the english named folders. So happen to me.
To solve the problem we must do some debugging in PgcEdit.tcl: proc init_user_prefs
Delete red lines! Insert green lines!
Application Data ine 209
set ::config(config_directory) $::env(HOME)
if {$::tcl_platform(platform) == "windows"} {
if {[file exists [file join $::env(HOME) "Application Data"]]} {
set ::config(config_directory) [file join $::env(HOME) "Application Data/PgcEdit"]
}
# $::env(HOME) is wrong on some foreign Windows systems
if {[info exists ::freewrap::progname] && \
[info script] == "" && ! [file exists [file join $::env(HOME) "Application Data"]]} {
if {! [catch {set tmp [registry get "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders" "AppData"]} err_str]} {
set ::config(config_directory) [file join $tmp "PgcEdit"]
}
}
} else {
set ::config(config_directory) [file join $::env(HOME) ".PgcEdit"]
}
Program Files line 249
set progfiles "${rootdir}Program files\\"
if {! [catch {set tmp [registry get "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion" "ProgramFilesDir"]} err_str]} {
set progfiles "$tmp\\"
}
} else {
set ::config(tk) x11
Changes are working well in german version of Win XP and Win98. (Anwendungsdaten, Programme)
But they don't exist in foreign Windows versions, then Pgcedit stores configuration into the root of user home folder without any warning.
All things are working well until you install any program which creates the english named folders. Then you will lose your whole configuration! PgcEdit now searches in the english named folders. So happen to me.
To solve the problem we must do some debugging in PgcEdit.tcl: proc init_user_prefs
Delete red lines! Insert green lines!
Application Data ine 209
set ::config(config_directory) $::env(HOME)
if {$::tcl_platform(platform) == "windows"} {
if {[file exists [file join $::env(HOME) "Application Data"]]} {
set ::config(config_directory) [file join $::env(HOME) "Application Data/PgcEdit"]
}
# $::env(HOME) is wrong on some foreign Windows systems
if {[info exists ::freewrap::progname] && \
[info script] == "" && ! [file exists [file join $::env(HOME) "Application Data"]]} {
if {! [catch {set tmp [registry get "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders" "AppData"]} err_str]} {
set ::config(config_directory) [file join $tmp "PgcEdit"]
}
}
} else {
set ::config(config_directory) [file join $::env(HOME) ".PgcEdit"]
}
Program Files line 249
set progfiles "${rootdir}Program files\\"
if {! [catch {set tmp [registry get "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion" "ProgramFilesDir"]} err_str]} {
set progfiles "$tmp\\"
}
} else {
set ::config(tk) x11
Changes are working well in german version of Win XP and Win98. (Anwendungsdaten, Programme)