diff options
author | Erlang/OTP <[email protected]> | 2013-01-07 12:00:33 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2013-01-07 12:00:33 +0100 |
commit | 47c5ff4d3f33af0a4fa7b6952a7066efcbdd82e5 (patch) | |
tree | e488f7753c3a343fa57ab0a21f606d0e3dda23e3 /erts | |
parent | 3c05d3389f8b45e5b9f13a874de53ec521981a41 (diff) | |
parent | 014f575ad684a2cf78925b839634ae6f90bb02e2 (diff) | |
download | otp-47c5ff4d3f33af0a4fa7b6952a7066efcbdd82e5.tar.gz otp-47c5ff4d3f33af0a4fa7b6952a7066efcbdd82e5.tar.bz2 otp-47c5ff4d3f33af0a4fa7b6952a7066efcbdd82e5.zip |
Merge branch 'fredrik/ssh/appup-r15b03-patch' into maint-r15
* fredrik/ssh/appup-r15b03-patch:
Fixed syntax appup ssh
Teach Win installer to handle redist on w2012/w8
Diffstat (limited to 'erts')
-rw-r--r-- | erts/etc/win32/nsis/Makefile | 10 | ||||
-rwxr-xr-x | erts/etc/win32/nsis/dll_version_helper.sh | 16 | ||||
-rw-r--r-- | erts/etc/win32/nsis/erlang20.nsi | 13 |
3 files changed, 34 insertions, 5 deletions
diff --git a/erts/etc/win32/nsis/Makefile b/erts/etc/win32/nsis/Makefile index a53ac708f8..7bcecaa264 100644 --- a/erts/etc/win32/nsis/Makefile +++ b/erts/etc/win32/nsis/Makefile @@ -62,9 +62,15 @@ else endif REDIST_FILE=$(shell (sh ./find_redist.sh || echo "")) +ifeq ($(MSYSTEM),MINGW32) + NICEREDISTFILE=$(shell (msys2win_path.sh -m "$(REDIST_FILE)" 2>/dev/null || echo "")) +else + NICEREDISTFILE=$(shell (cygpath -d -m "$(REDIST_FILE)" 2>/dev/null || echo "")) +endif + REDIST_TARGET=$(shell (sh ./find_redist.sh -n || echo "")) -REDIST_DLL_VERSION=$(shell (sh ./dll_version_helper.sh || echo "")) -REDIST_DLL_NAME=$(shell (sh ./dll_version_helper.sh -n || echo "")) +REDIST_DLL_VERSION=$(shell (sh ./dll_version_helper.sh $(NICEREDISTFILE) || echo "")) +REDIST_DLL_NAME=$(shell (sh ./dll_version_helper.sh -n $(NICEREDISTFILE) || echo "")) release_spec: @NSIS_VER=`makensis /hdrinfo | head -1 | awk '{print $$2}'`; \ diff --git a/erts/etc/win32/nsis/dll_version_helper.sh b/erts/etc/win32/nsis/dll_version_helper.sh index 96e4532b7a..0d9ba4248d 100755 --- a/erts/etc/win32/nsis/dll_version_helper.sh +++ b/erts/etc/win32/nsis/dll_version_helper.sh @@ -25,6 +25,13 @@ # echo "8.0.50727.763" # exit 0 +if [ "$1" = "-n" ]; then + SWITCH=$1 + shift +else + SWITCH="" +fi + cat > hello.c <<EOF #include <windows.h> #include <stdio.h> @@ -42,11 +49,16 @@ if [ '!' -f hello.exe.manifest ]; then # need another way of getting the version DLLNAME=`dumpbin.exe -imports hello.exe | egrep MSVCR.*dll` DLLNAME=`echo $DLLNAME` + if [ '!' -z "$1" ]; then + FILETOLOOKIN=$1 + else + FILETOLOOKIN=$DLLNAME + fi cat > helper.c <<EOF #include <windows.h> #include <stdio.h> -#define REQ_MODULE "$DLLNAME" +#define REQ_MODULE "$FILETOLOOKIN" int main(void) { @@ -100,7 +112,7 @@ else NAME=`grep '<assemblyIdentity' hello.exe.manifest | sed 's,.*name=.[A-Za-z\.]*\([0-9]*\).*,msvcr\1.dll,g' | grep -v '<'` fi #rm -f hello.c hello.obj hello.exe hello.exe.manifest helper.c helper.obj helper.exe helper.exe.manifest -if [ "$1" = "-n" ]; then +if [ "$SWITCH" = "-n" ]; then ASKEDFOR=$NAME else ASKEDFOR=$VERSION diff --git a/erts/etc/win32/nsis/erlang20.nsi b/erts/etc/win32/nsis/erlang20.nsi index c5ada9e3b3..3333c4a9aa 100644 --- a/erts/etc/win32/nsis/erlang20.nsi +++ b/erts/etc/win32/nsis/erlang20.nsi @@ -35,6 +35,7 @@ !include "MUI.nsh"
!include "WordFunc.nsh"
+ !include "WinVer.nsh"
;--------------------------------
;Configuration
@@ -341,6 +342,9 @@ FunctionEnd Function .onInit
Var /GLOBAL archprefix
Var /GLOBAL sysnativedir
+ Var /GLOBAL winvermajor
+ Var /GLOBAL winverminor
+
SectionGetFlags 0 $MYTEMP
StrCmpS ${WINTYPE} "win64" +1 +4
StrCpy $archprefix "amd64"
@@ -348,9 +352,16 @@ Function .onInit Goto +3
StrCpy $archprefix "x86"
StrCpy $sysnativedir $SYSDIR
- ;MessageBox MB_YESNO "Found $sysnativedir\${REDIST_DLL_NAME}" IDYES FoundLbl
+ ${WinVerGetMajor} $0
+ ${WinVerGetMinor} $1
+ StrCpy $winvermajor $0
+ StrCpy $winverminor $1
IfFileExists $sysnativedir\${REDIST_DLL_NAME} MaybeFoundInSystemLbl
SearchSxSLbl:
+ IntCmp $winvermajor 6 WVCheckMinorLbl WVCheckDoneLbl NotFoundLbl
+ WVCheckMinorLbl:
+ IntCmp $winverminor 1 WVCheckDoneLbl WVCheckDoneLbl NotFoundLbl
+ WVCheckDoneLbl:
FindFirst $0 $1 $WINDIR\WinSxS\$archprefix*
LoopLbl:
StrCmp $1 "" NotFoundLbl
|