Premier commit
[powerfractal.git] / Install / Power Fractal.nsi
1 ; Install_Mode_Index.nsi
2 ;
3 ; Installation du programme 'Mode d'adressage' 
4 ; Avec la possibilité de désinstallation et d'ajout (optinel)
5 ; d'un racourci dans le menu 'Démarrer'
6 ;
7 ;
8
9 Function .onInit
10   SetOutPath $TEMP
11   File /oname=spltmp.dat "LOGO.bmp"
12   File /oname=spltmp.exe "C:\program files\nsis\splash.exe"
13   ExecWait '"$TEMP\spltmp.exe" 3000 $HWNDPARENT spltmp.dat'
14   Delete $TEMP\spltmp.exe
15   Delete $TEMP\spltmp.dat
16 FunctionEnd
17
18
19 ShowInstDetails show
20
21 ; Le nom de l'installation
22 Name "Power Fractal - Installation"
23
24 ; Le nom du fichier d'installation
25 OutFile "PowerFractal  1.0 - Install.exe"
26
27 ; Le repertoire d'installation par défaut
28 InstallDir $PROGRAMFILES\Powerfractal
29
30 #--------------------------------------------------------
31 ; l'icon
32 Icon F:\Eivd-Data\Projet_Fractal\Install\icon.ico
33
34 ;Les petits boutons
35 EnabledBitmap button_on.bmp
36
37
38 DisabledBitmap button_off.bmp
39
40 #--------------------------------------------------------
41
42 ; Clef inscrit dans le registre correspondant au reprtoire d'installation
43 ; (Si une nouvelle installation est lancé, elle sera ecrasé)
44 InstallDirRegKey HKLM SOFTWARE\PowerFractal "Install_Dir"
45
46
47 ; Le texte d'acceuil
48 ComponentText "This will install Power Fractal on your computer. Select which optional things you want installed."
49
50 ; le texte qui propose à l'utilisateur un repertoire
51 DirText "Choose a directory to install in to:"
52
53 ;----------------------------------COPIE DES FICHIERS------------------------------
54 ; La section de copie de fichier
55 Section "Fractal (required)"
56   ; Indique le repertoire d'installation
57   SetOutPath $INSTDIR
58   ; Y met ces fichiers :
59   File PowerFractal.exe
60   File PowerFractal_Manuel_d_utilisation.pdf
61   File Que_est_qu_une_fractal_.pdf
62   File icon.ico
63   SetOutPath $SYSDIR
64   File graphmin.dll
65   SetOutPath $INSTDIR
66
67   ; Inscrit l'installation dans le registre :
68   WriteRegStr HKLM SOFTWARE\Powerfractal "Install_Dir" "$INSTDIR"
69   ; Inscrit les clefs de desinstallation
70   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PowerFractal" "DisplayName" "Mode_Adressage (Remove only)"
71   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PowerFractal" "UninstallString" '"$INSTDIR\uninstall.exe"'
72 SectionEnd
73
74 SectionDivider
75
76 ;-----------------------------------OPTIONS---------------------------------------
77 ; section concernant les options
78 Section "Start Menu Shortcuts"
79   CreateDirectory "$SMPROGRAMS\PowerFractal"
80   CreateShortCut "$SMPROGRAMS\PowerFractal\Uninstall.lnk" "$INSTDIR\uninstall.exe" #"" "$INSTDIR\uninstall.exe" 
81   CreateShortCut "$SMPROGRAMS\PowerFractal\PowerFractal.lnk" "$INSTDIR\PowerFractal.exe" "" "$INSTDIR\icon.ico" #"" "$INSTDIR\PowerFractal.exe" 0
82   CreateShortCut "$SMPROGRAMS\PowerFractal\Manuel d'utilisation.lnk" "$INSTDIR\PowerFractal_Manuel_d_utilisation.pdf"
83   CreateShortCut "$SMPROGRAMS\PowerFractal\Que est qu'une fractal-.lnk" "$INSTDIR\Que_est_qu_une_fractal_.pdf"
84 SectionEnd
85
86 Section "Desktop Shortcut"
87   CreateShortCut "$DESKTOP\PowerFractal.lnk" "$INSTDIR\PowerFractal.exe" "" "$INSTDIR\icon.ico" # """$INSTDIR\PowerFractal.exe" 0
88 SectionEnd
89
90 Section "ADA Source and Documentation (in french)"
91   CreateDirectory "$INSTDIR\Src"
92   SetOutPath $INSTDIR\Src
93   file Source_PowerFractal.zip
94 SectionEnd
95
96 #---------------------------------------------------------------------------------
97
98 ; Désinstallation
99
100 UninstallText "This will uninstall Power_fractal. Hit next to continue."
101 UninstallExeName "uninstall.exe"
102
103 ; Section spéciale de désinstallation.
104 Section "Uninstall"
105
106   ; Enleve la clef du registre
107   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PowerFractal"
108   DeleteRegKey HKLM SOFTWARE\PowerFractal
109
110
111   ; Enleve le prog
112   Delete $INSTDIR\PowerFractal.exe
113   ; Enleve le desinstaller (exe)
114   Delete $INSTDIR\uninstall.exe
115   ;Enleve l'icon
116
117   Delete $INSTDIR\Icon.ico
118
119   Delete $INSTDIR\Manuel_d_utilisation.pdf
120
121   Delete $INSTDIR\Que_est_qu_une_fractal_.pdf
122
123   Delete $INSTDIR\PowerFractal_Manuel_d_utilisation.pdf
124
125   Delete $INSTDIR\src\Source_PowerFractal.zip
126
127   Delete $SYSDIR\graphmin.dll
128
129   Delete "$SMPROGRAMS\PowerFractal\*.*"
130
131   Delete "$DESKTOP\PowerFractal.lnk"
132
133   RMDir "$SMPROGRAMS\PowerFractal"
134   RMDir "$INSTDIR"
135 SectionEnd
136
137 ; eof