Skip to content

Commit

Permalink
Merge pull request #57 from squidowl/icons-windows
Browse files Browse the repository at this point in the history
add windows icon
  • Loading branch information
casperstorm authored Jun 27, 2023
2 parents 10690b7 + 1230722 commit 6d88c0a
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ jobs:
os: macos-latest
make: bash scripts/build-macos.sh
binary_path: target/release/macos/halloy.dmg

- target: windows
os: windows-latest
make: bash scripts/build-windows.sh
binary_path: target/release/halloy.exe
runs-on: ${{ matrix.target.os }}

steps:
Expand Down Expand Up @@ -67,6 +70,10 @@ jobs:
artifact_name: halloy.dmg
asset_name: halloy.dmg
asset_type: application/octet-stream
- artifact: windows
artifact_name: halloy.exe
asset_name: halloy.exe
asset_type: application/x-dosexec

runs-on: ubuntu-latest
env:
Expand Down
59 changes: 59 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ tokio = { version = "1.0", features = ["rt", "fs", "process"] }
unicode-segmentation = "1.6"
open = "4.1.0"

[build-dependencies]
embed-resource = "2.1.1"

[dependencies.uuid]
version = "1.0"
features = ["v4"]
Expand Down
Binary file added assets/windows/halloy.ico
Binary file not shown.
8 changes: 8 additions & 0 deletions assets/windows/halloy.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<dpiAwareness>PerMonitorV2, unaware</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
7 changes: 7 additions & 0 deletions assets/windows/halloy.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#define IDI_ICON 0x101

IDI_ICON ICON "halloy.ico"

#define RT_MANIFEST 24

1 RT_MANIFEST "halloy.manifest"
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extern crate embed_resource;

fn main() {
#[cfg(windows)]
embed_resource::compile("assets/windows/halloy.rc", embed_resource::NONE);
}
5 changes: 5 additions & 0 deletions scripts/build-windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# build binary
rustup target add x86_64-pc-windows-msvc
cargo build --release --target=x86_64-pc-windows-msvc
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(clippy::large_enum_variant, clippy::too_many_arguments)]
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

mod buffer;
mod event;
Expand Down

0 comments on commit 6d88c0a

Please sign in to comment.