summaryrefslogtreecommitdiff
path: root/erts/etc/win32
diff options
context:
space:
mode:
Diffstat (limited to 'erts/etc/win32')
-rwxr-xr-xerts/etc/win32/cygwin_tools/mingw/cc.sh4
-rw-r--r--erts/etc/win32/cygwin_tools/mingw/coffix.c8
-rwxr-xr-xerts/etc/win32/cygwin_tools/vc/cc.sh6
-rw-r--r--erts/etc/win32/cygwin_tools/vc/coffix.c8
-rw-r--r--erts/etc/win32/erl.rc6
-rw-r--r--erts/etc/win32/erl_log.c2
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_service.c16
-rw-r--r--erts/etc/win32/msys_tools/vc/cc.sh6
-rw-r--r--erts/etc/win32/msys_tools/vc/coffix.c8
-rw-r--r--erts/etc/win32/nsis/Makefile19
-rw-r--r--erts/etc/win32/nsis/erlang20.nsi83
-rwxr-xr-xerts/etc/win32/nsis/find_redist.sh2
-rw-r--r--erts/etc/win32/nsis/vsn_number.escript16
-rw-r--r--erts/etc/win32/port_entry.c4
-rw-r--r--erts/etc/win32/start_erl.c4
-rw-r--r--erts/etc/win32/version.h.src2
-rwxr-xr-xerts/etc/win32/wsl_tools/vc/cc.sh227
-rwxr-xr-xerts/etc/win32/wsl_tools/vc/coffix.c6
18 files changed, 274 insertions, 153 deletions
diff --git a/erts/etc/win32/cygwin_tools/mingw/cc.sh b/erts/etc/win32/cygwin_tools/mingw/cc.sh
index 0b321a5099..681476d6eb 100755
--- a/erts/etc/win32/cygwin_tools/mingw/cc.sh
+++ b/erts/etc/win32/cygwin_tools/mingw/cc.sh
@@ -2,7 +2,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2006-2016. All Rights Reserved.
+# Copyright Ericsson AB 2006-2021. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -269,7 +269,7 @@ if [ $LINKING = true ]; then
*)
out_spec="-o $OUTFILE";;
esac
- # Descide which standard library to link against
+ # Decide which standard library to link against
case $MD in
-ML)
stdlib="-lLIBC";;
diff --git a/erts/etc/win32/cygwin_tools/mingw/coffix.c b/erts/etc/win32/cygwin_tools/mingw/coffix.c
index ff3f3de3d1..4ba0ae04e5 100644
--- a/erts/etc/win32/cygwin_tools/mingw/coffix.c
+++ b/erts/etc/win32/cygwin_tools/mingw/coffix.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2006-2016. All Rights Reserved.
+ * Copyright Ericsson AB 2006-2021. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ static int v_printf(char *format, ...);
char *progname;
-int verbouse = 0;
+int verbose = 0;
int main(int argc, char **argv)
{
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
break;
case 'v':
case 'V':
- verbouse = 1;
+ verbose = 1;
default:
fprintf(stderr, "%s: unknown option %s\n", progname, argv[findex]);
break;
@@ -152,7 +152,7 @@ static int v_printf(char *format, ...)
{
va_list ap;
int ret = 0;
- if (verbouse) {
+ if (verbose) {
va_start(ap, format);
ret = vfprintf(stdout, format, ap);
va_end(ap);
diff --git a/erts/etc/win32/cygwin_tools/vc/cc.sh b/erts/etc/win32/cygwin_tools/vc/cc.sh
index 9eeb004f0e..5dc9666eea 100755
--- a/erts/etc/win32/cygwin_tools/vc/cc.sh
+++ b/erts/etc/win32/cygwin_tools/vc/cc.sh
@@ -2,7 +2,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2002-2016. All Rights Reserved.
+# Copyright Ericsson AB 2002-2021. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ ERR_FILE=/tmp/cl.exe.$$.2
MD_FORCED=false
# If we're preprocession (only) i.e. -E
PREPROCESSING=false
-# If we're generating dependencies (implies preprocesing)
+# If we're generating dependencies (implies preprocessing)
DEPENDENCIES=false
# If this is supposed to be a debug build
DEBUG_BUILD=false
@@ -297,7 +297,7 @@ if [ $LINKING = true ]; then
*)
out_spec="-o $OUTFILE";;
esac
- # Descide which standard library to link against
+ # Decide which standard library to link against
case $MD in
-ML)
stdlib="-lLIBC";;
diff --git a/erts/etc/win32/cygwin_tools/vc/coffix.c b/erts/etc/win32/cygwin_tools/vc/coffix.c
index bf1096c425..3221ad6d85 100644
--- a/erts/etc/win32/cygwin_tools/vc/coffix.c
+++ b/erts/etc/win32/cygwin_tools/vc/coffix.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1999-2016. All Rights Reserved.
+ * Copyright Ericsson AB 1999-2021. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ static int v_printf(char *format, ...);
char *progname;
-int verbouse = 0;
+int verbose = 0;
int main(int argc, char **argv)
{
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
break;
case 'v':
case 'V':
- verbouse = 1;
+ verbose = 1;
default:
fprintf(stderr, "%s: unknown option %s\n", progname, argv[findex]);
break;
@@ -152,7 +152,7 @@ static int v_printf(char *format, ...)
{
va_list ap;
int ret = 0;
- if (verbouse) {
+ if (verbose) {
va_start(ap, format);
ret = vfprintf(stdout, format, ap);
va_end(ap);
diff --git a/erts/etc/win32/erl.rc b/erts/etc/win32/erl.rc
index 035c4a2881..13974c750b 100644
--- a/erts/etc/win32/erl.rc
+++ b/erts/etc/win32/erl.rc
@@ -1,7 +1,7 @@
//
// %CopyrightBegin%
//
-// Copyright Ericsson AB 1998-2021. All Rights Reserved.
+// Copyright Ericsson AB 1998-2023. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -31,10 +31,10 @@ VS_VERSION_INFO VERSIONINFO
{
BLOCK "040904e4"
{
- VALUE "CompanyName", "Ericsson\0"
+ VALUE "CompanyName", "Ericsson AB\0"
VALUE "FileDescription", "Erlang\0"
VALUE "FileVersion", ERTS_VERSION_STR
- VALUE "LegalCopyright", "Ericsson. All rights reserved.\0"
+ VALUE "LegalCopyright", OTP_LEGAL_STR
VALUE "ProductName", "Erlang/OTP\0"
VALUE "ProductVersion", OTP_VERSION_STR
}
diff --git a/erts/etc/win32/erl_log.c b/erts/etc/win32/erl_log.c
index b77491b169..8cebef2719 100644
--- a/erts/etc/win32/erl_log.c
+++ b/erts/etc/win32/erl_log.c
@@ -21,7 +21,7 @@
* erl_log:
*
* Provides a simple debug log for the Erlang emulator.
- * It simples echoes its standard intput to the console.
+ * It simples echoes its standard input to the console.
*
* Author: Bjorn Gustavsson
* Created: 1996-12-06
diff --git a/erts/etc/win32/erlsrv/erlsrv_service.c b/erts/etc/win32/erlsrv/erlsrv_service.c
index fb0ca120ac..2745888091 100644
--- a/erts/etc/win32/erlsrv/erlsrv_service.c
+++ b/erts/etc/win32/erlsrv/erlsrv_service.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2021. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2022. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -535,10 +535,14 @@ static BOOL start_a_service(ServerInfo *srvi){
HANDLE hJob = CreateJobObject(NULL, NULL);
JOBOBJECT_EXTENDED_LIMIT_INFORMATION jeli = { 0 };
/*
- * Causes all processes associated with the job to terminate when the
- * last handle to the job is closed.
- */
- jeli.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
+ * JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
+ * Causes all processes associated with the job to terminate when the
+ * last handle to the job is closed.
+ *
+ * JOB_OBJECT_LIMIT_BREAKAWAY_OK
+ * Sometimes we want to break out, for example to start programs in another windows session
+ */
+ jeli.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | JOB_OBJECT_LIMIT_BREAKAWAY_OK;
SetInformationJobObject(hJob, JobObjectExtendedLimitInformation, &jeli, sizeof(jeli));
if (AssignProcessToJobObject(hJob, GetCurrentProcess()) == FALSE) {
log_error(L"Could not AssignProcessToJobObject");
@@ -920,7 +924,7 @@ static VOID WINAPI service_main_loop(DWORD argc, wchar_t **argv){
L"The service is not restarted, ignoring OnFail option.");
} else {
log_error(L"Erlang machine seems to die "
- L"continously, not restarted.");
+ L"continuously, not restarted.");
}
CloseHandle(eventStop);
set_stopped(ERROR_PROCESS_ABORTED);
diff --git a/erts/etc/win32/msys_tools/vc/cc.sh b/erts/etc/win32/msys_tools/vc/cc.sh
index 0c15139bd5..ee24e4bab6 100644
--- a/erts/etc/win32/msys_tools/vc/cc.sh
+++ b/erts/etc/win32/msys_tools/vc/cc.sh
@@ -2,7 +2,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2002-2020. All Rights Reserved.
+# Copyright Ericsson AB 2002-2021. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ ERR_FILE=/tmp/cl.exe.$$.2
MD_FORCED=false
# If we're preprocession (only) i.e. -E
PREPROCESSING=false
-# If we're generating dependencies (implies preprocesing)
+# If we're generating dependencies (implies preprocessing)
DEPENDENCIES=false
# If this is supposed to be a debug build
DEBUG_BUILD=false
@@ -310,7 +310,7 @@ if [ $LINKING = true ]; then
*)
out_spec="-o $OUTFILE";;
esac
- # Descide which standard library to link against
+ # Decide which standard library to link against
case $MD in
-ML)
stdlib="-lLIBC";;
diff --git a/erts/etc/win32/msys_tools/vc/coffix.c b/erts/etc/win32/msys_tools/vc/coffix.c
index bf1096c425..3221ad6d85 100644
--- a/erts/etc/win32/msys_tools/vc/coffix.c
+++ b/erts/etc/win32/msys_tools/vc/coffix.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1999-2016. All Rights Reserved.
+ * Copyright Ericsson AB 1999-2021. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ static int v_printf(char *format, ...);
char *progname;
-int verbouse = 0;
+int verbose = 0;
int main(int argc, char **argv)
{
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
break;
case 'v':
case 'V':
- verbouse = 1;
+ verbose = 1;
default:
fprintf(stderr, "%s: unknown option %s\n", progname, argv[findex]);
break;
@@ -152,7 +152,7 @@ static int v_printf(char *format, ...)
{
va_list ap;
int ret = 0;
- if (verbouse) {
+ if (verbose) {
va_start(ap, format);
ret = vfprintf(stdout, format, ap);
va_end(ap);
diff --git a/erts/etc/win32/nsis/Makefile b/erts/etc/win32/nsis/Makefile
index a0c21a5f5d..dd4bbd4de6 100644
--- a/erts/etc/win32/nsis/Makefile
+++ b/erts/etc/win32/nsis/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2003-2021. All Rights Reserved.
+# Copyright Ericsson AB 2003-2023. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -68,18 +68,25 @@ REDIST_DLL_NAME=$(shell (sh ./dll_version_helper.sh -n "$(NICEREDISTFILE)" || ec
# $(info $$REDIST_DLL_NAME = [${REDIST_DLL_NAME}])
# $(info $$REDIST_FILE = [${REDIST_FILE}])
+VERSION_TICKETS_FILE=$(shell (w32_path.sh -m "$(ERL_TOP)/make/otp_version_tickets" 2>/dev/null || echo "NOTFOUND"))
+# NSIS really want the product version number to be at least 4 digits long
+OTP_VERSION_LONG=$(shell $(ERL_TOP)/bootstrap/bin/escript.exe vsn_number.escript $(OTP_VERSION) $(VERSION_TICKETS_FILE))
+YEAR=$(shell date +%Y)
+
release_spec:
@NSIS_VER=`makensis.exe -version`; \
case $$NSIS_VER in \
- v2.0b*) \
+ v2.* | v3.0 | v3.01) \
echo "Unsupported NSIS version: $$NSIS_VER";;\
- v2.* | v3.*) \
- echo '!define OTP_VERSION "$(SYSTEM_VSN)"' > $(VERSION_HEADER);\
- echo '!define OTP_RELEASE_VERSION "$(OTP_VERSION)"' >> $(VERSION_HEADER);\
+ v3.*) \
+ echo '!define OTP_RELEASE "$(SYSTEM_VSN)"' > $(VERSION_HEADER);\
+ echo '!define OTP_VERSION "$(OTP_VERSION)"' >> $(VERSION_HEADER);\
+ echo '!define OTP_VERSION_LONG "$(OTP_VERSION_LONG)"' >> $(VERSION_HEADER);\
echo '!define ERTS_VERSION "$(VSN)"' >> $(VERSION_HEADER);\
echo '!define TESTROOT "$(WTESTROOT)"' >> $(VERSION_HEADER);\
echo '!define OUTFILEDIR "$(WTARGET_DIR)"' >> $(VERSION_HEADER);\
echo '!define WINTYPE "$(WINTYPE)"' >> $(VERSION_HEADER);\
+ echo '!define YEAR "$(YEAR)"' >> $(VERSION_HEADER);\
if [ -f $(CUSTOM_MODERN) ];\
then \
echo '!define HAVE_CUSTOM_MODERN 1' >> $(VERSION_HEADER); \
@@ -96,6 +103,8 @@ release_spec:
then \
echo '!define HAVE_DOCS 1' >> $(VERSION_HEADER); \
fi;\
+ echo "OTP_VERSION = [${OTP_VERSION}]"; \
+ echo "OTP_VERSION_LONG = [${OTP_VERSION_LONG}]"; \
echo "Running $(MAKENSIS) $(MAKENSISFLAGS) erlang20.nsi";\
$(MAKENSIS) $(MAKENSISFLAGS) erlang20.nsi;;\
*) \
diff --git a/erts/etc/win32/nsis/erlang20.nsi b/erts/etc/win32/nsis/erlang20.nsi
index e744db8bf3..d8d1883e3a 100644
--- a/erts/etc/win32/nsis/erlang20.nsi
+++ b/erts/etc/win32/nsis/erlang20.nsi
@@ -7,7 +7,7 @@
;
; %CopyrightBegin%
;
-; Copyright Ericsson AB 2012-2021. All Rights Reserved.
+; Copyright Ericsson AB 2012-2023. All Rights Reserved.
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@
!include "erlang.nsh" ; All release specific parameters come from this
- Name "${OTP_PRODUCT} ${OTP_VERSION}"
+ Name "${OTP_PRODUCT} ${OTP_RELEASE}"
!include "MUI.nsh"
!include "WordFunc.nsh"
@@ -52,13 +52,13 @@ Var STARTMENU_FOLDER
!define MY_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
;General
- OutFile "${OUTFILEDIR}\otp_${WINTYPE}_${OTP_RELEASE_VERSION}.exe"
+ OutFile "${OUTFILEDIR}\otp_${WINTYPE}_${OTP_VERSION}.exe"
;Folder selection page
!if ${WINTYPE} == "win64"
- InstallDir "$PROGRAMFILES64\erl-${OTP_RELEASE_VERSION}"
+ InstallDir "$PROGRAMFILES64\Erlang OTP"
!else
- InstallDir "$PROGRAMFILES\erl-${OTP_RELEASE_VERSION}"
+ InstallDir "$PROGRAMFILES\Erlang OTP"
!endif
;Remember install folder
InstallDirRegKey HKLM "SOFTWARE\Ericsson\Erlang\${ERTS_VERSION}" ""
@@ -66,9 +66,9 @@ Var STARTMENU_FOLDER
; Set the default start menu folder
!if ${WINTYPE} == "win64"
- !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${OTP_PRODUCT} ${OTP_VERSION} (x64)"
+ !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${OTP_PRODUCT} ${OTP_RELEASE} (x64)"
!else
- !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${OTP_PRODUCT} ${OTP_VERSION} (i386)"
+ !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${OTP_PRODUCT} ${OTP_RELEASE} (i386)"
!endif
;--------------------------------
@@ -100,6 +100,17 @@ Var STARTMENU_FOLDER
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
+; Installer file properties
+
+VIProductVersion "${OTP_VERSION_LONG}"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Ericsson AB"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${OTP_VERSION}"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Erlang/OTP installer"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright Ericsson AB 2010-${YEAR}. All Rights Reserved."
+VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Erlang/OTP"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${OTP_VERSION}"
+
+;--------------------------------
;Language Strings
;Description
@@ -144,21 +155,19 @@ SubSection /e "Erlang" SecErlang
Section "Development" SecErlangDev
SectionIn 1 RO
-
+
SetOutPath "$INSTDIR"
-
-; Don't let Users nor Autenticated Users group create new files
-; Avoid dll injection when installing to non /Program Files/ dirs
-
- StrCmp $INSTDIR $InstallDir cp_files
- ; Remove ANY inherited access control
+
+; Don't let Users nor Authenticated Users group create new files
+; Avoid dll injection when installing to non /Program Files/ dirs
+
+ ; Remove ANY inherited access control
ExecShellWait "open" "$SYSDIR\icacls.exe" '"$INSTDIR" /inheritance:r' SW_HIDE
- ; Grant Admin full control
+ ; Grant Admin full control
ExecShellWait "open" "$SYSDIR\icacls.exe" '"$INSTDIR" /grant:r *S-1-5-32-544:(OI)(CI)F' SW_HIDE
- ; Grant Normal Users read+execute control
+ ; Grant Normal Users read+execute control
ExecShellWait "open" "$SYSDIR\icacls.exe" '"$INSTDIR" /grant:r *S-1-1-0:(OI)(CI)RX' SW_HIDE
-cp_files:
File "${TESTROOT}\Install.ini"
File "${TESTROOT}\Install.exe"
SetOutPath "$INSTDIR\releases"
@@ -201,7 +210,7 @@ continue_create:
StrCmp $MYTEMP "" 0 done_startmenu
-; If startmenu was skipped, this might be unnecessary, but wont hurt...
+; If startmenu was skipped, this might be unnecessary, but won't hurt...
WriteRegStr HKCU "Software\Ericsson\Erlang\${ERTS_VERSION}" \
"" $INSTDIR
WriteRegStr HKCU "${MY_STARTMENUPAGE_REGISTRY_KEY}" \
@@ -214,22 +223,28 @@ done_startmenu:
WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM \
- "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
- "DisplayName" "Erlang OTP ${OTP_RELEASE_VERSION} (${ERTS_VERSION})"
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
+ "DisplayName" "Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})"
+ WriteRegStr HKLM \
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
+ "DisplayVersion" "${OTP_VERSION}"
+ WriteRegStr HKLM \
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
+ "Publisher" "Ericsson AB"
WriteRegStr HKLM \
- "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
"UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegDWORD HKLM \
- "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
"NoModify" 1
WriteRegDWORD HKLM \
- "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
"NoRepair" 1
; Check that the registry could be written, we only check one key,
; but it should be sufficient...
ReadRegStr $MYTEMP HKLM \
- "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
"NoRepair"
StrCmp $MYTEMP "" 0 done
@@ -238,16 +253,22 @@ done_startmenu:
; do the things below...
WriteRegStr HKCU \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
- "DisplayName" "Erlang OTP ${OTP_RELEASE_VERSION} (${ERTS_VERSION})"
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
+ "DisplayName" "Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})"
+ WriteRegStr HKCU \
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
+ "DisplayVersion" "${OTP_VERSION}"
+ WriteRegStr HKCU \
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
+ "Publisher" "Ericsson AB"
WriteRegStr HKCU \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
"UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegDWORD HKCU \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
"NoModify" 1
WriteRegDWORD HKCU \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
+ "Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP" \
"NoRepair" 1
done:
@@ -464,9 +485,9 @@ noshortcuts:
DeleteRegKey /ifempty HKLM "SOFTWARE\Ericsson\Erlang\${ERTS_VERSION}"
DeleteRegKey /ifempty HKCU "SOFTWARE\Ericsson\Erlang\${ERTS_VERSION}"
DeleteRegKey HKLM \
- "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})"
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP"
DeleteRegKey HKCU \
- "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})"
+ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP"
; Now remove shell/file associations we'we made...
diff --git a/erts/etc/win32/nsis/find_redist.sh b/erts/etc/win32/nsis/find_redist.sh
index f3fa476fec..f551bc7527 100755
--- a/erts/etc/win32/nsis/find_redist.sh
+++ b/erts/etc/win32/nsis/find_redist.sh
@@ -153,7 +153,7 @@ fi
# Frantic search through two roots with different
# version directories. We want to be very specific about the
-# directory structures as we wouldnt want to find the wrong
+# directory structures as we wouldn't want to find the wrong
# redistributables...
#echo $BPATH_LIST
diff --git a/erts/etc/win32/nsis/vsn_number.escript b/erts/etc/win32/nsis/vsn_number.escript
new file mode 100644
index 0000000000..7854860042
--- /dev/null
+++ b/erts/etc/win32/nsis/vsn_number.escript
@@ -0,0 +1,16 @@
+
+
+main([OtpVsn, WinPathFile]) ->
+ try
+ {ok, Bin} = file:read_file(WinPathFile),
+ <<"OTP-", _/binary>> = Bin,
+ case [list_to_integer(Str) || Str <- string:lexemes(OtpVsn, ".")] of
+ [_,_,_,_|_] -> io:format("~s~n", [OtpVsn]);
+ [_,_,_] -> io:format("~s.0~n",[OtpVsn]);
+ [_,_] -> io:format("~s.0.0~n",[OtpVsn]);
+ [_] -> io:format("~s.0.0.0~n",[OtpVsn])
+ end
+ catch _:_R:_ST -> %% release candidate or development branch set fake version as 0.0.0.0
+ %% io:format("Err: ~p ~p~n ~p~n",[_R,_ST, WinPathFile]),
+ io:format("0.0.0.0~n")
+ end.
diff --git a/erts/etc/win32/port_entry.c b/erts/etc/win32/port_entry.c
index 8b1d3a44b8..50d8f31ba2 100644
--- a/erts/etc/win32/port_entry.c
+++ b/erts/etc/win32/port_entry.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2016. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2021. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
** erlang process is run as a service.
** Note that this entry point is only for
** Console programs, Windowing programs can just route the WM_QUERYENDSESSION
-** and WM_ENDSESSION to the default window procedure to aquire the same
+** and WM_ENDSESSION to the default window procedure to acquire the same
** functionality.
**
** Creator Patrik Nyblom
diff --git a/erts/etc/win32/start_erl.c b/erts/etc/win32/start_erl.c
index 07bcd19b81..b555dc8c1e 100644
--- a/erts/etc/win32/start_erl.c
+++ b/erts/etc/win32/start_erl.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2016. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2021. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -260,7 +260,7 @@ void parse_commandline(void)
fprintf(stderr, "NoConfig=TRUE\n");
#endif
} else {
- fprintf(stderr, "Unkown option: '%S'\n", cmdline);
+ fprintf(stderr, "Unknown option: '%S'\n", cmdline);
exit_help("Unknown command line option");
}
break;
diff --git a/erts/etc/win32/version.h.src b/erts/etc/win32/version.h.src
index 266ebda47d..45c1e9944e 100644
--- a/erts/etc/win32/version.h.src
+++ b/erts/etc/win32/version.h.src
@@ -5,3 +5,5 @@
#define OTP_VERSION_INTS %OTP_VERSION_INTS%
#define OTP_VERSION_STR "%OTP_VERSION%\0"
+
+#define OTP_LEGAL_STR "Copyright Ericsson AB 2010-%YEAR%. All Rights Reserved.\0"
diff --git a/erts/etc/win32/wsl_tools/vc/cc.sh b/erts/etc/win32/wsl_tools/vc/cc.sh
index bc51e7b9b5..5203ff5f17 100755
--- a/erts/etc/win32/wsl_tools/vc/cc.sh
+++ b/erts/etc/win32/wsl_tools/vc/cc.sh
@@ -2,7 +2,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2002-2021. All Rights Reserved.
+# Copyright Ericsson AB 2002-2022. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -39,8 +39,10 @@ ERR_FILE=/tmp/cl.exe.$$.2
MD_FORCED=false
# If we're preprocession (only) i.e. -E
PREPROCESSING=false
-# If we're generating dependencies (implies preprocesing)
+# If we're generating dependencies (implies preprocessing)
DEPENDENCIES=false
+# If we're generating fast dependencies
+FAST_DEPENDENCIES=false
# If this is supposed to be a debug build
DEBUG_BUILD=false
# If this is supposed to be an optimized build (there can only be one...)
@@ -91,6 +93,9 @@ while test -n "$1" ; do
LINKING=false;;
#CMD="$CMD -c";;
-MM)
+ LINKING=false;
+ FAST_DEPENDENCIES=true;;
+ -MS)
PREPROCESSING=true;
LINKING=false;
DEPENDENCIES=true;;
@@ -225,7 +230,7 @@ mkdir $TMPOBJDIR
WINTMPDIR=`w32_path.sh -w $TMPOBJDIR`
-# Sometimes the file server doesn't keep up (paralell file creation)
+# Sometimes the file server doesn't keep up (parallel file creation)
while true ; do
DIR_EXISTS=$(cd /mnt/c; cmd.exe /C "IF EXIST $WINTMPDIR (echo yes) ELSE (echo no)")
case $DIR_EXISTS in # Contains trash in the end of string
@@ -241,75 +246,139 @@ while true ; do
esac
done
-# Compile
-for x in $SOURCES; do
- # Compile each source
- if [ $LINKING = false ]; then
- # We should have an output defined, which is a directory
- # or an object file
- case $OUTFILE in
- /*.o)
- # Simple output, SOURCES should be one single
- n=`echo $SOURCES | wc -w`;
- if [ $n -gt 1 ]; then
- echo "cc.sh:Error, multiple sources, one object output.";
- exit 1;
- else
- output_filename=`echo $OUTFILE`;
- fi;;
- *.o)
- # Relative path needs no translation
- n=`echo $SOURCES | wc -w`
- if [ $n -gt 1 ]; then
- echo "cc.sh:Error, multiple sources, one object output."
- exit 1
- else
- output_filename=$OUTFILE
- fi;;
- /*)
- # Absolute directory
- o=`echo $x | sed 's,.*/,,' | sed 's,\.c$,.o,'`
- output_filename=`echo $OUTFILE`
- output_filename="$output_filename/${o}";;
- *)
- # Relative_directory or empty string (.//x.o is valid)
- o=`echo $x | sed 's,.*/,,' | sed 's,\.cp*$,.o,'`
- output_filename="./${OUTFILE}/${o}";;
- esac
- else
- # We are linking, which means we build objects in a temporary
- # directory and link from there. We should retain the basename
- # of each source to make examining the exe easier...
- o=`echo $x | sed 's,.*/,,' | sed 's,\.c$,.o,'`
- output_filename=$TMPOBJDIR/$o
- ACCUM_OBJECTS="$ACCUM_OBJECTS $output_filename"
- fi
- # Now we know enough, lets try a compilation...
- if [ $USEABSPATH = true ]; then
- MPATH=`w32_path.sh -a -d $x`
- else
- MPATH=`w32_path.sh -d $x`
- fi
- if [ $PREPROCESSING = true ]; then
- output_flag="-E"
- else
- output_flag="/FS -c -Fo`w32_path.sh -a -d ${output_filename}`"
- fi
+## This is a faster dependency calculation method that
+## only invokes cl.exe once for all files.
+if [ $FAST_DEPENDENCIES = true ]; then
+ MPATH=
+ for x in $SOURCES; do
+ if [ $USEABSPATH = true ]; then
+ MPATH="$MPATH $(w32_path.sh -a -d $x)"
+ else
+ MPATH="$MPATH $(w32_path.sh -d $x)"
+ fi
+ done
params="$COMMON_CFLAGS $MD $DEBUG_FLAGS $OPTIMIZE_FLAGS \
- $CMD ${output_flag} $MPATH"
+ $CMD /showIncludes '-Fo`w32_path.sh -a -d ${TMPOBJDIR}`\\' $MPATH"
if [ "X$CC_SH_DEBUG_LOG" != "X" ]; then
echo cc.sh "$SAVE" >>$CC_SH_DEBUG_LOG
echo cl.exe $params >>$CC_SH_DEBUG_LOG
fi
- eval cl.exe $params >$MSG_FILE 2>$ERR_FILE
+ eval cl.exe $params > $MSG_FILE 2> $ERR_FILE
RES=$?
- if test $PREPROCESSING = false; then
- cat $ERR_FILE >&2
- tail -n +2 $MSG_FILE
- else
- tail -n +2 $ERR_FILE >&2
- if test $DEPENDENCIES = true; then
- perl -e '
+ tail -n +2 $ERR_FILE | grep -v LNK1561 >&2
+ if grep "LNK1561" $ERR_FILE; then
+ rm -f $ERR_FILE $MSG_FILE
+ rm -rf $TMPOBJDIR
+ exit $RES
+ fi
+ perl -e '
+my $deps = "";
+my @sources = split(" ",$ARGV[1]);
+
+open(FH, "<", $ARGV[0]) or die $!;
+
+sub flushDeps() {
+ if ($deps ne "") {
+ ## To start a new shell can be very slow so we run all
+ ## the wslpath translations in a single run
+ my @paths = split("\n",`for x in $deps; do wslpath -u "\$x"; done`);
+ foreach (@paths) {
+ print "\\\n $_";
+ }
+ print "\n\n";
+ }
+}
+
+while (<FH>) {
+ $_ =~ tr/\r\n/\n/d;
+ if (/^(.*)\.(c|cpp)$/) {
+ my $target = "$1";
+ flushDeps();
+ $deps = shift(@sources) . " ";
+ print $target.".o:";
+ }
+ if (/^Note: including file:\s*(.*)$/) {
+ ## Ignore any deps that comes from "Program Files"
+ next if /Program Files/;
+ my $file = $1;
+ $file =~ s/\\/\//g;
+ $deps .= "'"'"'$file'"'"' ";
+ }
+}
+flushDeps();
+' $MSG_FILE "$MPATH"
+
+ rm -f $ERR_FILE $MSG_FILE
+else
+ # Compile
+ for x in $SOURCES; do
+ # Compile each source
+ if [ $LINKING = false ]; then
+ # We should have an output defined, which is a directory
+ # or an object file
+ case $OUTFILE in
+ /*.o)
+ # Simple output, SOURCES should be one single
+ n=`echo $SOURCES | wc -w`;
+ if [ $n -gt 1 ]; then
+ echo "cc.sh:Error, multiple sources, one object output.";
+ exit 1;
+ else
+ output_filename=`echo $OUTFILE`;
+ fi;;
+ *.o)
+ # Relative path needs no translation
+ n=`echo $SOURCES | wc -w`
+ if [ $n -gt 1 ]; then
+ echo "cc.sh:Error, multiple sources, one object output."
+ exit 1
+ else
+ output_filename=$OUTFILE
+ fi;;
+ /*)
+ # Absolute directory
+ o=`echo $x | sed 's,.*/,,' | sed 's,\.c$,.o,'`
+ output_filename=`echo $OUTFILE`
+ output_filename="$output_filename/${o}";;
+ *)
+ # Relative_directory or empty string (.//x.o is valid)
+ o=`echo $x | sed 's,.*/,,' | sed 's,\.cp*$,.o,'`
+ output_filename="./${OUTFILE}/${o}";;
+ esac
+ else
+ # We are linking, which means we build objects in a temporary
+ # directory and link from there. We should retain the basename
+ # of each source to make examining the exe easier...
+ o=`echo $x | sed 's,.*/,,' | sed 's,\.c$,.o,'`
+ output_filename=$TMPOBJDIR/$o
+ ACCUM_OBJECTS="$ACCUM_OBJECTS $output_filename"
+ fi
+ # Now we know enough, lets try a compilation...
+ if [ $USEABSPATH = true ]; then
+ MPATH=`w32_path.sh -a -d $x`
+ else
+ MPATH=`w32_path.sh -d $x`
+ fi
+ if [ $PREPROCESSING = true ]; then
+ output_flag="-E"
+ else
+ output_flag="/FS -c -Fo`w32_path.sh -a -d ${output_filename}`"
+ fi
+ params="$COMMON_CFLAGS $MD $DEBUG_FLAGS $OPTIMIZE_FLAGS \
+ $CMD ${output_flag} $MPATH"
+ if [ "X$CC_SH_DEBUG_LOG" != "X" ]; then
+ echo cc.sh "$SAVE" >>$CC_SH_DEBUG_LOG
+ echo cl.exe $params >>$CC_SH_DEBUG_LOG
+ fi
+ eval cl.exe $params >$MSG_FILE 2>$ERR_FILE
+ RES=$?
+ if test $PREPROCESSING = false; then
+ cat $ERR_FILE >&2
+ tail -n +2 $MSG_FILE
+ else
+ tail -n +2 $ERR_FILE >&2
+ if test $DEPENDENCIES = true; then
+ perl -e '
my $file = "'$x'";
while (<>) {
next unless /^#line/;
@@ -331,18 +400,18 @@ if (@f) {
print "\n\n";
print STDERR "Made dependencies for $file\n";
}' $MSG_FILE
- else
- cat $MSG_FILE
- fi
- fi
- rm -f $ERR_FILE $MSG_FILE
- if [ $RES != 0 ]; then
- echo Failed: cl.exe $params
- rm -rf $TMPOBJDIR
- exit $RES
- fi
-done
-
+ else
+ cat $MSG_FILE
+ fi
+ fi
+ rm -f $ERR_FILE $MSG_FILE
+ if [ $RES != 0 ]; then
+ echo Failed: cl.exe $params
+ rm -rf $TMPOBJDIR
+ exit $RES
+ fi
+ done
+fi
# If we got here, we succeeded in compiling (if there were anything to compile)
# The output filename should name an executable if we're linking
if [ $LINKING = true ]; then
@@ -360,7 +429,7 @@ if [ $LINKING = true ]; then
*)
out_spec="-o $OUTFILE";;
esac
- # Descide which standard library to link against
+ # Decide which standard library to link against
case $MD in
-ML)
stdlib="-lLIBC";;
diff --git a/erts/etc/win32/wsl_tools/vc/coffix.c b/erts/etc/win32/wsl_tools/vc/coffix.c
index 25b04e12da..5d7c255045 100755
--- a/erts/etc/win32/wsl_tools/vc/coffix.c
+++ b/erts/etc/win32/wsl_tools/vc/coffix.c
@@ -43,7 +43,7 @@ static int v_printf(char *format, ...);
char *progname;
-int verbouse = 0;
+int verbose = 0;
int main(int argc, char **argv)
{
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
break;
case 'v':
case 'V':
- verbouse = 1;
+ verbose = 1;
default:
fprintf(stderr, "%s: unknown option %s\n", progname, argv[findex]);
break;
@@ -152,7 +152,7 @@ static int v_printf(char *format, ...)
{
va_list ap;
int ret = 0;
- if (verbouse) {
+ if (verbose) {
va_start(ap, format);
ret = vfprintf(stdout, format, ap);
va_end(ap);