Add wpa_gui-qt4 translation files into build
[libeap.git] / 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_gui_de.qm
28         File wpa_cli.exe
29         File COPYING
30         File README
31         File README-Windows.txt
32         File win_example.reg
33         File win_if_list.exe
34         File wpa_passphrase.exe
35         File wpa_supplicant.conf
36         File wpa_supplicant.exe
37         File wpasvc.exe
38
39         File /opt/Qt-Win/files/mingwm10.dll
40         File /opt/Qt-Win/files/QtCore4.dll
41         File /opt/Qt-Win/files/QtGui4.dll
42
43         WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_level" 0
44         WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_show_keys" 0
45         WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_timestamp" 0
46         WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_use_file" 0
47
48         WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default" "ap_scan" 2
49         WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default" "update_config" 1
50         WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default\networks" "dummy" 1
51         DeleteRegValue HKLM "Software\wpa_supplicant\configs\default\networks" "dummy"
52
53         WriteRegDWORD HKLM "Software\wpa_supplicant\interfaces" "dummy" 1
54         DeleteRegValue HKLM "Software\wpa_supplicant\interfaces" "dummy"
55
56         writeUninstaller "$INSTDIR\uninstall.exe"
57
58         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant" \
59                 "DisplayName" "wpa_supplicant"
60 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant" \
61                 "UninstallString" "$INSTDIR\uninstall.exe"
62
63         CreateDirectory "$SMPROGRAMS\wpa_supplicant"
64         CreateShortCut "$SMPROGRAMS\wpa_supplicant\wpa_gui.lnk" "$INSTDIR\wpa_gui.exe"
65         CreateShortCut "$SMPROGRAMS\wpa_supplicant\Uninstall.lnk" "$INSTDIR\uninstall.exe"
66
67         ExecWait "$INSTDIR\wpasvc.exe reg"
68 sectionEnd
69
70
71 Function un.onInit
72         MessageBox MB_YESNO "This will uninstall wpa_supplicant. Continue?" IDYES NoAbort
73         Abort
74   NoAbort:
75 FunctionEnd
76
77 section "uninstall"
78         DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant"
79         delete "$INSTDIR\uninstall.exe"
80
81         ExecWait "$INSTDIR\wpasvc.exe unreg"
82
83         DeleteRegKey HKLM "Software\wpa_supplicant"
84
85         delete "$INSTDIR\wpa_gui.exe"
86         delete "$INSTDIR\wpa_gui_de.qm"
87         delete "$INSTDIR\wpa_cli.exe"
88         delete "$INSTDIR\COPYING"
89         delete "$INSTDIR\README"
90         delete "$INSTDIR\README-Windows.txt"
91         delete "$INSTDIR\win_example.reg"
92         delete "$INSTDIR\win_if_list.exe"
93         delete "$INSTDIR\wpa_passphrase.exe"
94         delete "$INSTDIR\wpa_supplicant.conf"
95         delete "$INSTDIR\wpa_supplicant.exe"
96         delete "$INSTDIR\wpasvc.exe"
97
98         delete "$INSTDIR\mingwm10.dll"
99         delete "$INSTDIR\QtCore4.dll"
100         delete "$INSTDIR\QtGui4.dll"
101
102         delete "$INSTDIR\Prerequisites\WinPcap_4_0_2.exe"
103         rmdir "$INSTDIR\Prerequisites"
104
105         rmdir "$INSTDIR"
106
107         delete "$SMPROGRAMS\wpa_supplicant\wpa_gui.lnk"
108         delete "$SMPROGRAMS\wpa_supplicant\Uninstall.lnk"
109         rmdir "$SMPROGRAMS\wpa_supplicant"
110 sectionEnd