Browse code

First working version of XGUI inclusion.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2834 e7ae566f-a301-0410-adde-c780ea21d3b5

james authored on 2008/03/10 19:02:20
Showing 10 changed files
... ...
@@ -1,6 +1,6 @@
1 1
 OpenVPN (TM) -- An Open Source VPN daemon
2 2
 
3
-Copyright (C) 2002-2005 OpenVPN Solutions LLC <info@openvpn.net>
3
+Copyright (C) 2002-2008 OpenVPN, Inc. <sales@openvpn.net>
4 4
 
5 5
 This distribution contains multiple components, some
6 6
 of which fall under different licenses.  By using OpenVPN
... ...
@@ -126,6 +126,9 @@ install-win32/getpkcs11helper
126 126
 # Get the OpenVPN GUI (must be prebuilt)
127 127
 install-win32/getgui
128 128
 
129
+# Get the OpenVPN XML-based GUI (must be prebuilt)
130
+install-win32/getxgui
131
+
129 132
 # Produce the license text, install README, and sample config files
130 133
 install-win32/maketext
131 134
 
... ...
@@ -9,7 +9,9 @@ if [ -d "$OPENSSL_DIR" ] ; then
9 9
     mkdir -p $GENOUT/bin &>/dev/null    
10 10
     for f in libeay32.dll libssl32.dll openssl.exe ; do
11 11
 	cp $OPENSSL_DIR/$f $GENOUT/lib
12
-	strip $GENOUT/lib/$f
12
+        if [ -z "$NO_STRIP" ]; then
13
+	    strip $GENOUT/lib/$f
14
+	fi
13 15
     done
14 16
     mv $GENOUT/lib/openssl.exe $GENOUT/bin
15 17
 else
... ...
@@ -8,7 +8,9 @@ if [ -d "$PKCS11_HELPER_DIR" ] ; then
8 8
     mkdir -p $GENOUT/lib &>/dev/null    
9 9
     for f in libpkcs11-helper-1.dll ; do
10 10
 	cp $PKCS11_HELPER_DIR/bin/$f $GENOUT/lib
11
-	strip $GENOUT/lib/$f
11
+        if [ -z "$NO_STRIP" ]; then
12
+	    strip $GENOUT/lib/$f
13
+	fi
12 14
     done
13 15
 else
14 16
     echo PKCS11-helper DIR $PKCS11_HELPER_DIR NOT FOUND
15 17
new file mode 100644
... ...
@@ -0,0 +1,34 @@
0
+#!/bin/sh
1
+
2
+# Get and sign the OpenVPN XML-based GUI
3
+
4
+# load version.nsi definitions
5
+. autodefs/defs.sh
6
+
7
+if [ -d "$OPENVPN_XGUI_DIR" ]; then
8
+    SIGNED_EXES="gui/ovpn-xgui-en.exe sta/ovpn-tray.exe"
9
+    UNSIGNED_EXES="xmlserv/ovpn-xmlserv.exe"
10
+    EXES="$SIGNED_EXES $UNSIGNED_EXES"
11
+
12
+    mkdir -p $GENOUT/bin &>/dev/null
13
+
14
+    if [ -z "$NO_STRIP" ]; then
15
+	for f in $EXES; do
16
+	    cp $OPENVPN_XGUI_DIR/$f $GENOUT/bin
17
+	    strip $GENOUT/bin/`basename $f`
18
+	done
19
+    fi
20
+
21
+    for f in $SIGNED_EXES; do
22
+	if [ -d "$SIGNTOOL" ]; then
23
+	    TARGET_EXE="$GENOUT/bin/`basename $f`" $SIGNTOOL/signexe
24
+	fi
25
+    done
26
+
27
+    rm -rf $GENOUT/htdocs
28
+    cp -a $OPENVPN_XGUI_DIR/ajax/htdocs $GENOUT/htdocs
29
+
30
+    echo '!define OPENVPN_XGUI_DEFINED' >autodefs/xguidefs.nsi
31
+else
32
+    cat /dev/null >autodefs/xguidefs.nsi
33
+fi
... ...
@@ -11,7 +11,9 @@ if gcc --version &>/dev/null && [ -d "$OPENSSL_DIR" ] && [ -d "$LZO_DIR" ] && [
11 11
     # copy OpenVPN executable to GENOUT/bin
12 12
     mkdir -p $GENOUT/bin &>/dev/null
13 13
     cp $PRODUCT_UNIX_NAME.exe $GENOUT/bin
14
-    strip $GENOUT/bin/$PRODUCT_UNIX_NAME.exe
14
+    if [ -z "$NO_STRIP" ]; then
15
+	strip $GENOUT/bin/$PRODUCT_UNIX_NAME.exe
16
+    fi
15 17
 else
16 18
     echo DID NOT BUILD openvpn.exe because one or more of gcc, OPENSSL_DIR, LZO_DIR, or PKCS11_HELPER_DIR directories were missing
17 19
 fi
... ...
@@ -24,7 +24,9 @@ if [ -d "$SVC_TEMPLATE" ] ; then
24 24
     # copy service to GENOUT/bin
25 25
     mkdir $GENOUT/bin &>/dev/null
26 26
     cp service-win32/${PRODUCT_UNIX_NAME}serv.exe $GENOUT/bin
27
-    strip $GENOUT/bin/${PRODUCT_UNIX_NAME}serv.exe
27
+    if [ -z "$NO_STRIP" ]; then
28
+	strip $GENOUT/bin/${PRODUCT_UNIX_NAME}serv.exe
29
+    fi
28 30
 else
29 31
     echo OpenVPN service not built -- template directory $SVC_TEMPLATE NOT FOUND
30 32
 fi
... ...
@@ -1,5 +1,5 @@
1 1
 ; ****************************************************************************
2
-; * Copyright (C) 2002-2005 OpenVPN Solutions LLC                            *
2
+; * Copyright (C) 2002-2008 OpenVPN Solutions LLC                            *
3 3
 ; *  This program is free software; you can redistribute it and/or modify    *
4 4
 ; *  it under the terms of the GNU General Public License version 2          *
5 5
 ; *  as published by the Free Software Foundation.                           *
... ...
@@ -11,22 +11,42 @@
11 11
 
12 12
 !include "${HOME}\autodefs\defs.nsi"
13 13
 !include "${HOME}\autodefs\guidefs.nsi"
14
+!include "${HOME}\autodefs\xguidefs.nsi"
14 15
 !include "MUI.nsh"
15 16
 !include "setpath.nsi"
16 17
 !include "GetWindowsVersion.nsi"
17 18
 
19
+; Which GUI to use (XGUI has priority).
20
+; We will define either USE_XGUI (XML-based version) or
21
+; USE_GUI (Mathias Sundman version) but not both.
22
+!ifdef OPENVPN_XGUI_DEFINED
23
+!define USE_XGUI
24
+!else
25
+!ifdef OPENVPN_GUI_DEFINED
26
+!define USE_GUI
27
+!endif
28
+!endif
29
+
18 30
 !define GEN "${HOME}\${GENOUT}"
19 31
 !define BIN "${GEN}\bin"
20 32
 !define LIB "${GEN}\lib"
21 33
 
22 34
 !define PRODUCT_ICON "icon.ico"
23 35
 
36
+!ifdef USE_XGUI
37
+!define XGUI_POSTFIX "X"
38
+!else
39
+!define XGUI_POSTFIX ""
40
+!endif
41
+
24 42
 !ifdef PRODUCT_TAP_DEBUG
25
-!define VERSION "${PRODUCT_VERSION}-DBG"
43
+!define DBG_POSTFIX "-DBG"
26 44
 !else
27
-!define VERSION "${PRODUCT_VERSION}"
45
+!define DBG_POSTFIX ""
28 46
 !endif
29 47
 
48
+!define VERSION "${PRODUCT_VERSION}${XGUI_POSTFIX}${DBG_POSTFIX}"
49
+
30 50
 !define TAP "${PRODUCT_TAP_ID}"
31 51
 !define TAPDRV "${TAP}.sys"
32 52
 
... ...
@@ -38,6 +58,14 @@
38 38
 !define SERV_PRIORITY     "NORMAL_PRIORITY_CLASS"
39 39
 !define SERV_LOG_APPEND   "0"
40 40
 
41
+; XGUI variables
42
+!define XGUI_EXE      ovpn-xgui-en.exe
43
+!define XGUI_TRAY     ovpn-tray.exe
44
+!define XGUI_XMLSERV  ovpn-xmlserv.exe
45
+!define XGUI_HTDOCS   htdocs
46
+
47
+!define XGUI_AJAX_GUI_NAME "${PRODUCT_NAME} Ajax GUI"
48
+
41 49
 ;--------------------------------
42 50
 ;Configuration
43 51
 
... ...
@@ -98,17 +126,21 @@
98 98
 
99 99
   LangString DESC_SecOpenVPNUserSpace ${LANG_ENGLISH} "Install ${PRODUCT_NAME} user-space components, including ${PRODUCT_UNIX_NAME}.exe."
100 100
 
101
-!ifdef OPENVPN_GUI_DEFINED
101
+!ifdef USE_GUI
102 102
   LangString DESC_SecOpenVPNGUI ${LANG_ENGLISH} "Install ${PRODUCT_NAME} GUI by Mathias Sundman"
103 103
 !endif
104 104
 
105
+!ifdef USE_XGUI
106
+  LangString DESC_SecOpenVPNXGUI ${LANG_ENGLISH} "Install ${PRODUCT_NAME} XML-based GUI"
107
+!endif
108
+
105 109
   LangString DESC_SecOpenVPNEasyRSA ${LANG_ENGLISH} "Install ${PRODUCT_NAME} RSA scripts for X509 certificate management."
106 110
 
107 111
   LangString DESC_SecOpenSSLDLLs ${LANG_ENGLISH} "Install OpenSSL DLLs locally (may be omitted if DLLs are already installed globally)."
108 112
 
109 113
   LangString DESC_SecPKCS11DLLs ${LANG_ENGLISH} "Install PKCS#11 helper DLLs locally (may be omitted if DLLs are already installed globally)."
110 114
 
111
-  LangString DESC_SecTAP ${LANG_ENGLISH} "Install/Upgrade the TAP-Win32 virtual device driver.  Will not interfere with CIPE."
115
+  LangString DESC_SecTAP ${LANG_ENGLISH} "Install/Upgrade the TAP virtual device driver.  Will not interfere with CIPE."
112 116
 
113 117
   LangString DESC_SecService ${LANG_ENGLISH} "Install the ${PRODUCT_NAME} service wrapper (${PRODUCT_UNIX_NAME}serv.exe)"
114 118
 
... ...
@@ -227,6 +259,26 @@ FunctionEnd
227 227
 
228 228
 !define SF_SELECTED 1
229 229
 
230
+;--------------------
231
+;Pre-install section
232
+
233
+Section -pre
234
+
235
+  ; Stop OpenVPN if currently running
236
+  DetailPrint "Previous Service REMOVE (if exists)"
237
+  nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -remove'
238
+  Pop $R0 # return value/error/timeout
239
+
240
+!ifdef USE_XGUI
241
+  DetailPrint "Previous XML Service REMOVE (if exists)"
242
+  nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -remove'
243
+  Pop $R0 # return value/error/timeout
244
+!endif
245
+
246
+  Sleep 3000
247
+
248
+SectionEnd
249
+
230 250
 Section "${PRODUCT_NAME} User-Space Components" SecOpenVPNUserSpace
231 251
 
232 252
   SetOverwrite on
... ...
@@ -236,7 +288,7 @@ Section "${PRODUCT_NAME} User-Space Components" SecOpenVPNUserSpace
236 236
 
237 237
 SectionEnd
238 238
 
239
-!ifdef OPENVPN_GUI_DEFINED
239
+!ifdef USE_GUI
240 240
 Section "${PRODUCT_NAME} GUI" SecOpenVPNGUI
241 241
 
242 242
   SetOverwrite on
... ...
@@ -247,6 +299,22 @@ Section "${PRODUCT_NAME} GUI" SecOpenVPNGUI
247 247
 SectionEnd
248 248
 !endif
249 249
 
250
+!ifdef USE_XGUI
251
+Section "${PRODUCT_NAME} XML-based GUI" SecOpenVPNXGUI
252
+
253
+  SetOverwrite on
254
+
255
+  SetOutPath "$INSTDIR\bin"
256
+  File "${BIN}\${XGUI_EXE}"
257
+  File "${BIN}\${XGUI_TRAY}"
258
+  File "${BIN}\${XGUI_XMLSERV}"
259
+
260
+  SetOutPath "$INSTDIR\${XGUI_HTDOCS}"
261
+  File "${GEN}\${XGUI_HTDOCS}\*.*"
262
+
263
+SectionEnd
264
+!endif
265
+
250 266
 Section "${PRODUCT_NAME} RSA Certificate Management Scripts" SecOpenVPNEasyRSA
251 267
 
252 268
   SetOverwrite on
... ...
@@ -328,18 +396,18 @@ Section "PKCS#11 DLLs" SecPKCS11DLLs
328 328
 
329 329
 SectionEnd
330 330
 
331
-Section "TAP-Win32 Virtual Ethernet Adapter" SecTAP
331
+Section "TAP Virtual Ethernet Adapter" SecTAP
332 332
 
333 333
   SetOverwrite on
334 334
 
335 335
   FileOpen $R0 "$INSTDIR\bin\addtap.bat" w
336
-  FileWrite $R0 "rem Add a new TAP-Win32 virtual ethernet adapter$\r$\n"
336
+  FileWrite $R0 "rem Add a new TAP virtual ethernet adapter$\r$\n"
337 337
   FileWrite $R0 '"$INSTDIR\bin\tapinstall.exe" install "$INSTDIR\driver\OemWin2k.inf" ${TAP}$\r$\n'
338 338
   FileWrite $R0 "pause$\r$\n"
339 339
   FileClose $R0
340 340
 
341 341
   FileOpen $R0 "$INSTDIR\bin\deltapall.bat" w
342
-  FileWrite $R0 "echo WARNING: this script will delete ALL TAP-Win32 virtual adapters (use the device manager to delete adapters one at a time)$\r$\n"
342
+  FileWrite $R0 "echo WARNING: this script will delete ALL TAP virtual adapters (use the device manager to delete adapters one at a time)$\r$\n"
343 343
   FileWrite $R0 "pause$\r$\n"
344 344
   FileWrite $R0 '"$INSTDIR\bin\tapinstall.exe" remove ${TAP}$\r$\n'
345 345
   FileWrite $R0 "pause$\r$\n"
... ...
@@ -412,11 +480,35 @@ SectionEnd
412 412
 
413 413
 Section -post
414 414
 
415
+  SetOverwrite on
416
+
415 417
   ; delete old devcon.exe
416 418
   Delete "$INSTDIR\bin\devcon.exe"
417 419
 
420
+  ; Store README, license, icon
421
+  SetOverwrite on
422
+  SetOutPath $INSTDIR
423
+  File "${GEN}\text\INSTALL-win32.txt"
424
+  File "${GEN}\text\license.txt"
425
+  File "${HOME}\images\${PRODUCT_ICON}"
426
+
427
+  ; store sample config files
428
+  !ifdef SAMPCONF_DIR
429
+    SetOverwrite on
430
+    SetOutPath "$INSTDIR\config"
431
+  !ifdef SAMPCONF_CONF
432
+    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_CONF}"
433
+  !endif
434
+  !ifdef SAMPCONF_P12
435
+    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_P12}"
436
+  !endif
437
+  !ifdef SAMPCONF_TA
438
+    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_TA}"
439
+  !endif
440
+  !endif
441
+
418 442
   ;
419
-  ; install/upgrade TAP-Win32 driver if selected, using tapinstall.exe
443
+  ; install/upgrade TAP driver if selected, using tapinstall.exe
420 444
   ;
421 445
   SectionGetFlags ${SecTAP} $R0
422 446
   IntOp $R0 $R0 & ${SF_SELECTED}
... ...
@@ -442,7 +534,7 @@ Section -post
442 442
     IntCmp $R0 -1 tapinstall
443 443
 
444 444
  ;tapupdate:
445
-    DetailPrint "TAP-Win32 UPDATE"
445
+    DetailPrint "TAP UPDATE"
446 446
     nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" update "$INSTDIR\driver\OemWin2k.inf" ${TAP}'
447 447
     Pop $R0 # return value/error/timeout
448 448
     Call CheckReboot
... ...
@@ -451,13 +543,13 @@ Section -post
451 451
     Goto tapinstall_check_error
452 452
 
453 453
  tapinstall:
454
-    DetailPrint "TAP-Win32 REMOVE OLD TAP"
454
+    DetailPrint "TAP REMOVE OLD TAP"
455 455
 
456 456
     nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove TAP0801'
457 457
     Pop $R0 # return value/error/timeout
458 458
     DetailPrint "tapinstall remove TAP0801 returned: $R0"
459 459
 
460
-    DetailPrint "TAP-Win32 INSTALL (${TAP})"
460
+    DetailPrint "TAP INSTALL (${TAP})"
461 461
     nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" install "$INSTDIR\driver\OemWin2k.inf" ${TAP}'
462 462
     Pop $R0 # return value/error/timeout
463 463
     Call CheckReboot
... ...
@@ -467,7 +559,7 @@ Section -post
467 467
  tapinstall_check_error:
468 468
     DetailPrint "tapinstall cumulative status: $5"
469 469
     IntCmp $5 0 notap
470
-    MessageBox MB_OK "An error occurred installing the TAP-Win32 device driver."
470
+    MessageBox MB_OK "An error occurred installing the TAP device driver."
471 471
 
472 472
  notap:
473 473
 
... ...
@@ -487,38 +579,29 @@ Section -post
487 487
     !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "priority"    "${SERV_PRIORITY}"
488 488
     !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "log_append"  "${SERV_LOG_APPEND}"
489 489
 
490
-    ; install openvpnserv as a service
491
-    DetailPrint "Previous Service REMOVE (if exists)"
492
-    nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -remove'
493
-    Pop $R0 # return value/error/timeout
490
+    ; install openvpnserv as a service (to be started manually from service control manager)
494 491
     DetailPrint "Service INSTALL"
495 492
     nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -install'
496 493
     Pop $R0 # return value/error/timeout
497 494
 
498 495
  noserv:
499
-  ; Store README, license, icon
500
-  SetOverwrite on
501
-  SetOutPath $INSTDIR
502
-  File "${GEN}\text\INSTALL-win32.txt"
503
-  File "${GEN}\text\license.txt"
504
-  File "${HOME}\images\${PRODUCT_ICON}"
496
+  !ifdef USE_XGUI
497
+    IfFileExists "$INSTDIR\bin\${XGUI_XMLSERV}" "" fileass
498
+      ; install and automatically start XML service
499
+      DetailPrint "XML Service INSTALL"
500
+      nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -install'
501
+      Pop $R0 # return value/error/timeout
502
+
503
+      Sleep 2000
504
+
505
+      DetailPrint "XML Service START"
506
+      nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -start'
507
+      Pop $R0 # return value/error/timeout
505 508
 
506
-  ; store sample config files
507
-  !ifdef SAMPCONF_DIR
508
-    SetOverwrite on
509
-    SetOutPath "$INSTDIR\config"
510
-  !ifdef SAMPCONF_CONF
511
-    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_CONF}"
512
-  !endif
513
-  !ifdef SAMPCONF_P12
514
-    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_P12}"
515
-  !endif
516
-  !ifdef SAMPCONF_TA
517
-    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_TA}"
518
-  !endif
519 509
   !endif
520 510
 
521 511
   ; Create file association if requested
512
+ fileass:
522 513
   SectionGetFlags ${SecFileAssociation} $R0
523 514
   IntOp $R0 $R0 & ${SF_SELECTED}
524 515
   IntCmp $R0 ${SF_SELECTED} "" noass noass
... ...
@@ -535,21 +618,33 @@ Section -post
535 535
   CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}\Utilities"
536 536
   CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}\Shortcuts"
537 537
 
538
-    ; Create start menu and desktop shortcuts to OpenVPN GUI
539
-  !ifdef OPENVPN_GUI_DEFINED
540
-    IfFileExists "$INSTDIR\bin\${OPENVPN_GUI}" "" tryaddtap
538
+  ; Create start menu and desktop shortcuts to OpenVPN GUI
539
+  !ifdef USE_GUI
540
+    IfFileExists "$INSTDIR\bin\${OPENVPN_GUI}" "" tryaddxgui
541 541
       CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${OPENVPN_GUI}" ""
542 542
       CreateShortcut "$DESKTOP\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${OPENVPN_GUI}"
543 543
   !endif
544 544
 
545
+  ; Create start menu and desktop shortcuts to OpenVPN XGUI
546
+ tryaddxgui:
547
+  !ifdef USE_XGUI
548
+    IfFileExists "$INSTDIR\bin\${XGUI_EXE}" "" tryaddtray
549
+      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${XGUI_EXE}" ""
550
+      CreateShortcut "$DESKTOP\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${XGUI_EXE}"
551
+ tryaddtray:
552
+    IfFileExists "$INSTDIR\bin\${XGUI_TRAY}" "" tryaddtap
553
+      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${XGUI_AJAX_GUI_NAME}.lnk" "$INSTDIR\bin\${XGUI_EXE}" ""
554
+      CreateShortcut "$DESKTOP\${XGUI_AJAX_GUI_NAME}.lnk" "$INSTDIR\bin\${XGUI_TRAY}"
555
+  !endif
556
+
545 557
     ; Create start menu shortcuts to addtap.bat and deltapall.bat
546 558
  tryaddtap:
547 559
     IfFileExists "$INSTDIR\bin\addtap.bat" "" trydeltap
548
-      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Add a new TAP-Win32 virtual ethernet adapter.lnk" "$INSTDIR\bin\addtap.bat" ""
560
+      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Add a new TAP virtual ethernet adapter.lnk" "$INSTDIR\bin\addtap.bat" ""
549 561
 
550 562
  trydeltap:
551 563
     IfFileExists "$INSTDIR\bin\deltapall.bat" "" config_shortcut
552
-      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Delete ALL TAP-Win32 virtual ethernet adapters.lnk" "$INSTDIR\bin\deltapall.bat" ""
564
+      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Delete ALL TAP virtual ethernet adapters.lnk" "$INSTDIR\bin\deltapall.bat" ""
553 565
 
554 566
     ; Create start menu shortcuts for config and log directories
555 567
  config_shortcut:
... ...
@@ -580,7 +675,7 @@ Section -post
580 580
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayVersion" "${VERSION}"
581 581
 
582 582
   ; Advise a reboot
583
-  ;Messagebox MB_OK "IMPORTANT: Rebooting the system is advised in order to finalize TAP-Win32 driver installation/upgrade (this is an informational message only, pressing OK will not reboot)."
583
+  ;Messagebox MB_OK "IMPORTANT: Rebooting the system is advised in order to finalize TAP driver installation/upgrade (this is an informational message only, pressing OK will not reboot)."
584 584
 
585 585
 SectionEnd
586 586
 
... ...
@@ -589,9 +684,12 @@ SectionEnd
589 589
 
590 590
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
591 591
   !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNUserSpace} $(DESC_SecOpenVPNUserSpace)
592
-  !ifdef OPENVPN_GUI_DEFINED
592
+  !ifdef USE_GUI
593 593
     !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNGUI} $(DESC_SecOpenVPNGUI)
594 594
   !endif
595
+  !ifdef USE_XGUI
596
+    !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNXGUI} $(DESC_SecOpenVPNXGUI)
597
+  !endif
595 598
   !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNEasyRSA} $(DESC_SecOpenVPNEasyRSA)
596 599
   !insertmacro MUI_DESCRIPTION_TEXT ${SecTAP} $(DESC_SecTAP)
597 600
   !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenSSLUtilities} $(DESC_SecOpenSSLUtilities)
... ...
@@ -621,13 +719,20 @@ FunctionEnd
621 621
 
622 622
 Section "Uninstall"
623 623
 
624
+  ; Stop OpenVPN if currently running
624 625
   DetailPrint "Service REMOVE"
625 626
   nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -remove'
626 627
   Pop $R0 # return value/error/timeout
627 628
 
629
+!ifdef USE_XGUI
630
+  DetailPrint "XML Service REMOVE"
631
+  nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -remove'
632
+  Pop $R0 # return value/error/timeout
633
+!endif
634
+
628 635
   Sleep 2000
629 636
 
630
-  DetailPrint "TAP-Win32 REMOVE"
637
+  DetailPrint "TAP REMOVE"
631 638
   nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove ${TAP}'
632 639
   Pop $R0 # return value/error/timeout
633 640
   DetailPrint "tapinstall remove returned: $R0"
... ...
@@ -650,11 +755,20 @@ Section "Uninstall"
650 650
   !endif
651 651
   !endif
652 652
 
653
-  !ifdef OPENVPN_GUI_DEFINED
653
+  !ifdef USE_GUI
654 654
     Delete "$INSTDIR\bin\${OPENVPN_GUI}"
655 655
     Delete "$DESKTOP\${PRODUCT_NAME} GUI.lnk"
656 656
   !endif
657 657
 
658
+  !ifdef USE_XGUI
659
+    Delete "$INSTDIR\bin\${XGUI_EXE}"
660
+    Delete "$INSTDIR\bin\${XGUI_TRAY}"
661
+    Delete "$INSTDIR\bin\${XGUI_XMLSERV}"
662
+    RMDir /r "$INSTDIR\${XGUI_HTDOCS}"
663
+    Delete "$DESKTOP\${XGUI_AJAX_GUI_NAME}.lnk"
664
+    Delete "$DESKTOP\${PRODUCT_NAME} GUI.lnk"
665
+  !endif
666
+
658 667
   Delete "$INSTDIR\bin\${PRODUCT_UNIX_NAME}.exe"
659 668
   Delete "$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe"
660 669
   Delete "$INSTDIR\bin\libeay32.dll"
... ...
@@ -17,6 +17,10 @@
17 17
 !define OPENVPN_GUI_DIR "../openvpn-gui"
18 18
 !define OPENVPN_GUI     "openvpn-gui-1.0.3.exe"
19 19
 
20
+# Include the OpenVPN XML-based GUI exe in the installer.
21
+# May be undefined.
22
+!define OPENVPN_XGUI_DIR "../ovpnxml"
23
+
20 24
 # Prebuilt libraries.  DMALLOC is optional.
21 25
 !define OPENSSL_DIR	  "../openssl-0.9.7m"
22 26
 !define LZO_DIR		  "../lzo-2.02"
... ...
@@ -74,6 +78,9 @@
74 74
 # set to "yes" or "no"
75 75
 !define CLEAN "yes"
76 76
 
77
+# Don't strip executables and DLLs
78
+;!define NO_STRIP
79
+
77 80
 ; DEBUGGING -- set to something like "-DBG2"
78 81
 !define OUTFILE_LABEL ""
79 82
 
... ...
@@ -82,6 +89,6 @@
82 82
 
83 83
 # include a sample configuration file and key
84 84
 ;!define SAMPCONF_DIR   "test-key"
85
-;!define SAMPCONF_CONF  "test.ovpn"
86
-;!define SAMPCONF_P12   "test.p12"
87
-;!define SAMPCONF_TA    "ta.key"
85
+!define SAMPCONF_CONF  "test.ovpn"
86
+!define SAMPCONF_P12   "test.p12"
87
+!define SAMPCONF_TA    "ta.key"
... ...
@@ -1,2 +1,2 @@
1 1
 dnl define the OpenVPN version
2
-define(PRODUCT_VERSION,[2.1_rc7a])
2
+define(PRODUCT_VERSION,[2.1_rc7b])