Changeset 395 for trunk


Ignore:
Timestamp:
Dec 4, 2009 5:05:27 PM (14 years ago)
Author:
toby
Message:

# on 2001/05/23 20:11:12, toby did:
use www.ncnr.nist.gov/xtal/software/expgui as default location for web pages
fix intermediate or old GSAS versions with fonts file in /fonts/ or named pgfont.dat
clean up file archiving in UNIX

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expgui

    • Property rcs:date changed from 2001/05/11 16:18:58 to 2001/05/23 20:11:12
    • Property rcs:lines changed from +75 -28 to +39 -7
    • Property rcs:rev changed from 1.42 to 1.43
    r390 r395  
    6464#set expgui(debug) 1
    6565
     66# location for web pages, if not found locally
     67set expgui(website) www.ncnr.nist.gov/xtal/software/expgui
    6668# default for archive mode = on
    6769set expgui(archive) 1
     
    172174}
    173175# do we have a PGPLOT fonts file?
     176# if it is in the "wrong" place/name -- make it "right"
     177if {![file exists [file join $expgui(gsasdir) pgl grfont.dat]] && \
     178        [file exists [file join $expgui(gsasdir) fonts grfont.dat]]} {
     179    catch {file mkdir [file join $expgui(gsasdir) pgl]}
     180    file copy [file join $expgui(gsasdir) fonts grfont.dat] \
     181            [file join $expgui(gsasdir) pgl grfont.dat]
     182}
     183# do we have a PGPLOT fonts file?
     184if {![file exists [file join $expgui(gsasdir) pgl grfont.dat]] && \
     185        [file exists [file join $expgui(gsasdir) fonts pgfont.dat]]} {
     186    catch {file mkdir [file join $expgui(gsasdir) pgl]}
     187    file copy [file join $expgui(gsasdir) fonts pgfont.dat] \
     188            [file join $expgui(gsasdir) pgl grfont.dat]
     189}
     190# do we have a PGPLOT fonts file?
     191if {![file exists [file join $expgui(gsasdir) pgl grfont.dat]] && \
     192        [file exists [file join $expgui(gsasdir) pgl pgfont.dat]]} {
     193    file copy [file join $expgui(gsasdir) pgl pgfont.dat] \
     194            [file join $expgui(gsasdir) pgl grfont.dat]
     195}
    174196if ![file exists [file join $expgui(gsasdir) pgl grfont.dat]] {
    175197    MyMessageBox -parent . -title "PGPLOT Error" \
    176             -message "Warning -- Unable to find file GRFONT.DAT. GSAS graphics will not work. Is GSAS correctly installed?" \
     198            -message "Warning -- Unable to find file GRFONT.DAT in [file join $expgui(gsasdir) pgl]. GSAS graphics will not work. Is GSAS correctly installed?" \
    177199            -icon warning -type {"Limp Ahead"} -default "Limp Ahead" \
    178200            -helplink "expguierr.html NoPGPLOT"
     
    715737                set file $expnam.EXP.000
    716738            } else {
    717                 set file [lindex [lsort -decreasing $files] 0]
    718                 regexp {.*\.EXP.0?0?([0-9]*).*} $file junk number
    719                 incr number
     739                set number {}
     740                foreach file [lsort -decreasing $files] {
     741                    if [catch {
     742                        regexp {.*\.EXP\.([0-9][0-9][0-9]).*} $file junk number
     743                        regexp {0?0?([0-9]*)} $number junk number
     744                        incr number
     745                    }] {
     746                        continue
     747                    } else {
     748                        break
     749                    }
     750                }
     751                if {$number == ""} {set number 0}
    720752                set file $expnam.EXP.[format "%3.3d" $number]
    721753            }
     
    733765    } errmsg
    734766    if {$errmsg != ""} {
    735         tk_dialog .warn Confirm "Error in archive: $errmsg" warning 0 OK
     767        tk_dialog .warn Confirm "Error archiving the current .EXP file: $errmsg" warning 0 OK
    736768    }
    737769}
Note: See TracChangeset for help on using the changeset viewer.