Changeset 983
- Timestamp:
- Apr 15, 2010 9:46:13 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expgui
r953 r983 4185 4185 # $expgui(fm).file.menu.track add radiobutton -command {SetSVNbranch stable} -label Standard -value stable \ 4186 4186 # -variable expgui(SVNversion) 4187 # get info about the current CMPRversion on the server. Someday we might want to compare this4187 # get info about the current version on the server. Someday we might want to compare this 4188 4188 # say every month and notify when there is a new version to update 4189 4189 set repos [GetSVNrepository $expgui(gsasdir)] -
trunk/gsascmds.tcl
r982 r983 2800 2800 } 2801 2801 2802 proc MacMakeResource {file app} { 2803 # make a resource file. Note that OS X has gotten picky about the length of this 2804 set l [string length $app] 2805 if $::expgui(debug) {puts "$l bytes"} 2806 incr l 2807 if $::expgui(debug) {puts "$l bytes after incr"} 2808 set str "data 'usro' (0) {\n" 2809 append str " $\"" 2810 append str [format %.8X $l] 2811 set bytes 4 2812 foreach char [split $app {}] { 2813 append str [format %.2X [scan $char %c]] 2814 } 2815 incr bytes $l 2816 set newline 1 2817 for {set i 0} {$i < [expr 1028-$bytes]} {incr i} { 2818 if $newline { 2819 append str "\" \n" 2820 append str " $\"" 2821 set newline 0 2822 set j 0 2823 } 2824 append str {0000 } 2825 incr bytes 2826 incr j 2 2827 if {$j > 15} {set newline 1} 2828 } 2829 if {$l % 2} { 2830 append str "\"\n " 2831 } else { 2832 # even lengths need one more byte 2833 append str "00\"\n " 2834 } 2835 append str "/* $app */\n};\n" 2836 set fp [open $file w] 2837 puts $fp $str 2838 close $fp 2839 } 2840 2802 2841 # modify resource fork info for a .EXP file on the Mac 2803 2842 proc MacSetResourceFork {expfile} { … … 2810 2849 set app [file nativename [file join $expgui(gsasdir) expgui.app]] 2811 2850 set RezApp {} 2812 foreach pth "/usr/bin /Developer/Tools /Rez$expgui(gsasexe)" {2851 foreach pth "/usr/bin /Developer/Tools $expgui(gsasexe)" { 2813 2852 if [file exists [set tst [file join $pth Rez]]] { 2814 2853 set RezApp $tst … … 2817 2856 } 2818 2857 set SetFileApp {} 2819 foreach pth "/usr/bin /Developer/Tools /Rez$expgui(gsasexe)" {2858 foreach pth "/usr/bin /Developer/Tools $expgui(gsasexe)" { 2820 2859 if [file exists [set tst [file join $pth SetFile]]] { 2821 2860 set SetFileApp $tst … … 2825 2864 if $::expgui(debug) {puts "found app=$app Rez=$RezApp and SetFile=$SetFileApp"} 2826 2865 if {[file exists $app] && $RezApp != ""} { 2827 # make a resource file. Note that OS X has gotten picky about the length of this 2828 set l [string length $app]; incr l 2829 set str "data 'usro' (0) {\n" 2830 append str " $\"" 2831 append str [format %.8X $l] 2832 set bytes 4 2833 foreach char [split $app {}] { 2834 append str [format %.2X [scan $char %c]] 2835 } 2836 incr bytes $l 2837 set newline 1 2838 for {set i 0} {$i < [expr 1028-$bytes]} {incr i} { 2839 if $newline { 2840 append str "\" \n" 2841 append str " $\"" 2842 set newline 0 2843 set j 0 2844 } 2845 append str {0000 } 2846 incr bytes 2847 incr j 2 2848 if {$j > 15} {set newline 1} 2849 } 2850 append str "00\"\n " 2851 append str "/* $app */\n};\n" 2852 set fp [open setapp.r w] 2853 puts $fp $str 2854 close $fp 2866 # make resource file 2867 MacMakeResource setapp.r $app 2855 2868 if $::expgui(debug) {puts "$RezApp setapp.r -o $expnative -a"} 2856 2869 exec $RezApp setapp.r -o $expnative -a
Note: See TracChangeset
for help on using the changeset viewer.