Skip to content

Commit

Permalink
manifest for admin rights
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmo16 committed Mar 15, 2020
1 parent 4c6c3b8 commit 9b23709
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
17 changes: 17 additions & 0 deletions src/Resources/TimesheetAssistant.exe.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="2.0.0.0" processorArchitecture="X86"
name="TimesheetAssistant.exe" type="win32" />
<description>Timesheet calculator</description>
<dependency />
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
2 changes: 2 additions & 0 deletions src/Resources/TimesheetAssistant.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
// remains consistent on all systems.
IDI_ICON1 ICON "TimesheetAssistant.ico"

#include <windows.h>
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "TimesheetAssistant.exe.manifest"
16 changes: 11 additions & 5 deletions src/TimesheetAssistant.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<CustomBuildBeforeTargets>Qt</CustomBuildBeforeTargets>
<CustomBuildBeforeTargets>
</CustomBuildBeforeTargets>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
<EmbedManifest>false</EmbedManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<CustomBuildBeforeTargets>Qt</CustomBuildBeforeTargets>
Expand Down Expand Up @@ -102,10 +104,14 @@
<AdditionalLibraryDirectories>$(Qt_LIBPATH_);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<CustomBuildStep>
<Command>"$(QTDIR)\bin\rcc.exe" -binary ".\Resources\TimesheetAssistant.qrc" -o ".\GeneratedFiles\TimesheetAssistant.rcc"</Command>
<Outputs>.\GeneratedFiles\TimesheetAssistant.rcc</Outputs>
<Inputs>.\Resources\TimesheetAssistant.qrc</Inputs>
<Message>Building RCC file</Message>
<Command>
</Command>
<Outputs>
</Outputs>
<Inputs>
</Inputs>
<Message>
</Message>
</CustomBuildStep>
<PostBuildEvent>
<Command>
Expand Down

0 comments on commit 9b23709

Please sign in to comment.