source: trunk/windows/papywizard.nsi @ 891

Revision 891, 7.0 KB checked in by fma, 5 years ago (diff)

Changed scripts names according to linux scripts

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