Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions assets/icons/app/tcode.manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<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>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
<heapType xmlns="http://schemas.microsoft.com/SMI/2020/WindowsSettings">SegmentHeap</heapType>
</windowsSettings>
</application>
<dependency>
<dependentAssembly>
<assemblyIdentity
type='win32'
name='Microsoft.Windows.Common-Controls'
version='6.0.0.0'
processorArchitecture='*'
publicKeyToken='6595b64144ccf1df'
/>
</dependentAssembly>
</dependency>
</assembly>
1 change: 1 addition & 0 deletions assets/icons/app/tcode.rc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
1 ICON "tcode.ico"
1 24 "tcode.manifest.xml"
9 changes: 7 additions & 2 deletions crates/app/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fn main() {

println!("cargo:rerun-if-changed=../../assets/icons/app/tcode.rc");
println!("cargo:rerun-if-changed=../../assets/icons/app/tcode.ico");
println!("cargo:rerun-if-changed=../../assets/icons/app/tcode.manifest.xml");

if std::env::var_os("CARGO_CFG_WINDOWS").is_some() {
// GPUI requests, prepaints and paints the element tree recursively on
Expand All @@ -24,12 +25,16 @@ fn main() {
if std::env::var("CARGO_CFG_TARGET_ENV").as_deref() == Ok("msvc") {
println!("cargo:rustc-link-arg-bins=/STACK:{}", 8 * 1024 * 1024);
}
// gpui-base and gpui-kit turn on gpui-fast's
// `windows-manifest-provided-by-host`, so the manifest GPUI needs
// (Common-Controls v6 for TaskDialogIndirect, per-monitor DPI) is ours
// to embed; without it the loader refuses to start tcode.exe.
embed_resource::compile_for(
"../../assets/icons/app/tcode.rc",
["tcode"],
embed_resource::NONE,
)
.manifest_optional()
.expect("failed to embed the Tcode application icon");
.manifest_required()
.expect("failed to embed the Tcode application icon and manifest");
}
}
Loading