]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Modified Windows domake-win build system to write all openvpn.nsi
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Fri, 17 Oct 2008 08:15:22 +0000 (08:15 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Fri, 17 Oct 2008 08:15:22 +0000 (08:15 +0000)
input files to gen, so that gen can be disconnected from
the rest of the source tree and makensis openvpn.nsi will
still function correctly.

Added additional SAMPCONF_(CA|CRT|KEY) macros to settings.in
(commented out by default).

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

domake-win
install-win32/buildinstaller
install-win32/maketext
install-win32/openvpn.nsi
install-win32/settings.in

index cc4e982f0d6d7aa1149af88f5042981ef212b5bd..ebe1bb343b47d550239c6d1ca8ccd5a89efacaea 100644 (file)
@@ -127,12 +127,12 @@ install-win32/getpkcs11helper
 # Get the OpenVPN GUI (must be prebuilt)
 install-win32/getgui
 
-# Produce the license text, install README, and sample config files
-install-win32/maketext
-
 # Get the OpenVPN XML-based GUI (must be prebuilt)
 install-win32/getxgui
 
+# Produce the license text, install README, and sample config files
+install-win32/maketext
+
 # This final step builds the OpenVPN installer using generated
 # files from GENOUT
 install-win32/buildinstaller
index d906edf42c19527d8232987b86ca0ab1ef75ed45..83057bba65a9a22eccd43c9591682b41bd08843c 100644 (file)
@@ -4,19 +4,11 @@
 . autodefs/defs.sh
 
 # build the installer
-cd install-win32
-rm -f *.exe
-'/c/Program Files/NSIS/makensis' openvpn.nsi &>makensis.log
+rm -f $GENOUT/*.exe
+'/c/Program Files/NSIS/makensis' $GENOUT/nsi/openvpn.nsi &>makensis.log
 tail -20 makensis.log
 
-# copy the installer to GENOUT/install
-ls openvpn*.exe 2>/dev/null || exit 1
-i=`ls -t openvpn*.exe | head -n 1`
-cd ..
-mkdir $GENOUT/install &>/dev/null
-cp install-win32/$i $GENOUT/install
-
 # sign the installer
 if [ -d "$SIGNTOOL" ]; then
-    TARGET_EXE="$(pwd)/$GENOUT/install/$i" $SIGNTOOL/signexe
+    TARGET_EXE="$(echo $(pwd)/$GENOUT/*.exe)" $SIGNTOOL/signexe
 fi
index 969a530032d8d9e0181e603651bf945e76caf7c1..a66715ce794001773855cd4080a037170f133d42 100644 (file)
@@ -17,4 +17,37 @@ mkdir -p $s &>/dev/null
 cp sample-config-files/client.conf $s/client.$PRODUCT_FILE_EXT
 cp sample-config-files/server.conf $s/server.$PRODUCT_FILE_EXT
 cp install-win32/sample.ovpn $s/sample.$PRODUCT_FILE_EXT
-cp easy-rsa/1.0/openssl.cnf $s/openssl.cnf.sample
+
+# get easy-rsa (Windows)
+e=$GENOUT/easy-rsa
+mkdir -p $e &>/dev/null
+cp easy-rsa/1.0/openssl.cnf $e/openssl.cnf.sample
+cp easy-rsa/Windows/* $e
+
+# get images
+i=$GENOUT/images
+mkdir -p $i &>/dev/null
+cp images/*.ico $i
+cp images/*.bmp $i
+
+# get NSI files
+n=$GENOUT/nsi
+mkdir -p $n &>/dev/null
+cp autodefs/defs.nsi $n
+cp autodefs/guidefs.nsi $n
+cp autodefs/xguidefs.nsi $n
+cp install-win32/openvpn.nsi $n
+cp install-win32/setpath.nsi $n
+cp install-win32/GetWindowsVersion.nsi $n
+
+# get OpenVPN client config files
+if [ -n "$SAMPCONF_DIR" ]; then
+    c=$GENOUT/conf
+    mkdir -p $c &>/dev/null
+    test -n "$SAMPCONF_CONF" && cp "../$SAMPCONF_DIR/$SAMPCONF_CONF" $c
+    test -n "$SAMPCONF_P12" && cp "../$SAMPCONF_DIR/$SAMPCONF_P12" $c
+    test -n "$SAMPCONF_TA" && cp "../$SAMPCONF_DIR/$SAMPCONF_TA" $c
+    test -n "$SAMPCONF_CA" && cp "../$SAMPCONF_DIR/$SAMPCONF_CA" $c
+    test -n "$SAMPCONF_CRT" && cp "../$SAMPCONF_DIR/$SAMPCONF_CRT" $c
+    test -n "$SAMPCONF_KEY" && cp "../$SAMPCONF_DIR/$SAMPCONF_KEY" $c
+fi
index 0ffdf8dd9ce37230ed28c2fe501192a345f2a99b..0c25d50221207defb0c7a5db178b30a32a7fedea 100755 (executable)
@@ -7,15 +7,18 @@
 
 ; OpenVPN install script for Windows, using NSIS
 
-!define HOME ".."
-
-!include "${HOME}\autodefs\defs.nsi"
-!include "${HOME}\autodefs\guidefs.nsi"
-!include "${HOME}\autodefs\xguidefs.nsi"
 !include "MUI.nsh"
+
+!include "defs.nsi"
+!include "guidefs.nsi"
+!include "xguidefs.nsi"
 !include "setpath.nsi"
 !include "GetWindowsVersion.nsi"
 
+!define GEN ".."
+!define BIN "${GEN}\bin"
+!define LIB "${GEN}\lib"
+
 ; Which GUI to use (XGUI has priority).
 ; We will define either USE_XGUI (XML-based version) or
 ; USE_GUI (Mathias Sundman version) but not both.
 !endif
 !endif
 
-!define GEN "${HOME}\${GENOUT}"
-!define BIN "${GEN}\bin"
-!define LIB "${GEN}\lib"
-
 !define PRODUCT_ICON "icon.ico"
 
 !ifdef USE_XGUI
@@ -72,7 +71,7 @@
 
   ;General
 
-  OutFile "${PRODUCT_UNIX_NAME}-${VERSION}${OUTFILE_LABEL}-install.exe"
+  OutFile "${GEN}\${PRODUCT_UNIX_NAME}-${VERSION}${OUTFILE_LABEL}-install.exe"
 
   SetCompressor bzip2
 
   !endif
   !define MUI_FINISHPAGE_NOAUTOCLOSE
   !define MUI_ABORTWARNING
-  !define MUI_ICON "${HOME}\images\${PRODUCT_ICON}"
-  !define MUI_UNICON "${HOME}\images\${PRODUCT_ICON}"
+  !define MUI_ICON "${GEN}\images\${PRODUCT_ICON}"
+  !define MUI_UNICON "${GEN}\images\${PRODUCT_ICON}"
   !define MUI_HEADERIMAGE
-  !define MUI_HEADERIMAGE_BITMAP "${HOME}\images\install-whirl.bmp"
+  !define MUI_HEADERIMAGE_BITMAP "${GEN}\images\install-whirl.bmp"
   !define MUI_UNFINISHPAGE_NOAUTOCLOSE
 
   !insertmacro MUI_PAGE_WELCOME
   ;Things that need to be extracted on first (keep these lines before any File command!)
   ;Only useful for BZIP2 compression
   
-  ReserveFile "${HOME}\images\install-whirl.bmp"
+  ReserveFile "${GEN}\images\install-whirl.bmp"
 
 ;--------------------------------
 ;Macros
@@ -325,21 +324,21 @@ Section "${PRODUCT_NAME} RSA Certificate Management Scripts" SecOpenVPNEasyRSA
   SetOverwrite on
   SetOutPath "$INSTDIR\easy-rsa"
 
-  File "${GEN}\samples\openssl.cnf.sample"
-  File "${HOME}\easy-rsa\Windows\vars.bat.sample"
+  File "${GEN}\easy-rsa\openssl.cnf.sample"
+  File "${GEN}\easy-rsa\vars.bat.sample"
 
-  File "${HOME}\easy-rsa\Windows\init-config.bat"
+  File "${GEN}\easy-rsa\init-config.bat"
 
-  File "${HOME}\easy-rsa\Windows\README.txt"
-  File "${HOME}\easy-rsa\Windows\build-ca.bat"
-  File "${HOME}\easy-rsa\Windows\build-dh.bat"
-  File "${HOME}\easy-rsa\Windows\build-key-server.bat"
-  File "${HOME}\easy-rsa\Windows\build-key.bat"
-  File "${HOME}\easy-rsa\Windows\build-key-pkcs12.bat"
-  File "${HOME}\easy-rsa\Windows\clean-all.bat"
-  File "${HOME}\easy-rsa\Windows\index.txt.start"
-  File "${HOME}\easy-rsa\Windows\revoke-full.bat"
-  File "${HOME}\easy-rsa\Windows\serial.start"
+  File "${GEN}\easy-rsa\README.txt"
+  File "${GEN}\easy-rsa\build-ca.bat"
+  File "${GEN}\easy-rsa\build-dh.bat"
+  File "${GEN}\easy-rsa\build-key-server.bat"
+  File "${GEN}\easy-rsa\build-key.bat"
+  File "${GEN}\easy-rsa\build-key-pkcs12.bat"
+  File "${GEN}\easy-rsa\clean-all.bat"
+  File "${GEN}\easy-rsa\index.txt.start"
+  File "${GEN}\easy-rsa\revoke-full.bat"
+  File "${GEN}\easy-rsa\serial.start"
 
 SectionEnd
 
@@ -497,20 +496,29 @@ Section -post
     File "${GEN}\text\INSTALL-win32.txt"
   !endif
   File "${GEN}\text\license.txt"
-  File "${HOME}\images\${PRODUCT_ICON}"
+  File "${GEN}\images\${PRODUCT_ICON}"
 
   ; store sample config files
   !ifdef SAMPCONF_DIR
     SetOverwrite on
     SetOutPath "$INSTDIR\config"
   !ifdef SAMPCONF_CONF
-    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_CONF}"
+    File "${GEN}\conf\${SAMPCONF_CONF}"
   !endif
   !ifdef SAMPCONF_P12
-    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_P12}"
+    File "${GEN}\conf\${SAMPCONF_P12}"
   !endif
   !ifdef SAMPCONF_TA
-    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_TA}"
+    File "${GEN}\conf\${SAMPCONF_TA}"
+  !endif
+  !ifdef SAMPCONF_CA
+    File "${GEN}\conf\${SAMPCONF_CA}"
+  !endif
+  !ifdef SAMPCONF_CRT
+    File "${GEN}\conf\${SAMPCONF_CRT}"
+  !endif
+  !ifdef SAMPCONF_KEY
+    File "${GEN}\conf\${SAMPCONF_KEY}"
   !endif
   !endif
 
@@ -760,6 +768,15 @@ Section "Uninstall"
   !ifdef SAMPCONF_TA
     Delete "$INSTDIR\config\${SAMPCONF_TA}"
   !endif
+  !ifdef SAMPCONF_CA
+    Delete "$INSTDIR\config\${SAMPCONF_CA}"
+  !endif
+  !ifdef SAMPCONF_CRT
+    Delete "$INSTDIR\config\${SAMPCONF_CRT}"
+  !endif
+  !ifdef SAMPCONF_KEY
+    Delete "$INSTDIR\config\${SAMPCONF_KEY}"
+  !endif
   !endif
 
   !ifdef USE_GUI
index f946ba9cf09b3f179ab7d3187c56b8ddcf45d9b7..0be1c2d2859faf3bb92c52f0369b586d3368e90d 100644 (file)
@@ -83,6 +83,9 @@
 
 # include a sample configuration file and key
 ;!define SAMPCONF_DIR   "test-key"
-!define SAMPCONF_CONF  "test.ovpn"
-!define SAMPCONF_P12   "test.p12"
-!define SAMPCONF_TA    "ta.key"
+;!define SAMPCONF_CONF  "test.ovpn"
+;!define SAMPCONF_P12   "test.p12"
+;!define SAMPCONF_TA    "ta.key"
+;!define SAMPCONF_CA    "ca.crt"
+;!define SAMPCONF_CRT   "test.crt"
+;!define SAMPCONF_KEY   "test.key"