Skip to content

Commit 37821b8

Browse files
m_igashim_igashi
authored andcommitted
feat: add GUI application (mp3rgui)
- egui-based cross-platform GUI - Track and album ReplayGain analysis - Apply track/album gain - File management (add, remove, drag & drop) - Clipping detection with visual warnings - Target volume adjustment - Progress indicators - CI/CD for macOS, Linux, Windows builds
1 parent 905db6e commit 37821b8

File tree

18 files changed

+853
-3
lines changed

18 files changed

+853
-3
lines changed

.github/workflows/release.yml

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ permissions:
99
contents: write
1010

1111
jobs:
12-
build:
13-
name: Build for ${{ matrix.target }}
12+
build-cli:
13+
name: Build CLI for ${{ matrix.target }}
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
@@ -53,9 +53,57 @@ jobs:
5353
name: mp3rgain-${{ matrix.target }}
5454
path: target/${{ matrix.target }}/release/mp3rgain.exe
5555

56+
build-gui:
57+
name: Build GUI for ${{ matrix.target }}
58+
runs-on: ${{ matrix.os }}
59+
strategy:
60+
matrix:
61+
include:
62+
- target: x86_64-apple-darwin
63+
os: macos-latest
64+
- target: aarch64-apple-darwin
65+
os: macos-latest
66+
- target: x86_64-unknown-linux-gnu
67+
os: ubuntu-latest
68+
- target: x86_64-pc-windows-msvc
69+
os: windows-latest
70+
71+
steps:
72+
- uses: actions/checkout@v4
73+
74+
- name: Install Rust
75+
uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
76+
with:
77+
targets: ${{ matrix.target }}
78+
79+
- name: Install Linux dependencies
80+
if: runner.os == 'Linux'
81+
run: |
82+
sudo apt-get update
83+
sudo apt-get install -y libxkbcommon-dev libwayland-dev
84+
85+
- name: Build GUI
86+
run: cargo build --release --manifest-path mp3rgui/Cargo.toml --target ${{ matrix.target }}
87+
env:
88+
RUSTFLAGS: ${{ contains(matrix.target, 'windows') && '-C target-feature=+crt-static' || '' }}
89+
90+
- name: Upload artifact (Unix)
91+
if: runner.os != 'Windows'
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: mp3rgui-${{ matrix.target }}
95+
path: target/${{ matrix.target }}/release/mp3rgui
96+
97+
- name: Upload artifact (Windows)
98+
if: runner.os == 'Windows'
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: mp3rgui-${{ matrix.target }}
102+
path: target/${{ matrix.target }}/release/mp3rgui.exe
103+
56104
release:
57105
name: Create Release
58-
needs: build
106+
needs: [build-cli, build-gui]
59107
runs-on: macos-latest
60108
outputs:
61109
version: ${{ steps.version.outputs.version }}
@@ -111,6 +159,27 @@ jobs:
111159
cd ../../dist
112160
shasum -a 256 mp3rgain-${{ github.ref_name }}-windows-arm64.zip > mp3rgain-${{ github.ref_name }}-windows-arm64.zip.sha256
113161
162+
- name: Create GUI universal macOS binary
163+
run: |
164+
lipo -create \
165+
artifacts/mp3rgui-x86_64-apple-darwin/mp3rgui \
166+
artifacts/mp3rgui-aarch64-apple-darwin/mp3rgui \
167+
-output dist/mp3rgui
168+
chmod +x dist/mp3rgui
169+
tar -czvf dist/mp3rgui-${{ github.ref_name }}-macos-universal.tar.gz -C dist mp3rgui
170+
rm dist/mp3rgui
171+
172+
- name: Create GUI Linux tarball
173+
run: |
174+
cd artifacts/mp3rgui-x86_64-unknown-linux-gnu
175+
chmod +x mp3rgui
176+
tar -czvf ../../dist/mp3rgui-${{ github.ref_name }}-linux-x86_64.tar.gz mp3rgui
177+
178+
- name: Create GUI Windows zip
179+
run: |
180+
cd artifacts/mp3rgui-x86_64-pc-windows-msvc
181+
zip ../../dist/mp3rgui-${{ github.ref_name }}-windows-x86_64.zip mp3rgui.exe
182+
114183
- name: Extract checksums
115184
id: checksums
116185
run: |
@@ -130,6 +199,9 @@ jobs:
130199
dist/mp3rgain-${{ github.ref_name }}-windows-x86_64.zip.sha256
131200
dist/mp3rgain-${{ github.ref_name }}-windows-arm64.zip
132201
dist/mp3rgain-${{ github.ref_name }}-windows-arm64.zip.sha256
202+
dist/mp3rgui-${{ github.ref_name }}-macos-universal.tar.gz
203+
dist/mp3rgui-${{ github.ref_name }}-linux-x86_64.tar.gz
204+
dist/mp3rgui-${{ github.ref_name }}-windows-x86_64.zip
133205
draft: true
134206
generate_release_notes: false
135207

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ Cargo.lock
44
.DS_Store
55
docs/OUTREACH.md
66
.claude/
7+
mp3rgui/target/

mp3rgui/Cargo.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[package]
2+
name = "mp3rgui"
3+
version = "0.1.0"
4+
edition = "2021"
5+
authors = ["Masanari Higashi <M-Igashi@users.noreply.github.com>"]
6+
description = "GUI application for mp3rgain - lossless MP3 volume adjustment"
7+
license = "MIT"
8+
repository = "https://github.com/M-Igashi/mp3rgain"
9+
10+
[dependencies]
11+
eframe = "0.31"
12+
egui = "0.31"
13+
egui_extras = { version = "0.31", features = ["all_loaders"] }
14+
rfd = "0.15"
15+
image = { version = "0.25", default-features = false, features = ["png"] }
16+
mp3rgain = { path = ".." }
17+
18+
[target.'cfg(windows)'.build-dependencies]
19+
winresource = "0.1"
20+
21+
[profile.release]
22+
lto = true
23+
codegen-units = 1
24+
strip = true

mp3rgui/build.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
fn main() {
2+
#[cfg(windows)]
3+
{
4+
let mut res = winresource::WindowsResource::new();
5+
res.set_icon("icons/icon.ico");
6+
res.compile().unwrap();
7+
}
8+
}

mp3rgui/icons/icon.png

10.1 KB
Loading

mp3rgui/icons/icon_128x128.png

3.97 KB
Loading

mp3rgui/icons/icon_16x16.png

220 Bytes
Loading

mp3rgui/icons/icon_256x256.png

10.1 KB
Loading

mp3rgui/icons/icon_32x32.png

598 Bytes
Loading

mp3rgui/icons/icon_48x48.png

1.09 KB
Loading

0 commit comments

Comments
 (0)