source: trunk/windows/papywizard.nsi @ 800

Revision 800, 6.4 KB checked in by fma, 5 years ago (diff)

Added icon

Line 
1; Script generated by the HM NIS Edit Script Wizard.
2
3; HM NIS Edit Wizard helper defines
4!define PRODUCT_NAME "papywizard"
5!define PRODUCT_VERSION "1.1"
6!define PRODUCT_WEB_SITE "http://trac.gbiloba.org/papywizard"
7!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\papywizard.exe"
8!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
9!define PRODUCT_UNINST_ROOT_KEY "HKLM"
10
11; MUI 1.67 compatible
12!include "MUI.nsh"
13
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"
18
19; Language Selection Dialog Settings
20!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
21!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
22!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
23
24; Welcome page
25!insertmacro MUI_PAGE_WELCOME
26; License page
27!insertmacro MUI_PAGE_LICENSE "..\licence_CeCILL_V2-en.txt"
28; Components page
29!insertmacro MUI_PAGE_COMPONENTS
30; Directory page
31!insertmacro MUI_PAGE_DIRECTORY
32; Instfiles page
33!insertmacro MUI_PAGE_INSTFILES
34; Finish page
35!define MUI_FINISHPAGE_RUN "$INSTDIR\papywizard.exe"
36!insertmacro MUI_PAGE_FINISH
37
38; Uninstaller pages
39!insertmacro MUI_UNPAGE_INSTFILES
40
41; Language files
42!insertmacro MUI_LANGUAGE "English"
43!insertmacro MUI_LANGUAGE "French"
44
45; MUI end ------
46
47Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
48OutFile "Install.exe"
49InstallDir "$PROGRAMFILES\papywizard"
50InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
51ShowInstDetails show
52ShowUnInstDetails show
53
54Function .onInit
55  !insertmacro MUI_LANGDLL_DISPLAY
56FunctionEnd
57
58Section "SectionPrincipale" SEC01
59  SetOutPath "$INSTDIR"
60  SetOverwrite ifnewer
61  File "dist\w9xpopen.exe"
62  CreateDirectory "$SMPROGRAMS\papywizard"
63  CreateShortCut "$SMPROGRAMS\papywizard\papywizard.lnk" "$INSTDIR\papywizard.exe"
64  CreateShortCut "$DESKTOP\papywizard.lnk" "$INSTDIR\papywizard.exe"
65  ;File "dist\python25.dll"    ; pas nessaire, inclus dans library.zip
66  File "dist\papywizard.exe"
67;  File "dist\papywizard.ico"
68  File "dist\msvcr71.dll"
69  File "dist\library.zip"
70  ;
71  ; Sources
72  File "..\__init__.py"
73  SetOutPath "$INSTDIR\papywizard"
74  File "..\papywizard\__init__.py"
75  SetOutPath "$INSTDIR\papywizard\scripts"
76  File "..\papywizard\common\*.*"
77  SetOutPath "$INSTDIR\papywizard\common"
78  File "..\papywizard\common\*.*"
79  SetOutPath "$INSTDIR\papywizard\controller"
80  File "..\papywizard\controller\*.*"
81  SetOutPath "$INSTDIR\papywizard\hardware"
82  File "..\papywizard\hardware\*.*"
83  SetOutPath "$INSTDIR\papywizard\model"
84  File "..\papywizard\model\*.*"
85  SetOutPath "$INSTDIR\papywizard\view"
86  File "..\papywizard\view\*.*"
87  SetOutPath "$INSTDIR\share\locale\en\LC_MESSAGES"
88  File "..\locale\en\LC_MESSAGES\papywizard.mo"
89  SetOutPath "$INSTDIR\share\locale\fr\LC_MESSAGES"
90  File "..\locale\fr\LC_MESSAGES\papywizard.mo"
91  SetOutPath "$INSTDIR\share\locale\pl\LC_MESSAGES"
92  File "..\locale\pl\LC_MESSAGES\papywizard.mo"
93SectionEnd
94
95Section "GTK+ runtime" SEC02
96  SetOutPath $TEMP
97  File "dist\gtk+-2.10.13-setup.exe"
98  ExecWait '"$TEMP\gtk+-2.10.13-setup.exe" /SP- /SILENT'
99  Delete "$TEMP\gtk+-2.10.13-setup.exe"
100SectionEnd
101
102Section -AdditionalIcons
103  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
104  CreateShortCut "$SMPROGRAMS\papywizard\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
105  CreateShortCut "$SMPROGRAMS\papywizard\Uninstall.lnk" "$INSTDIR\uninst.exe"
106SectionEnd
107
108Section -Post
109  WriteUninstaller "$INSTDIR\uninst.exe"
110  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\papywizard.exe"
111  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
112  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
113  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\papywizard.exe"
114  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
115  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
116SectionEnd
117
118; Section descriptions
119!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
120  !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Papywizard"
121  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "GTK+ 2.10.13 runtime"
122!insertmacro MUI_FUNCTION_DESCRIPTION_END
123
124Function un.onUninstSuccess
125  HideWindow
126  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) a ete desinstalle avec succes de votre ordinateur."
127FunctionEnd
128
129Function un.onInit
130!insertmacro MUI_UNGETLANGUAGE
131  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Etes-vous certains de vouloir desinstaller totalement $(^Name) et tous ses composants ?" IDYES +2
132  Abort
133FunctionEnd
134
135Section Uninstall
136  Delete "$INSTDIR\${PRODUCT_NAME}.url"
137  Delete "$INSTDIR\uninst.exe"
138  Delete "$INSTDIR\library.zip"
139  Delete "$INSTDIR\msvcr71.dll"
140  Delete "$INSTDIR\papywizard.exe"
141;  Delete "$INSTDIR\papywizard.ico"
142  Delete "$INSTDIR\w9xpopen.exe"
143  Delete "$INSTDIR\papywizard.exe.log"
144  Delete "$SMPROGRAMS\papywizard\Uninstall.lnk"
145  Delete "$SMPROGRAMS\papywizard\Website.lnk"
146  Delete "$SMPROGRAMS\papywizard\papywizard.lnk"
147  RMDir  "$SMPROGRAMS\papywizard"
148  Delete "$DESKTOP\papywizard.lnk"
149
150  ; Sources
151  Delete "$INSTDIR\__init__.py"
152  Delete "$INSTDIR\papywizard\__init__.py"
153  Delete "$INSTDIR\papywizard\scripts\*.*"
154  Delete "$INSTDIR\papywizard\common\*.*"
155  Delete "$INSTDIR\papywizard\controller\*.*"
156  Delete "$INSTDIR\papywizard\hardware\*.*"
157  Delete "$INSTDIR\papywizard\model\*.*"
158  Delete "$INSTDIR\papywizard\view\*.*"
159  Delete "$INSTDIR\share\locale\en\LC_MESSAGES\papywizard.mo"
160  Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\papywizard.mo"
161  Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\papywizard.mo"
162  RMDir  "$INSTDIR\papywizard\scripts"
163  RMDir  "$INSTDIR\papywizard\common"
164  RMDir  "$INSTDIR\papywizard\controller"
165  RMDir  "$INSTDIR\papywizard\hardware"
166  RMDir  "$INSTDIR\papywizard\model"
167  RMDir  "$INSTDIR\papywizard\view"
168  RMDir  "$INSTDIR\papywizard"
169  RMDir  "$INSTDIR\share\locale\en\LC_MESSAGES"
170  RMDir  "$INSTDIR\share\locale\en"
171  RMDir  "$INSTDIR\share\locale\fr\LC_MESSAGES"
172  RMDir  "$INSTDIR\share\locale\fr"
173  RMDir  "$INSTDIR\share\locale\pl\LC_MESSAGES"
174  RMDir  "$INSTDIR\share\locale\pl"
175  RMDir  "$INSTDIR\share\locale"
176  RMDir  "$INSTDIR\share"
177  RMDir  "$INSTDIR"
178 
179  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
180  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
181  SetAutoClose true
182SectionEnd
Note: See TracBrowser for help on using the repository browser.