wpa_supplicant.nsi 3.2 KB

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