devc++项目文件如果是project.dev,那么应该有一个项目资源文件project_private.rc,打开之后编辑,使用devc++编辑完保存之后再编译:
#include <windows.h> // 包含一些windows常量信息 CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "ChromeSet.exe.manifest"//添加UAC权限的manifest.xml文件 A ICON "app.ico" //添加文件到图标文件 CH RCDATA "Chrome.DLL"//添加文件到资源文件 //修改项目的版本信息 1 VERSIONINFO FILEVERSION 107,0,5304,107 PRODUCTVERSION 107,0,5304,107 FILETYPE VFT_APP { BLOCK "StringFileInfo" { BLOCK "080404e4" { VALUE "CompanyName", "" VALUE "FileVersion", "107.0.5304.107" VALUE "FileDescription", "Google Chrome 浏览器安装程序" VALUE "InternalName", "" VALUE "LegalCopyright", "Copyright 2022 Google LLC. ALL rights reserved." VALUE "LegalTrademarks", "" VALUE "OriginalFilename", "ChromeSetup.exe" VALUE "ProductName", "谷歌浏览器下载安装软件" VALUE "ProductVersion", "107.0.5304.107" } } BLOCK "VarFileInfo" { VALUE "Translation", 0x0804, 1252 } }
UAC权限的manifest文件内容:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="VMware.VMware.setup" type="win32" /> <description>"VMware installation launcher"</description> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> </requestedPrivileges> </security> </trustInfo> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> </application> </compatibility> </assembly>
本篇文章链接 地址:https://wmzos.com/?id=42
添加新评论