Changeset 365 for sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis
- Timestamp:
- May 13, 2008 4:31:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/NCNR_Install.ipf
r362 r365 8 8 // 9 9 // package-6.001 10 // 11 10 // - lots more diagnostics added 12 11 13 12 Function InstallNCNRMacros() … … 32 31 endif 33 32 33 34 34 String igorPathStr,homePathStr 35 35 PathInfo Igor … … 57 57 isThere = CheckForMatch(tmpStr,extFiles) 58 58 if(isThere) 59 Print "Move "+ tmpStr60 59 MoveFile/O/P=ExPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 60 Print "Move file "+ tmpStr + " from Igor Extensions: "+num2str(V_flag) 61 61 endif 62 62 endfor … … 69 69 isThere = CheckForMatch(tmpStr,extFolders) 70 70 if(isThere) 71 Print "Move "+ tmpStr72 71 MoveFolder extPathStr+tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 72 Print "Move folder "+ tmpStr + " from Igor Extensions: "+num2str(V_flag) 73 73 endif 74 74 endfor … … 86 86 isThere = CheckForMatch(tmpStr,UPFilesWave) 87 87 if(isThere) 88 Print "Move "+ tmpStr89 88 MoveFile/O/P=UPPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 89 Print "Move file "+ tmpStr + " from User Procedures: "+num2str(V_flag) 90 90 endif 91 91 endfor … … 100 100 isThere = CheckForMatch(tmpStr,UPFoldersWave) 101 101 if(isThere) 102 Print "Move "+ tmpStr 103 MoveFolder UPPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 104 endif 105 endfor 106 107 // clean up the Igor help files 102 // THIS is the problem, when NCNR_Help_Files is moved - it is in use 103 MoveFolder/Z UPPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 104 Print "Move folder "+ tmpStr + " from User Procedures: "+num2str(V_flag) 105 endif 106 endfor 107 108 // now try to move the Igor Help files out 108 109 NewPath /Q/O IHPath, igorPathStr+"Igor Help Files:" 109 110 PathInfo IHPath … … 117 118 isThere = CheckForMatch(tmpStr,IHFilesWave) 118 119 if(isThere) 119 Print "Move "+ tmpStr120 120 MoveFile/O/P=IHPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 121 Print "Move file "+ tmpStr + " from Igor Help Files: "+num2str(V_flag) 121 122 endif 122 123 endfor … … 129 130 isThere = CheckForMatch(tmpStr,IHFolders) 130 131 if(isThere) 131 Print "Move "+ tmpStr132 132 MoveFolder IHPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 133 Print "Move folder "+ tmpStr + " from Igor Help Files: "+num2str(V_flag) 133 134 endif 134 135 endfor … … 139 140 // 140 141 // the old ones should be gone already, so just put in the new ones 142 143 // they may not be possible to remove, so try to overwrite... 144 141 145 // and then create shortcuts for XOP and help files 142 MoveFolder homePathStr+"NCNR_Help_Files" as UPPathStr+"NCNR_Help_Files" 146 // MoveFolder/Z=1/O homePathStr+"NCNR_Help_Files" as UPPathStr+"NCNR_Help_Files" 147 // Print "Move folder NCNR_Help_Files into User Procedures, overwrite if needed: "+num2str(V_flag) 148 // if(V_Flag != 0) 149 MoveFolder/Z=1 homePathStr+"NCNR_Help_Files" as UPPathStr+"NCNR_Help_Files" 150 Print "******Move folder NCNR_Help_Files into User Procedures, NO overwite: "+num2str(V_flag) 151 // endif 143 152 CreateAliasShortcut/O/P=UPPath "NCNR_Help_Files" as igorPathStr+"Igor Help Files:NCNR_Help_Files" 144 145 MoveFolder homePathStr+"NCNR_User_Procedures" as UPPathStr+"NCNR_User_Procedures" 153 Print "Creating shortcut from NCNR_Help_Files into Igor Help Files: "+num2str(V_flag) 154 155 156 // MoveFolder/Z=1/O homePathStr+"NCNR_User_Procedures" as UPPathStr+"NCNR_User_Procedures" 157 // Print "Move folder NCNR_User_Procedures into User Procedures, overwrite if needed: "+num2str(V_flag) 158 // if(V_flag !=0) 159 MoveFolder/Z=1 homePathStr+"NCNR_User_Procedures" as UPPathStr+"NCNR_User_Procedures" 160 Print "*******Move folder NCNR_User_Procedures into User Procedures, NO overwrite: "+num2str(V_flag) 161 // endif 146 162 // don't need an alias for the UserProcedures - they're already here.... 147 163 148 MoveFolder homePathStr+"NCNR_Extensions" as UPPathStr+"NCNR_Extensions" 164 165 // MoveFolder/Z=1/O homePathStr+"NCNR_Extensions" as UPPathStr+"NCNR_Extensions" 166 // Print "Move folder NCNR_Extensions into User Procedures, overwrite if needed: "+num2str(V_flag) 167 // if(V_flag !=0) 168 MoveFolder/Z=1 homePathStr+"NCNR_Extensions" as UPPathStr+"NCNR_Extensions" 169 Print "*******Move folder NCNR_Extensions into User Procedures, NO overwrite: "+num2str(V_flag) 170 // endif 149 171 if(isMac) 150 172 CreateAliasShortcut/O/P=UPPath "NCNR_Extensions:Mac_XOP" as igorPathStr+"Igor Extensions:NCNR_Extensions" … … 152 174 CreateAliasShortcut/O/P=UPPath "NCNR_Extensions:Win_XOP" as igorPathStr+"Igor Extensions:NCNR_Extensions" 153 175 endif 176 Print "Creating shortcut for XOP into Igor Extensions: "+num2str(V_flag) 154 177 155 178 … … 165 188 // MoveFolder/O/P=IHPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 166 189 CreateAliasShortcut/O/P=UtilPath tmpStr as homePathStr +tmpStr 190 Print "Creating shortcut for "+tmpStr+" into top level: "+num2str(V_flag) 167 191 // endif 168 192 endfor … … 179 203 180 204 // installation is done, quit to start fresh 181 doAlert 1, "Quit Igor to complete installation.\rQuit now? "205 DoAlert 1, "Quit Igor to complete installation.\rQuit now? " 182 206 if (V_Flag==1) 183 207 execute "Quit /Y" … … 197 221 198 222 do 199 if(cmpstr(str,tw[ii])==0 || cmpstr(str +".lnk",tw[ii])==0)223 if(cmpstr(str,tw[ii])==0 || cmpstr(str,tw[ii]+".lnk")==0) 200 224 return (1) 201 225 endif … … 374 398 return(0) 375 399 End 400 401 Function AskUserToKillHelp() 402 403 //// clean up the Igor help files 404 // first, kill any open help files 405 // there are 5 of them 406 Variable numHelpFilesOpen=0 407 // do 408 numHelpFilesOpen = 0 409 // V_flag is set to zero if it's found, non-zero (unspecified value?) if it's not found 410 DisplayHelpTopic/Z "Beta SANS Tools" 411 if(V_flag==0) 412 numHelpFilesOpen += 1 413 endif 414 415 DisplayHelpTopic/Z "SANS Data Analysis Documentation" 416 if(V_flag==0) 417 numHelpFilesOpen += 1 418 endif 419 420 DisplayHelpTopic/Z "SANS Model Function Documentation" 421 if(V_flag==0) 422 numHelpFilesOpen += 1 423 endif 424 425 DisplayHelpTopic/Z "SANS Data Reduction Tutorial" 426 if(V_flag==0) 427 numHelpFilesOpen += 1 428 endif 429 430 DisplayHelpTopic/Z "USANS Data Reduction" 431 if(V_flag==0) 432 numHelpFilesOpen += 1 433 endif 434 435 // PauseForUser // can't use this, it keeps you from interacting with anything.... 436 // while(NumHelpFilesOpen != 0) 437 DoWindow HelpNotebook 438 if(V_flag) 439 DoWindow/K HelpNotebook 440 endif 441 442 String helpStr = "Please kill the open Help Files by option-clicking (Macintosh) or alt-clicking (Windows) on the close box of each window. Once you have finished, please close this window and install the SANS Macros." 443 if(NumHelpFilesOpen != 0) 444 NewNotebook/F=1/K=1/N=HelpNotebook /W=(5,44,547,181) as "Please close the open help files" 445 Notebook HelpNotebook,fsize=12,fstyle=1,showRuler=0,text=helpStr 446 return(0) 447 endif 448 449 return(0) 450 End
Note: See TracChangeset
for help on using the changeset viewer.