quickSelfTest/quickSelfTest.nsi
author sr
Tue, 10 Oct 2017 14:45:47 +0200
changeset 378 821de31572f3
parent 363 a76df1b2fc2f
child 392 2d7b0dd3cebd
permissions -rw-r--r--
initial checkin

class: RunUnitTestsStart
added: #start

class: RunUnitTestsStart class
added: #documentation
sr@363
     1
; $Header$
sr@363
     2
; Script generated by ProjectDefinition.
sr@363
     3
sr@363
     4
!define PRODUCT_NAME "Smalltalk/X"
sr@363
     5
!define PRODUCT_FILENAME "Smalltalk_X"
sr@363
     6
!define PRODUCT_VERSION "7.1.0.0"
sr@363
     7
!define PRODUCT_PUBLISHER "eXept Software AG"
sr@363
     8
!define PRODUCT_WEB_SITE "http://www.exept.de"
sr@363
     9
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_FILENAME}"
sr@363
    10
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
sr@363
    11
sr@363
    12
;
sr@363
    13
; SETUP_NAME can come from makefile as either setup or setup64
sr@363
    14
;
sr@363
    15
!if "${SETUP_NAME}" == ""
sr@363
    16
SETUP_NAME="Smalltalk/XSetup"
sr@363
    17
!endif
sr@363
    18
sr@363
    19
!define STX_ROOT "..\..\..\.."
sr@363
    20
sr@363
    21
SetCompressor /solid lzma
sr@363
    22
sr@363
    23
!include "MUI2.nsh"
sr@363
    24
!include "x64.nsh"
sr@363
    25
sr@363
    26
; MUI Settings
sr@363
    27
sr@363
    28
!define MUI_WELCOMEPAGE_TITLE_3LINES
sr@363
    29
!define MUI_ABORTWARNING
sr@363
    30
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
sr@363
    31
;; !define MUI_ICON "nil.ico"
sr@363
    32
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
sr@363
    33
;; !define MUI_UNICON "nil.ico"
sr@363
    34
sr@363
    35
; Language Selection Dialog Settings
sr@363
    36
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
sr@363
    37
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
sr@363
    38
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
sr@363
    39
sr@363
    40
; Welcome page
sr@363
    41
!insertmacro MUI_PAGE_WELCOME
sr@363
    42
; License page
sr@363
    43
; !define MUI_LICENSEPAGE_CHECKBOX
sr@363
    44
sr@363
    45
sr@363
    46
!insertmacro MUI_PAGE_COMPONENTS
sr@363
    47
; Directory page
sr@363
    48
!insertmacro MUI_PAGE_DIRECTORY
sr@363
    49
; Instfiles page
sr@363
    50
!insertmacro MUI_PAGE_INSTFILES
sr@363
    51
; Finish page
sr@363
    52
!insertmacro MUI_PAGE_FINISH
sr@363
    53
sr@363
    54
; Uninstaller pages
sr@363
    55
!insertmacro MUI_UNPAGE_INSTFILES
sr@363
    56
sr@363
    57
; Language files
sr@363
    58
!insertmacro MUI_LANGUAGE "English"
sr@363
    59
!insertmacro MUI_LANGUAGE "German"
sr@363
    60
sr@363
    61
; MUI end ------
sr@363
    62
sr@363
    63
sr@363
    64
sr@363
    65
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
sr@363
    66
VIProductVersion "${PRODUCT_VERSION}.0"
sr@363
    67
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_NAME}"
sr@363
    68
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_PUBLISHER}"
sr@378
    69
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "7.1.1.1"
sr@363
    70
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${PRODUCT_NAME} Installer"
sr@363
    71
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${PRODUCT_VERSION}"
sr@363
    72
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright Claus Gittinger 2017\nCopyright eXept Software AG 2017"
sr@363
    73
sr@363
    74
sr@363
    75
OutFile "${SETUP_NAME}.exe"
sr@363
    76
InstallDir "$PROGRAMFILES\quickSelfTest"
sr@363
    77
ShowInstDetails show
sr@363
    78
ShowUnInstDetails show
sr@363
    79
sr@363
    80
Function .onInit
sr@363
    81
  !insertmacro MUI_LANGDLL_DISPLAY
sr@363
    82
FunctionEnd
sr@363
    83
sr@363
    84
InstType Full
sr@363
    85
InstType Partial
sr@363
    86
sr@363
    87
Section "Programme" Section1
sr@363
    88
  SectionIn 1 2
sr@363
    89
  SetOutPath "$INSTDIR\bin"
sr@363
    90
  SetOverwrite ifnewer
sr@363
    91
  File  "quickSelfTest.com"
sr@363
    92
  File "*.dll"
sr@363
    93
  File "symbols.stc"
sr@363
    94
  File "*.stx"
sr@363
    95
  File "*.rc"
sr@363
    96
  File /r /x CVS /x ".*" resources
sr@363
    97
sr@363
    98
sr@363
    99
sr@363
   100
sr@363
   101
sr@363
   102
  WriteRegStr HKCR "Stx.Smalltalk_X.1" "" "Smalltalk_X File"
sr@363
   103
  WriteRegStr HKCR "Stx.Smalltalk_X.1\DefaultIcon" "" '$INSTDIR\bin\quickSelfTest.exe,0'
sr@363
   104
  WriteRegStr HKCR "Stx.Smalltalk_X.1\Shell\open" "" $(appOpen)
sr@363
   105
  WriteRegStr HKCR "Stx.Smalltalk_X.1\Shell\open\command" "" '"$INSTDIR\bin\quickSelfTest.exe" -- "%1"'
sr@363
   106
SectionEnd
sr@363
   107
sr@363
   108
;; Section "Online-Documentation for Smalltalk/X" Section2
sr@363
   109
;;   SectionIn 1
sr@363
   110
;;   SetOutPath "$INSTDIR\doc"
sr@363
   111
;;   SetOverwrite ifnewer
sr@363
   112
;;   File /r /x CVS "${STX_ROOT}\stx\quickSelfTest\doc\*"
sr@363
   113
;; SectionEnd
sr@363
   114
sr@363
   115
;; Section "Smalltalk/X Libraries and Demos" Section3
sr@363
   116
;;   SectionIn 1
sr@363
   117
;;   SetOutPath "$INSTDIR\lib"
sr@363
   118
;;   SetOverwrite ifnewer
sr@363
   119
;; ;   File /r /x CVS "${STX_ROOT}\stx\quickSelfTest\examples\*"
sr@363
   120
;; SectionEnd
sr@363
   121
;; 
sr@363
   122
;; Section "Smalltalk/X Reports and Printing" Section4
sr@363
   123
;;   SectionIn 1
sr@363
   124
;;   SetOutPath "$INSTDIR\reportGenerator"
sr@363
   125
;;   SetOverwrite ifnewer
sr@363
   126
;; ;  File /r /x CVS "..\reportGenerator\java" "..\reportGenerator\rules" "..\reportGenerator\*.xml" "..\reportGenerator\*.xslt" "..\reportGenerator\CloseApp.exe" "..\reportGenerator\expecco.jpg"
sr@363
   127
;; SectionEnd
sr@363
   128
sr@363
   129
sr@363
   130
sr@363
   131
sr@363
   132
sr@363
   133
sr@363
   134
sr@363
   135
sr@363
   136
Section -AdditionalIcons
sr@363
   137
  SetOutPath "$INSTDIR\bin"
sr@363
   138
  WriteIniStr "$INSTDIR\${PRODUCT_FILENAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
sr@363
   139
  CreateDirectory "$SMPROGRAMS\${PRODUCT_FILENAME}"
sr@363
   140
  CreateShortCut "$SMPROGRAMS\${PRODUCT_FILENAME}\quickSelfTest.lnk" "$INSTDIR\bin\quickSelfTest.exe"
sr@363
   141
  CreateShortCut "$DESKTOP\quickSelfTest.lnk" "$INSTDIR\bin\quickSelfTest.exe"
sr@363
   142
  CreateShortCut "$SMPROGRAMS\${PRODUCT_FILENAME}\Website.lnk" "$INSTDIR\${PRODUCT_FILENAME}.url"
sr@363
   143
  CreateShortCut "$SMPROGRAMS\${PRODUCT_FILENAME}\Uninstall.lnk" "$INSTDIR\uninst.exe"
sr@363
   144
SectionEnd
sr@363
   145
sr@363
   146
Section -Post
sr@363
   147
  WriteUninstaller "$INSTDIR\uninst.exe"
sr@363
   148
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
sr@363
   149
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
sr@363
   150
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
sr@363
   151
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
sr@363
   152
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
sr@363
   153
SectionEnd
sr@363
   154
sr@363
   155
LangString appOpen ${LANG_GERMAN}  "Mit Smalltalk/X öffnen"
sr@363
   156
LangString appOpen ${LANG_ENGLISH} "Open with Smalltalk/X"
sr@363
   157
sr@363
   158
LangString DESC_Section1 ${LANG_ENGLISH} "Program components of Smalltalk/X"
sr@363
   159
LangString DESC_Section1 ${LANG_GERMAN}  "Alle Programmkomponenten von Smalltalk/X"
sr@363
   160
;; LangString DESC_Section2 ${LANG_ENGLISH} "Online-Documentation of Smalltalk/X"
sr@363
   161
;; LangString DESC_Section2 ${LANG_GERMAN}  "Online-Dokumentation zu Smalltalk/X"
sr@363
   162
;; LangString DESC_Section3 ${LANG_ENGLISH} "Libraries and Demo Projects"
sr@363
   163
;; LangString DESC_Section3 ${LANG_GERMAN}  "Bibliotheken und Beispielprojekte"
sr@363
   164
;; LangString DESC_Section4 ${LANG_ENGLISH} "Logfile Printing and Report Generation"
sr@363
   165
;; LangString DESC_Section4 ${LANG_GERMAN}  "Drucken und Report-Generierung aus Log-Dateien"
sr@363
   166
;; LangString DESC_Section3 ${LANG_ENGLISH} "Sources of ST/X (Base-System)"
sr@363
   167
;; LangString DESC_Section3 ${LANG_GERMAN}  "Quellcode von ST/X (Basis-System)"
sr@363
   168
;; LangString DESC_Section4 ${LANG_ENGLISH} "Sources of Smalltalk/X"
sr@363
   169
;; LangString DESC_Section4 ${LANG_GERMAN}  "Quellcode von Smalltalk/X"
sr@363
   170
sr@363
   171
sr@363
   172
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
sr@363
   173
  !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
sr@363
   174
;;   !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
sr@363
   175
;;  !insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3)
sr@363
   176
;;  !insertmacro MUI_DESCRIPTION_TEXT ${Section4} $(DESC_Section4)
sr@363
   177
sr@363
   178
!insertmacro MUI_FUNCTION_DESCRIPTION_END
sr@363
   179
sr@363
   180
sr@363
   181
sr@363
   182
Function un.onUninstSuccess
sr@363
   183
  HideWindow
sr@363
   184
  MessageBox MB_ICONINFORMATION|MB_OK "Smalltalk/X wurde erfolgreich deinstalliert"
sr@363
   185
FunctionEnd
sr@363
   186
sr@363
   187
Function un.onInit
sr@363
   188
!insertmacro MUI_UNGETLANGUAGE
sr@363
   189
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Möchten Sie Smalltalk/X und alle seine Komponenten deinstallieren?" IDYES +2
sr@363
   190
  Abort
sr@363
   191
FunctionEnd
sr@363
   192
sr@363
   193
Section Uninstall
sr@363
   194
  Delete "$INSTDIR\${PRODUCT_FILENAME}.url"
sr@363
   195
  Delete "$INSTDIR\uninst.exe"
sr@363
   196
sr@363
   197
    Delete "$INSTDIR\*"
sr@363
   198
    RMDir /r "$INSTDIR"
sr@363
   199
sr@363
   200
  Delete "$SMPROGRAMS\${PRODUCT_FILENAME}\Uninstall.lnk"
sr@363
   201
  Delete "$SMPROGRAMS\${PRODUCT_FILENAME}\Website.lnk"
sr@363
   202
  Delete "$SMPROGRAMS\${PRODUCT_FILENAME}\quickSelfTest.lnk"
sr@363
   203
  Delete "$DESKTOP\quickSelfTest.lnk"
sr@363
   204
sr@363
   205
  RMDir "$SMPROGRAMS\${PRODUCT_FILENAME}"
sr@363
   206
sr@363
   207
  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
sr@363
   208
  DeleteRegKey HKCR "Stx.Smalltalk_X.1"
sr@363
   209
sr@363
   210
sr@363
   211
sr@363
   212
  SetAutoClose true
sr@363
   213
SectionEnd