source: trunk/windows/papywizard.nsi @ 797

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

Added gtk+ runtime again

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\msvcr71.dll"
68  File "dist\library.zip"
69  ;
70  ; Sources
71  File "..\__init__.py"
72  SetOutPath "$INSTDIR\papywizard"
73  File "..\papywizard\__init__.py"
74  SetOutPath "$INSTDIR\papywizard\scripts"
75  File "..\papywizard\common\*.*"
76  SetOutPath "$INSTDIR\papywizard\common"
77  File "..\papywizard\common\*.*"
78  SetOutPath "$INSTDIR\papywizard\controller"
79  File "..\papywizard\controller\*.*"
80  SetOutPath "$INSTDIR\papywizard\hardware"
81  File "..\papywizard\hardware\*.*"
82  SetOutPath "$INSTDIR\papywizard\model"
83  File "..\papywizard\model\*.*"
84  SetOutPath "$INSTDIR\papywizard\view"
85  File "..\papywizard\view\*.*"
86  SetOutPath "$INSTDIR\share\locale\en\LC_MESSAGES"
87  File "..\locale\en\LC_MESSAGES\papywizard.mo"
88  SetOutPath "$INSTDIR\share\locale\fr\LC_MESSAGES"
89  File "..\locale\fr\LC_MESSAGES\papywizard.mo"
90  SetOutPath "$INSTDIR\share\locale\pl\LC_MESSAGES"
91  File "..\locale\pl\LC_MESSAGES\papywizard.mo"
92SectionEnd
93
94Section "GTK+ runtime" SEC02
95  SetOutPath $TEMP
96  File "dist\gtk+-2.10.13-setup.exe"
97  ExecWait '"$TEMP\gtk+-2.10.13-setup.exe" /SP- /SILENT'
98  Delete "$TEMP\gtk+-2.10.13-setup.exe"
99SectionEnd
100
101Section -AdditionalIcons
102  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
103  CreateShortCut "$SMPROGRAMS\papywizard\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
104  CreateShortCut "$SMPROGRAMS\papywizard\Uninstall.lnk" "$INSTDIR\uninst.exe"
105SectionEnd
106
107Section -Post
108  WriteUninstaller "$INSTDIR\uninst.exe"
109  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\papywizard.exe"
110  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
111  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
112  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\papywizard.exe"
113  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
114  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
115SectionEnd
116
117; Section descriptions
118!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
119  !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Papywizard"
120  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "GTK+ 2.10.13 runtime"
121!insertmacro MUI_FUNCTION_DESCRIPTION_END
122
123Function un.onUninstSuccess
124  HideWindow
125  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) a ete desinstalle avec succes de votre ordinateur."
126FunctionEnd
127
128Function un.onInit
129!insertmacro MUI_UNGETLANGUAGE
130  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Etes-vous certains de vouloir desinstaller totalement $(^Name) et tous ses composants ?" IDYES +2
131  Abort
132FunctionEnd
133
134Section Uninstall
135  Delete "$INSTDIR\${PRODUCT_NAME}.url"
136  Delete "$INSTDIR\uninst.exe"
137  Delete "$INSTDIR\library.zip"
138  Delete "$INSTDIR\msvcr71.dll"
139  Delete "$INSTDIR\papywizard.exe"
140  Delete "$INSTDIR\w9xpopen.exe"
141  Delete "$INSTDIR\papywizard.exe.log"
142  Delete "$SMPROGRAMS\papywizard\Uninstall.lnk"
143  Delete "$SMPROGRAMS\papywizard\Website.lnk"
144  Delete "$SMPROGRAMS\papywizard\papywizard.lnk"
145  RMDir  "$SMPROGRAMS\papywizard"
146  Delete "$DESKTOP\papywizard.lnk"
147
148  ; Sources
149  Delete "$INSTDIR\__init__.py"
150  Delete "$INSTDIR\papywizard\__init__.py"
151  Delete "$INSTDIR\papywizard\scripts\*.*"
152  Delete "$INSTDIR\papywizard\common\*.*"
153  Delete "$INSTDIR\papywizard\controller\*.*"
154  Delete "$INSTDIR\papywizard\hardware\*.*"
155  Delete "$INSTDIR\papywizard\model\*.*"
156  Delete "$INSTDIR\papywizard\view\*.*"
157  Delete "$INSTDIR\share\locale\en\LC_MESSAGES\papywizard.mo"
158  Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\papywizard.mo"
159  Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\papywizard.mo"
160  RMDir  "$INSTDIR\papywizard\scripts"
161  RMDir  "$INSTDIR\papywizard\common"
162  RMDir  "$INSTDIR\papywizard\controller"
163  RMDir  "$INSTDIR\papywizard\hardware"
164  RMDir  "$INSTDIR\papywizard\model"
165  RMDir  "$INSTDIR\papywizard\view"
166  RMDir  "$INSTDIR\papywizard"
167  RMDir  "$INSTDIR\share\locale\en\LC_MESSAGES"
168  RMDir  "$INSTDIR\share\locale\en"
169  RMDir  "$INSTDIR\share\locale\fr\LC_MESSAGES"
170  RMDir  "$INSTDIR\share\locale\fr"
171  RMDir  "$INSTDIR\share\locale\pl\LC_MESSAGES"
172  RMDir  "$INSTDIR\share\locale\pl"
173  RMDir  "$INSTDIR\share\locale"
174  RMDir  "$INSTDIR\share"
175  RMDir  "$INSTDIR"
176 
177  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
178  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
179  SetAutoClose true
180SectionEnd
Note: See TracBrowser for help on using the repository browser.