fixed traj. plot bug when manual bounds
[iDMC.git] / misc / dmcDue.nsi
blob3f632966dbcb680dcad5389608b311b4a1788c9a
1 /*
2 iDmc Nullsoft Scriptable Install System 2 script for Windoze.
3 Written by Daniele Pizzoni <auouo@tin.it>
4 */
6 ; HM NIS Edit Wizard helper defines
7 !define APP_NAME "iDmc"
8 !define APP_VERSION "2.0.5"
9 !define LIB_VERSION "0.7.0"
11 ; MUI 1.67 compatible ------
12 !include "MUI.nsh"
14 ; MUI Settings
15 !define MUI_ABORTWARNING
16 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
17 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
19 ; Welcome page
20 !insertmacro MUI_PAGE_WELCOME
21 ; License page
22 !insertmacro MUI_PAGE_LICENSE "README"
23 ; Directory page
24 !insertmacro MUI_PAGE_DIRECTORY
25 ; Instfiles page
26 !insertmacro MUI_PAGE_INSTFILES
27 ; Finish page
28 !insertmacro MUI_PAGE_FINISH
30 ; Uninstaller pages
31 !insertmacro MUI_UNPAGE_INSTFILES
33 ; Language files
34 !insertmacro MUI_LANGUAGE "English"
36 ; MUI end ------
38 !define APP_FULLNAME "${APP_NAME}-${APP_VERSION}"
39 !define LIB_FULLNAME "jidmclib"
40 !define FILE_JAR "${APP_FULLNAME}.jar"
41 !define FILE_DLL "${LIB_FULLNAME}.dll"
42 !define DIR_MODELS "$INSTDIR\models"
45 Name "${APP_FULLNAME}"
46 OutFile "${APP_FULLNAME}-setup.exe"
47 InstallDir "$PROGRAMFILES\${APP_FULLNAME}"
48 ShowInstDetails show
49 ShowUnInstDetails show
50 AutoCloseWindow false
52 Section "Executables" SEC01
53 SetOutPath "$INSTDIR"
54 SetOverwrite on
56 File "${FILE_JAR}"
57 File "${FILE_DLL}"
58 File README
59 File COPYING
60 SectionEnd
62 Section "Models" SEC02
63 SetOutPath "${DIR_MODELS}"
64 SetOverwrite on
66 File "models\cremona.lua"
67 File "models\ctbif.lua"
68 File "models\ctlocal.lua"
69 File "models\gingerman.lua"
70 File "models\henon.lua"
71 File "models\henon2.lua"
72 File "models\hopf.lua"
73 File "models\ikeda.lua"
74 File "models\logist.lua"
75 File "models\lorenz.lua"
76 File "models\lv.lua"
77 File "models\nordmark.lua"
78 File "models\par.lua"
79 File "models\quasi.lua"
80 File "models\quasiperiodicity.lua"
81 File "models\rossler.lua"
82 File "models\rotor.lua"
83 File "models\silnikov2.lua"
84 File "models\standard.lua"
85 File "models\tent.lua"
86 File "models\tinkerbell.lua"
87 SectionEnd
89 Section "Links"
90 CreateDirectory "$SMPROGRAMS\${APP_FULLNAME}"
91 CreateShortCut "$SMPROGRAMS\${APP_FULLNAME}\${APP_FULLNAME}.lnk" "$INSTDIR\${FILE_JAR}" -library="$INSTDIR\${FILE_DLL}"
92 CreateShortCut "$DESKTOP\${APP_FULLNAME}.lnk" "$INSTDIR\${FILE_JAR}" -library="$INSTDIR\${FILE_DLL}"
93 CreateShortCut "$DESKTOP\iDmc models.lnk" "${DIR_MODELS}"
94 CreateShortCut "$SMPROGRAMS\${APP_FULLNAME}\Uninstall.lnk" "$INSTDIR\uninst.exe"
95 SectionEnd
97 Section "Registry"
98 WriteUninstaller "$INSTDIR\uninst.exe"
99 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_FULLNAME}" "DisplayName" "$(^Name)"
100 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_FULLNAME}" "UninstallString" "$INSTDIR\uninst.exe"
101 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_FULLNAME}" "DisplayVersion" "${APP_VERSION}"
102 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_FULLNAME}" "Publisher" "TshoSoft"
103 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_FULLNAME}" "InstallLocation" "$INSTDIR"
104 SectionEnd
107 Function un.onUninstSuccess
108 HideWindow
109 MessageBox MB_ICONINFORMATION|MB_OK "${APP_FULLNAME} was successfully removed from your computer."
110 FunctionEnd
112 Function un.onInit
113 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove ${APP_FULLNAME} and all of its components?" IDYES +2
114 Abort
115 FunctionEnd
117 Section Uninstall
118 Delete "$INSTDIR\uninst.exe"
120 Delete "${DIR_MODELS}\cremona.lua"
121 Delete "${DIR_MODELS}\ctbif.lua"
122 Delete "${DIR_MODELS}\ctlocal.lua"
123 Delete "${DIR_MODELS}\gingerman.lua"
124 Delete "${DIR_MODELS}\henon.lua"
125 Delete "${DIR_MODELS}\henon2.lua"
126 Delete "${DIR_MODELS}\hopf.lua"
127 Delete "${DIR_MODELS}\ikeda.lua"
128 Delete "${DIR_MODELS}\logist.lua"
129 Delete "${DIR_MODELS}\lorenz.lua"
130 Delete "${DIR_MODELS}\lv.lua"
131 Delete "${DIR_MODELS}\nordmark.lua"
132 Delete "${DIR_MODELS}\par.lua"
133 Delete "${DIR_MODELS}\quasi.lua"
134 Delete "${DIR_MODELS}\quasiperiodicity.lua"
135 Delete "${DIR_MODELS}\rossler.lua"
136 Delete "${DIR_MODELS}\rotor.lua"
137 Delete "${DIR_MODELS}\silnikov2.lua"
138 Delete "${DIR_MODELS}\standard.lua"
139 Delete "${DIR_MODELS}\tent.lua"
140 Delete "${DIR_MODELS}\tinkerbell.lua"
142 RmDir "${DIR_MODELS}"
144 Delete "$INSTDIR\${FILE_DLL}"
145 Delete "$INSTDIR\${FILE_JAR}"
147 Delete "$SMPROGRAMS\${APP_FULLNAME}\Uninstall.lnk"
148 Delete "$SMPROGRAMS\${APP_FULLNAME}\${APP_FULLNAME}.lnk"
149 Delete "$DESKTOP\${APP_FULLNAME}.lnk"
150 Delete "$DESKTOP\iDmc models.lnk"
152 Delete COPYING
153 Delete README
155 RMDir "$SMPROGRAMS\${APP_FULLNAME}"
156 RMDir "$INSTDIR"
158 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_FULLNAME}"
159 SectionEnd