mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Try building a Windows manifest.
This commit is contained in:
1
Makefile
1
Makefile
@@ -14,6 +14,7 @@ ifeq ($(OS), Windows_NT)
|
||||
PKG_CONFIG = $(MINGWBIN)/pkg-config
|
||||
WX_CONFIG = /usr/bin/sh $(MINGWBIN)/wx-config --static=yes
|
||||
PROTOC = $(MINGWBIN)/protoc
|
||||
WINDRES = windres
|
||||
LDFLAGS += \
|
||||
-static
|
||||
CXXFLAGS += \
|
||||
|
||||
@@ -32,3 +32,13 @@ normalrule(
|
||||
commands=["iconutil -c icns -o {outs[0]} {ins[0]}"],
|
||||
label="ICONUTIL",
|
||||
)
|
||||
|
||||
normalrule(
|
||||
name="fluxengine_ico",
|
||||
ins=["./icon.png"],
|
||||
outs=["fluxengine.ico"],
|
||||
commands=[
|
||||
"convert {ins[0]} -resize 64x46 -define icon:auto-resize=64,48,32,16 {outs[0]}"
|
||||
],
|
||||
label="MAKEICON",
|
||||
)
|
||||
|
||||
@@ -14,6 +14,19 @@ WX_LDFLAGS := $(shell $(WX_CONFIG) --libs core base adv aui richtext)
|
||||
"""
|
||||
)
|
||||
|
||||
extrasrcs = []
|
||||
if config.windows:
|
||||
extrasrcs += [
|
||||
normalrule(
|
||||
name="rc",
|
||||
ins=["./windres.rc"],
|
||||
outs=["rc.o"],
|
||||
deps=["./manifest.xml", "extras+fluxengine_ico"],
|
||||
commands=["$(WINDRES) {ins[0]} {outs[0]}"],
|
||||
label="WINDRES",
|
||||
)
|
||||
]
|
||||
|
||||
cxxprogram(
|
||||
name="gui",
|
||||
srcs=[
|
||||
@@ -35,7 +48,8 @@ cxxprogram(
|
||||
"./textviewerwindow.cc",
|
||||
"./visualisationcontrol.cc",
|
||||
"./layout.cpp",
|
||||
],
|
||||
]
|
||||
+ extrasrcs,
|
||||
cflags=["$(WX_CFLAGS)"],
|
||||
ldflags=["$(WX_LDFLAGS)"],
|
||||
deps=[
|
||||
|
||||
13
src/gui/manifest.xml
Normal file
13
src/gui/manifest.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<description>FluxEngine</description>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel
|
||||
level="asInvoker"
|
||||
uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
9
src/gui/windres.rc
Normal file
9
src/gui/windres.rc
Normal file
@@ -0,0 +1,9 @@
|
||||
/* © 2023 David Given.
|
||||
* FluxEngine is licensed under the MIT open source license. See the COPYING
|
||||
* file in this distribution for the full text.
|
||||
*/
|
||||
|
||||
#include "winuser.h"
|
||||
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "src/gui/manifest.xml"
|
||||
101 ICON DISCARDABLE ".obj/extras+fluxengine_ico/fluxengine.ico"
|
||||
Reference in New Issue
Block a user