Changeset 663 for sans/Dev


Ignore:
Timestamp:
Apr 6, 2010 2:32:11 PM (13 years ago)
Author:
srkline
Message:

More fixes for the installer to properly copy the files in, and date stamp them when they are moved out so that there are no overwrite issues when the installer is run multiple times. NCNR_Package_Loader is explicitly closed to be sure that it is not opened multiple times (even though it was moved).

Package loader now runs Retrieve Windows from the Igor menu after initialization, to bring all windows on-screen.

Location:
sans/Dev/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_Igor_Procedures/NCNR_Package_Loader.ipf

    r659 r663  
    5757                        Execute/P ("Init_WrapperPanel()") 
    5858                        Execute/P ("ModelPicker_Panel()") 
     59                        Execute/P ("DoIgorMenu \"Control\" \"Retrieve All Windows\"") 
    5960                 
    6061                        gMenuStr1a = "Hide NCNR Analysis Macros" 
     
    137138                        Execute/P "COMPILEPROCEDURES " 
    138139                        Execute/P ("Initialize()") 
    139                  
     140                        Execute/P ("DoIgorMenu \"Control\" \"Retrieve All Windows\"") 
     141 
    140142                        gMenuStr2a = "Hide NCNR SANS Reduction Macros" 
    141143//                      gMenuStr2b = "Unload NCNR SANS Reduction Macros" 
     
    204206                        Execute/P "COMPILEPROCEDURES " 
    205207                        Execute/P ("ShowUSANSPanel()") 
    206                  
     208                        Execute/P ("DoIgorMenu \"Control\" \"Retrieve All Windows\"") 
     209 
    207210                        gMenuStr3a = "Hide NCNR USANS Reduction Macros" 
    208211//                      gMenuStr3b = "Unload NCNR USANS Reduction Macros" 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/ModelPicker/SANSModelPicker_v40.ipf

    r644 r663  
    4444                Init_FileList() 
    4545                Procedure_List() 
    46                 AutoPositionWindow/M=1/R=WrapperPanel Procedure_List            //keep it on-screen 
     46//              AutoPositionWindow/M=1/R=WrapperPanel Procedure_List            //keep it on-screen 
    4747        endif 
    4848End 
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Installer/NCNR_Install.ipf

    r662 r663  
    106106        variable i=0, AliasSet=0, isThere = 0 
    107107        String tmpStr 
    108  
     108        String timeStamp = "_"+num2istr(datetime) 
    109109 
    110110////////////////////////////////////////////////////////////////////// 
     
    122122                isThere = CheckForMatch(tmpStr,extFiles) 
    123123                if(isThere) 
    124                         MoveFile/O/P=ExPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 
     124                        MoveFile/O/P=ExPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr+timeStamp 
    125125                        Print "Move file "+ tmpStr + " from Igor Extensions: "+IsMoveOK(V_flag) 
    126126                endif 
     
    135135                isThere = CheckForMatch(tmpStr,extFolders) 
    136136                if(isThere) 
    137                         MoveFolder extPathStr+tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 
     137                        MoveFolder extPathStr+tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr+timeStamp 
    138138                        Print "Move folder "+ tmpStr + " from Igor Extensions: "+IsMoveOK(V_flag) 
    139139                endif 
     
    150150                isThere = CheckForMatch(tmpStr,extFiles) 
    151151                if(isThere) 
    152                         MoveFile/O/P=ExPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 
     152                        MoveFile/O/P=ExPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr+timeStamp 
    153153                        Print "Move file "+ tmpStr + " from Igor Extensions: "+IsMoveOK(V_flag) 
    154154                endif 
     
    161161                isThere = CheckForMatch(tmpStr,extFolders) 
    162162                if(isThere) 
    163                         MoveFolder extPathStr+tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 
     163                        MoveFolder extPathStr+tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr+timeStamp 
    164164                        Print "Move folder "+ tmpStr + " from Igor Extensions: "+IsMoveOK(V_flag) 
    165165                endif 
     
    180180                isThere = CheckForMatch(tmpStr,UPFilesWave) 
    181181                if(isThere) 
    182                         MoveFile/O/P=UPPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 
     182                        MoveFile/O/P=UPPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr+timeStamp 
    183183                        Print "Move file "+ tmpStr + " from User Procedures: "+IsMoveOK(V_flag) 
    184184                endif 
     
    194194                if(isThere) 
    195195                // THIS is the problem, when NCNR_Help_Files is moved - it is in use 
    196                         MoveFolder/Z UPPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 
     196                        MoveFolder/Z UPPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr+timeStamp 
    197197                        Print "Move folder "+ tmpStr + " from User Procedures: "+IsMoveOK(V_flag) 
    198198                endif 
     
    210210                isThere = CheckForMatch(tmpStr,UPFilesWave) 
    211211                if(isThere) 
    212                         MoveFile/O/P=UPPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 
     212                        MoveFile/O/P=UPPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr+timeStamp 
    213213                        Print "Move file "+ tmpStr + " from User Procedures: "+IsMoveOK(V_flag) 
    214214                endif 
     
    223223                if(isThere) 
    224224                // THIS is the problem, when NCNR_Help_Files is moved - it is in use 
    225                         MoveFolder/Z UPPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 
     225                        MoveFolder/Z UPPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr+timeStamp 
    226226                        Print "Move folder "+ tmpStr + " from User Procedures: "+IsMoveOK(V_flag) 
    227227                endif 
     
    246246                isThere = CheckForMatch(tmpStr,IHFilesWave) 
    247247                if(isThere) 
    248                         MoveFile/O/P=IHPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 
     248                        MoveFile/O/P=IHPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr+timeStamp 
    249249                        Print "Move file "+ tmpStr + " from Igor Help Files: "+IsMoveOK(V_flag) 
    250250                endif 
     
    259259                isThere = CheckForMatch(tmpStr,IHFolders) 
    260260                if(isThere) 
    261                         MoveFolder IHPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 
     261                        MoveFolder IHPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr+timeStamp 
    262262                        Print "Move folder "+ tmpStr + " from Igor Help Files: "+IsMoveOK(V_flag) 
    263263                endif 
     
    275275                isThere = CheckForMatch(tmpStr,IHFilesWave) 
    276276                if(isThere) 
    277                         MoveFile/O/P=IHPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 
     277                        MoveFile/O/P=IHPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr+timeStamp 
    278278                        Print "Move file "+ tmpStr + " from Igor Help Files: "+IsMoveOK(V_flag) 
    279279                endif 
     
    287287                isThere = CheckForMatch(tmpStr,IHFolders) 
    288288                if(isThere) 
    289                         MoveFolder IHPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 
     289                        MoveFolder IHPathStr + tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr+timeStamp 
    290290                        Print "Move folder "+ tmpStr + " from Igor Help Files: "+IsMoveOK(V_flag) 
    291291                endif 
     
    305305                isThere = CheckForMatch(tmpStr,IgProcFiles) 
    306306                if(isThere) 
    307                         MoveFile/O/P=IgProcPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 
     307                        MoveFile/O/P=IgProcPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr+timeStamp 
    308308                        Print "Move file "+ tmpStr + " from Igor Procedures: "+IsMoveOK(V_flag) 
    309309                endif 
     
    318318                isThere = CheckForMatch(tmpStr,IgProcFolders) 
    319319                if(isThere) 
    320                         MoveFolder IgProcPathStr+tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 
     320                        MoveFolder IgProcPathStr+tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr+timeStamp 
    321321                        Print "Move folder "+ tmpStr + " from Igor Extensions: "+IsMoveOK(V_flag) 
    322322                endif 
     
    333333                isThere = CheckForMatch(tmpStr,IgProcFiles) 
    334334                if(isThere) 
    335                         MoveFile/O/P=IgProcPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr 
     335                        MoveFile/O/P=IgProcPath tmpStr as homePathStr+"NCNR_Moved_Files:"+tmpStr+timeStamp 
    336336                        Print "Move file "+ tmpStr + " from Igor Procedures: "+IsMoveOK(V_flag) 
    337337                endif 
     
    344344                isThere = CheckForMatch(tmpStr,IgProcFolders) 
    345345                if(isThere) 
    346                         MoveFolder IgProcPathStr+tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr 
     346                        MoveFolder IgProcPathStr+tmpStr as homePathStr+"NCNR_Moved_Files:NCNR_Moved_Folders:"+tmpStr+timeStamp 
    347347                        Print "Move folder "+ tmpStr + " from Igor Extensions: "+IsMoveOK(V_flag) 
    348348                endif 
     
    433433        DoAlert 1, "Quit and restart Igor to complete installation.\rQuit now? " 
    434434        if (V_Flag==1) 
    435                 execute "Quit /Y" 
     435                execute "Quit/Y " 
    436436        endif 
    437437         
     
    675675End 
    676676 
     677// first, close the NCNR_Package_Loader.ipf to break the link (if it's there) 
     678// otherwise, if the installer is run a second time, it won't compile - the current and the old (moved) 
     679// instance will both open up. 
    677680Function AskUserToKillHelp() 
    678681 
     682        if(ItemsInList(WinList("NCNR_Package_Loader.ipf", ";","WIN:128"))) 
     683                Execute/P "CloseProc /NAME=\"NCNR_Package_Loader.ipf\"" 
     684        endif 
     685         
    679686        //// clean up the Igor help files 
    680687// first, kill any open help files 
Note: See TracChangeset for help on using the changeset viewer.