support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 15 Dec 2003 07:57:44 +0000 (07:57 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 15 Dec 2003 07:57:44 +0000 (07:57 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3058 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
support/scripts/sdcc.nsi

index 23ae88a1277decf3a433ffe626b1f116d6a2dae7..6fe9b2e443ec32f0bd2908f2970c208bf9037f23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-12-15  Borut Razem <borut.razem@siol.net>
+
+       * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
+
 2003-12-14 Erik Petrich <epetrich@ivorytower.norman.ok.us>
 
        * support/makebin/makebin.c: put output in binary mode
index 47aad1279692e363a6b4b2fbe15475b642225c1a..7451cb426aaac992440cddcec3e3b0097d6fa129 100644 (file)
-; Generated NSIS script file (generated by makensitemplate.phtml 0.20)
-; by 63.48.69.245 on Sep 19 01 @ 15:09
-
-; NOTE: this .NSI script is designed for NSIS v1.3+
-
-Name "Small Device C Compiler"
-OutFile "c:\temp\sdcc-2.3.0-installer.exe"
-
-; Some default compiler settings (uncomment and change at will):
-; SetCompress auto ; (can be off or force)
-; SetDatablockOptimize on ; (can be off)
-; CRCCheck on ; (can be off)
-AutoCloseWindow true ; (can be true for the window go away automatically at end)
-; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
-; SetDateSave off ; (can be on to have files restored to their orginal date)
-
-LicenseText "SDCC is licensed under the GNU Public License"
-LicenseData "LICENSE.txt"
-
-InstallDir "c:\sdcc"
-InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Small Device C Compiler Group\Small Device C Compiler" ""
-DirShow show
-DirText "Choose the directory to install SDCC into.  Currently only c:\sdcc is supported."
-
-Section "" ; (default section)
-SetOutPath "$INSTDIR"
-; add files / whatever that need to be installed here.
-File /r bin
-File /r share
-File /r doc
-File README.txt
-File INSTALL.txt
-File LICENSE.txt
-WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Small Device C Compiler Group\Small Device C Compiler" "" "$INSTDIR"
-CreateDirectory "$SMPROGRAMS\Small Device C Compiler"
-CreateShortCut "$SMPROGRAMS\Small Device C Compiler\README.lnk" $INSTDIR\README.txt
-CreateShortCut "$SMPROGRAMS\Small Device C Compiler\INSTALL.lnk" $INSTDIR\INSTALL.txt
-CreateShortCut "$SMPROGRAMS\Small Device C Compiler\LICENSE.lnk" $INSTDIR\LICENSE.txt
-CreateShortCut "$SMPROGRAMS\Small Device C Compiler\Users Guide.lnk" $INSTDIR\share\doc\sdcc\sdccman.html\index.html
-ExecShell open $INSTDIR\README.txt
-SectionEnd ; end of default section
-
-; eof
+# sdcc.nsi - NSIS installer script for SDCC
+#
+# Copyright (c) 2003 Borut Razem
+#
+# This file is part of sdcc.
+#
+#  This software is provided 'as-is', without any express or implied
+#  warranty.  In no event will the authors be held liable for any damages
+#  arising from the use of this software.
+#
+#  Permission is granted to anyone to use this software for any purpose,
+#  including commercial applications, and to alter it and redistribute it
+#  freely, subject to the following restrictions:
+#
+#  1. The origin of this software must not be misrepresented; you must not
+#     claim that you wrote the original software. If you use this software
+#     in a product, an acknowledgment in the product documentation would be
+#     appreciated but is not required.
+#  2. Altered source versions must be plainly marked as such, and must not be
+#     misrepresented as being the original software.
+#  3. This notice may not be removed or altered from any source distribution.
+#
+#  Borut Razem
+#  borut.razem@siol.net
+
+!include "MUI.nsh"
+
+SetCompressor bzip2
+
+!define SDCC_ROOT "..\.."
+
+!define FROM_SNAPSHOT
+
+!ifdef FROM_SNAPSHOT
+!system "dir ${SDCC_ROOT}\device > NUL" <> 0
+!define DEV_ROOT "${SDCC_ROOT}"
+!else
+!system "dir ${SDCC_ROOT}\device > NUL" = 0
+!define DEV_ROOT "${SDCC_ROOT}\device"
+!endif
+
+!system "unix2dos ${SDCC_ROOT}\doc\ChangeLog_head.txt" = 0
+!system "unix2dos ${SDCC_ROOT}\doc\README.TXT" = 0
+
+InstType "Full (Bin, Doc, Lib, Src)"
+InstType "Medium (Bin, Doc, Lib)"
+InstType "Compact (Bin, Doc)"
+
+!define MUI_ABORTWARNING
+!insertmacro MUI_PAGE_WELCOME
+!define MUI_LICENSEPAGE_RADIOBUTTONS
+!insertmacro MUI_PAGE_LICENSE "${SDCC_ROOT}\COPYING.TXT"
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "SDCC"
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\%sSDCC"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "NSIS:StartMenuDir"
+!define MUI_STARTMENUPAGE_NODISABLE
+!insertmacro MUI_PAGE_STARTMENU
+!insertmacro MUI_PAGE_COMPONENTS
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+!insertmacro MUI_UNPAGE_INSTFILES
+!insertmacro MUI_LANGUAGE "English"
+
+Name "SDCC"
+BrandingText ""
+OutFile "setup.exe"
+InstallDir "$PROGRAMFILES\SDCC"
+ShowInstDetails show
+ShowUnInstDetails show
+
+Function .onInit
+  MessageBox MB_YESNO|MB_ICONQUESTION "This will install $(^Name). Do you wish to continue?" IDYES +2
+  Abort
+FunctionEnd
+
+Section -Common
+  SetOutPath "$INSTDIR"
+  File ".\sdcc.ico"
+  File "${SDCC_ROOT}\COPYING.TXT"
+SectionEnd
+
+Section "SDCC application files"
+  SectionIn 1 2 3 RO
+  SetOutPath "$INSTDIR\bin"
+  File "${SDCC_ROOT}\bin\*.exe"
+SectionEnd
+
+Section "SDCC documentation"
+  SectionIn 1 2 3
+  SetOutPath "$INSTDIR\doc"
+  File "${SDCC_ROOT}\doc\ChangeLog_head.txt"
+  File "${SDCC_ROOT}\doc\README.TXT"
+SectionEnd
+
+Section "SDCC include files"
+  SectionIn 1 2
+  SetOutPath "$INSTDIR\include\asm\default"
+  File "${DEV_ROOT}\include\asm\default\features.h"
+  SetOutPath "$INSTDIR\include\asm\gbz80"
+  File "${DEV_ROOT}\include\asm\gbz80\features.h"
+  SetOutPath "$INSTDIR\include\asm\z80"
+  File "${DEV_ROOT}\include\asm\z80\features.h"
+  SetOutPath "$INSTDIR\include"
+  File "${DEV_ROOT}\include\*.h"
+SectionEnd
+
+Section "SDCC DS390 library"
+  SectionIn 1 2
+  SetOutPath "$INSTDIR\lib\ds390"
+  File "${DEV_ROOT}\lib\ds390\*.asm"
+  File "${DEV_ROOT}\lib\ds390\*.rel"
+  File "${DEV_ROOT}\lib\ds390\*.lib"
+SectionEnd
+
+Section "SDCC DS400 library"
+  SectionIn 1 2
+  SetOutPath "$INSTDIR\lib\ds400"
+  File "${DEV_ROOT}\lib\ds400\*.asm"
+  File "${DEV_ROOT}\lib\ds400\*.rel"
+  File "${DEV_ROOT}\lib\ds400\*.lib"
+SectionEnd
+
+Section "SDCC GBZ80 library"
+  SectionIn 1 2
+  SetOutPath "$INSTDIR\lib\gbz80"
+  File "${DEV_ROOT}\lib\gbz80\*.asm"
+  File "${DEV_ROOT}\lib\gbz80\*.o"
+  File "${DEV_ROOT}\lib\gbz80\*.lib"
+SectionEnd
+
+Section "SDCC Z80 library"
+  SectionIn 1 2
+  SetOutPath "$INSTDIR\lib\z80"
+  File "${DEV_ROOT}\lib\z80\*.asm"
+  File "${DEV_ROOT}\lib\z80\*.o"
+  File "${DEV_ROOT}\lib\z80\*.lib"
+SectionEnd
+
+Section "SDCC large model library"
+  SectionIn 1 2
+  SetOutPath "$INSTDIR\lib\large"
+  File "${DEV_ROOT}\lib\large\*.asm"
+  File "${DEV_ROOT}\lib\large\*.rel"
+  File "${DEV_ROOT}\lib\large\*.lib"
+SectionEnd
+
+Section "SDCC small model library"
+  SectionIn 1 2
+  SetOutPath "$INSTDIR\lib\small"
+  File "${DEV_ROOT}\lib\small\*.asm"
+  File "${DEV_ROOT}\lib\small\*.rel"
+  File "${DEV_ROOT}\lib\small\*.lib"
+SectionEnd
+
+Section "SDCC HC08 library"
+  SectionIn 1 2
+  SetOutPath "$INSTDIR\lib\hc08"
+  File "${DEV_ROOT}\lib\hc08\*.asm"
+  File "${DEV_ROOT}\lib\hc08\*.rel"
+  File "${DEV_ROOT}\lib\hc08\*.lib"
+SectionEnd
+
+Section "SDCC library sources"
+  SectionIn 1
+  SetOutPath "$INSTDIR\lib\src\ds390\examples"
+  File "${DEV_ROOT}\lib\src\ds390\examples\MOVED"
+
+  SetOutPath "$INSTDIR\lib\src\ds390"
+  File "${DEV_ROOT}\lib\src\ds390\*.c"
+  File "${DEV_ROOT}\lib\src\ds390\libds390.lib"
+  File "${DEV_ROOT}\lib\src\ds390\Makefile"
+  File "${DEV_ROOT}\lib\src\ds390\Makefile.dep"
+
+  SetOutPath "$INSTDIR\lib\src\ds400"
+  File "${DEV_ROOT}\lib\src\ds400\*.c"
+  File "${DEV_ROOT}\lib\src\ds400\libds400.lib"
+  File "${DEV_ROOT}\lib\src\ds400\Makefile"
+  File "${DEV_ROOT}\lib\src\ds400\Makefile.dep"
+
+  SetOutPath "$INSTDIR\lib\src\gbz80"
+  File "${DEV_ROOT}\lib\src\gbz80\*.c"
+  File "${DEV_ROOT}\lib\src\gbz80\*.s"
+  File "${DEV_ROOT}\lib\src\gbz80\gbz80.lib"
+  File "${DEV_ROOT}\lib\src\gbz80\Makefile"
+  File "${DEV_ROOT}\lib\src\gbz80\README"
+
+  SetOutPath "$INSTDIR\lib\src\z80"
+  File "${DEV_ROOT}\lib\src\z80\*.c"
+  File "${DEV_ROOT}\lib\src\z80\*.s"
+  File "${DEV_ROOT}\lib\src\z80\Makefile"
+  File "${DEV_ROOT}\lib\src\z80\README"
+  File "${DEV_ROOT}\lib\src\z80\z80.lib"
+
+  SetOutPath "$INSTDIR\lib\src\hc08"
+  File "${DEV_ROOT}\lib\src\hc08\*.c"
+  File "${DEV_ROOT}\lib\src\hc08\Makefile"
+  File "${DEV_ROOT}\lib\src\hc08\hc08.lib"
+
+  SetOutPath "$INSTDIR\lib\src"
+  File "${DEV_ROOT}\lib\src\*.c"
+SectionEnd
+
+Section -Icons
+!insertmacro MUI_STARTMENU_WRITE_BEGIN
+  CreateDirectory "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}"
+  CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\SDCC on the Web.lnk" "$INSTDIR\sdcc.url" 
+  CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Uninstall SDCC.lnk" "$INSTDIR\uninstall.exe" 
+  CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Documentation.lnk" "$INSTDIR\doc\README.TXT" "" "$INSTDIR\sdcc.ico" "" "" "" ""
+  CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Change Log.lnk" "$INSTDIR\doc\ChangeLog_head.txt" "" "$INSTDIR\sdcc.ico" "" "" "" ""
+  CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\GPL 2 License.lnk" "$INSTDIR\COPYING.TXT" 
+!insertmacro MUI_STARTMENU_WRITE_END
+SectionEnd
+
+Section -INI
+  WriteIniStr "$INSTDIR\sdcc.url" "InternetShortcut" "URL" "http://sdcc.sourceforge.net/"
+SectionEnd
+
+Section -PostInstall
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" "DisplayName" "SDCC"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" "UninstallString" "$INSTDIR\uninstall.exe"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" "Publisher" "sdcc.sourceforge.net"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" "URLInfoAbout" "http://sdcc.sourceforge.net/"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" "HelpLink" "http://sdcc.sourceforge.net/"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC" "URLUpdateInfo" "http://sdcc.sourceforge.net/"
+  WriteUninstaller "$INSTDIR\uninstall.exe"
+SectionEnd
+
+
+#### Uninstaller code ####
+
+Function un.onInit
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
+  Abort
+FunctionEnd
+
+Function un.onUninstSuccess
+  HideWindow
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
+FunctionEnd
+
+Section Uninstall
+  ReadRegStr ${MUI_STARTMENUPAGE_VARIABLE} ${MUI_STARTMENUPAGE_REGISTRY_ROOT} "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
+
+  Delete "$INSTDIR\sdcc.url"
+
+  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC"
+  DeleteRegValue ${MUI_STARTMENUPAGE_REGISTRY_ROOT} "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
+
+  Delete "$INSTDIR\uninstall.exe"
+  Delete "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\GPL 2 License.lnk"
+  Delete "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Change Log.lnk"
+  Delete "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Documentation.lnk"
+  Delete "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Uninstall SDCC.lnk"
+  Delete "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\SDCC on the Web.lnk"
+
+  Delete "$INSTDIR\lib\src\hc08\*.c"
+  Delete "$INSTDIR\lib\src\hc08\hc08.lib"
+  Delete "$INSTDIR\lib\src\hc08\Makefile"
+
+  Delete "$INSTDIR\lib\src\z80\*.c"
+  Delete "$INSTDIR\lib\src\z80\*.s"
+  Delete "$INSTDIR\lib\src\z80\z80.lib"
+  Delete "$INSTDIR\lib\src\z80\README"
+  Delete "$INSTDIR\lib\src\z80\Makefile"
+
+  Delete "$INSTDIR\lib\src\gbz80\*.c"
+  Delete "$INSTDIR\lib\src\gbz80\*.s"
+  Delete "$INSTDIR\lib\src\gbz80\gbz80.lib"
+  Delete "$INSTDIR\lib\src\gbz80\README"
+  Delete "$INSTDIR\lib\src\gbz80\Makefile"
+
+  Delete "$INSTDIR\lib\src\ds390\*.c"
+  Delete "$INSTDIR\lib\src\ds390\libds390.lib"
+  Delete "$INSTDIR\lib\src\ds390\Makefile.dep"
+  Delete "$INSTDIR\lib\src\ds390\Makefile"
+  Delete "$INSTDIR\lib\src\ds390\examples\MOVED"
+
+  Delete "$INSTDIR\lib\src\ds400\*.c"
+  Delete "$INSTDIR\lib\src\ds400\libds400.lib"
+  Delete "$INSTDIR\lib\src\ds400\Makefile.dep"
+  Delete "$INSTDIR\lib\src\ds400\Makefile"
+
+  Delete "$INSTDIR\lib\src\*.c"
+
+  Delete "$INSTDIR\lib\hc08\*.rel"
+  Delete "$INSTDIR\lib\hc08\*.asm"
+  Delete "$INSTDIR\lib\hc08\*.lib"
+
+  Delete "$INSTDIR\lib\z80\*.o"
+  Delete "$INSTDIR\lib\z80\*.asm"
+  Delete "$INSTDIR\lib\z80\*.lib"
+
+  Delete "$INSTDIR\lib\small\*.asm"
+  Delete "$INSTDIR\lib\small\*.rel"
+  Delete "$INSTDIR\lib\small\*.lib"
+
+  Delete "$INSTDIR\lib\large\*.asm"
+  Delete "$INSTDIR\lib\large\*.rel"
+  Delete "$INSTDIR\lib\large\*.lib"
+
+  Delete "$INSTDIR\lib\gbz80\*.asm"
+  Delete "$INSTDIR\lib\gbz80\*.o"
+  Delete "$INSTDIR\lib\gbz80\*.lib"
+
+  Delete "$INSTDIR\lib\ds390\*.asm"
+  Delete "$INSTDIR\lib\ds390\*.rel"
+  Delete "$INSTDIR\lib\ds390\*.lib"
+
+  Delete "$INSTDIR\lib\ds400\*.asm"
+  Delete "$INSTDIR\lib\ds400\*.rel"
+  Delete "$INSTDIR\lib\ds400\*.lib"
+
+  Delete "$INSTDIR\include\asm\z80\*.h"
+  Delete "$INSTDIR\include\asm\gbz80\*.h"
+  Delete "$INSTDIR\include\asm\default\*.h"
+  Delete "$INSTDIR\include\*.h"
+
+  Delete "$INSTDIR\doc\README.TXT"
+  Delete "$INSTDIR\doc\ChangeLog_head.txt"
+
+  Delete "$INSTDIR\bin\*.exe"
+
+  Delete "$INSTDIR\COPYING.TXT"
+  Delete "$INSTDIR\sdcc.ico"
+
+  RMDir "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}"
+
+  RMDir "$INSTDIR\lib\src\z80"
+  RMDir "$INSTDIR\lib\src\gbz80"
+  RMDir "$INSTDIR\lib\src\ds390\examples"
+  RMDir "$INSTDIR\lib\src\ds390"
+  RMDir "$INSTDIR\lib\src\ds400"
+  RMDir "$INSTDIR\lib\src\hc08"
+  RMDir "$INSTDIR\lib\src"
+
+  RMDir "$INSTDIR\lib\z80"
+  RMDir "$INSTDIR\lib\small"
+  RMDir "$INSTDIR\lib\large"
+  RMDir "$INSTDIR\lib\gbz80"
+  RMDir "$INSTDIR\lib\ds390"
+  RMDir "$INSTDIR\lib\ds400"
+  RMDir "$INSTDIR\lib\hc08"
+  RMDir "$INSTDIR\lib"
+
+  RMDir "$INSTDIR\include\asm\z80"
+  RMDir "$INSTDIR\include\asm\gbz80"
+  RMDir "$INSTDIR\include\asm\default"
+  RMDir "$INSTDIR\include\asm"
+  RMDir "$INSTDIR\include"
+
+  RMDir "$INSTDIR\doc"
+
+  RMDir "$INSTDIR\bin"
+
+  RMDir "$INSTDIR"
+
+  SetAutoClose true
+SectionEnd
+