Support mingw make for edge prompt UAC

This commit is contained in:
Tony 2023-04-19 12:29:04 +08:00 committed by Hamish Coleman
parent 7cfc30fb15
commit 3a4c18258c
3 changed files with 21 additions and 0 deletions

View File

@ -201,6 +201,9 @@ tools: $(N2N_LIB)
win32:
$(MAKE) -C $@
win32/edge_rc.o: win32/edge.rc win32/edge.manifest
windres win32/edge.rc -O coff -o win32/edge_rc.o
src/edge.o: $(N2N_DEPS)
src/supernode.o: $(N2N_DEPS)
src/example_edge_embed_quick_edge_init.o: $(N2N_DEPS)
@ -213,6 +216,10 @@ src/example_edge_embed_quick_edge_init: $(N2N_LIB)
src/example_sn_embed: $(N2N_LIB)
src/example_edge_embed: $(N2N_LIB)
ifeq ($(CONFIG_TARGET), mingw)
src/edge: win32/edge_rc.o
endif
%: src/%
cp $< $@

11
win32/edge.manifest Normal file
View File

@ -0,0 +1,11 @@
<?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" name="edge" type="win32"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

3
win32/edge.rc Normal file
View File

@ -0,0 +1,3 @@
// https://www.transmissionzero.co.uk/computing/win32-apps-with-mingw/
// ID_MANIFEST RT_MANIFEST "edge.manifest"
1 24 "edge.manifest"