aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.nsi
blob: b9f0162878a643f27a4be08354399877fe8816f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
!define PRODUCT_NAME "wpa_supplicant"
!define PRODUCT_VERSION "@WPAVER@"
!define PRODUCT_PUBLISHER "Jouni Malinen"

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
outfile "../wpa_supplicant-@WPAVER@.exe"

installDir "$PROGRAMFILES\wpa_supplicant"

Page Directory
Page InstFiles

section -Prerequisites
	SetOutPath $INSTDIR\Prerequisites
	MessageBox MB_YESNO "Install WinPcap?" /SD IDYES IDNO endWinPcap
		File "/opt/Qt-Win/files/WinPcap_4_1_2.exe"
		ExecWait "$INSTDIR\Prerequisites\WinPcap_4_1_2.exe"
		Goto endWinPcap
	endWinPcap:
sectionEnd


section
	setOutPath $INSTDIR

	File wpa_gui.exe
	File wpa_gui_de.qm
	File wpa_cli.exe
	File COPYING
	File README
	File README-Windows.txt
	File win_example.reg
	File win_if_list.exe
	File wpa_passphrase.exe
	File wpa_supplicant.conf
	File wpa_supplicant.exe
	File wpasvc.exe

	File /opt/Qt-Win/files/mingwm10.dll
	File /opt/Qt-Win/files/libgcc_s_dw2-1.dll
	File /opt/Qt-Win/files/QtCore4.dll
	File /opt/Qt-Win/files/QtGui4.dll

	WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_level" 0
	WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_show_keys" 0
	WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_timestamp" 0
	WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_use_file" 0

	WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default" "ap_scan" 2
	WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default" "update_config" 1
	WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default\networks" "dummy" 1
	DeleteRegValue HKLM "Software\wpa_supplicant\configs\default\networks" "dummy"

	WriteRegDWORD HKLM "Software\wpa_supplicant\interfaces" "dummy" 1
	DeleteRegValue HKLM "Software\wpa_supplicant\interfaces" "dummy"

	writeUninstaller "$INSTDIR\uninstall.exe"

	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant" \
		"DisplayName" "wpa_supplicant"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant" \
		"UninstallString" "$INSTDIR\uninstall.exe"

	CreateDirectory "$SMPROGRAMS\wpa_supplicant"
	CreateShortCut "$SMPROGRAMS\wpa_supplicant\wpa_gui.lnk" "$INSTDIR\wpa_gui.exe"
	CreateShortCut "$SMPROGRAMS\wpa_supplicant\Uninstall.lnk" "$INSTDIR\uninstall.exe"

	ExecWait "$INSTDIR\wpasvc.exe reg"
sectionEnd


Function un.onInit
	MessageBox MB_YESNO "This will uninstall wpa_supplicant. Continue?" IDYES NoAbort
	Abort
  NoAbort:
FunctionEnd

section "uninstall"
	DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant"
	delete "$INSTDIR\uninstall.exe"

	ExecWait "$INSTDIR\wpasvc.exe unreg"

	DeleteRegKey HKLM "Software\wpa_supplicant"

	delete "$INSTDIR\wpa_gui.exe"
	delete "$INSTDIR\wpa_gui_de.qm"
	delete "$INSTDIR\wpa_cli.exe"
	delete "$INSTDIR\COPYING"
	delete "$INSTDIR\README"
	delete "$INSTDIR\README-Windows.txt"
	delete "$INSTDIR\win_example.reg"
	delete "$INSTDIR\win_if_list.exe"
	delete "$INSTDIR\wpa_passphrase.exe"
	delete "$INSTDIR\wpa_supplicant.conf"
	delete "$INSTDIR\wpa_supplicant.exe"
	delete "$INSTDIR\wpasvc.exe"

	delete "$INSTDIR\mingwm10.dll"
	delete "$INSTDIR\libgcc_s_dw2-1.dll"
	delete "$INSTDIR\QtCore4.dll"
	delete "$INSTDIR\QtGui4.dll"

	delete "$INSTDIR\Prerequisites\WinPcap_4_1_2.exe"
	rmdir "$INSTDIR\Prerequisites"

	rmdir "$INSTDIR"

	delete "$SMPROGRAMS\wpa_supplicant\wpa_gui.lnk"
	delete "$SMPROGRAMS\wpa_supplicant\Uninstall.lnk"
	rmdir "$SMPROGRAMS\wpa_supplicant"
sectionEnd