Changeset 2161 for trunk

Show
Ignore:
Timestamp:
06/26/08 02:27:02 (6 months ago)
Author:
jteh
Message:

installer:

  • Use the InstallLib? and UninstallLib? macros for installation and uninstallation of dlls. This seemlessly handles registration of COM dlls, as well as allowing us to bypass file protection and request a reboot if required.
  • AdvUninstLog?: Request a reboot if necessary when removing files and directories.
Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property bzr:revision-id:v3-list-QlpoOTFBWSZTWbrL2vUAAB1VgAAQABCAQDrrnqAgAFCgaaGRkxBoTIJ6mmaNRwhndFAoNhZjh_YY4a01fOg1ulgNNC2UrzPdXXEnDpX8XckU4UJC6y9r1A..
      •  

        old new  
        1261261962 jamie@jantrid.net-20080625044806-frtg19pukbhhhz0u 
        1271271964 jamie@jantrid.net-20080625081946-e47mmoilmgppupwa 
         1281965 jamie@jantrid.net-20080625120449-pl6rne52cnqcjkoq 
    • Property bzr:file-ids
      •  

        old new  
        1 source/include  include-20080625063749-bdbfw8phnzacyn2m-1 
        2 source/include/ServProv.Idl     352@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2Flib%2FServProv.Idl 
        3 source/include/ia2.idl  352@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2Flib%2Fia2.idl 
    • Property bzr:revision-info
      •  

        old new  
        1 timestamp: 2008-06-25 18:19:46.921000004 +1000 
         1timestamp: 2008-06-25 22:04:49.345999956 +1000 
        22committer: James Teh <jamie@jantrid.net> 
        33properties:  
        44        branch-nick: main 
        5         rebase-of: jamie@jantrid.net-20080625081946-j2s7v1lvbyr7tr61 
         5        rebase-of: jamie@jantrid.net-20080625120449-i0ep72t8eph2jf99 
  • trunk/installer/AdvUninstLog.nsh

    r2066 r2161  
    214214                 
    215215                        isfile: 
    216                                 Delete "$R9" 
     216                                Delete /rebootok "$R9" 
    217217                                goto end 
    218218                 
    219219                    isdir: 
    220                                 RmDir "$R9" 
     220                                RmDir /rebootok "$R9" 
    221221                                IntOp $unlog_tmp_1 $unlog_tmp_1 + 1 
    222222                                goto end 
     
    246246         
    247247                        isfile: 
    248                                 Delete "$R9" 
     248                                Delete /rebootok "$R9" 
    249249                                goto end 
    250250         
    251251                        isdir: 
    252                                 RmDir "$R9" 
     252                                RmDir /rebootok "$R9" 
    253253                                IntOp $unlog_tmp_1 $unlog_tmp_1 + 1 
    254254                                goto end 
  • trunk/installer/nvda.nsi

    r2109 r2161  
    1111!define WEBSITE "www.nvda-project.org" 
    1212!define READMEFILE "documentation\en\readme.txt" 
    13 !define IA2DLL "ia2.dll" 
    1413!define NVDAWindowClass "wxWindowClassNR" 
    1514!define NVDAWindowTitle "NVDA" 
     
    2726!include "AdvUninstLog.nsh" 
    2827!include "WinMessages.nsh" 
     28!include "Library.nsh" 
    2929 
    3030CRCCheck On 
     
    213213FunctionEnd 
    214214 
    215 Function unregisterDLLs 
    216 ; place here the names of DLLs that need to be unregistered before copying files 
    217 UnRegDll $INSTDIR\LIB\${IA2DLL} 
    218 FunctionEnd 
    219  
    220 Function registerDLLs 
    221 RegDll $INSTDIR\\LIB\${IA2DLL} 
    222 FunctionEnd 
    223  
    224215Section "install" section_install 
    225216SetShellVarContext all 
    226217SetOutPath "$INSTDIR" 
    227 ; unregister any NVDA-related DLLs to prevent write-access violations 
    228 call unregisterDLLs 
    229218; open and close uninstallation log after ennumerating all the files being copied 
    230219!insertmacro UNINSTALL.LOG_OPEN_INSTALL 
    231 File /r "${NVDASourceDir}\" 
     220File /r /x lib "${NVDASourceDir}\" 
     221CreateDirectory "$INSTDIR\lib" 
    232222!insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
     223 
     224; Install libraries 
     225!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "${NVDASourceDir}\lib\charHook.dll" "$INSTDIR\lib\charHook.dll" "$INSTDIR\lib" 
     226!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "${NVDASourceDir}\lib\keyHook.dll" "$INSTDIR\lib\keyHook.dll" "$INSTDIR\lib" 
     227!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "${NVDASourceDir}\lib\mouseHook.dll" "$INSTDIR\lib\mouseHook.dll" "$INSTDIR\lib" 
     228!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "${NVDASourceDir}\lib\virtualBuffer.dll" "$INSTDIR\lib\virtualBuffer.dll" "$INSTDIR\lib" 
     229!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "${NVDASourceDir}\lib\VBufBackend_gecko_ia2.dll" "$INSTDIR\lib\VBufBackend_gecko_ia2.dll" "$INSTDIR\lib" 
     230!insertmacro InstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED "${NVDASourceDir}\lib\ia2.dll" "$INSTDIR\lib\ia2.dll" "$INSTDIR\lib" 
     231 
    233232strcpy $NVDAInstalled "1" 
    234 call registerDLLs 
    235233SectionEnd 
    236234 
     
    300298Section "Uninstall" 
    301299SetShellVarContext all 
     300 
     301; Uninstall libraries 
     302!insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$INSTDIR\lib\charHook.dll" 
     303!insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$INSTDIR\lib\keyHook.dll" 
     304!insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$INSTDIR\lib\mouseHook.dll" 
     305!insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$INSTDIR\lib\virtualBuffer.dll" 
     306!insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$INSTDIR\lib\VBufBackend_gecko_ia2.dll" 
     307!insertmacro UninstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED "$INSTDIR\lib\ia2.dll" 
     308 
    302309;uninstall from path, must be repeated for every install logged path individual 
    303310!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR"