summaryrefslogtreecommitdiff
path: root/erts/etc/win32/wsl_tools/vc/ld.sh
diff options
context:
space:
mode:
authorDan Gudmundsson <dgud@erlang.org>2020-12-03 09:35:40 +0100
committerDan Gudmundsson <dgud@erlang.org>2020-12-03 09:35:40 +0100
commit82729b957ecae151fcac7a35765a9a864cc06a77 (patch)
tree58fdaa73d0e7d7807521c7c1a8b39b4a4b658f3a /erts/etc/win32/wsl_tools/vc/ld.sh
parentb2d38edca6c9e27c9f4eef822cd82b608f6cc345 (diff)
downloaderlang-82729b957ecae151fcac7a35765a9a864cc06a77.tar.gz
Add a default manifest for windows
Previously only erl werl and beam added the manifest. Add it to all exe and dll's. Specificly ./Install.exe that runs after the nsis installer, needs it if somebody wants to run it manually. The test runs don't want to elevate to admin for example.
Diffstat (limited to 'erts/etc/win32/wsl_tools/vc/ld.sh')
-rwxr-xr-xerts/etc/win32/wsl_tools/vc/ld.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/erts/etc/win32/wsl_tools/vc/ld.sh b/erts/etc/win32/wsl_tools/vc/ld.sh
index fc115bec8c..a16c502cea 100755
--- a/erts/etc/win32/wsl_tools/vc/ld.sh
+++ b/erts/etc/win32/wsl_tools/vc/ld.sh
@@ -177,11 +177,16 @@ RES=$?
CMANIFEST=`w32_path.sh -u $MANIFEST`
-if [ "$RES" = "0" -a -f "$CMANIFEST" ]; then
- # Add stuff to manifest to turn off "virtualization"
+if [ -f "$CMANIFEST" ]; then
+ ## Add stuff to manifest to turn off "virtualization"
sed -n -i '1h;1!H;${;g;s,<trustInfo.*</trustInfo>.,,g;p;}' $CMANIFEST 2>/dev/null
sed -i "s/<\/assembly>/ <ms_asmv2:trustInfo xmlns:ms_asmv2=\"urn:schemas-microsoft-com:asm.v2\">\n <ms_asmv2:security>\n <ms_asmv2:requestedPrivileges>\n <ms_asmv2:requestedExecutionLevel level=\"AsInvoker\" uiAccess=\"false\"\/>\n <\/ms_asmv2:requestedPrivileges>\n <\/ms_asmv2:security>\n <\/ms_asmv2:trustInfo>\n<\/assembly>/" $CMANIFEST 2>/dev/null
+else
+ CMANIFEST=$ERL_TOP/erts/etc/win32/manifest.xml
+ MANIFEST=`w32_path.sh -d $CMANIFEST`
+fi
+if [ "$RES" = "0" ]; then
eval mt.exe -nologo -manifest "$MANIFEST" -outputresource:"$OUTPUTRES" >>/tmp/link.exe.${p}.1 2>>/tmp/link.exe.${p}.2
RES=$?
if [ "$RES" != "0" ]; then
@@ -192,7 +197,6 @@ if [ "$RES" = "0" -a -f "$CMANIFEST" ]; then
echo "If you get this error, make sure Windows Defender AND Windows Search is disabled">>/tmp/link.exe.${p}.1
rm -f "$CREMOVE"
fi
- rm -f "$CMANIFEST"
fi
# This works around some strange behaviour