Just RUN

A scientist builds in order to learn; an engineer learns in order to build.

HOHO,发现了一个好咚咚,分享一下。

NSIS:

Nullsoft Scriptable Install System

An installer is the first experience of a user with your application. Slow or unsuccesful software installations are the most irritating computer problems. A quick and user friendly installer is therefore an essential part of your software product.

NSIS (Nullsoft Scriptable Install System) is a tool that allows programmers to create such installers for Windows. It is released under an open source license and is completely free for any use.

Link: http://nsis.sourceforge.net/

贴一段刚写的打包脚本看看,但愿不算泄密,God bless,可以看到基本上没有什么废话,也不需要什么注释,有点计算机和英文能力地都看得懂,老外比较搞笑,在提供的例子里居然能找到,Microsoft shit, I like f*ck sheep... 晕倒

------------------------------------------------------------------

Name "Run test"
Caption "Run's test"
OutFile "setup.exe"

LicenseText "A test text, make sure it's all there"

InstallDir "$PROGRAMFILES\SMS_Client"

Page directory
Page instfiles

Section ""

  DetailPrint "Welcome to setup program..."
  WriteRegStr "HKCU" "SOFTWARE\Comgi\TrafficStation" "Install_Dir" "$INSTDIR"
  WriteRegStr "HKCU" "SOFTWARE\Comgi\TrafficStation" "AutoMoveToHistory" "true"
  WriteRegStr "HKCU" "SOFTWARE\Comgi\TrafficStation" "AutoCleanTrashCan" "true"
  WriteRegStr "HKCU" "SOFTWARE\Comgi\TrafficStation" "AutoReceiveInterval" "10"
  WriteRegStr "HKCU" "SOFTWARE\Comgi\TrafficStation" "TimeFormat" "HH:MI"
  WriteRegStr "HKCU" "SOFTWARE\Comgi\TrafficStation" "AutoCleanDays" "7"
  WriteRegStr "HKCU" "SOFTWARE\Comgi\TrafficStation" "AutoMoveDays" "3"
  WriteRegStr "HKCU" "SOFTWARE\Comgi\TrafficStation" "WSDL" "
http://bdcb.m-mall.cn/TrafficService/services/TrafficService"

  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "DisplayName" "BigNSISTest (remove only)"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "UninstallString" '"$INSTDIR\bt-uninst.exe"'

  SetOutPath $INSTDIR
  File /a "F:\BDCB SMS Client\StationSMSClient.exe"
  File /a "F:\BDCB SMS Client\data.dat"
  File /a "F:\BDCB SMS Client\dotnetfx.exe"
  File /a "F:\BDCB SMS Client\OnlineUpdater.exe"
  File /a "F:\BDCB SMS Client\TrafficClient_1.2.0.0.dll"
  File /a "F:\BDCB SMS Client\TrafficClient.chm"
  File /a "F:\BDCB SMS Client\StationSMSClient.exe.config"
  WriteUninstaller "uninst.exe"

  CreateDirectory "$SMPROGRAMS\康击短信"
  CreateShortCut "$SMPROGRAMS\康击短信\卸载程序.lnk" "$INSTDIR\uninst.exe"
  CreateShortCut "$SMPROGRAMS\康击短信\短信应用.lnk" "$INSTDIR\StationSMSClient.exe"
  CreateShortCut "$SMPROGRAMS\康击短信\帮助文档.lnk" "$INSTDIR\TrafficClient.chm"
  CreateShortCut "$DESKTOP\短信应用.lnk" "$INSTDIR\StationSMSClient.exe"

  Exec "$INSTDIR\dotnetfx.exe"

SectionEnd

Section "Uninstall"

  Delete "$INSTDIR\StationSMSClient.exe"
  Delete "$INSTDIR\dotnetfx.exe"
  Delete "$INSTDIR\OnlineUpdater.exe"
  Delete "$INSTDIR\TrafficClient_1.2.0.0.dll"
  Delete "$INSTDIR\TrafficClient.chm"
  Delete "$INSTDIR\StationSMSClient.exe.config"
  Delete "$SMPROGRAMS\康击短信\短信应用.lnk"
  Delete "$DESKTOP\短信应用.lnk"
  Delete "$SMPROGRAMS\康击短信\帮助文档.lnk"
  Delete "$SMPROGRAMS\康击短信\卸载程序.lnk"
  Delete "$INSTDIR\uninst.exe"

SectionEnd

posted on 2004-09-23 16:56    阅读(841)  评论(2)    收藏  举报

导航