]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/wpa/wpa_supplicant/wpa_supplicant.nsi
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / contrib / wpa / wpa_supplicant / wpa_supplicant.nsi
1 !define PRODUCT_NAME "wpa_supplicant"
2 !define PRODUCT_VERSION "@WPAVER@"
3 !define PRODUCT_PUBLISHER "Jouni Malinen"
4
5 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
6 outfile "../wpa_supplicant-@WPAVER@.exe"
7
8 installDir "$PROGRAMFILES\wpa_supplicant"
9
10 Page Directory
11 Page InstFiles
12
13 section -Prerequisites
14         SetOutPath $INSTDIR\Prerequisites
15         MessageBox MB_YESNO "Install WinPcap?" /SD IDYES IDNO endWinPcap
16                 File "/opt/Qt-Win/files/WinPcap_4_0_2.exe"
17                 ExecWait "$INSTDIR\Prerequisites\WinPcap_4_0_2.exe"
18                 Goto endWinPcap
19         endWinPcap:
20 sectionEnd
21
22
23 section
24         setOutPath $INSTDIR
25
26         File wpa_gui.exe
27         File wpa_cli.exe
28         File COPYING
29         File README
30         File README-Windows.txt
31         File win_example.reg
32         File win_if_list.exe
33         File wpa_passphrase.exe
34         File wpa_supplicant.conf
35         File wpa_supplicant.exe
36         File wpasvc.exe
37
38         File /opt/Qt-Win/files/mingwm10.dll
39         File /opt/Qt-Win/files/QtCore4.dll
40         File /opt/Qt-Win/files/QtGui4.dll
41
42         WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_level" 0
43         WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_show_keys" 0
44         WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_timestamp" 0
45         WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_use_file" 0
46
47         WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default" "ap_scan" 2
48         WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default" "update_config" 1
49         WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default\networks" "dummy" 1
50         DeleteRegValue HKLM "Software\wpa_supplicant\configs\default\networks" "dummy"
51
52         WriteRegDWORD HKLM "Software\wpa_supplicant\interfaces" "dummy" 1
53         DeleteRegValue HKLM "Software\wpa_supplicant\interfaces" "dummy"
54
55         writeUninstaller "$INSTDIR\uninstall.exe"
56
57         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant" \
58                 "DisplayName" "wpa_supplicant"
59 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant" \
60                 "UninstallString" "$INSTDIR\uninstall.exe"
61
62         CreateDirectory "$SMPROGRAMS\wpa_supplicant"
63         CreateShortCut "$SMPROGRAMS\wpa_supplicant\wpa_gui.lnk" "$INSTDIR\wpa_gui.exe"
64         CreateShortCut "$SMPROGRAMS\wpa_supplicant\Uninstall.lnk" "$INSTDIR\uninstall.exe"
65
66         ExecWait "$INSTDIR\wpasvc.exe reg"
67 sectionEnd
68
69
70 Function un.onInit
71         MessageBox MB_YESNO "This will uninstall wpa_supplicant. Continue?" IDYES NoAbort
72         Abort
73   NoAbort:
74 FunctionEnd
75
76 section "uninstall"
77         DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant"
78         delete "$INSTDIR\uninstall.exe"
79
80         ExecWait "$INSTDIR\wpasvc.exe unreg"
81
82         DeleteRegKey HKLM "Software\wpa_supplicant"
83
84         delete "$INSTDIR\wpa_gui.exe"
85         delete "$INSTDIR\wpa_cli.exe"
86         delete "$INSTDIR\COPYING"
87         delete "$INSTDIR\README"
88         delete "$INSTDIR\README-Windows.txt"
89         delete "$INSTDIR\win_example.reg"
90         delete "$INSTDIR\win_if_list.exe"
91         delete "$INSTDIR\wpa_passphrase.exe"
92         delete "$INSTDIR\wpa_supplicant.conf"
93         delete "$INSTDIR\wpa_supplicant.exe"
94         delete "$INSTDIR\wpasvc.exe"
95
96         delete "$INSTDIR\mingwm10.dll"
97         delete "$INSTDIR\QtCore4.dll"
98         delete "$INSTDIR\QtGui4.dll"
99
100         delete "$INSTDIR\Prerequisites\WinPcap_4_0_2.exe"
101         rmdir "$INSTDIR\Prerequisites"
102
103         rmdir "$INSTDIR"
104
105         delete "$SMPROGRAMS\wpa_supplicant\wpa_gui.lnk"
106         delete "$SMPROGRAMS\wpa_supplicant\Uninstall.lnk"
107         rmdir "$SMPROGRAMS\wpa_supplicant"
108 sectionEnd