sysmodellibs/sysmodelgen/installer/SystemModelToolkit.nsi
changeset 1 b538b70cbe51
child 6 5b32dc297d05
equal deleted inserted replaced
0:2e8eeb919028 1:b538b70cbe51
       
     1 
       
     2 ; Script generated by the HM NIS Edit Script Wizard.
       
     3 
       
     4 ; HM NIS Edit Wizard helper defines
       
     5 !define PRODUCT_NAME "SystemModelToolkit"
       
     6 !define PRODUCT_VERSION "1.1.8"
       
     7 !define PRODUCT_PUBLISHER "Symbian Software Ltd"
       
     8 !define PRODUCT_WEB_SITE "http://www.symbian.com"
       
     9 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
       
    10 !define PRODUCT_UNINST_ROOT_KEY "HKLM"
       
    11 
       
    12 ; MUI 1.67 compatible ------
       
    13 !include "MUI.nsh"
       
    14 
       
    15 ; MUI Settings
       
    16 !define MUI_ABORTWARNING
       
    17 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-full.ico"
       
    18 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-full.ico"
       
    19 
       
    20 ; Welcome page
       
    21 !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of SystemModelToolkit 1.1\n\nClick Next to continue..."
       
    22 !insertmacro MUI_PAGE_WELCOME
       
    23 ; License page
       
    24 !define MUI_LICENSEPAGE_CHECKBOX
       
    25 !insertmacro MUI_PAGE_LICENSE "license.txt"
       
    26 ; Directory page
       
    27 !insertmacro MUI_PAGE_DIRECTORY
       
    28 ; Instfiles page
       
    29 !insertmacro MUI_PAGE_INSTFILES
       
    30 ; Finish page
       
    31 !insertmacro MUI_PAGE_FINISH
       
    32 
       
    33 ; Uninstaller pages
       
    34 !insertmacro MUI_UNPAGE_INSTFILES
       
    35 
       
    36 ; Language files
       
    37 !insertmacro MUI_LANGUAGE "English"
       
    38 
       
    39 ; MUI end ------
       
    40 
       
    41 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
       
    42 OutFile "SystemModelToolkitInstaller.exe"
       
    43 InstallDir "D:\SystemModelToolkit"
       
    44 InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
       
    45 ShowInstDetails show
       
    46 ShowUnInstDetails show
       
    47 
       
    48 
       
    49 ;--------------------------- INSTALL SECTION ---------------------------
       
    50 Section "Install Files" SEC01
       
    51 
       
    52   SetOutPath "$INSTDIR"
       
    53   SetOverwrite try
       
    54   File "..\src\svg\DrawSvg.pl"
       
    55   File "..\src\svg\distribution.policy"
       
    56 
       
    57   SetOutPath "$INSTDIR\svg"
       
    58   SetOverwrite try
       
    59   File "..\src\svg\Model.xsl"
       
    60   File "..\src\svg\Draw.xsl"
       
    61   File "..\src\svg\Legend.xsl"
       
    62   File "..\src\svg\DrawSvg.pm"
       
    63   File "..\src\svg\ModelTemplate.xml"
       
    64   File "..\src\svg\ModelTemplate.older.xml"
       
    65   File "..\src\svg\Overlay.xsl"
       
    66   File "..\src\svg\Postprocess.xsl"
       
    67   File "..\src\svg\Shapes.xsl"
       
    68 
       
    69 
       
    70   SetOutPath "$INSTDIR\common"
       
    71   SetOverwrite try
       
    72   File "..\src\common\DepConstants.pm"
       
    73   File "..\src\common\Logger.pm"
       
    74   File "..\src\common\LogItem.pm"
       
    75   File "..\src\common\distribution.policy"
       
    76 
       
    77   SetOutPath "$INSTDIR\resources\installed\Xalan"
       
    78   SetOverwrite try
       
    79   File "..\resources\installed\Xalan\DISTRIBUTION.POLICY"
       
    80   File "..\resources\installed\Xalan\Xalan-C_1_8.dll"
       
    81   File "..\resources\installed\Xalan\Xalan.exe"
       
    82   File "..\resources\installed\Xalan\XalanMessages_1_8.dll"
       
    83   File "..\resources\installed\Xalan\xerces-c_2_5_0.dll"
       
    84 
       
    85   SetOutPath "$INSTDIR\resources\auxiliary"
       
    86   SetOverwrite try
       
    87   File "..\resources\auxiliary\DISTRIBUTION.POLICY"
       
    88   File "..\resources\auxiliary\system_model_colors.xml"
       
    89   File "..\resources\auxiliary\display-names.xml"
       
    90   File "..\resources\auxiliary\Levels.xml"
       
    91   File "..\resources\auxiliary\Levels91.xml"
       
    92   File "..\resources\auxiliary\Shapes.xml"
       
    93   File "..\resources\auxiliary\Example-shapes.xml"
       
    94   File "..\resources\auxiliary\SystemInfo.xml"
       
    95 
       
    96   SetOutPath "$INSTDIR\docs"
       
    97   SetOverwrite try
       
    98   File "..\docs\Building the System Model.doc"
       
    99   File "..\docs\Customising the System Model Presentation.doc"
       
   100   File "..\docs\distribution.policy"
       
   101   File "..\docs\dep.css"
       
   102   File "..\docs\guide.css"
       
   103   File "..\docs\sample_drawsvg.ini"
       
   104   File "..\docs\SystemModelToolkitInstaller_main.jpg"
       
   105   File "..\docs\user_guide_system_model_toolkit.html"
       
   106 
       
   107 
       
   108 SectionEnd
       
   109 ;-------------------------------------------------------
       
   110 
       
   111 
       
   112 Section -Post
       
   113   WriteUninstaller "$INSTDIR\uninst.exe"
       
   114   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
       
   115   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
       
   116   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
       
   117   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
       
   118   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
       
   119 SectionEnd
       
   120 
       
   121 
       
   122 Function un.onUninstSuccess
       
   123   HideWindow
       
   124   MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
       
   125 FunctionEnd
       
   126 
       
   127 Function un.onInit
       
   128   MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
       
   129   Abort
       
   130 FunctionEnd
       
   131 
       
   132 
       
   133 ;--------------------------- UNISTALL SECTION ---------------------------
       
   134 Section Uninstall
       
   135 
       
   136   Delete "$INSTDIR\uninst.exe"
       
   137   Delete "$INSTDIR\DrawSvg.pl"
       
   138   Delete "$INSTDIR\distribution.policy"
       
   139   Delete "$INSTDIR\svg\Draw.xsl"
       
   140   Delete "$INSTDIR\svg\Legend.xsl"
       
   141   Delete "$INSTDIR\svg\DrawSvg.pm"
       
   142   Delete "$INSTDIR\svg\Model.xsl"
       
   143   Delete "$INSTDIR\svg\ModelTemplate.xml"
       
   144   Delete "$INSTDIR\svg\ModelTemplate.older.xml"
       
   145   Delete "$INSTDIR\svg\Overlay.xsl"
       
   146   Delete "$INSTDIR\svg\Postprocess.xsl"
       
   147   Delete "$INSTDIR\svg\Shapes.xsl"
       
   148   Delete "$INSTDIR\common\DepConstants.pm"
       
   149   Delete "$INSTDIR\common\Logger.pm"
       
   150   Delete "$INSTDIR\common\LogItem.pm"
       
   151   Delete "$INSTDIR\common\distribution.policy"
       
   152   Delete "$INSTDIR\resources\installed\Xalan\DISTRIBUTION.POLICY"
       
   153   Delete "$INSTDIR\resources\installed\Xalan\Xalan-C_1_8.dll"
       
   154   Delete "$INSTDIR\resources\installed\Xalan\Xalan.exe"
       
   155   Delete "$INSTDIR\resources\installed\Xalan\XalanMessages_1_8.dll"
       
   156   Delete "$INSTDIR\resources\installed\Xalan\xerces-c_2_5_0.dll"
       
   157   Delete "$INSTDIR\resources\auxiliary\DISTRIBUTION.POLICY"
       
   158   Delete "$INSTDIR\resources\auxiliary\system_model_colors.xml"
       
   159   Delete "$INSTDIR\resources\auxiliary\display-names.xml"
       
   160   Delete "$INSTDIR\resources\auxiliary\Levels.xml"
       
   161   Delete "$INSTDIR\resources\auxiliary\Levels91.xml"
       
   162   Delete "$INSTDIR\resources\auxiliary\Shapes.xml"
       
   163   Delete "$INSTDIR\resources\auxiliary\Example-shapes.xml"
       
   164   Delete "$INSTDIR\resources\auxiliary\SystemInfo.xml"
       
   165   Delete "$INSTDIR\docs\Building the System Model.doc"
       
   166   Delete "$INSTDIR\docs\Customising the System Model Presentation.doc"
       
   167   Delete "$INSTDIR\docs\distribution.policy"
       
   168   Delete "$INSTDIR\docs\dep.css"
       
   169   Delete "$INSTDIR\docs\guide.css"
       
   170   Delete "$INSTDIR\docs\sample_drawsvg.ini"
       
   171   Delete "$INSTDIR\docs\SystemModelToolkitInstaller_main.jpg"
       
   172   Delete "$INSTDIR\docs\user_guide_system_model_toolkit.html"
       
   173 
       
   174   RMDir "$INSTDIR\svg"
       
   175   RMDir "$INSTDIR\common"
       
   176   RMDir "$INSTDIR\resources\installed\Xalan"
       
   177   RMDir "$INSTDIR\resources\installed"
       
   178   RMDir "$INSTDIR\resources\auxiliary"
       
   179   RMDir "$INSTDIR\resources"
       
   180   RMDir "$INSTDIR\docs"
       
   181   RMDir "$INSTDIR"
       
   182 
       
   183   DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
       
   184   SetAutoClose true
       
   185 SectionEnd
       
   186 ;-------------------------------------------------------
       
   187 
       
   188