diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-10-17 08:15:22 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-10-17 08:15:22 +0000 |
commit | 63903a82203205643c8ae245533179fa0b1767cc (patch) | |
tree | 4f87beb03e2b934a98587cbd354da6cfd871fb47 /install-win32 | |
parent | Added additional warning messages about --script-security 2 (diff) | |
download | openvpn-63903a82203205643c8ae245533179fa0b1767cc.tar.xz |
Modified Windows domake-win build system to write all openvpn.nsi
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
Diffstat (limited to 'install-win32')
-rw-r--r-- | install-win32/buildinstaller | 14 | ||||
-rw-r--r-- | install-win32/maketext | 35 | ||||
-rwxr-xr-x | install-win32/openvpn.nsi | 79 | ||||
-rw-r--r-- | install-win32/settings.in | 9 |
4 files changed, 91 insertions, 46 deletions
diff --git a/install-win32/buildinstaller b/install-win32/buildinstaller index d906edf..83057bb 100644 --- a/install-win32/buildinstaller +++ b/install-win32/buildinstaller @@ -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 diff --git a/install-win32/maketext b/install-win32/maketext index 969a530..a66715c 100644 --- a/install-win32/maketext +++ b/install-win32/maketext @@ -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 diff --git a/install-win32/openvpn.nsi b/install-win32/openvpn.nsi index 0ffdf8d..0c25d50 100755 --- a/install-win32/openvpn.nsi +++ b/install-win32/openvpn.nsi @@ -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. @@ -27,10 +30,6 @@ !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 @@ -103,10 +102,10 @@ !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 @@ -163,7 +162,7 @@ ;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 diff --git a/install-win32/settings.in b/install-win32/settings.in index f946ba9..0be1c2d 100644 --- a/install-win32/settings.in +++ b/install-win32/settings.in @@ -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" |