Rename "$WHERE1" -> "$BASE".
original commit: de40798d49762270cecb397fb8af6f08125a3c13
BIN
collects/meta/build/nsis/header-r.bmp
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
collects/meta/build/nsis/header.bmp
Normal file
After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
@ -5,44 +5,44 @@
|
|||
;; ==================== Configuration
|
||||
|
||||
;; The following should define:
|
||||
;; PLTVersion, PLTVersionLong, PLTHumanName,
|
||||
;; PLTDirName, PLTRegName
|
||||
;; RKTVersion, RKTVersionLong, RKTHumanName,
|
||||
;; RKTDirName, RKTRegName
|
||||
|
||||
!include plt-defs.nsh
|
||||
!include racket-defs.nsh
|
||||
|
||||
Name "${PLTHumanName}"
|
||||
Name "${RKTHumanName}"
|
||||
OutFile "installer.exe"
|
||||
|
||||
BrandingText "${PLTHumanName}"
|
||||
BrandingText "${RKTHumanName}"
|
||||
BGGradient 4040A0 101020
|
||||
|
||||
SetCompressor /SOLID "LZMA"
|
||||
|
||||
InstallDir "$PROGRAMFILES\${PLTDirName}"
|
||||
InstallDir "$PROGRAMFILES\${RKTDirName}"
|
||||
!ifndef SimpleInstaller
|
||||
InstallDirRegKey HKLM "Software\${PLTRegName}" ""
|
||||
InstallDirRegKey HKLM "Software\${RKTRegName}" ""
|
||||
!endif
|
||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${PLTStartName}"
|
||||
!define MUI_ICON "plt-installer.ico"
|
||||
!define MUI_UNICON "plt-uninstaller.ico"
|
||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${RKTStartName}"
|
||||
!define MUI_ICON "installer.ico"
|
||||
!define MUI_UNICON "uninstaller.ico"
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP "plt-header.bmp"
|
||||
!define MUI_HEADERIMAGE_BITMAP_RTL "plt-header-r.bmp"
|
||||
!define MUI_HEADERIMAGE_BITMAP "header.bmp"
|
||||
!define MUI_HEADERIMAGE_BITMAP_RTL "header-r.bmp"
|
||||
!define MUI_HEADERIMAGE_RIGHT
|
||||
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "plt-welcome.bmp"
|
||||
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "plt-welcome.bmp"
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"
|
||||
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "welcome.bmp"
|
||||
|
||||
!define MUI_WELCOMEPAGE_TITLE "${PLTHumanName} Setup"
|
||||
!define MUI_UNWELCOMEPAGE_TITLE "${PLTHumanName} Uninstall"
|
||||
!define MUI_WELCOMEPAGE_TITLE "${RKTHumanName} Setup"
|
||||
!define MUI_UNWELCOMEPAGE_TITLE "${RKTHumanName} Uninstall"
|
||||
!ifdef SimpleInstaller
|
||||
!define MUI_WELCOMEPAGE_TEXT "This is a simple installer for ${PLTHumanName}.$\r$\n$\r$\nIt will only create the PLT folder. To uninstall, simply remove the folder.$\r$\n$\r$\n$_CLICK"
|
||||
!define MUI_WELCOMEPAGE_TEXT "This is a simple installer for ${RKTHumanName}.$\r$\n$\r$\nIt will only create the Racket folder. To uninstall, simply remove the folder.$\r$\n$\r$\n$_CLICK"
|
||||
!else
|
||||
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of ${PLTHumanName}.$\r$\n$\r$\nPlease close other PLT applications (DrScheme, MrEd, MzScheme) so the installer can update relevant system files.$\r$\n$\r$\n$_CLICK"
|
||||
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of ${RKTHumanName}.$\r$\n$\r$\nPlease close other Racket applications so the installer can update relevant system files.$\r$\n$\r$\n$_CLICK"
|
||||
!endif
|
||||
!define MUI_UNWELCOMEPAGE_TEXT "This wizard will guide you through the removal of ${PLTHumanName}.$\r$\n$\r$\nBefore starting, make sure PLT applications (DrScheme, MrEd, MzScheme) are not running.$\r$\n$\r$\n$_CLICK"
|
||||
!define MUI_UNWELCOMEPAGE_TEXT "This wizard will guide you through the removal of ${RKTHumanName}.$\r$\n$\r$\nBefore starting, make sure no Racket applications are running.$\r$\n$\r$\n$_CLICK"
|
||||
|
||||
!define MUI_FINISHPAGE_TITLE "${PLTHumanName}"
|
||||
!define MUI_FINISHPAGE_TITLE "${RKTHumanName}"
|
||||
!ifdef SimpleInstaller
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION OpenInstDir
|
||||
|
@ -51,8 +51,8 @@ InstallDir "$PROGRAMFILES\${PLTDirName}"
|
|||
FunctionEnd
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Open the installation folder"
|
||||
!else
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\DrScheme.exe"
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Run DrScheme"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\DrRacket.exe"
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Run DrRacket"
|
||||
!endif
|
||||
!define MUI_FINISHPAGE_LINK "Visit the Racket web site"
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://racket-lang.org/"
|
||||
|
@ -60,19 +60,19 @@ InstallDir "$PROGRAMFILES\${PLTDirName}"
|
|||
; !define MUI_UNFINISHPAGE_NOAUTOCLOSE ; to allow users see what was erased
|
||||
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${PLTRegName}"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${RKTRegName}"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
|
||||
; Doesn't work on some non-xp machines
|
||||
; !define MUI_INSTFILESPAGE_PROGRESSBAR colored
|
||||
|
||||
VIProductVersion "${PLTVersionLong}"
|
||||
VIAddVersionKey "ProductName" "PLT Scheme"
|
||||
VIAddVersionKey "Comments" "This is PLT Scheme, including DrScheme which is based on MrEd and MzScheme."
|
||||
VIProductVersion "${RKTVersionLong}"
|
||||
VIAddVersionKey "ProductName" "Racket"
|
||||
VIAddVersionKey "Comments" "This is the Racket language, see http://racket-lang.org/."
|
||||
VIAddVersionKey "CompanyName" "PLT"
|
||||
VIAddVersionKey "LegalCopyright" "© PLT"
|
||||
VIAddVersionKey "FileDescription" "PLT Scheme Installer"
|
||||
VIAddVersionKey "FileVersion" "${PLTVersion}"
|
||||
VIAddVersionKey "FileDescription" "Racket Installer"
|
||||
VIAddVersionKey "FileVersion" "${RKTVersion}"
|
||||
|
||||
;; ==================== Variables
|
||||
|
||||
|
@ -137,36 +137,36 @@ Function myTestInstDir
|
|||
FunctionEnd
|
||||
!else
|
||||
Function myTestInstDir
|
||||
; The assumption is that users might have all kinds of ways to get a PLT
|
||||
; The assumption is that users might have all kinds of ways to get a Racket
|
||||
; tree, plus, they might have an old wise-based installation, so it is better
|
||||
; to rely on files rather than test registry keys. Note: no version check.
|
||||
; if any of these exist, then we assume it's an old installation
|
||||
IfFileExists "$INSTDIR\MzScheme.exe" plt_is_installed
|
||||
IfFileExists "$INSTDIR\MrEd.exe" plt_is_installed
|
||||
IfFileExists "$INSTDIR\DrScheme.exe" plt_is_installed
|
||||
IfFileExists "$INSTDIR\collects" plt_is_installed
|
||||
Goto plt_is_not_installed
|
||||
plt_is_installed:
|
||||
IfFileExists "$INSTDIR\Racket.exe" racket_is_installed
|
||||
IfFileExists "$INSTDIR\GRacket.exe" racket_is_installed
|
||||
IfFileExists "$INSTDIR\DrRacket.exe" racket_is_installed
|
||||
IfFileExists "$INSTDIR\collects" racket_is_installed
|
||||
Goto racket_is_not_installed
|
||||
racket_is_installed:
|
||||
IfFileExists "${UNINSTEXE}" we_have_uninstall
|
||||
MessageBox MB_YESNO "It appears that there is an existing PLT Scheme installation in '$INSTDIR', but no Uninstaller was found.$\r$\nContinue anyway (not recommended)?" /SD IDYES IDYES maybe_remove_tree
|
||||
MessageBox MB_YESNO "It appears that there is an existing Racket installation in '$INSTDIR', but no Uninstaller was found.$\r$\nContinue anyway (not recommended)?" /SD IDYES IDYES maybe_remove_tree
|
||||
Abort
|
||||
we_have_uninstall:
|
||||
MessageBox MB_YESNO "It appears that there is an existing PLT Scheme installation in '$INSTDIR'.$\r$\nDo you want to uninstall it first (recommended)?" /SD IDNO IDNO maybe_remove_tree
|
||||
MessageBox MB_YESNO "It appears that there is an existing Racket installation in '$INSTDIR'.$\r$\nDo you want to uninstall it first (recommended)?" /SD IDNO IDNO maybe_remove_tree
|
||||
HideWindow
|
||||
ClearErrors
|
||||
ExecWait '"${UNINSTEXE}" _?=$INSTDIR'
|
||||
IfErrors uninstaller_problematic
|
||||
IfFileExists "$INSTDIR\MzScheme.exe" uninstaller_problematic
|
||||
IfFileExists "$INSTDIR\MrEd.exe" uninstaller_problematic
|
||||
IfFileExists "$INSTDIR\Racket.exe" uninstaller_problematic
|
||||
IfFileExists "$INSTDIR\GRacket.exe" uninstaller_problematic
|
||||
BringToFront
|
||||
Goto plt_is_not_installed
|
||||
Goto racket_is_not_installed
|
||||
uninstaller_problematic:
|
||||
MessageBox MB_YESNO "Errors in uninstallation!$\r$\nDo you want to quit and sort things out now (highly recommended)?" /SD IDNO IDNO maybe_remove_tree
|
||||
Quit
|
||||
maybe_remove_tree:
|
||||
MessageBox MB_YESNO "Since you insist, do you want to simply remove the previous directory now?$\r$\n(It is really better if you sort this out manually.)" /SD IDYES IDNO plt_is_not_installed
|
||||
MessageBox MB_YESNO "Since you insist, do you want to simply remove the previous directory now?$\r$\n(It is really better if you sort this out manually.)" /SD IDYES IDNO racket_is_not_installed
|
||||
RMDir /r $INSTDIR
|
||||
plt_is_not_installed:
|
||||
racket_is_not_installed:
|
||||
FunctionEnd
|
||||
!endif
|
||||
|
||||
|
@ -174,10 +174,10 @@ Section ""
|
|||
SetShellVarContext all
|
||||
|
||||
SetDetailsPrint both
|
||||
DetailPrint "Installing PLT Scheme..."
|
||||
DetailPrint "Installing Racket..."
|
||||
SetDetailsPrint listonly
|
||||
SetOutPath "$INSTDIR"
|
||||
File /a /r "plt\*.*"
|
||||
File /a /r "racket\*.*"
|
||||
!ifndef SimpleInstaller
|
||||
WriteUninstaller "${UNINSTEXE}" ; Create uninstaller
|
||||
!endif
|
||||
|
@ -189,43 +189,46 @@ Section ""
|
|||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
SetOutPath "$INSTDIR" ; Make installed links run in INSTDIR
|
||||
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\DrScheme.lnk" "$INSTDIR\DrScheme.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\PLT Documentation.lnk" "$INSTDIR\plt-help.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\MrEd.lnk" "$INSTDIR\MrEd.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\MzScheme.lnk" "$INSTDIR\MzScheme.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\PLT Folder.lnk" "$INSTDIR"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\DrRacket.lnk" "$INSTDIR\DrRacket.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Racket Documentation.lnk" "$INSTDIR\Racket Documentation.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GRacket.lnk" "$INSTDIR\GRacket.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Racket.lnk" "$INSTDIR\Racket.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Racket Folder.lnk" "$INSTDIR"
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "${UNINSTEXE}"
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
|
||||
SetDetailsPrint both
|
||||
DetailPrint "Setting Registry Keys..."
|
||||
SetDetailsPrint listonly
|
||||
WriteRegStr HKLM "Software\${PLTRegName}" "" "$INSTDIR" ; Save folder location
|
||||
WriteRegStr HKCR ".ss" "" "Scheme.Document"
|
||||
WriteRegStr HKCR ".scm" "" "Scheme.Document"
|
||||
WriteRegStr HKCR ".scrbl" "" "Scheme.Document"
|
||||
WriteRegStr HKCR "Scheme.Document" "" "PLT Scheme Document"
|
||||
WriteRegStr HKCR "Scheme.Document\DefaultIcon" "" "$INSTDIR\collects\icons\schemedoc.ico"
|
||||
WriteRegStr HKCR "Scheme.Document\shell\open\command" "" '"$INSTDIR\DrScheme.exe" "%1"'
|
||||
WriteRegStr HKLM "Software\${RKTRegName}" "" "$INSTDIR" ; Save folder location
|
||||
WriteRegStr HKCR ".rkt" "" "Racket.Document"
|
||||
WriteRegStr HKCR ".rktl" "" "Racket.Document"
|
||||
WriteRegStr HKCR ".rktd" "" "Racket.Document"
|
||||
WriteRegStr HKCR ".ss" "" "Racket.Document"
|
||||
WriteRegStr HKCR ".scm" "" "Racket.Document"
|
||||
WriteRegStr HKCR ".scrbl" "" "Racket.Document"
|
||||
WriteRegStr HKCR "Racket.Document" "" "Racket Document"
|
||||
WriteRegStr HKCR "Racket.Document\DefaultIcon" "" "$INSTDIR\collects\icons\schemedoc.ico"
|
||||
WriteRegStr HKCR "Racket.Document\shell\open\command" "" '"$INSTDIR\DrRacket.exe" "%1"'
|
||||
; Example, in case we want some things like this in the future
|
||||
; WriteRegStr HKCR "Scheme.Document\shell\mzscheme" "" "Run with MzScheme"
|
||||
; WriteRegStr HKCR "Scheme.Document\shell\mzscheme\command" "" '"$INSTDIR\MzScheme.exe" "-r" "%1"'
|
||||
WriteRegStr HKCR ".plt" "" "Setup PLT.Document"
|
||||
WriteRegStr HKCR "Setup PLT.Document" "" "PLT Scheme Package"
|
||||
WriteRegStr HKCR "Setup PLT.Document\DefaultIcon" "" "$INSTDIR\collects\icons\schemedoc.ico"
|
||||
WriteRegStr HKCR "Setup PLT.Document\shell\open\command" "" '"$INSTDIR\Setup PLT.exe" -p "%1"'
|
||||
; WriteRegStr HKCR "Racket.Document\shell\racket" "" "Run with Racket"
|
||||
; WriteRegStr HKCR "Racket.Document\shell\racket\command" "" '"$INSTDIR\Racket.exe" "-r" "%1"'
|
||||
WriteRegStr HKCR ".plt" "" "Racket Setup.Document"
|
||||
WriteRegStr HKCR "Racket Setup.Document" "" "Racket Package"
|
||||
WriteRegStr HKCR "Racket Setup.Document\DefaultIcon" "" "$INSTDIR\collects\icons\schemedoc.ico"
|
||||
WriteRegStr HKCR "Racket Setup.Document\shell\open\command" "" '"$INSTDIR\raco.exe" setup -p "%1"'
|
||||
|
||||
WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "UninstallString" '"${UNINSTEXE}"'
|
||||
WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "InstallLocation" "$INSTDIR"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "DisplayName" "${PLTHumanName}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "DisplayIcon" "$INSTDIR\DrScheme.exe,0"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "DisplayVersion" "${PLTVersion}"
|
||||
WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "UninstallString" '"${UNINSTEXE}"'
|
||||
WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "InstallLocation" "$INSTDIR"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "DisplayName" "${RKTHumanName}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "DisplayIcon" "$INSTDIR\DrRacket.exe,0"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "DisplayVersion" "${RKTVersion}"
|
||||
; used to also have "VersionMajor" & "VersionMinor" but looks like it's not needed
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "HelpLink" "http://racket-lang.org/"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "URLInfoAbout" "http://racket-lang.org/"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "Publisher" "PLT Scheme Inc."
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "NoModify" "1"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}" "NoRepair" "1"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "HelpLink" "http://racket-lang.org/"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "URLInfoAbout" "http://racket-lang.org/"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "Publisher" "PLT Scheme Inc."
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "NoModify" "1"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}" "NoRepair" "1"
|
||||
!endif
|
||||
|
||||
SetDetailsPrint both
|
||||
|
@ -238,20 +241,20 @@ SectionEnd
|
|||
|
||||
Function un.myGUIInit
|
||||
; if any of these exist, then we're fine
|
||||
IfFileExists "$INSTDIR\MzScheme.exe" plt_is_installed_un
|
||||
IfFileExists "$INSTDIR\MrEd.exe" plt_is_installed_un
|
||||
IfFileExists "$INSTDIR\DrScheme.exe" plt_is_installed_un
|
||||
IfFileExists "$INSTDIR\collects" plt_is_installed_un
|
||||
MessageBox MB_YESNO "It does not appear that PLT Scheme is installed in '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" /SD IDYES IDYES plt_is_installed_un
|
||||
IfFileExists "$INSTDIR\Racket.exe" racket_is_installed_un
|
||||
IfFileExists "$INSTDIR\GRacket.exe" racket_is_installed_un
|
||||
IfFileExists "$INSTDIR\DrRacket.exe" racket_is_installed_un
|
||||
IfFileExists "$INSTDIR\collects" racket_is_installed_un
|
||||
MessageBox MB_YESNO "It does not appear that Racket is installed in '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" /SD IDYES IDYES racket_is_installed_un
|
||||
Abort "Uninstall aborted by user"
|
||||
plt_is_installed_un:
|
||||
racket_is_installed_un:
|
||||
FunctionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
SetShellVarContext all
|
||||
|
||||
SetDetailsPrint both
|
||||
DetailPrint "Removing the PLT Scheme installation..."
|
||||
DetailPrint "Removing the Racket installation..."
|
||||
SetDetailsPrint listonly
|
||||
Delete "$INSTDIR\*.exe"
|
||||
Delete "$INSTDIR\README*.*"
|
||||
|
@ -259,7 +262,7 @@ Section "Uninstall"
|
|||
RMDir /r "$INSTDIR\include"
|
||||
RMDir /r "$INSTDIR\lib"
|
||||
RMDir /r "$INSTDIR\doc"
|
||||
;; these exist in PLT-Full installations
|
||||
;; these exist in Racket-Full installations
|
||||
RMDir /r "$INSTDIR\man"
|
||||
RMDir /r "$INSTDIR\src"
|
||||
Delete "${UNINSTEXE}"
|
||||
|
@ -267,7 +270,7 @@ Section "Uninstall"
|
|||
;; if the directory is opened, it will take some time to remove
|
||||
Sleep 1000
|
||||
IfErrors +1 uninstall_inst_dir_ok
|
||||
MessageBox MB_YESNO "The PLT Scheme installation at '$INSTDIR' was not completely removed.$\r$\nForce deletion?$\r$\n(Make sure no PLT applications are running.)" /SD IDYES IDNO uninstall_inst_dir_ok
|
||||
MessageBox MB_YESNO "The Racket installation at '$INSTDIR' was not completely removed.$\r$\nForce deletion?$\r$\n(Make sure no Racket applications are running.)" /SD IDYES IDNO uninstall_inst_dir_ok
|
||||
RMDir /r "$INSTDIR"
|
||||
IfErrors +1 uninstall_inst_dir_ok
|
||||
MessageBox MB_OK "Forced deletion did not work either, you will need to clean up '$INSTDIR' manually." /SD IDOK
|
||||
|
@ -290,13 +293,16 @@ Section "Uninstall"
|
|||
SetDetailsPrint both
|
||||
DetailPrint "Removing Registry Keys..."
|
||||
SetDetailsPrint listonly
|
||||
DeleteRegKey /ifempty HKLM "Software\${PLTRegName}\Start Menu Folder"
|
||||
DeleteRegKey /ifempty HKLM "Software\${PLTRegName}"
|
||||
DeleteRegKey /ifempty HKLM "Software\${RKTRegName}\Start Menu Folder"
|
||||
DeleteRegKey /ifempty HKLM "Software\${RKTRegName}"
|
||||
DeleteRegKey HKCR ".rkt"
|
||||
DeleteRegKey HKCR ".rktl"
|
||||
DeleteRegKey HKCR ".rktd"
|
||||
DeleteRegKey HKCR ".ss"
|
||||
DeleteRegKey HKCR ".scm"
|
||||
DeleteRegKey HKCR ".scrbl"
|
||||
DeleteRegKey HKCR "Scheme.Document"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PLTRegName}"
|
||||
DeleteRegKey HKCR "Racket.Document"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${RKTRegName}"
|
||||
|
||||
SetDetailsPrint both
|
||||
DetailPrint "Uninstallation complete."
|
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
BIN
collects/meta/build/nsis/welcome.bmp
Normal file
After Width: | Height: | Size: 201 KiB |
|
@ -61,7 +61,7 @@ lookfor dirname
|
|||
_POSIX2_VERSION=199209
|
||||
export _POSIX2_VERSION
|
||||
|
||||
origpwd="`pwd`"
|
||||
origwd="`pwd`"
|
||||
|
||||
echo "This program will extract and install $DISTNAME."
|
||||
echo ""
|
||||
|
@ -73,23 +73,25 @@ echo "Note: the required diskspace for this installation is about $ORIGSIZE."
|
|||
echo ""
|
||||
echo "Do you want a Unix-style distribution?"
|
||||
echo " In this distribution mode files go into different directories according"
|
||||
echo " to Unix conventions. A \"plt-uninstall\" script will be generated to"
|
||||
echo " make it possible to remove the installation. If say 'no', the whole"
|
||||
echo " PLT directory is kept as a single (movable and erasable) unit, possibly"
|
||||
echo " with external links into it."
|
||||
echo " to Unix conventions. A \"racket-uninstall\" script will be generated"
|
||||
echo " to be used when you want to remove the installation. If you say 'no',"
|
||||
echo " the whole Racket directory is kept in a single installation directory"
|
||||
echo " (movable and erasable) unit, possibly with convenient external links"
|
||||
echo " into it -- this is often more convenient, especially if you want to"
|
||||
echo " install multiple versions or keep it in your home directory."
|
||||
if test ! "x$RELEASED" = "xyes"; then
|
||||
echo "*** This is a nightly build: such a distribution is not recommended"
|
||||
echo "*** because it cannot be used to install multiple versions."
|
||||
echo "*** This is a nightly build: such a unix-style distribution is *not*"
|
||||
echo "*** recommended because it cannot be used to install multiple versions."
|
||||
fi
|
||||
unixstyle="x"
|
||||
while test "$unixstyle" = "x"; do
|
||||
echon "Enter yes/no (default: no) > "
|
||||
read unixstyle
|
||||
case "$unixstyle" in
|
||||
[yY]* ) unixstyle="yes" ;;
|
||||
[nN]* ) unixstyle="no" ;;
|
||||
"" ) unixstyle="no" ;;
|
||||
* ) unixstyle="x" ;;
|
||||
[yY]* ) unixstyle="Y" ;;
|
||||
[nN]* ) unixstyle="N" ;;
|
||||
"" ) unixstyle="N" ;;
|
||||
* ) unixstyle="x" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
@ -97,11 +99,11 @@ done
|
|||
## Where do you want it?
|
||||
|
||||
echo ""
|
||||
if test "$unixstyle" = "yes"; then
|
||||
if test "$unixstyle" = "Y"; then
|
||||
echo "Where do you want to base your installation of $DISTNAME?"
|
||||
echo " (Use an existing directory. If you've done such an installation in"
|
||||
echo " the past, either use the same place, or manually run"
|
||||
echo " 'plt-uninstaller' now.)"
|
||||
echo " 'racket-uninstall' now.)"
|
||||
TARGET1="..."
|
||||
else
|
||||
echo "Where do you want to install the \"$TARGET\" directory tree?"
|
||||
|
@ -109,49 +111,48 @@ else
|
|||
fi
|
||||
echo " 1 - /usr/$TARGET1 [default]"
|
||||
echo " 2 - /usr/local/$TARGET1"
|
||||
echo " 3 - \$HOME/$TARGET1 ($HOME/$TARGET1)"
|
||||
echo " 3 - ~/$TARGET1 ($HOME/$TARGET1)"
|
||||
echo " 4 - ./$TARGET1 (here)"
|
||||
if test "$unixstyle" = "yes"; then
|
||||
if test "$unixstyle" = "Y"; then
|
||||
echo " Or enter a different directory prefix to install in."
|
||||
else
|
||||
echo " Or enter a different \"plt\" directory to install in."
|
||||
echo " Or enter a different \"racket\" directory to install in."
|
||||
fi
|
||||
echon "> "
|
||||
read where
|
||||
case "$where" in
|
||||
"" | "1" ) where="/usr" ;;
|
||||
"2" ) where="/usr/local" ;;
|
||||
"3" ) where="$HOME" ;;
|
||||
"4" | "." ) where="`pwd`" ;;
|
||||
"/"* )
|
||||
if test "$unixstyle" = "no"; then
|
||||
TARGET="`\"$basename\" \"$where\"`"
|
||||
where="`\"$dirname\" \"$where\"`"
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
if test "$unixstyle" = "no"; then
|
||||
TARGET="`\"$basename\" \"$where\"`"
|
||||
where="`\"$dirname\" \"$where\"`"
|
||||
fi
|
||||
if test -d "$where"; then cd "$where"; where="`pwd`"; cd "$origpwd"
|
||||
else where="`pwd`/$where"; fi
|
||||
;;
|
||||
"~/"* ) where="$HOME/${where#\~/}" ;;
|
||||
"~"* ) failwith "cannot use '~user' paths" ;;
|
||||
esac
|
||||
case "$unixstyle$where" in
|
||||
? | ?1 ) where="/usr" ;;
|
||||
?2 ) where="/usr/local" ;;
|
||||
?3 ) where="$HOME" ;;
|
||||
?4 | ?. ) where="`pwd`" ;;
|
||||
N/* ) TARGET="`\"$basename\" \"$where\"`"
|
||||
where="`\"$dirname\" \"$where\"`" ;;
|
||||
Y/* ) ;;
|
||||
N* ) TARGET="`\"$basename\" \"$where\"`"
|
||||
where="`\"$dirname\" \"$where\"`"
|
||||
if test -d "$where"; then cd "$where"; where="`pwd`"; cd "$origwd"
|
||||
else where="`pwd`/$where"; fi ;;
|
||||
Y* ) if test -d "$where"; then cd "$where"; where="`pwd`"; cd "$origwd"
|
||||
else where="`pwd`/$where"; fi ;;
|
||||
esac
|
||||
|
||||
if test "$unixstyle" = "no"; then
|
||||
if test "$unixstyle" = "N"; then
|
||||
# can happen when choosing the root
|
||||
if test "$TARGET" = "/"; then
|
||||
failwith "refusing to remove your root"
|
||||
fi
|
||||
fi
|
||||
|
||||
# WHERE1 can be used with "$WHERE1/$TARGET" to avoid a double slash
|
||||
# BASE can be used with "$BASE/$TARGET" to avoid a double slash
|
||||
case "$where" in
|
||||
"" ) failwith "internal error (empty \$where)" ;;
|
||||
"/" ) WHERE1="" ;;
|
||||
"/" ) BASE="" ;;
|
||||
*"/" ) failwith "internal error (\$where ends in a slash)" ;;
|
||||
"/"* ) WHERE1="$where" ;;
|
||||
"/"* ) BASE="$where" ;;
|
||||
* ) failwith "internal error (\$where is not absolute)" ;;
|
||||
esac
|
||||
|
||||
|
@ -168,20 +169,20 @@ fi
|
|||
set_prefix() {
|
||||
where="$1"
|
||||
# default dirs -- mimic configure behavior
|
||||
bindir="$WHERE1/bin"
|
||||
collectsdir="$WHERE1/lib/plt/collects"
|
||||
if test -d "$WHERE1/share"; then docdir="$WHERE1/share/plt/doc"
|
||||
elif test -d "$WHERE1/doc"; then docdir="$WHERE1/doc/plt"
|
||||
else docdir="$WHERE1/share/plt/doc"
|
||||
bindir="$BASE/bin"
|
||||
collectsdir="$BASE/lib/racket/collects"
|
||||
if test -d "$BASE/share"; then docdir="$BASE/share/racket/doc"
|
||||
elif test -d "$BASE/doc"; then docdir="$BASE/doc/racket"
|
||||
else docdir="$BASE/share/racket/doc"
|
||||
fi
|
||||
libdir="$WHERE1/lib"
|
||||
includepltdir="$WHERE1/include/plt"
|
||||
libpltdir="$WHERE1/lib/plt"
|
||||
mandir="$WHERE1/man"
|
||||
libdir="$BASE/lib"
|
||||
includerktdir="$BASE/include/racket"
|
||||
librktdir="$BASE/lib/racket"
|
||||
mandir="$BASE/man"
|
||||
# The source tree is always removed -- no point keeping it if it won't work
|
||||
# if test -d "$WHERE1/share"; then srcdir="$WHERE1/share/plt/src"
|
||||
# elif test -d "$WHERE1/src"; then srcdir="$WHERE1/src/plt"
|
||||
# else srcdir="$WHERE1/share/plt/src"
|
||||
# if test -d "$BASE/share"; then srcdir="$BASE/share/racket/src"
|
||||
# elif test -d "$BASE/src"; then srcdir="$BASE/src/racket"
|
||||
# else srcdir="$BASE/share/racket/src"
|
||||
# fi
|
||||
}
|
||||
|
||||
|
@ -193,11 +194,11 @@ dir_createable() {
|
|||
}
|
||||
|
||||
show_dir_var() {
|
||||
if test -f "$2"; then dir_status="(error: not a directory!)"; err="yes"
|
||||
if test -f "$2"; then dir_status="(error: not a directory!)"; err="Y"
|
||||
elif test ! -d "$2"; then
|
||||
if dir_createable "$2"; then dir_status="(will be created)"
|
||||
else dir_status="(error: not writable!)"; err="yes"; fi
|
||||
elif test ! -w "$2"; then dir_status="(error: not writable!)"; err="yes"
|
||||
else dir_status="(error: not writable!)"; err="Y"; fi
|
||||
elif test ! -w "$2"; then dir_status="(error: not writable!)"; err="Y"
|
||||
else dir_status="(exists)"
|
||||
fi
|
||||
echo " $1 $2 $dir_status"
|
||||
|
@ -207,30 +208,30 @@ read_dir() {
|
|||
read new_dir
|
||||
case "$new_dir" in
|
||||
"/"* ) echo "$new_dir" ;;
|
||||
* ) echo "$WHERE1/$new_dir" ;;
|
||||
* ) echo "$BASE/$new_dir" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
if test "$unixstyle" = "yes"; then
|
||||
if test "$unixstyle" = "Y"; then
|
||||
set_prefix "$where"
|
||||
# loop for possible changes
|
||||
done="no"
|
||||
while test ! "$done" = "yes"; do
|
||||
done="N"
|
||||
while test ! "$done" = "Y"; do
|
||||
echo ""
|
||||
echo "Target Directories:"
|
||||
err="no"
|
||||
err="N"
|
||||
show_dir_var "[e] Executables " "$bindir"
|
||||
show_dir_var "[s] Scheme Code " "$collectsdir"
|
||||
show_dir_var "[d] Core Docs " "$docdir"
|
||||
show_dir_var "[l] C Libraries " "$libdir"
|
||||
show_dir_var "[h] C headers " "$includepltdir"
|
||||
show_dir_var "[o] Extra C Objs " "$libpltdir"
|
||||
show_dir_var "[h] C headers " "$includerktdir"
|
||||
show_dir_var "[o] Extra C Objs " "$librktdir"
|
||||
show_dir_var "[m] Man Pages " "$mandir"
|
||||
if test "$PNAME" = "full"; then
|
||||
echo " (C sources are not kept)"
|
||||
# show_dir_var "[r] Source Tree " "$srcdir"
|
||||
fi
|
||||
if test "$err" = "yes"; then echo "*** Errors in some paths ***"; fi
|
||||
if test "$err" = "Y"; then echo "*** Errors in some paths ***"; fi
|
||||
echo "Enter a new prefix, a letter to change an entry, enter to continue"
|
||||
echon "> "
|
||||
read change_what
|
||||
|
@ -239,8 +240,8 @@ if test "$unixstyle" = "yes"; then
|
|||
[sS]* ) echon "New directory: "; collectsdir="`read_dir`" ;;
|
||||
[dD]* ) echon "New directory: "; docdir="`read_dir`" ;;
|
||||
[lL]* ) echon "New directory: "; libdir="`read_dir`" ;;
|
||||
[hH]* ) echon "New directory: "; includepltdir="`read_dir`" ;;
|
||||
[oO]* ) echon "New directory: "; libpltdir="`read_dir`" ;;
|
||||
[hH]* ) echon "New directory: "; includerktdir="`read_dir`" ;;
|
||||
[oO]* ) echon "New directory: "; librktdir="`read_dir`" ;;
|
||||
[mM]* ) echon "New directory: "; mandir="`read_dir`" ;;
|
||||
# [rR]* ) if test "$PNAME" = "full"; then
|
||||
# echon "New directory: "; srcdir="`read_dir`"
|
||||
|
@ -248,11 +249,11 @@ if test "$unixstyle" = "yes"; then
|
|||
# echo "Invalid response"
|
||||
# fi ;;
|
||||
"/"* ) set_prefix "$change_what" ;;
|
||||
"" ) done="yes" ;;
|
||||
"" ) done="Y" ;;
|
||||
* ) echo "Invalid response" ;;
|
||||
esac
|
||||
done
|
||||
if test "$err" = "yes"; then failwith "errors in some paths"; fi
|
||||
if test "$err" = "Y"; then failwith "errors in some paths"; fi
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
|
@ -271,30 +272,30 @@ echo "ok."
|
|||
|
||||
unpack_installation() {
|
||||
# test that no TARGET exists
|
||||
if test -d "$WHERE1/$TARGET" || test -f "$WHERE1/$TARGET"; then
|
||||
echon "\"$WHERE1/$TARGET\" exists, delete? "
|
||||
if test -d "$BASE/$TARGET" || test -f "$BASE/$TARGET"; then
|
||||
echon "\"$BASE/$TARGET\" exists, delete? "
|
||||
read yesno
|
||||
case "$yesno" in
|
||||
[yY]*)
|
||||
echon "Deleting old \"$WHERE1/$TARGET\"... "
|
||||
"$rm" -rf "$WHERE1/$TARGET" \
|
||||
|| failwith "could not delete \"$WHERE1/$TARGET\"."
|
||||
echon "Deleting old \"$BASE/$TARGET\"... "
|
||||
"$rm" -rf "$BASE/$TARGET" \
|
||||
|| failwith "could not delete \"$BASE/$TARGET\"."
|
||||
echo "done."
|
||||
;;
|
||||
*) failwith "aborting because \"$WHERE1/$TARGET\" exists." ;;
|
||||
*) failwith "aborting because \"$BASE/$TARGET\" exists." ;;
|
||||
esac
|
||||
fi
|
||||
# unpack
|
||||
echon "Unpacking into \"$WHERE1/$TARGET\"... "
|
||||
rm_on_abort="$WHERE1/$TARGET"
|
||||
"$mkdir" "$WHERE1/$TARGET"
|
||||
echon "Unpacking into \"$BASE/$TARGET\"... "
|
||||
rm_on_abort="$BASE/$TARGET"
|
||||
"$mkdir" "$BASE/$TARGET"
|
||||
"$tail" +"$BINSTARTLINE" "$0" | "$gunzip" -c \
|
||||
| { cd "$WHERE1/$TARGET"
|
||||
| { cd "$BASE/$TARGET"
|
||||
"$tar" xf - || failwith "problems during unpacking of binary archive."
|
||||
}
|
||||
cd "$WHERE1/$TARGET"
|
||||
cd "$BASE/$TARGET"
|
||||
test -d "collects" \
|
||||
|| failwith "unpack failed (could not find \"$WHERE1/$TARGET/collects\")."
|
||||
|| failwith "unpack failed (could not find \"$BASE/$TARGET/collects\")."
|
||||
echo "done."
|
||||
}
|
||||
|
||||
|
@ -317,7 +318,7 @@ if test -d "bin"; then
|
|||
* ) sysdir="" ;;
|
||||
esac
|
||||
else
|
||||
cd "$origpwd"
|
||||
cd "$origwd"
|
||||
echo ""
|
||||
echo "If you want to install new system links within the bin, lib, include,"
|
||||
echo " man, and doc subdirectories of a common directory prefix (for"
|
||||
|
@ -345,15 +346,15 @@ if test ! "x$sysdir" = "x"; then
|
|||
echo "Installing links in \"$sysdir/bin\"..."
|
||||
printsep=" "
|
||||
cd "bin"
|
||||
for x in `cd "$WHERE1/$TARGET/bin"; ls`; do
|
||||
if test -x "$WHERE1/$TARGET/bin/$x"; then
|
||||
for x in `cd "$BASE/$TARGET/bin"; ls`; do
|
||||
if test -x "$BASE/$TARGET/bin/$x"; then
|
||||
echon "${printsep}$x"
|
||||
printsep=", "
|
||||
link "$WHERE1/$TARGET/bin/$x" "$x" "$sysdir/bin"
|
||||
link "$BASE/$TARGET/bin/$x" "$x" "$sysdir/bin"
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
echo "Done. (see \"$WHERE1/$TARGET/bin\" for other executables)"
|
||||
echo "Done. (see \"$BASE/$TARGET/bin\" for other executables)"
|
||||
else
|
||||
echo "Skipping \"$sysdir/bin\" (does not exist or not writable)."
|
||||
fi
|
||||
|
@ -373,10 +374,10 @@ if test ! "x$sysdir" = "x"; then
|
|||
cd "$mandir"
|
||||
echo "Installing links in \"$sysdir/$mandir\"..."
|
||||
printsep=" "
|
||||
for x in `cd "$WHERE1/$TARGET/man/man1/"; "$ls"`; do
|
||||
for x in `cd "$BASE/$TARGET/man/man1/"; "$ls"`; do
|
||||
echon "${printsep}$x"
|
||||
printsep=", "
|
||||
link "$WHERE1/$TARGET/man/man1/$x" "$x" "$sysdir/$mandir"
|
||||
link "$BASE/$TARGET/man/man1/$x" "$x" "$sysdir/$mandir"
|
||||
done
|
||||
echo ""
|
||||
echo "Done"
|
||||
|
@ -395,7 +396,7 @@ if test ! "x$sysdir" = "x"; then
|
|||
else
|
||||
cd "$libdir"
|
||||
echo "Installing \"$sysdir/$libdir/$TARGET\"."
|
||||
link "$WHERE1/$TARGET/lib" "$TARGET" "$sysdir/$libdir"
|
||||
link "$BASE/$TARGET/lib" "$TARGET" "$sysdir/$libdir"
|
||||
fi
|
||||
# include link
|
||||
cd "$sysdir"
|
||||
|
@ -412,7 +413,7 @@ if test ! "x$sysdir" = "x"; then
|
|||
else
|
||||
cd "$incdir"
|
||||
echo "Installing \"$sysdir/$incdir/$TARGET\"."
|
||||
link "$WHERE1/$TARGET/include" "$TARGET" "$sysdir/$incdir"
|
||||
link "$BASE/$TARGET/include" "$TARGET" "$sysdir/$incdir"
|
||||
fi
|
||||
# doc link
|
||||
cd "$sysdir"
|
||||
|
@ -428,7 +429,7 @@ if test ! "x$sysdir" = "x"; then
|
|||
else
|
||||
cd "$docdir"
|
||||
echo "Installing \"$sysdir/$docdir/$TARGET\"."
|
||||
link "$WHERE1/$TARGET/notes" "$TARGET" "$sysdir/$docdir"
|
||||
link "$BASE/$TARGET/notes" "$TARGET" "$sysdir/$docdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -440,23 +441,24 @@ fi
|
|||
unixstyle_install() {
|
||||
|
||||
TARGET="$TARGET-tmp-install"
|
||||
if test -e "$WHERE1/$TARGET"; then
|
||||
echo "\"$WHERE1/$TARGET\" already exists (needed for the installation),"
|
||||
if test -e "$BASE/$TARGET"; then
|
||||
echo "\"$BASE/$TARGET\" already exists (needed for the installation),"
|
||||
echon " ok to remove? "
|
||||
read R
|
||||
case "$R" in
|
||||
[yY]* ) "$rm" -rf "$WHERE1/$TARGET" ;;
|
||||
[yY]* ) "$rm" -rf "$BASE/$TARGET" ;;
|
||||
* ) failwith "abort..." ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test -x "$bindir/plt-uninstall"; then
|
||||
echo "A previous PLT uninstaller is found at \"$bindir/plt-uninstall\","
|
||||
if test -x "$bindir/racket-uninstall"; then
|
||||
echo "A previous Racket uninstaller is found at"
|
||||
echo " \"$bindir/racket-uninstall\","
|
||||
echon " ok to run it? "
|
||||
read R
|
||||
case "$R" in
|
||||
[yY]* ) echon " running uninstaller..."
|
||||
"$bindir/plt-uninstall" || failwith "problems during uninstall"
|
||||
"$bindir/racket-uninstall" || failwith "problems during uninstall"
|
||||
echo " done." ;;
|
||||
* ) failwith "abort..." ;;
|
||||
esac
|
||||
|
@ -465,9 +467,9 @@ fi
|
|||
unpack_installation
|
||||
|
||||
cd "$where"
|
||||
"$TARGET/bin/mzscheme" "$TARGET/collects/setup/unixstyle-install.ss" \
|
||||
"move" "$WHERE1/$TARGET" "$bindir" "$collectsdir" "$docdir" "$libdir" \
|
||||
"$includepltdir" "$libpltdir" "$mandir" \
|
||||
"$TARGET/bin/racket" "$TARGET/collects/setup/unixstyle-install.rkt" \
|
||||
"move" "$BASE/$TARGET" "$bindir" "$collectsdir" "$docdir" "$libdir" \
|
||||
"$includerktdir" "$librktdir" "$mandir" \
|
||||
|| failwith "installation failed"
|
||||
|
||||
}
|
||||
|
@ -475,7 +477,7 @@ cd "$where"
|
|||
###############################################################################
|
||||
## Done
|
||||
|
||||
if test "$unixstyle" = "yes"; then unixstyle_install; else wholedir_install; fi
|
||||
if test "$unixstyle" = "Y"; then unixstyle_install; else wholedir_install; fi
|
||||
|
||||
echo ""
|
||||
echo "All done."
|