mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
setup: 1.x compatibility
setup: DIA registration setup: remember installed components for uninstaller setup: version increment git-svn-id: https://pykd.svn.codeplex.com/svn@72699 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
69da8abdc9
commit
b09d6c56e2
@ -27,7 +27,7 @@ SetCompressor LZMA
|
|||||||
|
|
||||||
!define PRODUCT_SHORT_NAME "pykd"
|
!define PRODUCT_SHORT_NAME "pykd"
|
||||||
!define PRODUCT_FULL_NAME "Python extension for WinDbg"
|
!define PRODUCT_FULL_NAME "Python extension for WinDbg"
|
||||||
!define PRODUCT_VERSION "0.0.0.20"
|
!define PRODUCT_VERSION "0.0.1.2"
|
||||||
!define PRODUCT_URL "http://pykd.codeplex.com/"
|
!define PRODUCT_URL "http://pykd.codeplex.com/"
|
||||||
!define PRODUCT_NAME_AND_VERSION "${PRODUCT_FULL_NAME} ${PRODUCT_ARCH} ${PRODUCT_VERSION}"
|
!define PRODUCT_NAME_AND_VERSION "${PRODUCT_FULL_NAME} ${PRODUCT_ARCH} ${PRODUCT_VERSION}"
|
||||||
!define PRODUCT_MANUFACTURER "PyKd Team"
|
!define PRODUCT_MANUFACTURER "PyKd Team"
|
||||||
@ -111,7 +111,7 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_SHORT_NAME}"
|
|||||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "${PRODUCT_NAME_AND_VERSION}"
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "${PRODUCT_NAME_AND_VERSION}"
|
||||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_MANUFACTURER}"
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_MANUFACTURER}"
|
||||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "${PRODUCT_SHORT_NAME} is a trademark of ${PRODUCT_MANUFACTURER}"
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "${PRODUCT_SHORT_NAME} is a trademark of ${PRODUCT_MANUFACTURER}"
|
||||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© All rights reserved 2010-2011"
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© All rights reserved 2010-2012"
|
||||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${PRODUCT_SHORT_NAME} setup"
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${PRODUCT_SHORT_NAME} setup"
|
||||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}"
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}"
|
||||||
|
|
||||||
@ -140,7 +140,6 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}"
|
|||||||
Pop $_LOGICLIB_TEMP
|
Pop $_LOGICLIB_TEMP
|
||||||
!insertmacro _== $_LOGICLIB_TEMP 1 `${_t}` `${_f}`
|
!insertmacro _== $_LOGICLIB_TEMP 1 `${_t}` `${_f}`
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!define IsVcRuntimeInstalled `"" IsVcRuntimeInstalled ""`
|
!define IsVcRuntimeInstalled `"" IsVcRuntimeInstalled ""`
|
||||||
!define un.IsVcRuntimeInstalled `"" IsVcRuntimeInstalled ""`
|
!define un.IsVcRuntimeInstalled `"" IsVcRuntimeInstalled ""`
|
||||||
|
|
||||||
@ -155,6 +154,16 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}"
|
|||||||
!define IsPythonInstalled `"" IsPythonInstalled ""`
|
!define IsPythonInstalled `"" IsPythonInstalled ""`
|
||||||
!define un.IsPythonInstalled `"" IsPythonInstalled ""`
|
!define un.IsPythonInstalled `"" IsPythonInstalled ""`
|
||||||
|
|
||||||
|
!macro _IsDiaRegistered _a _b _t _f
|
||||||
|
!insertmacro _LOGICLIB_TEMP
|
||||||
|
${SetRegView64}
|
||||||
|
ReadRegStr $_LOGICLIB_TEMP HKCR "CLSID\${CLSID_DiaSource}\InprocServer32" ""
|
||||||
|
${SetRegView32}
|
||||||
|
!insertmacro _!= $_LOGICLIB_TEMP "" `${_t}` `${_f}`
|
||||||
|
!macroend
|
||||||
|
!define IsDiaRegistered `"" IsDiaRegistered ""`
|
||||||
|
!define un.IsDiaRegistered `"" IsDiaRegistered ""`
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Check WinDbg executable presence in selected directory
|
# Check WinDbg executable presence in selected directory
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -204,11 +213,12 @@ Section "Python ${PYTHON_VERSION} ${PRODUCT_ARCH}" sec_python
|
|||||||
${If} $0 == "OK"
|
${If} $0 == "OK"
|
||||||
DetailPrint "Successfully downloaded."
|
DetailPrint "Successfully downloaded."
|
||||||
DetailPrint "Installing Python..."
|
DetailPrint "Installing Python..."
|
||||||
IfErrors ClearErrorFlag1
|
|
||||||
ClearErrorFlag1:
|
|
||||||
ExecWait '"msiexec" /i "$TEMP\${PYTHON_INSTALLER}"'
|
ExecWait '"msiexec" /i "$TEMP\${PYTHON_INSTALLER}"'
|
||||||
IfErrors PythonInstallFailed
|
IfErrors PythonInstallFailed
|
||||||
DetailPrint "Successfully installed."
|
DetailPrint "Successfully installed."
|
||||||
|
${SetRegView64}
|
||||||
|
WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallPython" 1
|
||||||
|
${SetRegView32}
|
||||||
${Else}
|
${Else}
|
||||||
PythonInstallFailed:
|
PythonInstallFailed:
|
||||||
DetailPrint "Operation failed. Installation will be continued without Python."
|
DetailPrint "Operation failed. Installation will be continued without Python."
|
||||||
@ -228,13 +238,32 @@ Section "Visual C++ 2005 SP1 (${PRODUCT_ARCH}) runtime" sec_vcruntime
|
|||||||
!endif
|
!endif
|
||||||
|
|
||||||
ExecWait "$TEMP\vcredist_${PRODUCT_ARCH}.exe"
|
ExecWait "$TEMP\vcredist_${PRODUCT_ARCH}.exe"
|
||||||
IfErrors RuntimeInstallFailed
|
${IfNot} ${Errors}
|
||||||
DetailPrint "Successfully installed."
|
DetailPrint "Successfully installed."
|
||||||
Return
|
${SetRegView64}
|
||||||
|
WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallVcRuntime" 1
|
||||||
|
${SetRegView32}
|
||||||
|
${Else}
|
||||||
|
DetailPrint "Operation failed. Installation will be continued without Visual C++ runtime."
|
||||||
|
DetailPrint "Please download and install it manually."
|
||||||
|
${EndIf}
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
RuntimeInstallFailed:
|
Section "Debug Interface Access (${PRODUCT_ARCH}) library" sec_msdia
|
||||||
DetailPrint "Operation failed. Installation will be continued without Visual C++ runtime."
|
DetailPrint "Registering Debug Interface Access (${PRODUCT_ARCH}) library..."
|
||||||
DetailPrint "Please download and install it manually."
|
!if ${PRODUCT_ARCH} == "x64"
|
||||||
|
RegDLL "$COMMONFILES64\Microsoft Shared\VC\${MSDIA_DLL_NAME}"
|
||||||
|
!else
|
||||||
|
RegDLL "$COMMONFILES32\Microsoft Shared\VC\${MSDIA_DLL_NAME}"
|
||||||
|
!endif
|
||||||
|
${IfNot} ${Errors}
|
||||||
|
DetailPrint "Successfully registered."
|
||||||
|
${SetRegView64}
|
||||||
|
WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UnregisterDia" 1
|
||||||
|
${SetRegView32}
|
||||||
|
${Else}
|
||||||
|
DetailPrint "Operation failed. Please register it manually."
|
||||||
|
${EndIf}
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section -FinishSection
|
Section -FinishSection
|
||||||
@ -295,6 +324,11 @@ Function .onInit
|
|||||||
!insertmacro UnselectSection ${sec_vcruntime}
|
!insertmacro UnselectSection ${sec_vcruntime}
|
||||||
SectionSetText ${sec_vcruntime} ""
|
SectionSetText ${sec_vcruntime} ""
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
|
${If} ${IsDiaRegistered}
|
||||||
|
!insertmacro UnselectSection ${sec_msdia}
|
||||||
|
SectionSetText ${sec_msdia} ""
|
||||||
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -305,12 +339,14 @@ LangString DESC_sec_pykd ${LANG_ENGLISH} "${PRODUCT_FULL_NAME}"
|
|||||||
LangString DESC_sec_snippets ${LANG_ENGLISH} "Useful code snippets. Will be installed in $DOCUMENTS\${PRODUCT_SHORT_NAME}"
|
LangString DESC_sec_snippets ${LANG_ENGLISH} "Useful code snippets. Will be installed in $DOCUMENTS\${PRODUCT_SHORT_NAME}"
|
||||||
LangString DESC_sec_python ${LANG_ENGLISH} "Let installer download and setup Python ${PYTHON_VERSION} ${PRODUCT_ARCH}"
|
LangString DESC_sec_python ${LANG_ENGLISH} "Let installer download and setup Python ${PYTHON_VERSION} ${PRODUCT_ARCH}"
|
||||||
LangString DESC_sec_vcruntime ${LANG_ENGLISH} "Let installer download and setup Microsoft Visual C++ 2005 SP1 (${PRODUCT_ARCH}) runtime library"
|
LangString DESC_sec_vcruntime ${LANG_ENGLISH} "Let installer download and setup Microsoft Visual C++ 2005 SP1 (${PRODUCT_ARCH}) runtime library"
|
||||||
|
LangString DESC_sec_msdia ${LANG_ENGLISH} "Let installer register Debug Interface Access (${PRODUCT_ARCH}) library"
|
||||||
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${sec_pykd} $(DESC_sec_pykd)
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_pykd} $(DESC_sec_pykd)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${sec_snippets} $(DESC_sec_snippets)
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_snippets} $(DESC_sec_snippets)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${sec_python} $(DESC_sec_python)
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_python} $(DESC_sec_python)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${sec_vcruntime} $(DESC_sec_vcruntime)
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_vcruntime} $(DESC_sec_vcruntime)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_msdia} $(DESC_sec_msdia)
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -346,11 +382,30 @@ Section /o "un.Python ${PYTHON_VERSION} ${PRODUCT_ARCH}" unsec_python
|
|||||||
ExecWait '"msiexec" /x ${PYTHON_PRODUCT_CODE}'
|
ExecWait '"msiexec" /x ${PYTHON_PRODUCT_CODE}'
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section /o "un.Debug Interface Access (${PRODUCT_ARCH}) library" unsec_msdia
|
||||||
|
DetailPrint "Unregistering Debug Interface Access (${PRODUCT_ARCH}) library..."
|
||||||
|
${SetRegView64}
|
||||||
|
ReadRegStr $R0 HKCR "CLSID\${CLSID_DiaSource}\InprocServer32" ""
|
||||||
|
${SetRegView32}
|
||||||
|
UnRegDLL $R0
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
Section /o "un.Visual C++ 2005 SP1 (${PRODUCT_ARCH}) runtime" unsec_vcruntime
|
Section /o "un.Visual C++ 2005 SP1 (${PRODUCT_ARCH}) runtime" unsec_vcruntime
|
||||||
DetailPrint "Uninstalling Microsoft Visual C++ 2005 SP1 (${PRODUCT_ARCH}) runtime library..."
|
DetailPrint "Uninstalling Microsoft Visual C++ 2005 SP1 (${PRODUCT_ARCH}) runtime library..."
|
||||||
ExecWait '"msiexec" /x ${VCRUNTIME_PRODUCT_CODE}'
|
ExecWait '"msiexec" /x ${VCRUNTIME_PRODUCT_CODE}'
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section -un.FinishSection
|
||||||
|
${SetRegView64}
|
||||||
|
WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallPython" 0
|
||||||
|
WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UnregisterDia" 0
|
||||||
|
WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallVcRuntime" 0
|
||||||
|
# DeleteRegValue HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallPython"
|
||||||
|
# DeleteRegValue HKLM "Software\${PRODUCT_SHORT_NAME}" "UnregisterDia"
|
||||||
|
# DeleteRegValue HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallVcRuntime"
|
||||||
|
${SetRegView32}
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Before first page displayed
|
# Before first page displayed
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -360,12 +415,35 @@ SectionEnd
|
|||||||
!define WinSxS_HasAssembly `Call un.WinSxS_HasAssembly`
|
!define WinSxS_HasAssembly `Call un.WinSxS_HasAssembly`
|
||||||
|
|
||||||
Function un.onInit
|
Function un.onInit
|
||||||
${IfNot} ${IsPythonInstalled}
|
${SetRegView64}
|
||||||
|
ReadRegDWORD $R0 HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallPython"
|
||||||
|
${SetRegView32}
|
||||||
|
|
||||||
|
${If} ${Errors}
|
||||||
|
${OrIf} $R0 == 0
|
||||||
|
${OrIfNot} ${IsPythonInstalled}
|
||||||
!insertmacro UnselectSection ${unsec_python}
|
!insertmacro UnselectSection ${unsec_python}
|
||||||
SectionSetText ${unsec_python} ""
|
SectionSetText ${unsec_python} ""
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${IfNot} ${IsVcRuntimeInstalled}
|
${SetRegView64}
|
||||||
|
ReadRegDWORD $R0 HKLM "Software\${PRODUCT_SHORT_NAME}" "UnregisterDia"
|
||||||
|
${SetRegView32}
|
||||||
|
|
||||||
|
${If} ${Errors}
|
||||||
|
${OrIf} $R0 == 0
|
||||||
|
${OrIfNot} ${IsDiaRegistered}
|
||||||
|
!insertmacro UnselectSection ${unsec_msdia}
|
||||||
|
SectionSetText ${unsec_msdia} ""
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
${SetRegView64}
|
||||||
|
ReadRegDWORD $R0 HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallVcRuntime"
|
||||||
|
${SetRegView32}
|
||||||
|
|
||||||
|
${If} ${Errors}
|
||||||
|
${OrIf} $R0 == 0
|
||||||
|
${OrIfNot} ${IsVcRuntimeInstalled}
|
||||||
!insertmacro UnselectSection ${unsec_vcruntime}
|
!insertmacro UnselectSection ${unsec_vcruntime}
|
||||||
SectionSetText ${unsec_vcruntime} ""
|
SectionSetText ${unsec_vcruntime} ""
|
||||||
${EndIf}
|
${EndIf}
|
||||||
@ -377,10 +455,12 @@ FunctionEnd
|
|||||||
|
|
||||||
LangString DESC_unsec_pykd ${LANG_ENGLISH} "${PRODUCT_FULL_NAME}"
|
LangString DESC_unsec_pykd ${LANG_ENGLISH} "${PRODUCT_FULL_NAME}"
|
||||||
LangString DESC_unsec_python ${LANG_ENGLISH} "Uninstall Python ${PYTHON_VERSION} ${PRODUCT_ARCH}"
|
LangString DESC_unsec_python ${LANG_ENGLISH} "Uninstall Python ${PYTHON_VERSION} ${PRODUCT_ARCH}"
|
||||||
|
LangString DESC_unsec_msdia ${LANG_ENGLISH} "Unregister Debug Interface Access (${PRODUCT_ARCH}) library"
|
||||||
LangString DESC_unsec_vcruntime ${LANG_ENGLISH} "Uninstall Microsoft Visual C++ 2005 SP1 (${PRODUCT_ARCH}) runtime library"
|
LangString DESC_unsec_vcruntime ${LANG_ENGLISH} "Uninstall Microsoft Visual C++ 2005 SP1 (${PRODUCT_ARCH}) runtime library"
|
||||||
|
|
||||||
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
|
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${unsec_pykd} $(DESC_unsec_pykd)
|
!insertmacro MUI_DESCRIPTION_TEXT ${unsec_pykd} $(DESC_unsec_pykd)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${unsec_python} $(DESC_unsec_python)
|
!insertmacro MUI_DESCRIPTION_TEXT ${unsec_python} $(DESC_unsec_python)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${unsec_msdia} $(DESC_unsec_msdia)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${unsec_vcruntime} $(DESC_unsec_vcruntime)
|
!insertmacro MUI_DESCRIPTION_TEXT ${unsec_vcruntime} $(DESC_unsec_vcruntime)
|
||||||
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
|
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
|
||||||
|
@ -12,4 +12,7 @@
|
|||||||
# When changing VC runtime vesion don't forget to update ProductCode appropriately
|
# When changing VC runtime vesion don't forget to update ProductCode appropriately
|
||||||
!define VCRUNTIME_PRODUCT_CODE "{ad8a2fa1-06e7-4b0d-927d-6e54b3d31028}"
|
!define VCRUNTIME_PRODUCT_CODE "{ad8a2fa1-06e7-4b0d-927d-6e54b3d31028}"
|
||||||
|
|
||||||
|
!define MSDIA_DLL_NAME "msdia90.dll"
|
||||||
|
!define CLSID_DiaSource "{4C41678E-887B-4365-A09E-925D28DB33C2}"
|
||||||
|
|
||||||
!include "pykd_setup_common.nsh"
|
!include "pykd_setup_common.nsh"
|
||||||
|
@ -12,4 +12,7 @@
|
|||||||
# When changing VC runtime vesion don't forget to update ProductCode appropriately
|
# When changing VC runtime vesion don't forget to update ProductCode appropriately
|
||||||
!define VCRUNTIME_PRODUCT_CODE "{710f4c1c-cc18-4c49-8cbf-51240c89a1a2}"
|
!define VCRUNTIME_PRODUCT_CODE "{710f4c1c-cc18-4c49-8cbf-51240c89a1a2}"
|
||||||
|
|
||||||
|
!define MSDIA_DLL_NAME "msdia90.dll"
|
||||||
|
!define CLSID_DiaSource "{4C41678E-887B-4365-A09E-925D28DB33C2}"
|
||||||
|
|
||||||
!include "pykd_setup_common.nsh"
|
!include "pykd_setup_common.nsh"
|
||||||
|
Loading…
Reference in New Issue
Block a user