[Jahshaka-cvs] openlibraries/installer openlibraries_runtime.nsi, 1.28, 1.29 openlibraries_sdk.nsi,
Status: Beta
Brought to you by:
jahshaka
From: jpn <non...@us...> - 2007-02-08 12:41:24
|
Update of /cvsroot/openlibraries/openlibraries/installer In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25672/installer Modified Files: openlibraries_runtime.nsi openlibraries_sdk.nsi Log Message: - Modified to allow silent installations - Added extra info to registry on installation e.g. 'Version' and 'Installation type' (Runtime or SDK) Index: openlibraries_sdk.nsi =================================================================== RCS file: /cvsroot/openlibraries/openlibraries/installer/openlibraries_sdk.nsi,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- openlibraries_sdk.nsi 1 Feb 2007 12:35:59 -0000 1.34 +++ openlibraries_sdk.nsi 8 Feb 2007 12:40:38 -0000 1.35 @@ -68,6 +68,47 @@ !insertmacro MUI_LANGUAGE "English" + Function .onInit + + ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "UninstallString" + StrCmp $R0 "" 0 +2 + Return + + IfSilent 0 +6 + ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "Version" + StrCmp $R1 "${VERSION}" 0 +4 + ReadRegStr $R2 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "Installation type" + StrCmp $R2 "SDK" 0 +2 + Abort + + MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ + "OpenLibraries v${VERSION} is already installed. $\n$\nClick `OK` to remove the \ + previous version or `Cancel` to cancel this upgrade." \ + /SD IDOK IDOK uninst + Abort + + ;Run the uninstaller + uninst: + ClearErrors + + ;Start the uninstaller using the option to not copy itself + ExecWait '$R0 _?=$INSTDIR' + + IfErrors no_remove_uninstaller + ; In most cases the uninstall is successful at this point. + ; You may also consider using a registry key to check whether + ; the user has chosen to uninstall. If you are using an uninstaller + ; components page, make sure all sections are uninstalled. + Return + + no_remove_uninstaller: + MessageBox MB_ICONEXCLAMATION \ + "Unable to remove previous version of OpenLibraries" + Abort + +FunctionEnd + + Section "OpenLibraries" SecCore SetDetailsPrint textonly @@ -79,9 +120,6 @@ SetOverwrite on - SetOutPath $INSTDIR - File "msxml4.msi" - SetOutPath $INSTDIR\include\openlibraries-${VERSION}\openpluginlib\pl File ..\src\openpluginlib\pl\allocatorstringstorage.h File ..\src\openpluginlib\pl\bind_info.hpp @@ -389,51 +427,68 @@ SetDetailsPrint both -;-------------------------------- -;Path environment variable + ;-------------------------------- + ;Path environment variable Push "$INSTDIR\bin" Call AddToPath -;-------------------------------- -;Include environment variable + ;-------------------------------- + ;Include environment variable Push "OPENLIBRARIES_INCLUDE_PATH" Push "$INSTDIR\include\openlibraries-${VERSION}" Call WriteEnvStr -;-------------------------------- -;Lib environment variable + ;-------------------------------- + ;Lib environment variable Push "OPENLIBRARIES_LIB_PATH" Push "$INSTDIR\lib" Call WriteEnvStr -;-------------------------------- -;Python environment variable + ;-------------------------------- + ;Python environment variable Push "PYTHONPATH" Push "$INSTDIR\python" Call WriteEnvStr -;-------------------------------- -;Registry + ;-------------------------------- + ;Registry -WriteRegStr HKLM "Software\OpenLibraries" "CurrentVersion" "${VERSION}" -WriteRegStr HKLM "Software\OpenLibraries" "PluginsDirDebug" "$INSTDIR\plugins\debug" -WriteRegStr HKLM "Software\OpenLibraries" "PluginsDirRelease" "$INSTDIR\plugins\release" -WriteRegStr HKLM "Software\OpenLibraries" "KernelsDir" "$INSTDIR\kernels" -WriteRegStr HKLM "Software\OpenLibraries" "ShadersDir" "$INSTDIR\shaders" + WriteRegStr HKLM "Software\OpenLibraries" "CurrentVersion" "${VERSION}" + WriteRegStr HKLM "Software\OpenLibraries" "PluginsDirDebug" "$INSTDIR\plugins\debug" + WriteRegStr HKLM "Software\OpenLibraries" "PluginsDirRelease" "$INSTDIR\plugins\release" + WriteRegStr HKLM "Software\OpenLibraries" "KernelsDir" "$INSTDIR\kernels" + WriteRegStr HKLM "Software\OpenLibraries" "ShadersDir" "$INSTDIR\shaders" -WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "DisplayName" "OpenLibraries" -WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "UninstallString" "$INSTDIR\uninst-openlibraries.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "DisplayName" "OpenLibraries" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "Version" "${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "Installation type" "SDK" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "UninstallString" "$INSTDIR\uninst-openlibraries.exe" +SectionEnd + +Section "MSXML4 SP2" msxml2 + + SectionIn 1 + SetOutPath $INSTDIR + + SetOverwrite on + SetShellVarContext all + SetDetailsPrint textonly - DetailPrint "Installing MSXML4..." + DetailPrint "Installing MSXML4 SP2..." SetDetailsPrint listonly + SetOutPath $INSTDIR + File "msxml4.msi" + ExecWait 'MsiExec.exe /qn /x{2AEBE10C-D819-4EBF-BC60-03BF2327D340}' ; uninstall MSXML4 if it's there ExecWait 'MsiExec.exe /qn /x{35343FF7-939B-401A-87B3-FF90A5123D88}' ; uninstall MSXML4 SP1 if it's there ExecWait 'MsiExec.exe /qn /i "$INSTDIR\msxml4.msi"' + + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "msxml2" "" - ;ExecWait 'regsvr32 ..\src\openmedialib\plugins\filters\GetAudio\release\GetAudio.ax' + SetDetailsPrint both SectionEnd @@ -448,6 +503,7 @@ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "OpenLibraries development and runtime files" + !insertmacro MUI_DESCRIPTION_TEXT ${msxml2} "MSXML2 SP2" !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- @@ -455,8 +511,6 @@ Section Uninstall - ;ExecWait 'regsvr32 GetAudio.ax -u' - SetDetailsPrint textonly DetailPrint "Deleting Files..." SetDetailsPrint listonly @@ -487,41 +541,4 @@ SetDetailsPrint both SectionEnd - - Function .onInit - - ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "UninstallString" - StrCmp $R0 "" done - - MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ - "OpenLibraries is already installed. $\n$\nClick `OK` to remove the \ - previous version or `Cancel` to cancel this upgrade." \ - IDOK uninst - Abort - -;Run the uninstaller -uninst: - ClearErrors - ; Copy the uninstaller to a temp location - ;GetTempFileName $0 - ;CopyFiles $R0 $0 - ;Start the uninstaller using the option to not copy itself - ExecWait '$R0 _?=$INSTDIR' - - IfErrors no_remove_uninstaller - ; In most cases the uninstall is successful at this point. - ; You may also consider using a registry key to check whether - ; the user has chosen to uninstall. If you are using an uninstaller - ; components page, make sure all sections are uninstalled. - goto done - no_remove_uninstaller: - MessageBox MB_ICONEXCLAMATION \ - "Unable to remove previous version of OpenLibraries" - Abort -done: - ; remove the copied uninstaller - ;Delete '$0' - -FunctionEnd - Index: openlibraries_runtime.nsi =================================================================== RCS file: /cvsroot/openlibraries/openlibraries/installer/openlibraries_runtime.nsi,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- openlibraries_runtime.nsi 1 Feb 2007 12:35:59 -0000 1.28 +++ openlibraries_runtime.nsi 8 Feb 2007 12:40:37 -0000 1.29 @@ -68,6 +68,45 @@ !insertmacro MUI_LANGUAGE "English" + Function .onInit + + ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "UninstallString" + StrCmp $R0 "" 0 +2 + Return + + IfSilent 0 +4 + ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "Version" + StrCmp $R1 "${VERSION}" 0 +2 + Abort + + MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ + "OpenLibraries v${VERSION} is already installed. $\n$\nClick `OK` to remove the \ + previous version or `Cancel` to cancel this upgrade." \ + /SD IDOK IDOK uninst + Abort + + ;Run the uninstaller + uninst: + ClearErrors + + ;Start the uninstaller using the option to not copy itself + ExecWait '$R0 _?=$INSTDIR' + + IfErrors no_remove_uninstaller + ; In most cases the uninstall is successful at this point. + ; You may also consider using a registry key to check whether + ; the user has chosen to uninstall. If you are using an uninstaller + ; components page, make sure all sections are uninstalled. + Return + + no_remove_uninstaller: + MessageBox MB_ICONEXCLAMATION \ + "Unable to remove previous version of OpenLibraries" + Abort + +FunctionEnd + + Section "OpenLibraries" SecCore SetDetailsPrint textonly @@ -79,9 +118,6 @@ SetOverwrite on - SetOutPath $INSTDIR - File "msxml4.msi" - SetOutPath $INSTDIR\bin File "..\src\openpluginlib\pl\Multi-threaded Release DLL\openpluginlib_pl-vc71-r-0_4_0.dll" File "..\src\openimagelib\il\Multi-threaded Release DLL\openimagelib_il-vc71-r-0_4_0.dll" @@ -181,36 +217,55 @@ SetDetailsPrint both -;-------------------------------- -;Path environment variable + ;-------------------------------- + ;Path environment variable Push "$INSTDIR\bin" Call AddToPath -;-------------------------------- -;Python environment variable + ;-------------------------------- + ;Python environment variable Push "PYTHONPATH" Push "$INSTDIR\python" Call WriteEnvStr -;-------------------------------- -;Registry + ;-------------------------------- + ;Registry -WriteRegStr HKLM "Software\OpenLibraries" "CurrentVersion" "${VERSION}" -WriteRegStr HKLM "Software\OpenLibraries" "PluginsDirRelease" "$INSTDIR\plugins\release" -WriteRegStr HKLM "Software\OpenLibraries" "KernelsDir" "$INSTDIR\kernels" -WriteRegStr HKLM "Software\OpenLibraries" "ShadersDir" "$INSTDIR\shaders" + WriteRegStr HKLM "Software\OpenLibraries" "CurrentVersion" "${VERSION}" + WriteRegStr HKLM "Software\OpenLibraries" "PluginsDirRelease" "$INSTDIR\plugins\release" + WriteRegStr HKLM "Software\OpenLibraries" "KernelsDir" "$INSTDIR\kernels" + WriteRegStr HKLM "Software\OpenLibraries" "ShadersDir" "$INSTDIR\shaders" + + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "DisplayName" "OpenLibraries" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "Version" "${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "Installation type" "Runtime" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "UninstallString" "$INSTDIR\uninst-openlibraries.exe" + +SectionEnd + +Section "MSXML4 SP2" msxml2 + + SectionIn 1 + SetOutPath $INSTDIR + + SetOverwrite on + SetShellVarContext all -WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "DisplayName" "OpenLibraries" -WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "UninstallString" "$INSTDIR\uninst-openlibraries.exe" - SetDetailsPrint textonly - DetailPrint "Installing MSXML4..." + DetailPrint "Installing MSXML4 SP2..." SetDetailsPrint listonly + SetOutPath $INSTDIR + File "msxml4.msi" + ExecWait 'MsiExec.exe /qn /x{2AEBE10C-D819-4EBF-BC60-03BF2327D340}' ; uninstall MSXML4 if it's there ExecWait 'MsiExec.exe /qn /x{35343FF7-939B-401A-87B3-FF90A5123D88}' ; uninstall MSXML4 SP1 if it's there ExecWait 'MsiExec.exe /qn /i "$INSTDIR\msxml4.msi"' + + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "msxml2" "" + + SetDetailsPrint both SectionEnd @@ -225,6 +280,7 @@ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "OpenLibraries development and runtime files" + !insertmacro MUI_DESCRIPTION_TEXT ${msxml2} "MSXML2 SP2" !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- @@ -257,40 +313,3 @@ SectionEnd - Function .onInit - - ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenLibraries" "UninstallString" - StrCmp $R0 "" done - - MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ - "OpenLibraries is already installed. $\n$\nClick `OK` to remove the \ - previous version or `Cancel` to cancel this upgrade." \ - IDOK uninst - Abort - -;Run the uninstaller -uninst: - ClearErrors - ; Copy the uninstaller to a temp location - ;GetTempFileName $0 - ;CopyFiles $R0 $0 - ;Start the uninstaller using the option to not copy itself - ExecWait '$R0 _?=$INSTDIR' - - IfErrors no_remove_uninstaller - ; In most cases the uninstall is successful at this point. - ; You may also consider using a registry key to check whether - ; the user has chosen to uninstall. If you are using an uninstaller - ; components page, make sure all sections are uninstalled. - goto done - no_remove_uninstaller: - MessageBox MB_ICONEXCLAMATION \ - "Unable to remove previous version of OpenLibraries" - Abort - -done: - ; remove the copied uninstaller - ;Delete '$0' - -FunctionEnd - |