Skip to content

Commit 5a4019d

Browse files
committed
setup release bundle
1 parent 1ae6354 commit 5a4019d

File tree

16 files changed

+63
-45
lines changed

16 files changed

+63
-45
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
toolchain: stable
2626
override: true
2727
components: rustfmt, clippy
28-
target: x86_64-apple-darwin
28+
target: aarch64-apple-darwin
2929

3030
- name: Clippy
3131
uses: actions-rs/clippy-check@v1

.github/workflows/release.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/target
2+
*.app
3+
*.dmg

Cargo.toml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
11
[package]
22
name = "mic-mute"
3+
description = "System-wide mic mute for macOS"
34
version = "0.1.0"
45
edition = "2021"
56

6-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7-
87
[dependencies]
98
log = "0.4"
109
env_logger = "0.10"
11-
anyhow = "1.0.69" # error handling
12-
tao = "0.18" # window manager and event loop
13-
tray-icon = "0.4" # system tray
14-
image = "0.24" # icon image manipulation
10+
anyhow = "1.0.69"
11+
tao = "0.18"
12+
tray-icon = "0.4"
13+
image = "0.24"
1514
global-hotkey = "0.1"
1615
async-std = "1.12"
1716
libc = "0.2"
1817

1918
[target.'cfg(target_os = "macos")'.dependencies]
2019
cocoa = "0.24"
2120
objc = "0.2"
22-
dark-light = "1.0" # detect appearance mode
23-
coreaudio-rs = "0.11" # macos audio
21+
dark-light = "1.0"
22+
coreaudio-rs = "0.11"
2423
core-foundation-sys = "0.8"
24+
25+
[package.metadata.bundle]
26+
name = "mic-mute"
27+
identifier = "com.brettinternet.micmute"
28+
icon = ["assets/32x32.png", "assets/128x128.png"]
29+
version = "0.1.0"
30+
copyright = "Copyright (c) Brett Gardiner 2023. All rights reserved."
31+
category = "Utility"
32+
short_description = "System-wide mic mute for macOS"
33+
long_description = """
34+
A system-wide mute for macOS microphones with a global shortcut and visual confirmation of mute status. Inspired by VCM for Windows.
35+
"""
36+
osx_frameworks = ["Cocoa", "CoreAudio", "AppKit", "Foundation"]
37+
osx_url_schemes = ["com.brettinternet.micmute"]

Taskfile.yaml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,28 @@ tasks:
1515
- task -l
1616

1717
init:
18-
desc: Install dependencies and setup environment
18+
desc: Install dependencies
1919
cmds:
2020
- task: dependencies
2121

2222
dependencies:
23-
desc: Setup project dependencies
23+
internal: true
24+
desc: Project dependencies
2425
cmds:
2526
- cargo install cargo-watch
27+
status:
28+
- test -f $HOME/.cargo/bin/cargo-watch
29+
30+
dependencies-release:
31+
internal: true
32+
desc: Release dependencies
33+
cmds:
34+
- cargo install cargo-bundle
35+
status:
36+
- test -f $HOME/.cargo/bin/cargo-bundle
2637

2738
start:
39+
desc: Compile, run and watch for changes
2840
aliases:
2941
- watch
3042
cmds:
@@ -55,7 +67,23 @@ tasks:
5567

5668
release:
5769
cmds:
58-
- cargo build --release
70+
- task: dependencies-release
71+
- task: release-arch
72+
vars:
73+
ARCH: aarch64-apple-darwin
74+
# - task: release-arch
75+
# vars:
76+
# ARCH: x86_64-apple-darwin
77+
env:
78+
RUST_LOG: warn
79+
80+
release-arch:
81+
internal: true
82+
cmds:
83+
- cargo build --locked --release --target {{ .ARCH }}
84+
- cargo bundle --release --target {{ .ARCH }}
85+
- open ./target/{{ .ARCH }}/release/bundle/osx
86+
- hdiutil create -volname MicMute -srcfolder ./target/{{ .ARCH }}/release/bundle/osx -ov -format UDZO mic-mute.dmg
5987

6088
clean:
6189
cmds:

assets/128x128.png

4 KB
Loading

assets/32x32.png

1.13 KB
Loading

assets/images/mic-light.png

434 Bytes
Loading

0 commit comments

Comments
 (0)