您当前的位置:首页 > 计算机 > 软件应用 > 行业软件

NSIS制作exe安装包

时间:03-17来源:作者:点击数:

脚本.nsi 如下:

; 该脚本使用 HM VNISEdit 脚本编辑器向导产生

; 安装程序初始定义常量
!define PRODUCT_NAME "xxx"
!define PRODUCT_VERSION "2.1"
!define PRODUCT_PUBLISHER "xxxxxxxxx有限公司"
!define PRODUCT_WEB_SITE "http://www.xxxxxxx.cn/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\SYZJZWPF.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

SetCompressor lzma

; ------ MUI 现代界面定义 (1.67 版本以上兼容) ------
!include "MUI.nsh"

; MUI 预定义常量
!define MUI_ABORTWARNING
!define MUI_ICON "Util.Controls.WPFTest\Icon_1.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; 欢迎页面
!insertmacro MUI_PAGE_WELCOME
; 安装目录选择页面
!insertmacro MUI_PAGE_DIRECTORY
; 安装过程页面
!insertmacro MUI_PAGE_INSTFILES
; 安装完成页面
!define MUI_FINISHPAGE_RUN "$INSTDIR\SYZJZWPF.exe"
!insertmacro MUI_PAGE_FINISH

; 安装卸载过程页面
!insertmacro MUI_UNPAGE_INSTFILES

; 安装界面包含的语言设置
!insertmacro MUI_LANGUAGE "SimpChinese"

; 安装预释放文件
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; ------ MUI 现代界面定义结束 ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\xxx"
InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
ShowInstDetails show
ShowUnInstDetails show

Section "MainSection" SEC01
  SetOutPath "$INSTDIR"
  SetOverwrite ifnewer
  File "Util.Controls.WPFTest\bin\Debug\AxInterop.TerraExplorerX.dll"
  CreateDirectory "$SMPROGRAMS\xxx"
  CreateShortCut "$SMPROGRAMS\xxx\xxx.lnk" "$INSTDIR\SYZJZWPF.exe"
  CreateShortCut "$DESKTOP\xxx.lnk" "$INSTDIR\SYZJZWPF.exe"
  SetOutPath "$INSTDIR\Images\AirPlanes"
  File "Util.Controls.WPFTest\bin\Debug\Images\AirPlanes\747.xpc"
  File "Util.Controls.WPFTest\bin\Debug\Images\AirPlanes\beech.xpc" 
  File "Util.Controls.WPFTest\bin\Debug\Images\AirPlanes\t33.xpc"
  File "Util.Controls.WPFTest\bin\Debug\Images\AirPlanes\Triplane-Banner.x"
  File "Util.Controls.WPFTest\bin\Debug\Images\AirPlanes\Triplane.x"
  SetOutPath "$INSTDIR"
  File "Util.Controls.WPFTest\bin\Debug\Interop.TerraExplorerX.dll"
  File "Util.Controls.WPFTest\bin\Debug\MapConfig.ini"
  File "Util.Controls.WPFTest\bin\Debug\Microsoft.Expression.Drawing.dll"
  File "Util.Controls.WPFTest\bin\Debug\Microsoft.Expression.Effects.dll"
  File "Util.Controls.WPFTest\bin\Debug\Microsoft.Expression.Interactions.dll"
  File "Util.Controls.WPFTest\bin\Debug\Microsoft.Windows.Shell.dll"
  File "Util.Controls.WPFTest\bin\Debug\stdole.dll"
  File "Util.Controls.WPFTest\bin\Debug\System.Utility.dll"
  File "Util.Controls.WPFTest\bin\Debug\System.Windows.Interactivity.dll"
  File "Util.Controls.WPFTest\bin\Debug\SYZJZWPF.exe"
  File "Util.Controls.WPFTest\bin\Debug\SYZJZWPF.exe.config"
  File "Util.Controls.WPFTest\bin\Debug\SYZJZWPF.pdb"
  File "Util.Controls.WPFTest\bin\Debug\SYZJZWPF.vshost.exe"
  File "Util.Controls.WPFTest\bin\Debug\SYZJZWPF.vshost.exe.config"
  SetOutPath "$INSTDIR\Tools\animation"
  File "Util.Controls.WPFTest\bin\Debug\Tools\animation\animation.html"
  SetOutPath "$INSTDIR\Tools\animation\images"
  File "Util.Controls.WPFTest\bin\Debug\Tools\animation\images\empty.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\animation\images\fire.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\animation\images\fog.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\animation\images\rain.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\animation\images\snow.png"
  SetOutPath "$INSTDIR\Tools\animation"
  File "Util.Controls.WPFTest\bin\Debug\Tools\animation\Lang.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\animation\RoadBuilder.html"
  SetOutPath "$INSTDIR\Tools\CommonImg"
  File "Util.Controls.WPFTest\bin\Debug\Tools\CommonImg\bg_button_a.gif" 
  File "Util.Controls.WPFTest\bin\Debug\Tools\CommonImg\point.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\CommonImg\polygon.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\CommonImg\polyline.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\CommonImg\Separator.gif"
  SetOutPath "$INSTDIR\Tools\CoordSystemTool\2052"
  File "Util.Controls.WPFTest\bin\Debug\Tools\CoordSystemTool\2052\help.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\CoordSystemTool\2052\Lang.js"
  SetOutPath "$INSTDIR\Tools\CoordSystemTool"
  File "Util.Controls.WPFTest\bin\Debug\Tools\CoordSystemTool\CoordSystem.html" 
  File "Util.Controls.WPFTest\bin\Debug\Tools\CoordSystemTool\Skin_bkg.bmp"
  File "Util.Controls.WPFTest\bin\Debug\Tools\CoordSystemTool\TerraExplorerPro-Logo-Small.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\CoordSystemTool\ToolIcon.png" 
  File "Util.Controls.WPFTest\bin\Debug\Tools\CoordSystemTool\up-right-reg.gif"
  SetOutPath "$INSTDIR\Tools\ImageComparison"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\cursor_m.cur"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\help.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\ImageComparison.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\ImageComparison.ico"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\ImageComparisonPopup.html"
  SetOutPath "$INSTDIR\Tools\ImageComparison\Images"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\Images\autoOff.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\Images\autoOn.gif" 
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\Images\space.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\Images\ZoomIn.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\Images\ZoomOut.gif"
  SetOutPath "$INSTDIR\Tools\ImageComparison"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\Lang.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\range.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\slider.css"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\slider.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\SnapshotComparison.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\SnapshotComparison.ico"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\SnapshotDetectionPopup.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ImageComparison\timer.js"
  SetOutPath "$INSTDIR\Tools\LookAround"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Binoculars.kml"
  SetOutPath "$INSTDIR\Tools\LookAround\Images"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Images\binoculars.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Images\exit.jpg"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Images\icon.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Images\reset.jpg"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Images\slider.handle.horizontal.hover.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Images\slider.handle.horizontal.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Images\slider.handle.vertical.hover.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Images\slider.handle.vertical.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Images\zoomBar.jpg"
  SetOutPath "$INSTDIR\Tools\LookAround"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\Lang.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\LookAround.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\LookAround.ico"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\range.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\slider.css"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\slider.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\timer.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\__Launcher.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\LookAround\__Tool.xml"
  SetOutPath "$INSTDIR\Tools"
  File "Util.Controls.WPFTest\bin\Debug\Tools\Style.css"
  SetOutPath "$INSTDIR\Tools\TerrainProfile\2052"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\2052\help.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\2052\Lang.js"
  SetOutPath "$INSTDIR\Tools\TerrainProfile"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\cursor_m.cur"
  SetOutPath "$INSTDIR\Tools\TerrainProfile\flot"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\flot\excanvas.min.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\flot\jquery-ui-1.10.4.custom.min.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\flot\jquery.flot.min.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\flot\jquery.flot.navigate.min.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\flot\jquery.flot.resize.min.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\flot\jquery.flot.selection.min.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\flot\jquery.flot.symbol.min.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\flot\jquery.min.js"
  SetOutPath "$INSTDIR\Tools\TerrainProfile"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\help.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\Hourglass.cur"
  SetOutPath "$INSTDIR\Tools\TerrainProfile\img"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\img\ButtonBackground.jpg"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\img\minmaxAlt.jpg"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\img\minmaxSlope.jpg"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\img\point.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\img\waypoint.jpg"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\img\zoomall.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\img\zoomin.png"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\img\zoomout.png"
  SetOutPath "$INSTDIR\Tools\TerrainProfile"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\Lang.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\TerrainProfile.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\TerrainProfile.ico"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\TerrainProfilePopup.html"
  File "Util.Controls.WPFTest\bin\Debug\Tools\TerrainProfile\ToolIcon.png"
  SetOutPath "$INSTDIR\Tools"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ToolsCommon.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ToolsCommon65.js"
  File "Util.Controls.WPFTest\bin\Debug\Tools\ToolStyle.css"
  SetOutPath "$INSTDIR\Tools\UrbanDesign\2052"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\2052\Lang.js"
  SetOutPath "$INSTDIR\Tools\UrbanDesign\images"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\images\cursor_d.cur"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\images\cursor_v.cur"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\images\drawingDelete.png" 
  SetOutPath "$INSTDIR\Tools\UrbanDesign\Junctions"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Junctions\junction-1-1.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Junctions\junction-1-2.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Junctions\junction-1-3.gif" 
  SetOutPath "$INSTDIR\Tools\UrbanDesign"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Lang.js"
  SetOutPath "$INSTDIR\Tools\UrbanDesign\Lights"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Lights\lightpole-0s.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Lights\lightpole-20.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Lights\lightpole-20s.gif" 
  SetOutPath "$INSTDIR\Tools\UrbanDesign"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\RoadBuilder.html"
  SetOutPath "$INSTDIR\Tools\UrbanDesign\RoadTextures"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\RoadTextures\empty.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\RoadTextures\road-1-1.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\RoadTextures\road-1-2.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\RoadTextures\road-1-3.gif" 
  SetOutPath "$INSTDIR\Tools\UrbanDesign\TrafficLights"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\TrafficLights\light-1.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\TrafficLights\light-1s.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\TrafficLights\light-2.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\TrafficLights\light-2s.gif" 
  SetOutPath "$INSTDIR\Tools\UrbanDesign\Trees"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Trees\tree-0s.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Trees\tree-10.gif"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\Trees\tree-10s.gif" 
  SetOutPath "$INSTDIR\Tools\UrbanDesign"
  File "Util.Controls.WPFTest\bin\Debug\Tools\UrbanDesign\UrbanDesign.html"
  SetOutPath "$INSTDIR\Tools"
  File "Util.Controls.WPFTest\bin\Debug\Tools\vis.css"
  File "Util.Controls.WPFTest\bin\Debug\Tools\vis.js"
  SetOutPath "$INSTDIR"
  File "Util.Controls.WPFTest\bin\Debug\Util.Controls.dll"
  File "Util.Controls.WPFTest\bin\Debug\Util.Controls.pdb"
  File "Util.Controls.WPFTest\bin\Debug\Util.Controls.WPFTest.vshost.exe.config"
  File "Util.Controls.WPFTest\bin\Debug\Utility.dll"
  File "Util.Controls.WPFTest\bin\Debug\Utility.pdb"
  File "Util.Controls.WPFTest\bin\Debug\检测表模板-dem.xls"
  File "Util.Controls.WPFTest\bin\Debug\检测表模板.xls"
SectionEnd

Section -AdditionalIcons
  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  CreateShortCut "$SMPROGRAMS\xxx\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
  CreateShortCut "$SMPROGRAMS\xxx\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd

Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\SYZJZWPF.exe"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\SYZJZWPF.exe"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd

/******************************
 *  以下是安装程序的卸载部分  *
 ******************************/

Section Uninstall
  Delete "$INSTDIR\${PRODUCT_NAME}.url"
  Delete "$INSTDIR\uninst.exe"
  Delete "$INSTDIR\检测表模板.xls"
  Delete "$INSTDIR\检测表模板-dem.xls"
  Delete "$INSTDIR\Utility.pdb"
  Delete "$INSTDIR\Utility.dll"
  Delete "$INSTDIR\Util.Controls.WPFTest.vshost.exe.config"
  Delete "$INSTDIR\Util.Controls.pdb"
  Delete "$INSTDIR\Util.Controls.dll"
  Delete "$INSTDIR\Tools\vis.js"
  Delete "$INSTDIR\Tools\vis.css"
  Delete "$INSTDIR\Tools\UrbanDesign\UrbanDesign.html"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-16s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-15s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-15.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-14s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-14.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-13s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-13.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-12s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-12.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-11s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-11.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-10s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-10.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Trees\tree-0s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\TrafficLights\light-9s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\TrafficLights\light-9.gif" 
  Delete "$INSTDIR\Tools\UrbanDesign\RoadTextures\empty.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\RoadBuilder.html"
  Delete "$INSTDIR\Tools\UrbanDesign\Lights\lightpole-23s.gif" 
  Delete "$INSTDIR\Tools\UrbanDesign\Lights\lightpole-0s.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\Lang.js"
  Delete "$INSTDIR\Tools\UrbanDesign\Junctions\junction-4-3.gif" 
  Delete "$INSTDIR\Tools\UrbanDesign\images\empty.gif"
  Delete "$INSTDIR\Tools\UrbanDesign\images\edit.png"
  Delete "$INSTDIR\Tools\UrbanDesign\images\drawingTrafficlight.png"
  Delete "$INSTDIR\Tools\UrbanDesign\images\drawingSeparator.png"
  Delete "$INSTDIR\Tools\UrbanDesign\images\drawingRoad.png"
  Delete "$INSTDIR\Tools\UrbanDesign\images\drawingJunction.png"
  Delete "$INSTDIR\Tools\UrbanDesign\images\drawingDelete.png"
  Delete "$INSTDIR\Tools\UrbanDesign\images\cursor_v.cur"
  Delete "$INSTDIR\Tools\UrbanDesign\images\cursor_d.cur"
  Delete "$INSTDIR\Tools\UrbanDesign\2052\Lang.js"
  Delete "$INSTDIR\Tools\ToolStyle.css"
  Delete "$INSTDIR\Tools\ToolsCommon65.js"
  Delete "$INSTDIR\Tools\ToolsCommon.js"
  Delete "$INSTDIR\Tools\TerrainProfile\ToolIcon.png"
  Delete "$INSTDIR\Tools\TerrainProfile\TerrainProfilePopup.html"
  Delete "$INSTDIR\Tools\TerrainProfile\TerrainProfile.ico"
  Delete "$INSTDIR\Tools\TerrainProfile\TerrainProfile.html"
  Delete "$INSTDIR\Tools\TerrainProfile\Lang.js"
  Delete "$INSTDIR\Tools\TerrainProfile\img\zoomout.png"
  Delete "$INSTDIR\Tools\TerrainProfile\img\zoomin.png"
  Delete "$INSTDIR\Tools\TerrainProfile\img\zoomall.png"
  Delete "$INSTDIR\Tools\TerrainProfile\img\waypoint.jpg"
  Delete "$INSTDIR\Tools\TerrainProfile\img\point.gif"
  Delete "$INSTDIR\Tools\TerrainProfile\img\minmaxSlope.jpg"
  Delete "$INSTDIR\Tools\TerrainProfile\img\minmaxAlt.jpg"
  Delete "$INSTDIR\Tools\TerrainProfile\img\ButtonBackground.jpg"
  Delete "$INSTDIR\Tools\TerrainProfile\Hourglass.cur"
  Delete "$INSTDIR\Tools\TerrainProfile\help.html"
  Delete "$INSTDIR\Tools\TerrainProfile\flot\jquery.min.js"
  Delete "$INSTDIR\Tools\TerrainProfile\flot\jquery.flot.symbol.min.js"
  Delete "$INSTDIR\Tools\TerrainProfile\flot\jquery.flot.selection.min.js"
  Delete "$INSTDIR\Tools\TerrainProfile\flot\jquery.flot.resize.min.js"
  Delete "$INSTDIR\Tools\TerrainProfile\flot\jquery.flot.navigate.min.js"
  Delete "$INSTDIR\Tools\TerrainProfile\flot\jquery.flot.min.js"
  Delete "$INSTDIR\Tools\TerrainProfile\flot\jquery-ui-1.10.4.custom.min.js"
  Delete "$INSTDIR\Tools\TerrainProfile\flot\excanvas.min.js"
  Delete "$INSTDIR\Tools\TerrainProfile\cursor_m.cur"
  Delete "$INSTDIR\Tools\TerrainProfile\2052\Lang.js"
  Delete "$INSTDIR\Tools\TerrainProfile\2052\help.html"
  Delete "$INSTDIR\Tools\Style.css"
  Delete "$INSTDIR\Tools\LookAround\__Tool.xml"
  Delete "$INSTDIR\Tools\LookAround\__Launcher.html"
  Delete "$INSTDIR\Tools\LookAround\timer.js"
  Delete "$INSTDIR\Tools\LookAround\slider.js"
  Delete "$INSTDIR\Tools\LookAround\slider.css"
  Delete "$INSTDIR\Tools\LookAround\range.js"
  Delete "$INSTDIR\Tools\LookAround\LookAround.ico"
  Delete "$INSTDIR\Tools\LookAround\LookAround.html"
  Delete "$INSTDIR\Tools\LookAround\Lang.js"
  Delete "$INSTDIR\Tools\LookAround\Images\zoomBar.jpg"
  Delete "$INSTDIR\Tools\LookAround\Images\slider.handle.vertical.png"
  Delete "$INSTDIR\Tools\LookAround\Images\slider.handle.vertical.hover.png"
  Delete "$INSTDIR\Tools\LookAround\Images\slider.handle.horizontal.png"
  Delete "$INSTDIR\Tools\LookAround\Images\slider.handle.horizontal.hover.png"
  Delete "$INSTDIR\Tools\LookAround\Images\reset.jpg"
  Delete "$INSTDIR\Tools\LookAround\Images\icon.png"
  Delete "$INSTDIR\Tools\LookAround\Images\exit.jpg"
  Delete "$INSTDIR\Tools\LookAround\Images\binoculars.png"
  Delete "$INSTDIR\Tools\LookAround\Binoculars.kml"
  Delete "$INSTDIR\Tools\ImageComparison\timer.js"
  Delete "$INSTDIR\Tools\ImageComparison\SnapshotDetectionPopup.html"
  Delete "$INSTDIR\Tools\ImageComparison\SnapshotComparison.ico"
  Delete "$INSTDIR\Tools\ImageComparison\SnapshotComparison.html"
  Delete "$INSTDIR\Tools\ImageComparison\slider.js"
  Delete "$INSTDIR\Tools\ImageComparison\slider.css"
  Delete "$INSTDIR\Tools\ImageComparison\range.js"
  Delete "$INSTDIR\Tools\ImageComparison\Lang.js"
  Delete "$INSTDIR\Tools\ImageComparison\Images\ZoomOut.gif"
  Delete "$INSTDIR\Tools\ImageComparison\Images\ZoomIn.gif"
  Delete "$INSTDIR\Tools\ImageComparison\Images\space.gif"
  Delete "$INSTDIR\Tools\ImageComparison\Images\slider.handle.vertical.png"
  Delete "$INSTDIR\Tools\ImageComparison\Images\slider.handle.vertical.hover.png"
  Delete "$INSTDIR\Tools\ImageComparison\Images\slider.handle.horizontal.png"
  Delete "$INSTDIR\Tools\ImageComparison\Images\slider.handle.horizontal.hover.png"
  Delete "$INSTDIR\Tools\ImageComparison\Images\loading.gif"
  Delete "$INSTDIR\Tools\ImageComparison\Images\autoOn.gif"
  Delete "$INSTDIR\Tools\ImageComparison\Images\autoOff.gif"
  Delete "$INSTDIR\Tools\ImageComparison\ImageComparisonPopup.html"
  Delete "$INSTDIR\Tools\ImageComparison\ImageComparison.ico"
  Delete "$INSTDIR\Tools\ImageComparison\ImageComparison.html"
  Delete "$INSTDIR\Tools\ImageComparison\help.html"
  Delete "$INSTDIR\Tools\ImageComparison\cursor_m.cur"
  Delete "$INSTDIR\Tools\CoordSystemTool\up-right-reg.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\up-right-Hi.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\up-left-reg.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\up-left-Hi.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\ToolIcon.png"
  Delete "$INSTDIR\Tools\CoordSystemTool\TerraExplorerPro-Logo-Small.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\Skin_bkg.bmp"
  Delete "$INSTDIR\Tools\CoordSystemTool\sep-reg.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\sep-Hi.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\plus.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\MultipleCoordSys.ico"
  Delete "$INSTDIR\Tools\CoordSystemTool\minus.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\Lang.js"
  Delete "$INSTDIR\Tools\CoordSystemTool\help.html"
  Delete "$INSTDIR\Tools\CoordSystemTool\empty.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\down-right-reg.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\down-right-Hi.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\down-left-reg.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\down-left-Hi.gif"
  Delete "$INSTDIR\Tools\CoordSystemTool\CoordSystem.html"
  Delete "$INSTDIR\Tools\CoordSystemTool\2052\Lang.js"
  Delete "$INSTDIR\Tools\CoordSystemTool\2052\help.html"
  Delete "$INSTDIR\Tools\CommonImg\Separator.gif"
  Delete "$INSTDIR\Tools\CommonImg\polyline.png"
  Delete "$INSTDIR\Tools\CommonImg\polygon.png"
  Delete "$INSTDIR\Tools\CommonImg\point.png"
  Delete "$INSTDIR\Tools\CommonImg\help.png"
  Delete "$INSTDIR\Tools\CommonImg\Help.gif"
  Delete "$INSTDIR\Tools\CommonImg\group.png"
  Delete "$INSTDIR\Tools\CommonImg\close.png"
  Delete "$INSTDIR\Tools\CommonImg\close.gif"
  Delete "$INSTDIR\Tools\CommonImg\clipboard.png"
  Delete "$INSTDIR\Tools\CommonImg\bg_button_span.gif"
  Delete "$INSTDIR\Tools\CommonImg\bg_button_a.gif"
  Delete "$INSTDIR\Tools\animation\RoadBuilder.html"
  Delete "$INSTDIR\Tools\animation\Lang.js"
  Delete "$INSTDIR\Tools\animation\images\snow.png"
  Delete "$INSTDIR\Tools\animation\images\rain.png"
  Delete "$INSTDIR\Tools\animation\images\fog.png"
  Delete "$INSTDIR\Tools\animation\images\fire.png"
  Delete "$INSTDIR\Tools\animation\images\empty.gif"
  Delete "$INSTDIR\Tools\animation\animation.html"
  Delete "$INSTDIR\SYZJZWPF.vshost.exe.config"
  Delete "$INSTDIR\SYZJZWPF.vshost.exe"
  Delete "$INSTDIR\SYZJZWPF.pdb"
  Delete "$INSTDIR\SYZJZWPF.exe.config"
  Delete "$INSTDIR\SYZJZWPF.exe"
  Delete "$INSTDIR\System.Windows.Interactivity.dll"
  Delete "$INSTDIR\System.Utility.dll"
  Delete "$INSTDIR\stdole.dll"
  Delete "$INSTDIR\Microsoft.Windows.Shell.dll"
  Delete "$INSTDIR\Microsoft.Expression.Interactions.dll"
  Delete "$INSTDIR\Microsoft.Expression.Effects.dll"
  Delete "$INSTDIR\Microsoft.Expression.Drawing.dll"
  Delete "$INSTDIR\MapConfig.ini"
  Delete "$INSTDIR\Interop.TerraExplorerX.dll"
  Delete "$INSTDIR\Images\AirPlanes\Triplane.x"
  Delete "$INSTDIR\Images\AirPlanes\Triplane-Banner.x"
  Delete "$INSTDIR\Images\AirPlanes\t33.xpc"
  Delete "$INSTDIR\Images\AirPlanes\t-corb.xpc"
  Delete "$INSTDIR\Images\AirPlanes\polygon.xpl2"
  Delete "$INSTDIR\Images\AirPlanes\otter.xpc"
  Delete "$INSTDIR\Images\AirPlanes\mirage.xpc"
  Delete "$INSTDIR\Images\AirPlanes\hercules.xpc"
  Delete "$INSTDIR\Images\AirPlanes\g17s.xpc"
  Delete "$INSTDIR\Images\AirPlanes\f16.xpc"
  Delete "$INSTDIR\Images\AirPlanes\f15.xpc"
  Delete "$INSTDIR\Images\AirPlanes\corven.xpc"
  Delete "$INSTDIR\Images\AirPlanes\cessna.xpc"
  Delete "$INSTDIR\Images\AirPlanes\c5.xpc"
  Delete "$INSTDIR\Images\AirPlanes\beech.xpc"
  Delete "$INSTDIR\Images\AirPlanes\747.xpc"
  Delete "$INSTDIR\AxInterop.TerraExplorerX.dll"

  Delete "$SMPROGRAMS\xxx\Uninstall.lnk"
  Delete "$SMPROGRAMS\xxx\Website.lnk"
  Delete "$DESKTOP\xxx.lnk"
  Delete "$SMPROGRAMS\xxx\xxx.lnk"

  RMDir "$SMPROGRAMS\xxx"
  RMDir "$INSTDIR\Tools\UrbanDesign\Trees"
  RMDir "$INSTDIR\Tools\UrbanDesign\TrafficLights"
  RMDir "$INSTDIR\Tools\UrbanDesign\RoadTextures"
  RMDir "$INSTDIR\Tools\UrbanDesign\Lights"
  RMDir "$INSTDIR\Tools\UrbanDesign\Junctions"
  RMDir "$INSTDIR\Tools\UrbanDesign\images"
  RMDir "$INSTDIR\Tools\UrbanDesign\2052"
  RMDir "$INSTDIR\Tools\UrbanDesign"
  RMDir "$INSTDIR\Tools\TerrainProfile\img"
  RMDir "$INSTDIR\Tools\TerrainProfile\flot"
  RMDir "$INSTDIR\Tools\TerrainProfile\2052"
  RMDir "$INSTDIR\Tools\TerrainProfile"
  RMDir "$INSTDIR\Tools\LookAround\Images"
  RMDir "$INSTDIR\Tools\LookAround"
  RMDir "$INSTDIR\Tools\ImageComparison\Images"
  RMDir "$INSTDIR\Tools\ImageComparison"
  RMDir "$INSTDIR\Tools\CoordSystemTool\2052"
  RMDir "$INSTDIR\Tools\CoordSystemTool"
  RMDir "$INSTDIR\Tools\CommonImg"
  RMDir "$INSTDIR\Tools\animation\images"
  RMDir "$INSTDIR\Tools\animation"
  RMDir "$INSTDIR\Tools"
  RMDir "$INSTDIR\Images\AirPlanes"

  RMDir "$INSTDIR"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd

#-- 根据 NSIS 脚本编辑规则,所有 Function 区段必须放置在 Section 区段之后编写,以避免安装程序出现未可预知的问题。--#

Function un.onInit
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "你确实要完全移除 $(^Name) ,及其所有的组件?" IDYES +2
  Abort
FunctionEnd

Function un.onUninstSuccess
  HideWindow
  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) 已成功地从你的计算机移除。"
FunctionEnd


方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门