Skip to content

Commit

Permalink
PORT: Windows: Do not include manifest when building with MSVC, since it
Browse files Browse the repository at this point in the history
causes a duplicate resource error.  Also uses a textual manifest for the
MinGW compilation rather than a binary blob.
  • Loading branch information
Röbke Geenen authored and JanWielemaker committed Feb 18, 2020
1 parent 41f4156 commit a3649d3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -146,6 +146,7 @@ doc-version
.doc-action
pl-doc-*.tar.gz
*.manifest
!src/swipl.manifest
config.dat
call_vcvars.cmd
src/reqs64.cab
Expand Down
10 changes: 10 additions & 0 deletions src/swipl.manifest
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
35 changes: 6 additions & 29 deletions src/swipl.rc
Expand Up @@ -2,32 +2,9 @@

SWI_Icon ICON swipl.ico

/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST to prevent Windows Vista from asking to execute
//

1 RT_MANIFEST
BEGIN
0x613c, 0x7373, 0x6d65, 0x6c62, 0x2079, 0x6d78, 0x6e6c, 0x3d73, 0x7522,
0x6e72, 0x733a, 0x6863, 0x6d65, 0x7361, 0x6d2d, 0x6369, 0x6f72, 0x6f73,
0x7466, 0x632d, 0x6d6f, 0x613a, 0x6d73, 0x762e, 0x2231, 0x6d20, 0x6e61,
0x6669, 0x7365, 0x5674, 0x7265, 0x6973, 0x6e6f, 0x223d, 0x2e31, 0x2230,
0x0d3e, 0x200a, 0x3c20, 0x7274, 0x7375, 0x4974, 0x666e, 0x206f, 0x6d78,
0x6e6c, 0x3d73, 0x7522, 0x6e72, 0x733a, 0x6863, 0x6d65, 0x7361, 0x6d2d,
0x6369, 0x6f72, 0x6f73, 0x7466, 0x632d, 0x6d6f, 0x613a, 0x6d73, 0x762e,
0x2233, 0x0d3e, 0x200a, 0x2020, 0x3c20, 0x6573, 0x7563, 0x6972, 0x7974,
0x0d3e, 0x200a, 0x2020, 0x2020, 0x3c20, 0x6572, 0x7571, 0x7365, 0x6574,
0x5064, 0x6972, 0x6976, 0x656c, 0x6567, 0x3e73, 0x0a0d, 0x2020, 0x2020,
0x2020, 0x2020, 0x723c, 0x7165, 0x6575, 0x7473, 0x6465, 0x7845, 0x6365,
0x7475, 0x6f69, 0x4c6e, 0x7665, 0x6c65, 0x6c20, 0x7665, 0x6c65, 0x223d,
0x7361, 0x6e49, 0x6f76, 0x656b, 0x2272, 0x7520, 0x4169, 0x6363, 0x7365,
0x3d73, 0x6622, 0x6c61, 0x6573, 0x3e22, 0x2f3c, 0x6572, 0x7571, 0x7365,
0x6574, 0x4564, 0x6578, 0x7563, 0x6974, 0x6e6f, 0x654c, 0x6576, 0x3e6c,
0x0a0d, 0x2020, 0x2020, 0x2020, 0x2f3c, 0x6572, 0x7571, 0x7365, 0x6574,
0x5064, 0x6972, 0x6976, 0x656c, 0x6567, 0x3e73, 0x0a0d, 0x2020, 0x2020,
0x2f3c, 0x6573, 0x7563, 0x6972, 0x7974, 0x0d3e, 0x200a, 0x3c20, 0x742f,
0x7572, 0x7473, 0x6e49, 0x6f66, 0x0d3e, 0x3c0a, 0x612f, 0x7373, 0x6d65,
0x6c62, 0x3e79
END

// RT_MANIFEST to prevent Windows Vista and up from asking to execute (UAC).
// Only include the manifest when building under MinGW, since MSVC generates its
// own manifest. Including a manifest here leads to a duplicate resource error.
#ifdef __MINGW32__
1 RT_MANIFEST "swipl.manifest"
#endif // __MINGW32__

0 comments on commit a3649d3

Please sign in to comment.