Skip to content

Commit b27df78

Browse files
authored
Add GUI (#5)
* Add GUI Project * Update Enums and Targets * Update Github Actions * Removed API * Add GUI * Update Validation * Update Routes * Update Validation * Update restore * Updated frameworks * Remove vunerability checker * Removed MacOS Build Validation * Update Build and Release * Update Workflow * Update XCode version * Update XCode Version * Update XCode * Downgraded .Net Version * Downgraded Target Version * Updated Launch.json * Update * Remove Clean * Update csproj * Update Route * Updated Damage Installer * Update
1 parent 125f2d5 commit b27df78

64 files changed

Lines changed: 1637 additions & 332 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 136 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,154 @@
1-
name: Build and Publish Artifacts
1+
name: Build Drum Midi Remapper (Windows/macOS/Linux)
22

33
on:
44
push:
5-
branches: [ main ]
65
tags:
7-
- 'v*'
8-
9-
permissions:
10-
contents: write
6+
- 'v*.*.*'
7+
pull_request:
8+
branches: [ main ]
119

1210
jobs:
13-
build:
11+
version:
12+
name: 🏷️ Generate Version
1413
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
runtime: [win-x64, osx-x64, osx-arm64, linux-x64]
18-
14+
outputs:
15+
version: ${{ steps.set-version.outputs.version }}
1916
steps:
20-
- name: Checkout repository
21-
uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
2220

23-
- name: Setup .NET 9 SDK
24-
uses: actions/setup-dotnet@v3
21+
- name: 🏷️ Generate semantic version from Git tag
22+
id: set-version
23+
run: |
24+
TAG=$(git describe --tags --abbrev=0)
25+
VERSION_BASE=${TAG#v}
26+
COUNT=$(git rev-list --count ${TAG}..HEAD)
27+
VERSION="$VERSION_BASE.$COUNT"
28+
echo "version=$VERSION" >> $GITHUB_OUTPUT
29+
echo "📦 Using version: $VERSION"
30+
31+
build-windows:
32+
name: Build Windows Desktop + CLI
33+
runs-on: windows-latest
34+
needs: version
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: actions/setup-dotnet@v4
2538
with:
26-
dotnet-version: '9.0.x'
39+
dotnet-version: 8.0.x
40+
41+
- name: Install MAUI workloads
42+
run: |
43+
dotnet workload update
44+
dotnet workload install maui
45+
dotnet workload install maui-windows
2746
2847
- name: Restore dependencies
2948
run: dotnet restore
3049

31-
- name: Publish single-file executable for ${{ matrix.runtime }}
50+
- name: Build Windows MSIX
51+
run: |
52+
dotnet publish ./src/GUI/GUI.csproj -f net8.0-windows10.0.19041.0 -c Release `
53+
-p:Version=${{ needs.version.outputs.version }} `
54+
-p:WindowsPackageType=MSIX `
55+
-p:GenerateAppxPackageOnBuild=true
56+
57+
- name: Build CLI
58+
run: dotnet publish ./src/CLI/CLI.csproj -c Release -r win-x64 --self-contained true -p:Version=${{ needs.version.outputs.version }} -o ./cli-publish
59+
60+
- name: Package Windows MSIX
61+
shell: pwsh
3262
run: |
33-
dotnet publish src/CLI \
34-
-c Release \
35-
-r ${{ matrix.runtime }} \
36-
--self-contained true \
37-
/p:PublishSingleFile=true \
38-
/p:IncludeAllContentForSelfExtract=true \
39-
-o ./publish/${{ matrix.runtime }}
40-
41-
- name: Upload artifact for ${{ matrix.runtime }}
42-
uses: actions/upload-artifact@v4
63+
$msix = Get-ChildItem -Path ./src/GUI/bin/Release/** -Recurse -Include "*.msix" | Select-Object -First 1
64+
Compress-Archive -Path $msix.FullName -DestinationPath DrumMidiRemapper-Windows-${{ needs.version.outputs.version }}.zip
65+
66+
- uses: actions/upload-artifact@v4
67+
with:
68+
name: DrumMidiRemapper-Windows-${{ needs.version.outputs.version }}
69+
path: |
70+
DrumMidiRemapper-Windows-${{ needs.version.outputs.version }}.zip
71+
./cli-publish/**
72+
73+
build-macos:
74+
name: Build macOS Desktop + CLI
75+
runs-on: macos-latest
76+
needs: version
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: actions/setup-dotnet@v4
4380
with:
44-
name: DrumMidiRemapper-${{ matrix.runtime }}
45-
path: ./publish/${{ matrix.runtime }}
81+
dotnet-version: 8.0.x
4682

47-
- name: Upload Release Asset
48-
if: startsWith(github.ref, 'refs/tags/v')
49-
uses: softprops/action-gh-release@v2
83+
- uses: maxim-lobanov/setup-xcode@v1
5084
with:
51-
files: ./publish/${{ matrix.runtime }}/CLI*
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
xcode-version: 'latest'
86+
87+
- name: Install MAUI workloads
88+
run: |
89+
dotnet workload update
90+
dotnet workload install maui
91+
dotnet workload install maui-maccatalyst
92+
93+
- name: Restore dependencies
94+
run: dotnet workload restore
95+
96+
- name: Build MacCatalyst App
97+
run: dotnet publish ./src/GUI/GUI.csproj -f net8.0-maccatalyst -c Release -p:Version=${{ needs.version.outputs.version }}
98+
99+
- name: Create DMG Installer
100+
run: |
101+
brew install create-dmg
102+
APP_PATH=$(find ./src/GUI/bin/Release/net8.0-maccatalyst -name "*.app" | head -n 1)
103+
echo "Found app: $APP_PATH"
104+
105+
if [[ "$APP_PATH" == *" "* ]]; then
106+
APP_DIR=$(dirname "$APP_PATH")
107+
APP_NEW="$APP_DIR/DrumMidiRemapper.app"
108+
echo "Renaming app to: $APP_NEW"
109+
mv "$APP_PATH" "$APP_NEW"
110+
APP_PATH="$APP_NEW"
111+
fi
112+
113+
create-dmg \
114+
--volname "DrumMidiRemapper" \
115+
--window-pos 200 120 \
116+
--window-size 600 400 \
117+
--no-internet-enable \
118+
--skip-jenkins \
119+
--icon-size 100 \
120+
--icon "$APP_PATH" 175 190 \
121+
--app-drop-link 425 190 \
122+
"DrumMidiRemapper-${{ needs.version.outputs.version }}.dmg" \
123+
"$APP_PATH"
124+
125+
- name: Build CLI
126+
run: dotnet publish ./src/CLI/CLI.csproj -c Release -r osx-x64 --self-contained true -p:Version=${{ needs.version.outputs.version }} -o ./cli-publish
127+
128+
- uses: actions/upload-artifact@v4
129+
with:
130+
name: DrumMidiRemapper-macOS-${{ needs.version.outputs.version }}
131+
path: |
132+
DrumMidiRemapper-${{ needs.version.outputs.version }}.dmg
133+
./cli-publish/**
134+
135+
# build-linux:
136+
# name: Build Linux CLI only
137+
# runs-on: ubuntu-latest
138+
# needs: version
139+
# steps:
140+
# - uses: actions/checkout@v4
141+
# - uses: actions/setup-dotnet@v4
142+
# with:
143+
# dotnet-version: 8.0.x
144+
145+
# - name: Restore dependencies
146+
# run: dotnet restore ./src/CLI/CLI.csproj
147+
148+
# - name: Build CLI Linux
149+
# run: dotnet publish ./src/CLI/CLI.csproj -c Release --framework net8.0 --self-contained true -p:Version=${{ needs.version.outputs.version }} -o ./cli-publish --no-restore
150+
151+
# - uses: actions/upload-artifact@v4
152+
# with:
153+
# name: DrumMidiRemapper-LinuxCLI-${{ needs.version.outputs.version }}
154+
# path: ./cli-publish/**

.github/workflows/pr-validation.yml

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,4 +483,4 @@ $RECYCLE.BIN/
483483
# Vim temporary swap files
484484
*.swp
485485

486-
midis/**
486+
**/midis/**

.vscode/launch.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
52
"version": "0.2.0",
63
"configurations": [
74
{
8-
"name": ".NET Core Attach",
9-
"type": "coreclr",
10-
"request": "attach"
11-
},
12-
{
13-
"name": ".NET Core Launch (console)",
5+
"name": "Launch CLI",
146
"type": "coreclr",
157
"request": "launch",
16-
"preLaunchTask": "build",
17-
"program": "${workspaceFolder}/src/CLI/bin/Debug/net9.0/CLI.dll",
18-
"args": [],
8+
"program": "${workspaceFolder}/src/CLI/bin/Debug/net8.0/CLI",
199
"cwd": "${workspaceFolder}/src/CLI",
20-
"console": "internalConsole",
21-
"stopAtEntry": false
10+
"args": [
11+
"GuitarPro",
12+
"StevenSlate",
13+
"${workspaceFolder}/midis/test.mid"
14+
],
15+
"console": "integratedTerminal"
2216
},
2317
{
24-
"name": ".NET Core Attach",
18+
"name": "Launch GUI (Mac Catalyst)",
2519
"type": "coreclr",
26-
"request": "attach"
20+
"request": "launch",
21+
"preLaunchTask": "build GUI (Mac Catalyst)",
22+
"program": "${workspaceFolder}/src/GUI/bin/Debug/net8.0-maccatalyst/maccatalyst-arm64/DrumMidiRemapper.app/Contents/MacOS/DrumMidiRemapper",
23+
"cwd": "${workspaceFolder}/src/GUI",
24+
"internalConsoleOptions": "openOnSessionStart",
25+
"env": {
26+
"DOTNET_ROOT": "/usr/local/share/dotnet"
27+
}
2728
}
2829
]
2930
}

.vscode/tasks.json

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,14 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"label": "build",
5+
"label": "build GUI (Mac Catalyst)",
66
"command": "dotnet",
77
"type": "process",
88
"args": [
99
"build",
10-
"${workspaceFolder}/drum-midi-remapper.sln",
11-
"/property:GenerateFullPaths=true",
12-
"/consoleloggerparameters:NoSummary;ForceNoAlign"
13-
],
14-
"problemMatcher": "$msCompile"
15-
},
16-
{
17-
"label": "publish",
18-
"command": "dotnet",
19-
"type": "process",
20-
"args": [
21-
"publish",
22-
"${workspaceFolder}/drum-midi-remapper.sln",
23-
"/property:GenerateFullPaths=true",
24-
"/consoleloggerparameters:NoSummary;ForceNoAlign"
25-
],
26-
"problemMatcher": "$msCompile"
27-
},
28-
{
29-
"label": "watch",
30-
"command": "dotnet",
31-
"type": "process",
32-
"args": [
33-
"watch",
34-
"run",
35-
"--project",
36-
"${workspaceFolder}/drum-midi-remapper.sln"
10+
"${workspaceFolder}/src/GUI/GUI.csproj",
11+
"-f",
12+
"net8.0-maccatalyst"
3713
],
3814
"problemMatcher": "$msCompile"
3915
}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Drum MIDI Remapper
22

3-
A **.NET 9** cross-platform tool for remapping MIDI drum notes between different standards and custom mappings. Designed to help musicians and producers adapt MIDI drum tracks for compatibility with various drum kits, DAWs, and hardware.
3+
A **.NET 8** cross-platform tool for remapping MIDI drum notes between different standards and custom mappings. Designed to help musicians and producers adapt MIDI drum tracks for compatibility with various drum kits, DAWs, and hardware.
44

55
![Build Status](https://img.shields.io/github/actions/workflow/status/Abstractize/drum-midi-remapper/ci.yml?branch=main)
66
![License](https://img.shields.io/github/license/Abstractize/drum-midi-remapper)
@@ -22,7 +22,7 @@ dotnet run --project src/CLI -- GuitarPro StevenSlate midis/test.mid
2222

2323
## Requirements
2424

25-
- [.NET 9.0 SDK or newer](https://dotnet.microsoft.com/download)
25+
- [.NET 8.0 SDK or newer](https://dotnet.microsoft.com/download)
2626
- Compatible with Windows, macOS, and Linux
2727

2828
---
@@ -32,7 +32,7 @@ dotnet run --project src/CLI -- GuitarPro StevenSlate midis/test.mid
3232
- Remap MIDI drum notes using customizable JSON mapping files
3333
- Support for popular drum mapping standards (e.g., GuitarPro, StevenSlate, LogicPro, ProTools)
3434
- Batch processing of MIDI files via CLI
35-
- Cross-platform support powered by .NET 9
35+
- Cross-platform support powered by .NET 8
3636
- Modular architecture with Dependency Injection for easy extensibility
3737

3838
---
@@ -112,7 +112,7 @@ dotnet run --project src/CLI -- GuitarPro StevenSlate midis/test.mid
112112

113113
## Troubleshooting & FAQ
114114

115-
- **Build errors:** Ensure .NET 9 SDK is installed and your environment is configured correctly.
115+
- **Build errors:** Ensure .NET 8 SDK is installed and your environment is configured correctly.
116116
- **Mapping not found:** Verify spelling and that JSON mapping files exist in **Services/Resources/Maps/**.
117117
- **MIDI file issues:** Confirm your input file is a valid MIDI file and accessible.
118118

0 commit comments

Comments
 (0)